Plugins
turbulent_viscosity_fvcr.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2015: G-CSC, Goethe University Frankfurt
3  * Author: Christian Wehner
4  *
5  * This file is part of UG4.
6  *
7  * UG4 is free software: you can redistribute it and/or modify it under the
8  * terms of the GNU Lesser General Public License version 3 (as published by the
9  * Free Software Foundation) with the following additional attribution
10  * requirements (according to LGPL/GPL v3 §7):
11  *
12  * (1) The following notice must be displayed in the Appropriate Legal Notices
13  * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14  *
15  * (2) The following notice must be displayed at a prominent place in the
16  * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17  *
18  * (3) The following bibliography is recommended for citation and must be
19  * preserved in all covered files:
20  * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21  * parallel geometric multigrid solver on hierarchically distributed grids.
22  * Computing and visualization in science 16, 4 (2013), 151-164"
23  * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24  * flexible software system for simulating pde based models on high performance
25  * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26  *
27  * This program is distributed in the hope that it will be useful,
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  * GNU Lesser General Public License for more details.
31  */
32 
33 #ifndef __H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__FVCR__TURBULENT_VISCOSITY_DATA__
34 #define __H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__FVCR__TURBULENT_VISCOSITY_DATA__
35 
36 #include "common/common.h"
37 
48 #include "disc_constraint_fvcr.h"
49 
50 #ifdef UG_FOR_LUA
52 #endif
53 
54 namespace ug{
55 namespace NavierStokes{
56 
60 template <typename TData, int dim, typename TImpl,typename TGridFunction>
62 : public StdUserData<StdTurbulentViscosityData<TData,dim,TImpl,TGridFunction>, TData,dim>
63 {
65  typedef typename TGridFunction::domain_type domain_type;
66 
68  typedef typename TGridFunction::algebra_type algebra_type;
69 
72 
75 
77  typedef typename TGridFunction::template dim_traits<dim>::grid_base_object elem_type;
78 
80  typedef typename elem_type::side side_type;
81 
83  typedef typename TGridFunction::template dim_traits<dim>::const_iterator ElemIterator;
84 
86  typedef typename TGridFunction::template traits<side_type>::const_iterator SideIterator;
87 
91 
94 
98 
99  public:
100 
101  virtual void operator() (TData& value,
102  const MathVector<dim>& globIP,
103  number time, int si) const
104  {
105  UG_THROW("StdTurbulentViscosityData: Need element.");
106  }
107 
108  virtual void operator() (TData vValue[],
109  const MathVector<dim> vGlobIP[],
110  number time, int si, const size_t nip) const
111  {
112  UG_THROW("StdTurbulentViscosityData: Need element.");
113  }
114 
116 
117  // turbulent viscosity attachment
120 
121  // volume attachment
124 
125  // deformation tensor attachment
128 
129  static const size_t max_number_of_ips = 20;
130 
131  template <int refDim>
132  inline void evaluate(number vValue[],
133  const MathVector<dim> vGlobIP[],
134  number time, int si,
135  GridObject* elem,
136  const MathVector<dim> vCornerCoords[],
137  const MathVector<refDim> vLocIP[],
138  const size_t nip,
139  LocalVector* u,
140  const MathMatrix<refDim, dim>* vJT = NULL) const
141  {
142  // reference object id
143  ReferenceObjectID roid = elem->reference_object_id();
144 
145  typename grid_type::template traits<side_type>::secure_container sides;
146 
147  UG_ASSERT(dynamic_cast<elem_type*>(elem) != NULL, "Unsupported element type");
148 
149  m_grid->associated_elements_sorted(sides, static_cast<elem_type*>(elem) );
150 
151  // get trial space
152  try{
153  const LocalShapeFunctionSet<refDim>& rTrialSpace =
154  LocalFiniteElementProvider::get<refDim>(roid, LFEID(LFEID::CROUZEIX_RAVIART, refDim, 1));
155 
156  // memory for shapes
157  std::vector<number> vShape;
158 
159  // loop ips
160  for(size_t ip = 0; ip < nip; ++ip)
161  {
162  // evaluate at shapes at ip
163  rTrialSpace.shapes(vShape, vLocIP[ip]);
164 
165  // compute solution at integration point
166  vValue[ip] = 0.0;
167  for(size_t sh = 0; sh < vShape.size(); ++sh)
168  {
169  const number valSH = m_acTurbulentViscosity[sides[sh]];
170  vValue[ip] += valSH * vShape[sh];
171  }
172  // UG_LOG(ip << " " << vValue[ip] << "\n");
173  }
174 
175  }
176  UG_CATCH_THROW("TurbulentViscosityData: trial space missing, Reference Object: "
177  <<roid<<", Trial Space: CROUZEIX_RAVIART, refDim="<<refDim);
178 
179  number kinViscValues[max_number_of_ips];
180  (*m_imKinViscosity)(kinViscValues,
181  vGlobIP,
182  time, si,
183  elem,
184  vCornerCoords,
185  vLocIP,
186  nip,
187  u,
188  vJT);
189  for (size_t ip=0;ip < nip;ip++){
190  // UG_LOG("turbVis(" << ip << ")=" << vValue[ip] << "+" << kinViscValues[ip] << "\n");
191  vValue[ip] += kinViscValues[ip];
192  }
193  }
194 
195  virtual void compute(LocalVector* u, GridObject* elem,
196  const MathVector<dim> vCornerCoords[], bool bDeriv = false)
197  {
198  const int si = this->subset();
199  for(size_t s = 0; s < this->num_series(); ++s)
200  getImpl().template evaluate<dim>(this->values(s), this->ips(s), this->time(s), si,
201  elem, NULL, this->template local_ips<dim>(s),
202  this->num_ip(s), u);
203  }
204 
205  virtual void compute(LocalVectorTimeSeries* u, GridObject* elem,
206  const MathVector<dim> vCornerCoords[], bool bDeriv = false)
207  {
208  const int si = this->subset();
209  for(size_t s = 0; s < this->num_series(); ++s)
210  getImpl().template evaluate<dim>(this->values(s), this->ips(s), this->time(s), si,
211  elem, NULL, this->template local_ips<dim>(s),
212  this->num_ip(s), &(u->solution(this->time_point(s))));
213  }
214 
216  virtual bool continuous() const {return false;}
217 
219  virtual bool requires_grid_fct() const {return true;}
220 
222 
223  void addUiUjTerm(aSideTensor& aaDefTensor,const number factor,SmartPtr<TGridFunction> u,aSideDimVector* aaU);
224 
225  template <typename VType>
227 
228  template <typename VType>
230 
232 
233  void transferToLowerLevels(aSideNumber& aaData,ApproximationSpace<domain_type>& approximationSpace);
234 
235  void scaleTensorByNorm(aSideTensor& aaTensor);
236 
237  // set non-periodic boundaries so that viscosity can be set to zero there
238  void setTurbulenceZeroBoundaries(const char* subsets){
239  try{
240  m_turbZeroSg = m_uInfo->subset_grp_by_name(subsets);
241  }UG_CATCH_THROW("ERROR while parsing Subsets.");
242  }
243 
244  protected:
246  TImpl& getImpl() {return static_cast<TImpl&>(*this);}
247 
249  const TImpl& getImpl() const {return static_cast<const TImpl&>(*this);}
250 
251  // grid function
253 
254  // subset group
256 
258 
259 public:
267  m_imKinViscosity = user;
268  }
270  m_viscosityNumber = val;
272  }
273 #ifdef UG_FOR_LUA
274  void set_kinematic_viscosity(const char* fctName){
276  }
277 #endif
279 
280 protected:
283 
285 
286 };
287 
288 
289 template <typename TGridFunction>
291 : public StdTurbulentViscosityData<number, TGridFunction::dim,
292  CRSmagorinskyTurbViscData<TGridFunction>,TGridFunction >, virtual public INewtonUpdate
293  {
296 
299 
301  typedef typename TGridFunction::domain_type domain_type;
302 
304  typedef typename TGridFunction::algebra_type algebra_type;
305 
308 
310  static const int dim = domain_type::dim;
311 
314 
316  typedef typename TGridFunction::template dim_traits<dim>::grid_base_object elem_type;
317 
319  typedef typename elem_type::side side_type;
320 
322  typedef typename TGridFunction::template dim_traits<dim>::const_iterator ElemIterator;
323 
325  typedef typename TGridFunction::template traits<side_type>::const_iterator SideIterator;
326 
330 
333 
334  private:
335  // grid function
337 
338  using base_type::m_grid;
339 
340  // turbulent viscosity attachment
343 
344  // volume attachment
345  using base_type::m_acVolume;
346  using base_type::m_aVolume;
347 
348  // deformation tensor attachment
351 
352  // Smagorinsky model parameter, typical values [0.01 0.1]
354 
355  // approximation space for level and surface grid
357 
358  // periodic boundary manager
360 
361  public:
364  m_c = c;
365  m_u = spGridFct;
366  this->m_uInfo = m_u;
367  m_spApproxSpace = approxSpace;
368  domain_type& domain = *m_u->domain().get();
369  grid_type& grid = *domain.grid();
370  m_grid = &grid;
371  m_pbm = m_grid->periodic_boundary_manager();
372  // attachments
373  grid.template attach_to<side_type>(m_aTurbulentViscosity);
374  grid.template attach_to<side_type>(m_aVolume);
375  grid.template attach_to<side_type>(m_aDeformation);
376  // accessors
380 
381  }
382 
384  domain_type& domain = *m_u->domain().get();
385  grid_type& grid = *domain.grid();
386  grid.template detach_from<side_type>(m_aTurbulentViscosity);
387  grid.template detach_from<side_type>(m_aVolume);
388  grid.template detach_from<side_type>(m_aDeformation);
389  };
390 
392  m_c = c;
393  }
394 
396 
397  void update();
398 
399  protected:
404  };
405 
406 template <typename TGridFunction>
408 : public StdTurbulentViscosityData<number, TGridFunction::dim,
409  CRDynamicTurbViscData<TGridFunction>,TGridFunction >, virtual public INewtonUpdate
410  {
413 
416 
418  typedef typename TGridFunction::domain_type domain_type;
419 
421  typedef typename TGridFunction::algebra_type algebra_type;
422 
425 
427  static const int dim = domain_type::dim;
428 
431 
433  typedef typename TGridFunction::template dim_traits<dim>::grid_base_object elem_type;
434 
436  typedef typename elem_type::side side_type;
437 
439  typedef typename TGridFunction::template dim_traits<dim>::const_iterator ElemIterator;
440 
442  typedef typename TGridFunction::template traits<side_type>::const_iterator SideIterator;
443 
447 
450 
454 
455  private:
456 
457  static const number m_small;
458 
459  private:
460  // grid function
462 
463  using base_type::m_grid;
464 
465  // turbulent viscosity attachment
468 
469  // volume attachment
470  using base_type::m_acVolume;
471  using base_type::m_aVolume;
472 
473  // deformation tensor attachment
476 
477  // turbulent model parameter attachment
480 
481  // new turbulent model parameter attachment (needed in time filtering)
484 
485  // coarser grid volume attachment
488 
489  // filtered u attachment
492 
493  // coarser grid deformation tensor attachment
496 
497  // Leonard tensor attachment
500 
501  // Mij tensor attachment
504 
505  // approximation space for level and surface grid
507 
508  // periodic boundary manager
510 
511  public:
512  void init(SmartPtr<ApproximationSpace<domain_type> > approxSpace,SmartPtr<TGridFunction> spGridFct,bool spaceFilter,number timeFilterEps,bool bFixedRatio){
513  m_u = spGridFct;
514  this->m_uInfo = m_u;
515  m_spApproxSpace = approxSpace;
516  domain_type& domain = *m_u->domain().get();
517  grid_type& grid = *domain.grid();
518  m_grid = &grid;
519  m_pbm = m_grid->periodic_boundary_manager();
520  // attachments
521  grid.template attach_to<side_type>(m_aTurbulentViscosity);
522  grid.template attach_to<side_type>(m_aTurbulentC);
523  grid.template attach_to<side_type>(m_aTurbulentCNew);
524  grid.template attach_to<side_type>(m_aVolume);
525  grid.template attach_to<side_type>(m_aVolumeHat);
526  grid.template attach_to<side_type>(m_aUHat);
527  grid.template attach_to<side_type>(m_aDeformation);
528  grid.template attach_to<side_type>(m_aDeformationHat);
529  grid.template attach_to<side_type>(m_aLij);
530  grid.template attach_to<side_type>(m_aMij);
531  // accessors
542  m_spaceFilter=spaceFilter;
543  m_timeFilterEps=timeFilterEps;
544  if (timeFilterEps==1) m_timeFilter=false;
545  m_fixedRatio = bFixedRatio;
546  }
549  // use default settings for filtering of model constant c, use space filter, no time filter (timeFilter eps=1)
550  init(approxSpace,spGridFct,true,1,true);
551  }
552 
554  init(approxSpace,spGridFct,spaceFilter,timeFilter,true);
555  }
556 
557  CRDynamicTurbViscData(SmartPtr<ApproximationSpace<domain_type> > approxSpace,SmartPtr<TGridFunction> spGridFct,bool spaceFilter,bool timeFilter){
558  init(approxSpace,spGridFct,spaceFilter,1,true);
559  set_time_filter(timeFilter);
560  }
561 
563  domain_type& domain = *m_u->domain().get();
564  grid_type& grid = *domain.grid();
565  grid.template detach_from<side_type>(m_aTurbulentViscosity);
566  grid.template detach_from<side_type>(m_aTurbulentC);
567  grid.template detach_from<side_type>(m_aVolume);
568  grid.template detach_from<side_type>(m_aVolumeHat);
569  grid.template detach_from<side_type>(m_aUHat);
570  grid.template detach_from<side_type>(m_aDeformation);
571  grid.template detach_from<side_type>(m_aDeformationHat);
572  grid.template detach_from<side_type>(m_aLij);
573  grid.template detach_from<side_type>(m_aMij);
574  };
575 
579 
580  // fixed ratio boolean \hat{delta} / delta
582  // value \hat{delta} / delta
583  static const number m_kappa;
584 
586 
587  void update();
588 
589  void set_space_filter(bool b){
590  m_spaceFilter=b;
591  }
592  void set_time_filter(bool b){
593  m_timeFilter=b;
594  m_timeFilterEps=0.001;
595  }
597  if (eps!=1)
598  m_timeFilter=true;
599  else
600  m_timeFilter=false;
601  m_timeFilterEps=eps;
602  }
603  protected:
607  };
608 
609 template <typename TGridFunction>
611 template <typename TGridFunction>
613 
614 } // namespace NavierStokes
615 } // end namespace ug
616 
617 // include implementation
619 
620 #endif /* __H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__FVCR__TURBULENT_VISCOSITY_DATA__ */
function NavierStokes(fcts, subsets, discType)
TGridFunction * get()
TData & value(size_t s, size_t ip)
size_t num_ip(size_t s) const
virtual ReferenceObjectID reference_object_id() const=0
const MathVector< dim > & ip(size_t s, size_t ip) const
int subset() const
number time() const
const MathVector< dim > * ips(size_t s) const
virtual void shapes(std::vector< std::vector< shape_type > > &vvShape, const std::vector< MathVector< dim > > &vLocPos) const=0
LocalVector & solution(size_t i)
Definition: turbulent_viscosity_fvcr.h:410
static const number m_small
Definition: turbulent_viscosity_fvcr.h:457
ANumber m_aVolumeHat
Definition: turbulent_viscosity_fvcr.h:487
virtual ~CRDynamicTurbViscData()
Definition: turbulent_viscosity_fvcr.h:562
ATensor m_aLij
Definition: turbulent_viscosity_fvcr.h:499
void set_space_filter(bool b)
Definition: turbulent_viscosity_fvcr.h:589
MathVector< dim > vecDim
Definition: turbulent_viscosity_fvcr.h:448
TGridFunction::domain_type domain_type
domain type
Definition: turbulent_viscosity_fvcr.h:418
static const number m_kappa
Definition: turbulent_viscosity_fvcr.h:583
TGridFunction::algebra_type algebra_type
algebra type
Definition: turbulent_viscosity_fvcr.h:421
bool m_bAdaptive
Definition: turbulent_viscosity_fvcr.h:585
TGridFunction::template dim_traits< dim >::const_iterator ElemIterator
element iterator
Definition: turbulent_viscosity_fvcr.h:439
ATensor m_aMij
Definition: turbulent_viscosity_fvcr.h:503
SmartPtr< ApproximationSpace< domain_type > > m_spApproxSpace
Definition: turbulent_viscosity_fvcr.h:506
aSideTensor m_acDeformationHat
Definition: turbulent_viscosity_fvcr.h:494
Attachment< vecDim > AMathVectorDim
Definition: turbulent_viscosity_fvcr.h:449
aSideNumber m_acTurbulentCNew
Definition: turbulent_viscosity_fvcr.h:482
aSideTensor m_acMij
Definition: turbulent_viscosity_fvcr.h:502
domain_type::position_accessor_type position_accessor_type
position accessor type
Definition: turbulent_viscosity_fvcr.h:424
PeriodicBoundaryManager * m_pbm
Definition: turbulent_viscosity_fvcr.h:509
number m_timeFilterEps
Definition: turbulent_viscosity_fvcr.h:578
ANumber m_aTurbulentCNew
Definition: turbulent_viscosity_fvcr.h:483
domain_type::grid_type grid_type
grid type
Definition: turbulent_viscosity_fvcr.h:430
bool m_fixedRatio
Definition: turbulent_viscosity_fvcr.h:581
PeriodicAttachmentAccessor< side_type, ATensor > aSideTensor
Definition: turbulent_viscosity_fvcr.h:452
static const int dim
world dimension
Definition: turbulent_viscosity_fvcr.h:427
elem_type::side side_type
side type
Definition: turbulent_viscosity_fvcr.h:436
CRDynamicTurbViscData(SmartPtr< ApproximationSpace< domain_type > > approxSpace, SmartPtr< TGridFunction > spGridFct, bool spaceFilter, number timeFilter)
Definition: turbulent_viscosity_fvcr.h:553
CRDynamicTurbViscData< TGridFunction > this_type
own type
Definition: turbulent_viscosity_fvcr.h:412
aSideNumber m_acVolumeHat
Definition: turbulent_viscosity_fvcr.h:486
bool m_timeFilter
Definition: turbulent_viscosity_fvcr.h:577
CRDynamicTurbViscData(SmartPtr< ApproximationSpace< domain_type > > approxSpace, SmartPtr< TGridFunction > spGridFct, bool spaceFilter, bool timeFilter)
Definition: turbulent_viscosity_fvcr.h:557
AMathVectorDim m_aUHat
Definition: turbulent_viscosity_fvcr.h:491
Attachment< dimMat > ATensor
Definition: turbulent_viscosity_fvcr.h:446
aSideDimVector m_acUHat
Definition: turbulent_viscosity_fvcr.h:490
PeriodicAttachmentAccessor< side_type, AMathVectorDim > aSideDimVector
Definition: turbulent_viscosity_fvcr.h:453
aSideTensor m_acLij
Definition: turbulent_viscosity_fvcr.h:498
void set_time_filter(bool b)
Definition: turbulent_viscosity_fvcr.h:592
SmartPtr< TGridFunction > m_u
Definition: turbulent_viscosity_fvcr.h:461
void init(SmartPtr< ApproximationSpace< domain_type > > approxSpace, SmartPtr< TGridFunction > spGridFct, bool spaceFilter, number timeFilterEps, bool bFixedRatio)
Definition: turbulent_viscosity_fvcr.h:512
TGridFunction::template dim_traits< dim >::grid_base_object elem_type
element type
Definition: turbulent_viscosity_fvcr.h:433
ANumber m_aTurbulentC
Definition: turbulent_viscosity_fvcr.h:479
TGridFunction::template traits< side_type >::const_iterator SideIterator
side iterator
Definition: turbulent_viscosity_fvcr.h:442
void set_time_filter_eps(number eps)
Definition: turbulent_viscosity_fvcr.h:596
StdTurbulentViscosityData< number, TGridFunction::dim, this_type, TGridFunction > base_type
base class type
Definition: turbulent_viscosity_fvcr.h:415
void update()
Definition: turbulent_viscosity_fvcr_impl.h:679
PeriodicAttachmentAccessor< side_type, ANumber > aSideNumber
Definition: turbulent_viscosity_fvcr.h:451
MathSymmetricMatrix< dim > dimMat
attachment accessor types
Definition: turbulent_viscosity_fvcr.h:445
aSideNumber m_acTurbulentC
Definition: turbulent_viscosity_fvcr.h:478
bool m_spaceFilter
Definition: turbulent_viscosity_fvcr.h:574
ATensor m_aDeformationHat
Definition: turbulent_viscosity_fvcr.h:495
CRDynamicTurbViscData(SmartPtr< ApproximationSpace< domain_type > > approxSpace, SmartPtr< TGridFunction > spGridFct)
constructor
Definition: turbulent_viscosity_fvcr.h:548
Definition: turbulent_viscosity_fvcr.h:293
CRSmagorinskyTurbViscData< TGridFunction > this_type
own type
Definition: turbulent_viscosity_fvcr.h:295
number m_c
Definition: turbulent_viscosity_fvcr.h:353
domain_type::position_accessor_type position_accessor_type
position accessor type
Definition: turbulent_viscosity_fvcr.h:307
TGridFunction::domain_type domain_type
domain type
Definition: turbulent_viscosity_fvcr.h:301
TGridFunction::template dim_traits< dim >::const_iterator ElemIterator
element iterator
Definition: turbulent_viscosity_fvcr.h:322
PeriodicAttachmentAccessor< side_type, ATensor > aSideTensor
Definition: turbulent_viscosity_fvcr.h:332
TGridFunction::template traits< side_type >::const_iterator SideIterator
side iterator
Definition: turbulent_viscosity_fvcr.h:325
bool m_bAdaptive
Definition: turbulent_viscosity_fvcr.h:395
void update()
Definition: turbulent_viscosity_fvcr_impl.h:639
virtual ~CRSmagorinskyTurbViscData()
Definition: turbulent_viscosity_fvcr.h:383
domain_type::grid_type grid_type
grid type
Definition: turbulent_viscosity_fvcr.h:313
elem_type::side side_type
side type
Definition: turbulent_viscosity_fvcr.h:319
void set_model_parameter(number c)
Definition: turbulent_viscosity_fvcr.h:391
SmartPtr< TGridFunction > m_u
Definition: turbulent_viscosity_fvcr.h:336
SmartPtr< ApproximationSpace< domain_type > > m_spApproxSpace
Definition: turbulent_viscosity_fvcr.h:356
CRSmagorinskyTurbViscData(SmartPtr< ApproximationSpace< domain_type > > approxSpace, SmartPtr< TGridFunction > spGridFct, number c=0.05)
constructor
Definition: turbulent_viscosity_fvcr.h:363
StdTurbulentViscosityData< number, TGridFunction::dim, this_type, TGridFunction > base_type
base class type
Definition: turbulent_viscosity_fvcr.h:298
MathSymmetricMatrix< dim > dimMat
attachment accessor types
Definition: turbulent_viscosity_fvcr.h:328
static const int dim
world dimension
Definition: turbulent_viscosity_fvcr.h:310
TGridFunction::algebra_type algebra_type
algebra type
Definition: turbulent_viscosity_fvcr.h:304
Attachment< dimMat > ATensor
Definition: turbulent_viscosity_fvcr.h:329
PeriodicBoundaryManager * m_pbm
Definition: turbulent_viscosity_fvcr.h:359
PeriodicAttachmentAccessor< side_type, ANumber > aSideNumber
Definition: turbulent_viscosity_fvcr.h:331
TGridFunction::template dim_traits< dim >::grid_base_object elem_type
element type
Definition: turbulent_viscosity_fvcr.h:316
Definition: turbulent_viscosity_fvcr.h:63
TGridFunction::algebra_type algebra_type
algebra type
Definition: turbulent_viscosity_fvcr.h:68
TImpl & getImpl()
access to implementation
Definition: turbulent_viscosity_fvcr.h:246
ANumber m_aTurbulentViscosity
Definition: turbulent_viscosity_fvcr.h:119
TGridFunction::template traits< side_type >::const_iterator SideIterator
side iterator
Definition: turbulent_viscosity_fvcr.h:86
TGridFunction::domain_type domain_type
domain type
Definition: turbulent_viscosity_fvcr.h:65
Attachment< dimMat > ATensor
Definition: turbulent_viscosity_fvcr.h:90
ATensor m_aDeformation
Definition: turbulent_viscosity_fvcr.h:127
void transferToLowerLevels(aSideNumber &aaData, ApproximationSpace< domain_type > &approximationSpace)
Definition: turbulent_viscosity_fvcr_impl.h:40
static const size_t max_number_of_ips
Definition: turbulent_viscosity_fvcr.h:129
SubsetGroup m_turbZeroSg
Definition: turbulent_viscosity_fvcr.h:255
aSideNumber m_acTurbulentViscosity
Definition: turbulent_viscosity_fvcr.h:118
TGridFunction::template dim_traits< dim >::const_iterator ElemIterator
element iterator
Definition: turbulent_viscosity_fvcr.h:83
virtual bool requires_grid_fct() const
returns if grid function is needed for evaluation
Definition: turbulent_viscosity_fvcr.h:219
void addUiUjTerm(aSideTensor &aaDefTensor, const number factor, SmartPtr< TGridFunction > u, aSideDimVector *aaU)
Definition: turbulent_viscosity_fvcr_impl.h:598
MathSymmetricMatrix< dim > dimMat
attachment accessor types
Definition: turbulent_viscosity_fvcr.h:89
aSideTensor m_acDeformation
Definition: turbulent_viscosity_fvcr.h:126
SmartPtr< TGridFunction > m_uInfo
Definition: turbulent_viscosity_fvcr.h:252
elem_type::side side_type
side type
Definition: turbulent_viscosity_fvcr.h:80
void set_kinematic_viscosity(SmartPtr< CplUserData< number, dim > > user)
Definition: turbulent_viscosity_fvcr.h:266
bool m_bAdaptive
Definition: turbulent_viscosity_fvcr.h:257
void elementFilter(PeriodicAttachmentAccessor< side_type, Attachment< VType > > &aaUHat, aSideNumber &aaVol, SmartPtr< TGridFunction > u, PeriodicAttachmentAccessor< side_type, Attachment< VType > > *aaU)
Definition: turbulent_viscosity_fvcr_impl.h:109
void scaleTensorByNorm(aSideTensor &aaTensor)
Definition: turbulent_viscosity_fvcr_impl.h:575
PeriodicAttachmentAccessor< side_type, AMathVectorDim > aSideDimVector
Definition: turbulent_viscosity_fvcr.h:97
void fillAttachment(aSideDimVector &aaU, SmartPtr< TGridFunction > u)
Definition: turbulent_viscosity_fvcr_impl.h:66
void setTurbulenceZeroBoundaries(const char *subsets)
Definition: turbulent_viscosity_fvcr.h:238
number m_viscosityNumber
Definition: turbulent_viscosity_fvcr.h:284
void set_kinematic_viscosity(number val)
Definition: turbulent_viscosity_fvcr.h:269
SmartPtr< CplUserData< number, dim > > m_imKinViscosity
Data import for kinematic viscosity.
Definition: turbulent_viscosity_fvcr.h:282
virtual void compute(LocalVector *u, GridObject *elem, const MathVector< dim > vCornerCoords[], bool bDeriv=false)
Definition: turbulent_viscosity_fvcr.h:195
grid_type * m_grid
Definition: turbulent_viscosity_fvcr.h:115
PeriodicAttachmentAccessor< side_type, ATensor > aSideTensor
Definition: turbulent_viscosity_fvcr.h:96
void scvFilter(PeriodicAttachmentAccessor< side_type, Attachment< VType > > &aaUHat, aSideNumber &aaVol, SmartPtr< TGridFunction > u, PeriodicAttachmentAccessor< side_type, Attachment< VType > > *aaU)
Definition: turbulent_viscosity_fvcr_impl.h:262
const TImpl & getImpl() const
const access to implementation
Definition: turbulent_viscosity_fvcr.h:249
aSideNumber m_acVolume
Definition: turbulent_viscosity_fvcr.h:122
domain_type::grid_type grid_type
grid type
Definition: turbulent_viscosity_fvcr.h:74
MathVector< dim > vecDim
Definition: turbulent_viscosity_fvcr.h:92
virtual void compute(LocalVectorTimeSeries *u, GridObject *elem, const MathVector< dim > vCornerCoords[], bool bDeriv=false)
Definition: turbulent_viscosity_fvcr.h:205
void assembleDeformationTensor(aSideTensor &aaDefTensor, aSideNumber &aaVol, SmartPtr< TGridFunction > u, aSideDimVector *aaU)
Definition: turbulent_viscosity_fvcr_impl.h:406
domain_type::position_accessor_type position_accessor_type
position accessor type
Definition: turbulent_viscosity_fvcr.h:71
TGridFunction::template dim_traits< dim >::grid_base_object elem_type
element type
Definition: turbulent_viscosity_fvcr.h:77
void evaluate(number vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< refDim > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< refDim, dim > *vJT=NULL) const
Definition: turbulent_viscosity_fvcr.h:132
Attachment< vecDim > AMathVectorDim
Definition: turbulent_viscosity_fvcr.h:93
virtual void operator()(TData &value, const MathVector< dim > &globIP, number time, int si) const
Definition: turbulent_viscosity_fvcr.h:101
PeriodicAttachmentAccessor< side_type, ANumber > aSideNumber
Definition: turbulent_viscosity_fvcr.h:95
virtual bool continuous() const
returns if provided data is continuous over geometric object boundaries
Definition: turbulent_viscosity_fvcr.h:216
ANumber m_aVolume
Definition: turbulent_viscosity_fvcr.h:123
bool access(Grid &g, TAttachment &a)
Grid::VertexAttachmentAccessor< position_attachment_type > position_accessor_type
SmartPtr< TGrid > grid()
static const int dim
TGrid grid_type
StringTable s
#define UG_ASSERT(expr, msg)
#define UG_CATCH_THROW(msg)
#define UG_THROW(msg)
double number
ReferenceObjectID
SmartPtr< T, FreePolicy > make_sp(T *inst)