KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::DynamicSmagorinskyUtils Class Reference

Helper class to dynamically determine a value for the Smagorinsly parameter. More...

#include <dynamic_smagorinsky_utilities.h>

Collaboration diagram for Kratos::DynamicSmagorinskyUtils:

Public Member Functions

Life Cycle
 DynamicSmagorinskyUtils (ModelPart &rModelPart, unsigned int DomainSize)
 Constructor. More...
 
 ~DynamicSmagorinskyUtils ()
 Destructor. More...
 
Operations
void StoreCoarseMesh ()
 Store current mesh as coarse mesh. Call before refining. More...
 
void CalculateC ()
 Provide a value for the Smagorinsky coefficient using the Variational Germano Identity. More...
 
void CorrectFlagValues (Variable< double > &rThisVariable=FLAG_VARIABLE)
 For the bridge analysis problem, correct the boundary flag after the refinement. More...
 

Detailed Description

Helper class to dynamically determine a value for the Smagorinsly parameter.

This class uses the Variational Germano Identity to determine a value for the Smagorinsky parameter. This value is stored in the elemental variable C_SMAGORINSKY, the element implementation is responsible for using it. The ability to assign different values to different patches of elements (identified by the PATCH_INDEX variable) is supported, although it tends to produce unreliable results due to a 0/0 indetermination in patches with smooth velocity fields.

This class is based in Oberai, A.A. and Wanderer, J., Variational formulation of the Germano identity for the Navier Stokes equations, Journal of Turbulence, 2005, vol 6. Note that the formulation described there requires a nested mesh. It takes the model part containing a coarse mesh as input and assumes that all elements will be subdivided before CalculateC() is called.

Remember to call StoreCoarseMesh before refining the element, otherwise the coarse mesh will be lost.

See also
VMS for an element implementation that uses the Smagorinsky model.
Local_Refine_Triangle_Mesh,Local_Refine_Tetrahedra_Mesh for the element refinement process.

Constructor & Destructor Documentation

◆ DynamicSmagorinskyUtils()

Kratos::DynamicSmagorinskyUtils::DynamicSmagorinskyUtils ( ModelPart rModelPart,
unsigned int  DomainSize 
)
inline

Constructor.

Parameters
rModelPartReference to the model part containing the coarse mesh
DomainSizeSpatial dimension (2 or 3)

◆ ~DynamicSmagorinskyUtils()

Kratos::DynamicSmagorinskyUtils::~DynamicSmagorinskyUtils ( )
inline

Destructor.

Member Function Documentation

◆ CalculateC()

void Kratos::DynamicSmagorinskyUtils::CalculateC ( )
inline

Provide a value for the Smagorinsky coefficient using the Variational Germano Identity.

◆ CorrectFlagValues()

void Kratos::DynamicSmagorinskyUtils::CorrectFlagValues ( Variable< double > &  rThisVariable = FLAG_VARIABLE)
inline

For the bridge analysis problem, correct the boundary flag after the refinement.

Remember to run this AFTER EACH REFINEMENT STEP Possible values for the variable: 1.0 inlet, 2.0 bridge surface, 3.0 outlet, 0.0 otherwise

Parameters
rThisVariableThe Kratos variable used to identify the boundary

◆ StoreCoarseMesh()

void Kratos::DynamicSmagorinskyUtils::StoreCoarseMesh ( )
inline

Store current mesh as coarse mesh. Call before refining.

If you are refining more than once, this only has to be called before last refinement.


The documentation for this class was generated from the following file: