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.
fluid_characteristic_numbers_utilities.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Ruben Zorrilla
11 //
12 //
13 
14 #ifndef KRATOS_FLUID_CHARACTERISTIC_NUMBERS_UTILITIES_H
15 #define KRATOS_FLUID_CHARACTERISTIC_NUMBERS_UTILITIES_H
16 
17 // System includes
18 #include <utility>
19 
20 // External includes
21 
22 
23 // Project includes
24 #include "includes/define.h"
25 #include "includes/model_part.h"
27 
28 // Application includes
29 
30 
31 namespace Kratos
32 {
33 
36 
39 
45 class KRATOS_API(FLUID_DYNAMICS_APPLICATION) FluidCharacteristicNumbersUtilities
46 {
47 public:
48 
51 
54 
56  typedef std::function<double(const Geometry<Node>&)> ElementSizeFunctionType;
57 
61 
64 
68 
74  static void CalculateLocalCFL(ModelPart& rModelPart);
75 
84  static double CalculateElementCFL(
85  const Element &rElement,
86  const ElementSizeFunctionType& rElementSizeCalculator,
87  const double Dt);
88 
89 
98  static double CalculateElementCFLWithSoundVelocity(
99  const Element &rElement,
100  const ElementSizeFunctionType& rElementSizeCalculator,
101  const double Dt);
102 
103 
111  template<bool ConsiderArtificialMagnitudes>
112  static double CalculateElementPrandtlNumber(const Element& rElement);
113 
123  template<bool ConsiderArtificialMagnitudes, bool DensityIsNodal>
124  static std::pair<double,double> CalculateElementPecletNumbers(
125  const Element& rElement,
126  const ElementSizeFunctionType& rElementSizeCalculator);
127 
136  template<bool ConsiderArtificialMagnitudes, bool DensityIsNodal>
137  static double CalculateElementViscousPecletNumber(
138  const Element& rElement,
139  const ElementSizeFunctionType& rElementSizeCalculator);
140 
149  template<bool ConsiderArtificialMagnitudes, bool DensityIsNodal>
150  static double CalculateElementThermalPecletNumber(
151  const Element& rElement,
152  const ElementSizeFunctionType& rElementSizeCalculator);
153 
163  template<bool ConsiderArtificialMagnitudes, bool DensityIsNodal>
164  static std::pair<double,double> CalculateElementFourierNumbers(
165  const Element& rElement,
166  const ElementSizeFunctionType& rElementSizeCalculator,
167  const double Dt);
168 
177  template<bool ConsiderArtificialMagnitudes, bool DensityIsNodal>
178  static double CalculateElementViscousFourierNumber(
179  const Element& rElement,
180  const ElementSizeFunctionType& rElementSizeCalculator,
181  const double Dt);
182 
191  template<bool ConsiderArtificialMagnitudes, bool DensityIsNodal>
192  static double CalculateElementThermalFourierNumber(
193  const Element& rElement,
194  const ElementSizeFunctionType& rElementSizeCalculator,
195  const double Dt);
196 
205  static double CalculateElementMachNumber(const Element& rElement);
206 
214  static ElementSizeFunctionType GetMinimumElementSizeFunction(const Geometry<Node>& rGeometry);
215 
223  static ElementSizeFunctionType GetAverageElementSizeFunction(const Geometry<Node>& rGeometry);
224 
226 
227 private:
228 
232 
233  template<bool IsNodal>
234  static double AuxiliaryGetDensity(const Element& rElement);
235 
236  template<bool AddArtificialValues>
237  static std::pair<double,double> GetDiffusivityValues(const Element& rElement);
238 
239  template<bool AddArtificialValues>
240  static double GetDynamicViscosityValue(const Element& rElement);
241 
242  template<bool AddArtificialValues>
243  static double GetConductivityValue(const Element& rElement);
244 
246 };
247 
249 
251 
252 } // namespace Kratos.
253 
254 
255 #endif /* KRATOS_FLUID_CHARACTERISTIC_NUMBERS_UTILITIES_H */
Base class for all Elements.
Definition: element.h:60
Fluid characteristic numbers calculation utility This class provides static methods to calculate the ...
Definition: fluid_characteristic_numbers_utilities.h:46
std::function< double(const Geometry< Node > &)> ElementSizeFunctionType
Function type for the element size calculator function.
Definition: fluid_characteristic_numbers_utilities.h:56
KRATOS_CLASS_POINTER_DEFINITION(FluidCharacteristicNumbersUtilities)
Pointer definition of FluidCharacteristicNumbersUtilities.
FluidCharacteristicNumbersUtilities()=delete
Intentionally deleting default constructor.
Geometry base class.
Definition: geometry.h:71
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182
Dt
Definition: face_heat.py:78