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_far_field_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 authors: Inigo Lopez and Marc Nunez
11 //
12 
13 #if !defined(KRATOS_APPLY_FAR_FIELD_PROCESS_H_INCLUDED )
14 #define KRATOS_APPLY_FAR_FIELD_PROCESS_H_INCLUDED
15 
16 // Project includes
17 #include "includes/model_part.h"
18 #include "processes/process.h"
20 
21 namespace Kratos
22 {
23 
26 
28 class KRATOS_API(COMPRESSIBLE_POTENTIAL_FLOW_APPLICATION) ApplyFarFieldProcess
29  : public Process
30 {
31 public:
34 
37 
38  typedef Node NodeType;
39 
43 
45  ApplyFarFieldProcess(ModelPart& rModelPart,
46  const double ReferencePotential,
47  const bool InitializeFlowField,
48  const bool PerturbationField);
49 
51  ApplyFarFieldProcess(ApplyFarFieldProcess const& rOther) = delete;
52 
54  ~ApplyFarFieldProcess() override = default;
55 
59 
62 
66 
68  void Execute() override;
69  void InitializeFlowField();
70  void FindFarthestUpstreamBoundaryNode();
71  void AssignFarFieldBoundaryConditions();
72  void AssignDirichletFarFieldBoundaryCondition(Geometry<NodeType>& rGeometry);
73  void AssignNeumannFarFieldBoundaryCondition(Condition& rCondition);
74 
78 
80  std::string Info() const override
81  {
82  return "ApplyFarFieldProcess";
83  }
84 
86  void PrintInfo(std::ostream& rOStream) const override
87  {
88  rOStream << "ApplyFarFieldProcess";
89  }
90 
92  void PrintData(std::ostream& rOStream) const override
93  {
94  }
95 
97 private:
100  ModelPart& mrModelPart;
101  NodeType::Pointer mpReferenceNode;
102  const double mReferencePotential = 1.0;
103  const bool mInitializeFlowField;
104  const bool mPerturbationField;
105  const array_1d<double,3> mFreeStreamVelocity;
109 
111 
112 }; // Class ApplyFarFieldProcess
113 
117 
119 inline std::istream& operator >> (std::istream& rIStream,
120  ApplyFarFieldProcess& rThis);
121 
123 inline std::ostream& operator << (std::ostream& rOStream,
124  const ApplyFarFieldProcess& rThis)
125 {
126  rThis.PrintInfo(rOStream);
127  rOStream << std::endl;
128  rThis.PrintData(rOStream);
129 
130  return rOStream;
131 }
133 
134 } // namespace Kratos.
135 
136 #endif // KRATOS_DEFINE_2D_WAKE_PROCESS_H_INCLUDED defined
Auxiliary process to define the wake in 2 dimensional problems.
Definition: apply_far_field_process.h:30
ApplyFarFieldProcess & operator=(ApplyFarFieldProcess const &rOther)=delete
Assignment operator.
ApplyFarFieldProcess(ApplyFarFieldProcess const &rOther)=delete
Copy constructor.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: apply_far_field_process.h:92
~ApplyFarFieldProcess() override=default
Destructor.
Node NodeType
Definition: apply_far_field_process.h:38
std::string Info() const override
Turn back information as a string.
Definition: apply_far_field_process.h:80
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: apply_far_field_process.h:86
KRATOS_CLASS_POINTER_DEFINITION(ApplyFarFieldProcess)
Pointer definition of ApplyFarFieldProcess.
Base class for all Conditions.
Definition: condition.h:59
Geometry base class.
Definition: geometry.h:71
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class defines the node.
Definition: node.h:65
The base class for all processes in Kratos.
Definition: process.h:49
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432