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.
apply_compressible_navier_stokes_boundary_conditions_process.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 author: Eduard Gómez
11 //
12 
13 #if !defined(KRATOS_APPLY_COMPRESSIBLE_NAVIER_STOKES_BOUNDARY_CONDITIONS_PROCESS_INCLUDED )
14 #define KRATOS_APPLY_COMPRESSIBLE_NAVIER_STOKES_BOUNDARY_CONDITIONS_PROCESS_INCLUDED
15 
16 
17 // System includes
18 #include <string>
19 #include <iostream>
20 
21 
22 // External includes
23 
24 
25 // Project includes
26 #include "includes/define.h"
28 #include "includes/model_part.h"
29 #include "processes/process.h"
30 #include "containers/model.h"
32 namespace Kratos
33 {
36 
39 
43 
47 
51 
55 
72  class KRATOS_API(FLUID_DYNAMICS_APPLICATION) ApplyCompressibleNavierStokesBoundaryConditionsProcess: public Process
73  {
74  public:
77  //
80 
96  {
97  public:
99  const std::string& rVariableName,
100  const double Value,
101  const IntervalUtility& rIntervalUtility);
107  void ActivateIfInsideTimeInterval(const double Time);
108 
114  void Enforce(NodeType& rNode) const;
115 
117  const Variable<double> & GetVariable() const;
118 
119  private:
120  const Variable<double> * mpVariable; // Variable to fix
121  const double mValue; // Value to enforce
122  IntervalUtility mInterval; // Interval to enforce in
123 
128  static void FixDof(const BoundaryConditionUtility& rUtility, NodeType& rNode);
129 
134  decltype(FixDof) * mEnforceInternal = nullptr;
135  };
136 
139 
143 
146 
147 
151 
152 
156 
157  void ExecuteInitialize() override;
158 
159  void ExecuteInitializeSolutionStep() override;
160 
161  void ExecuteFinalizeSolutionStep() override;
162 
163  const Parameters GetDefaultParameters() const override;
164 
168 
169 
173 
174 
178 
180  std::string Info() const override;
181 
183  void PrintInfo(std::ostream& rOStream) const override;
184 
188 
189 
191 
192  private:
195 
196 
200 
201  ModelPart * mpModelPart;
202  VectorVariable const * mpFlowDirectionVariable;
203  bool mRefreshNormalsEveryTimeStep;
204  std::vector<BoundaryConditionUtility> mSubsonicBCs = {};
205  std::vector<BoundaryConditionUtility> mSupersonicBCs = {};
206 
210 
211 
215 
220  void ReadBoundaryCondition(std::vector<BoundaryConditionUtility> & rBCList, Parameters Parameters);
221 
225 
226 
230 
231 
235 
237  ApplyCompressibleNavierStokesBoundaryConditionsProcess& operator=(ApplyCompressibleNavierStokesBoundaryConditionsProcess const& rOther);
238 
240  ApplyCompressibleNavierStokesBoundaryConditionsProcess(ApplyCompressibleNavierStokesBoundaryConditionsProcess const& rOther);
241 
242 
244 
245  }; // Class ApplyCompressibleNavierStokesBoundaryConditionsProcess
246 
248 
251 
252 
256 
257 
259  inline std::ostream& operator << (
260  std::ostream& rOStream,
261  const ApplyCompressibleNavierStokesBoundaryConditionsProcess& rThis);
262 
264 
266 
267 } // namespace Kratos.
268 
269 #endif // KRATOS_APPLY_COMPRESSIBLE_NAVIER_STOKES_BOUNDARY_CONDITIONS_PROCESS_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: periodic_interface_process.hpp:55
void ExecuteInitialize() override
Definition: periodic_interface_process.hpp:37
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
This class validates and manages a variable to fix and the value to fix it to.
Definition: apply_compressible_navier_stokes_boundary_conditions_process.h:96
This process applies diferent boundary conditions accoring to the mach regime. Parameters:
Definition: apply_compressible_navier_stokes_boundary_conditions_process.h:73
KRATOS_CLASS_POINTER_DEFINITION(ApplyCompressibleNavierStokesBoundaryConditionsProcess)
Pointer definition of ApplyCompressibleNavierStokesBoundaryConditionsProcess.
ModelPart::NodeType NodeType
Definition: apply_compressible_navier_stokes_boundary_conditions_process.h:78
Variable< array_1d< double, 3 > > VectorVariable
Definition: apply_compressible_navier_stokes_boundary_conditions_process.h:79
Definition: interval_utility.h:27
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
The base class for all processes in Kratos.
Definition: process.h:49
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
const TVariableType & GetVariable(Kernel &rKernel, const std::string &variable_name)
Definition: add_kernel_to_python.cpp:61
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432