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.
rans_variable_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: Suneth Warnakulasuriya
11 //
12 
13 #if !defined(KRATOS_RANS_VARIABLE_UTILS)
14 #define KRATOS_RANS_VARIABLE_UTILS
15 
16 /* System includes */
17 
18 /* External includes */
19 
20 /* Project includes */
21 #include "includes/model_part.h"
22 
23 namespace Kratos
24 {
27 
28 namespace RansVariableUtilities
29 {
30 
40 std::tuple<unsigned int, unsigned int> KRATOS_API(RANS_APPLICATION) ClipScalarVariable(
41  const double MinimumValue,
42  const double MaximumValue,
43  const Variable<double>& rVariable,
44  ModelPart& rModelPart);
45 
46 double KRATOS_API(RANS_APPLICATION) GetMinimumScalarValue(
47  const ModelPart& rModelPart,
48  const Variable<double>& rVariable);
49 
50 double KRATOS_API(RANS_APPLICATION) GetMaximumScalarValue(
51  const ModelPart& rModelPart,
52  const Variable<double>& rVariable);
53 
54 void KRATOS_API(RANS_APPLICATION) GetNodalVariablesVector(
55  Vector& rValues,
56  const ModelPart::NodesContainerType& rNodes,
57  const Variable<double>& rVariable);
58 
59 void KRATOS_API(RANS_APPLICATION) GetNodalArray(
60  Vector& rNodalValues,
61  const Element& rElement,
62  const Variable<double>& rVariable);
63 
64 template <typename TDataType>
65 KRATOS_API(RANS_APPLICATION)
67  ModelPart& rModelPart,
68  const Variable<TDataType>& rVariable,
69  const Flags& rFlag,
70  const bool FlagValue = true);
71 
72 KRATOS_API(RANS_APPLICATION)
73 void AddAnalysisStep(
74  ModelPart& rModelPart,
75  const std::string& rStepName);
76 
77 KRATOS_API(RANS_APPLICATION)
79  const ModelPart& rModelPart,
80  const std::string& rStepName);
81 
82 KRATOS_API(RANS_APPLICATION)
84  ModelPart& rModelPart);
85 
86 template <typename TDataType>
87 KRATOS_API(RANS_APPLICATION)
88 double GetVariableValueNorm(const TDataType& rValue);
89 
90 template <typename TDataType>
91 KRATOS_API(RANS_APPLICATION)
92 std::tuple<double, double> CalculateTransientVariableConvergence(
93  const ModelPart& rModelPart,
94  const Variable<TDataType>& rVariable);
95 
96 void KRATOS_API(RANS_APPLICATION) SetNodalVariables(
98  const Vector& rValues,
99  const Variable<double>& rVariable);
100 
101 void KRATOS_API(RANS_APPLICATION) CopyNodalSolutionStepVariablesList(
102  ModelPart& rOriginModelPart,
103  ModelPart& rDestinationModelPart);
104 
105 void KRATOS_API(RANS_APPLICATION)
107 
109 } // namespace RansVariableUtilities
110 
111 } /* namespace Kratos.*/
112 
113 #endif /* KRATOS_RANS_VARIABLE_UTILS defined */
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
std::tuple< double, double > CalculateTransientVariableConvergence(const ModelPart &rModelPart, const Variable< TDataType > &rVariable)
Definition: rans_variable_utilities.cpp:260
void SetElementConstitutiveLaws(ModelPart::ElementsContainerType &rElements)
Definition: rans_variable_utilities.cpp:307
void AddAnalysisStep(ModelPart &rModelPart, const std::string &rStepName)
Definition: rans_variable_utilities.cpp:207
void AssignBoundaryFlagsToGeometries(ModelPart &rModelPart)
Definition: rans_variable_utilities.cpp:235
double GetMaximumScalarValue(const ModelPart &rModelPart, const Variable< double > &rVariable)
Definition: rans_variable_utilities.cpp:98
void CopyNodalSolutionStepVariablesList(ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart)
Definition: rans_variable_utilities.cpp:168
bool IsAnalysisStepCompleted(const ModelPart &rModelPart, const std::string &rStepName)
Definition: rans_variable_utilities.cpp:219
void GetNodalVariablesVector(Vector &rValues, const ModelPart::NodesContainerType &rNodes, const Variable< double > &rVariable)
Definition: rans_variable_utilities.cpp:118
void GetNodalArray(Vector &rNodalValues, const Element &rElement, const Variable< double > &rVariable)
Definition: rans_variable_utilities.cpp:134
void SetNodalVariables(ModelPart::NodesContainerType &rNodes, const Vector &rValues, const Variable< double > &rVariable)
Definition: rans_variable_utilities.cpp:151
double GetVariableValueNorm(const double &rValue)
Definition: rans_variable_utilities.cpp:247
void AssignConditionVariableValuesToNodes(ModelPart &rModelPart, const Variable< TDataType > &rVariable, const Flags &rFlag, const bool FlagValue)
Definition: rans_variable_utilities.cpp:181
double GetMinimumScalarValue(const ModelPart &rModelPart, const Variable< double > &rVariable)
Definition: rans_variable_utilities.cpp:78
std::tuple< unsigned int, unsigned int > ClipScalarVariable(const double MinimumValue, const double MaximumValue, const Variable< double > &rVariable, ModelPart &rModelPart)
Clipping scalar variable for given lower and upper bounds.
Definition: rans_variable_utilities.cpp:35
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesContainerType
Definition: find_conditions_neighbours_process.h:44
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
ModelPart::ElementsContainerType ElementsContainerType
Definition: clear_contact_conditions_mesher_process.hpp:43
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
tuple const
Definition: ode_solve.py:403
namespace
Definition: array_1d.h:793