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.
embedded_transonic_perturbation_potential_flow_element.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: Marc Nuñez, Eloisa Baez Jones, Inigo Lopez and Riccardo Rossi
11 //
12 
13 #if !defined(KRATOS_EMBEDDED_TRANSONIC_PERTURBATION_POTENTIAL_FLOW_ELEMENT_H)
14 #define KRATOS_EMBEDDED_TRANSONIC_PERTURBATION_POTENTIAL_FLOW_ELEMENT_H
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
25 
26 namespace Kratos
27 {
30 
34 
38 
42 
46 
47 template <int TDim, int TNumNodes>
49 {
50 public:
53 
55 
56  typedef typename BaseType::SizeType SizeType;
57  typedef typename BaseType::IndexType IndexType;
61  typedef typename BaseType::VectorType VectorType;
62  typedef typename BaseType::MatrixType MatrixType;
65 
70 
74 
75  // Constructors.
76 
78 
82  {
83  }
84 
89  const NodesArrayType& ThisNodes)
90  : TransonicPerturbationPotentialFlowElement<TDim,TNumNodes>(NewId, ThisNodes)
91  {
92  }
93 
98  typename GeometryType::Pointer pGeometry)
99  : TransonicPerturbationPotentialFlowElement<TDim,TNumNodes>(NewId, pGeometry)
100  {
101  }
102 
107  typename GeometryType::Pointer pGeometry,
108  typename PropertiesType::Pointer pProperties)
109  : TransonicPerturbationPotentialFlowElement<TDim,TNumNodes>(NewId, pGeometry, pProperties)
110  {
111  }
112 
117 
122 
127  {
128  }
129 
133 
136 
139 
143 
144  Element::Pointer Create(IndexType NewId,
145  NodesArrayType const& ThisNodes,
146  typename PropertiesType::Pointer pProperties) const override;
147 
148  Element::Pointer Create(IndexType NewId,
149  typename GeometryType::Pointer pGeom,
150  typename PropertiesType::Pointer pProperties) const override;
151 
152  Element::Pointer Clone(IndexType NewId,
153  NodesArrayType const& ThisNodes) const override;
154 
155  void Initialize(const ProcessInfo& rCurrentProcessInfo) override;
156 
157  void CalculateRightHandSide(VectorType& rRightHandSideVector,
158  const ProcessInfo& rCurrentProcessInfo) override;
159 
160  void CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix,
161  const ProcessInfo& rCurrentProcessInfo) override;
162 
166 
167  void CalculateOnIntegrationPoints(const Variable<double>& rVariable,
168  std::vector<double>& rValues,
169  const ProcessInfo& rCurrentProcessInfo) override;
170 
171  void CalculateOnIntegrationPoints(const Variable<int>& rVariable,
172  std::vector<int>& rValues,
173  const ProcessInfo& rCurrentProcessInfo) override;
174 
176  std::vector<array_1d<double, 3>>& rValues,
177  const ProcessInfo& rCurrentProcessInfo) override;
178 
182 
183  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
184 
188 
190  std::string Info() const override;
191 
193  void PrintInfo(std::ostream& rOStream) const override;
194 
196  void PrintData(std::ostream& rOStream) const override;
197 
199 protected:
200 
201 
202  void CalculateLeftHandSideKuttaWakeElement(MatrixType& rLeftHandSideMatrix,
203  const ProcessInfo& rCurrentProcessInfo);
204 
205  void CalculateRightHandSideKuttaWakeElement(VectorType& rRightHandSideVector,
206  const ProcessInfo& rCurrentProcessInfo);
207 
209  const ProcessInfo& rCurrentProcessInfo,
210  const array_1d<double, TDim>& rVelocity,
211  const ElementalData& rData) override;
212 
214  const double rDensity,
215  const array_1d<double, TDim>& rVelocity) override;
216 
217 
218  void AssembleSupersonicLeftHandSide(MatrixType& rLeftHandSideMatrix,
219  const double densityDerivativeWRTVelocity,
220  const double densityDerivativeWRTUpwindVelocity,
222  const array_1d<double, TDim> upwindVelocity,
223  const ProcessInfo& rCurrentProcessInfo) override;
224 
225  ModifiedShapeFunctions::Pointer pGetModifiedShapeFunctions(Vector& rDistances);
226 
227  void FindUpwindElement(const ProcessInfo& rCurrentProcessInfo) override;
228 
229 private:
233 
234  void SelectUpwindElement(std::vector<IndexType>& rUpwindElementNodesIds,
235  GlobalPointersVector<Element>& rUpwindElementCandidates,
236  const ProcessInfo& rCurrentProcessInfo);
237 
241 
245 
246  friend class Serializer;
247 
248  void save(Serializer& rSerializer) const override;
249 
250  void load(Serializer& rSerializer) override;
251 
255 
259 
263 
265 
266 }; // Class EmbeddedTransonicPerturbationPotentialFlowElement
267 
269 
272 
276 
278 
279 } // namespace Kratos.
280 
281 #endif // KRATOS_TRANSONIC_PERTURBATION_POTENTIAL_FLOW_ELEMENT_H defined
Vector VectorType
Definition: element.h:88
std::size_t SizeType
Definition: element.h:94
Properties PropertiesType
Definition: element.h:80
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: element.h:86
Matrix MatrixType
Definition: element.h:90
Definition: embedded_transonic_perturbation_potential_flow_element.h:49
void CalculateLeftHandSideKuttaWakeElement(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:188
Element::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override
It creates a new element pointer and clones the previous element data.
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:50
void CalculateRightHandSideContribution(BoundedVector< double, TNumNodes > &rRhs_total, const double rDensity, const array_1d< double, TDim > &rVelocity) override
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:224
BaseType::GeometryType GeometryType
Definition: embedded_transonic_perturbation_potential_flow_element.h:58
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(EmbeddedTransonicPerturbationPotentialFlowElement)
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:104
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:69
void AssembleSupersonicLeftHandSide(MatrixType &rLeftHandSideMatrix, const double densityDerivativeWRTVelocity, const double densityDerivativeWRTUpwindVelocity, const array_1d< double, TDim > velocity, const array_1d< double, TDim > upwindVelocity, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:312
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:61
EmbeddedTransonicPerturbationPotentialFlowElement(IndexType NewId=0)
Default constuctor.
Definition: embedded_transonic_perturbation_potential_flow_element.h:81
EmbeddedTransonicPerturbationPotentialFlowElement & operator=(EmbeddedTransonicPerturbationPotentialFlowElement &&rOther)=delete
Move operator.
BaseType::SizeType SizeType
Definition: embedded_transonic_perturbation_potential_flow_element.h:56
TransonicPerturbationPotentialFlowElement< TDim, TNumNodes > BaseType
Definition: embedded_transonic_perturbation_potential_flow_element.h:54
BaseType::VectorType VectorType
Definition: embedded_transonic_perturbation_potential_flow_element.h:61
BaseType::IndexType IndexType
Definition: embedded_transonic_perturbation_potential_flow_element.h:57
void CalculateLeftHandSideContribution(BoundedMatrix< double, TNumNodes, TNumNodes > &rLhs_total, const ProcessInfo &rCurrentProcessInfo, const array_1d< double, TDim > &rVelocity, const ElementalData &rData) override
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:259
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:459
void CalculateRightHandSideKuttaWakeElement(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:145
void FindUpwindElement(const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:378
BaseType::PropertiesType PropertiesType
Definition: embedded_transonic_perturbation_potential_flow_element.h:59
BaseType::MatrixType MatrixType
Definition: embedded_transonic_perturbation_potential_flow_element.h:62
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, typename PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:27
EmbeddedTransonicPerturbationPotentialFlowElement(IndexType NewId, typename GeometryType::Pointer pGeometry, typename PropertiesType::Pointer pProperties)
Definition: embedded_transonic_perturbation_potential_flow_element.h:106
ModifiedShapeFunctions::Pointer pGetModifiedShapeFunctions(Vector &rDistances)
BaseType::GeometriesArrayType GeometriesArrayType
Definition: embedded_transonic_perturbation_potential_flow_element.h:63
EmbeddedTransonicPerturbationPotentialFlowElement(EmbeddedTransonicPerturbationPotentialFlowElement const &rOther)=delete
PotentialFlowUtilities::ElementalData< TNumNodes, TDim > ElementalData
Definition: embedded_transonic_perturbation_potential_flow_element.h:64
EmbeddedTransonicPerturbationPotentialFlowElement(IndexType NewId, typename GeometryType::Pointer pGeometry)
Definition: embedded_transonic_perturbation_potential_flow_element.h:97
void CalculateOnIntegrationPoints(const Variable< double > &rVariable, std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:486
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:531
std::string Info() const override
Turn back information as a string.
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:517
EmbeddedTransonicPerturbationPotentialFlowElement(IndexType NewId, const NodesArrayType &ThisNodes)
Definition: embedded_transonic_perturbation_potential_flow_element.h:88
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: embedded_transonic_perturbation_potential_flow_element.cpp:525
EmbeddedTransonicPerturbationPotentialFlowElement & operator=(EmbeddedTransonicPerturbationPotentialFlowElement const &rOther)=delete
Assignment operator.
EmbeddedTransonicPerturbationPotentialFlowElement(EmbeddedTransonicPerturbationPotentialFlowElement &&rOther)=delete
~EmbeddedTransonicPerturbationPotentialFlowElement() override
Definition: embedded_transonic_perturbation_potential_flow_element.h:126
BaseType::NodesArrayType NodesArrayType
Definition: embedded_transonic_perturbation_potential_flow_element.h:60
std::size_t IndexType
Definition: flags.h:74
std::size_t IndexType
Defines the index type.
Definition: geometrical_object.h:73
Geometry base class.
Definition: geometry.h:71
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Definition: transonic_perturbation_potential_flow_element.h:47
PointerVector< GeometryType > GeometriesArrayType
Definition: transonic_perturbation_potential_flow_element.h:54
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
float velocity
Definition: PecletTest.py:54
def load(f)
Definition: ode_solve.py:307
Definition: potential_flow_utilities.h:39