13 #if !defined(KRATOS_SPALART_ALLMARAS_H_INCLUDED )
14 #define KRATOS_SPALART_ALLMARAS_H_INCLUDED
86 mIntegrationMethod(pGeometry->GetDefaultIntegrationMethod())
91 Element(NewId, pGeometry, pProperties),
92 mIntegrationMethod(pGeometry->GetDefaultIntegrationMethod())
98 mIntegrationMethod(ThisIntegrationMethod)
103 Element(NewId,pGeometry,pProperties),
104 mIntegrationMethod(ThisIntegrationMethod)
124 Element::Pointer
Create(
IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties)
const override;
177 std::string
Info()
const override
179 std::stringstream buffer;
189 rOStream <<
"Integration method: " <<
static_cast<int>(this->mIntegrationMethod);
196 rOStream <<
"Geometry Data: " << std::endl;
231 const double Weight);
236 const double Weight);
239 const double MolecularViscosity,
240 const double LastEddyViscosity,
242 const double Distance,
246 const double Weight);
254 const double Weight);
260 template<
class TVariableType >
265 rResult = rShapeFunc[0] * this->
GetGeometry()[0].FastGetSolutionStepValue(Var);
269 rResult += rShapeFunc[
i] * this->
GetGeometry()[
i].FastGetSolutionStepValue(Var);
314 std::vector< ShapeDerivativesType > mDN_DX;
329 void save(
Serializer& rSerializer)
const override
334 unsigned int IntMethod = 0;
335 switch(mIntegrationMethod)
353 KRATOS_ERROR <<
"Unknown integration method encountered on serializer save for SpalartAllmaras element: " <<
static_cast<int>(mIntegrationMethod) << std::endl;
356 rSerializer.
save(
"IntMethod",IntMethod);
357 rSerializer.
save(
"mDN_DX",mDN_DX);
358 rSerializer.
save(
"mDetJ",mDetJ);
366 unsigned int IntMethod = 0;
367 rSerializer.load(
"IntMethod",IntMethod);
368 switch(mIntegrationMethod)
386 KRATOS_ERROR <<
"Unknown integration method encountered on serializer load for SpalartAllmaras element: " <<
static_cast<int>(IntMethod) << std::endl;
389 rSerializer.load(
"mDN_DX",mDN_DX);
390 rSerializer.load(
"mDetJ",mDetJ);
452 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Elements.
Definition: element.h:60
std::size_t SizeType
Definition: element.h:94
Element(IndexType NewId=0)
Definition: element.h:121
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
Matrix MatrixType
Definition: element.h:90
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
std::size_t IndexType
Definition: flags.h:74
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Definition: geometry_data.h:60
IntegrationMethod
Definition: geometry_data.h:76
SizeType PointsNumber() const
Definition: geometry.h:528
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: geometry.h:3834
SizeType WorkingSpaceDimension() const
Definition: geometry.h:1287
IndexType Id() const
Definition: indexed_object.h:107
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
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Short class definition.
Definition: spalart_allmaras.h:59
void GetValuesVector(Vector &rValues, int Step=0) const override
Fill given vector with nodal values of the problem variable (TURBULENT_VISCOSITY)
Definition: spalart_allmaras.cpp:284
SpalartAllmaras(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using geometry and properties.
Definition: spalart_allmaras.h:90
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Evaluate the elemental contribution to the problem for turbulent viscosity.
Definition: spalart_allmaras.cpp:137
SpalartAllmaras(IndexType NewId, GeometryType::Pointer pGeometry, const Element::IntegrationMethod &ThisIntegrationMethod)
Additional constructor using a specific quadrature.
Definition: spalart_allmaras.h:96
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SpalartAllmaras)
Pointer definition of SpalartAllmaras.
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new SpalartAllmaras element and return a pointer to it.
Definition: spalart_allmaras.cpp:10
void VelocityGradientNorms(double &rNormS, double &rNormOmega, const ShapeDerivativesType &DN_DX)
Definition: spalart_allmaras.cpp:511
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Calculate Shape function derivatives for the element.
Definition: spalart_allmaras.cpp:65
SpalartAllmaras(IndexType NewId=0)
Default constructor.
Definition: spalart_allmaras.h:78
Kratos::Matrix ShapeDerivativesType
Type for shape function derivatives container.
Definition: spalart_allmaras.h:71
double MeasureOfVorticity(const ShapeDerivativesType &DN_DX)
Definition: spalart_allmaras.cpp:488
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Fill given array with containing the element's degrees of freedom.
Definition: spalart_allmaras.cpp:261
Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Create a new SpalartAllmaras element and return a pointer to it.
SpalartAllmaras(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties, const Element::IntegrationMethod &ThisIntegrationMethod)
Additional constructor using a specific quadrature.
Definition: spalart_allmaras.h:102
void AddModelTerms(MatrixType &rLHS, const double MolecularViscosity, const double LastEddyViscosity, const array_1d< double, 3 > &rLastEddyViscosityGradient, const double Distance, const array_1d< double, 3 > &rVelocity, const ShapeFunctionsType &N, const ShapeDerivativesType &DN_DX, const double Weight)
Definition: spalart_allmaras.cpp:367
void InitializeElementData()
Definition: spalart_allmaras.cpp:299
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: spalart_allmaras.h:185
void AddStabilization(MatrixType &rLHS, VectorType &rRHS, const double Tau, const ShapeFunctionsType &N, const ShapeDerivativesType &DN_DX, const Vector &UGradN, const double Weight)
Definition: spalart_allmaras.cpp:450
double CalculateTau(double ElementSize, const ProcessInfo &rCurrentProcessInfo)
Definition: spalart_allmaras.cpp:546
void AddConvection(MatrixType &rLHS, const ShapeFunctionsType &N, const Vector &UGradN, const double Weight)
Definition: spalart_allmaras.cpp:351
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: spalart_allmaras.h:193
void InitializeSolutionStep(const ProcessInfo &rCurrentProcessInfo) override
Calculates the projection term for stabilization.
Definition: spalart_allmaras.cpp:74
SpalartAllmaras(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using a Geometry instance.
Definition: spalart_allmaras.h:84
double ElementSize()
Definition: spalart_allmaras.cpp:582
void EvaluateConvection(Vector &rResult, const array_1d< double, 3 > &rConvVel, const ShapeDerivativesType &DN_DX)
Definition: spalart_allmaras.cpp:471
~SpalartAllmaras() override
Destructor.
Definition: spalart_allmaras.h:108
std::string Info() const override
Turn back information as a string.
Definition: spalart_allmaras.h:177
void EvaluateInPoint(TVariableType &rResult, const Kratos::Variable< TVariableType > &Var, const ShapeFunctionsType &rShapeFunc)
Definition: spalart_allmaras.h:261
friend class Serializer
Definition: spalart_allmaras.h:327
void AddMassTerm(MatrixType &rMassMatrix, const ShapeFunctionsType &N, const double Weight)
Definition: spalart_allmaras.cpp:331
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: spalart_allmaras.cpp:255
void EquationIdVector(Element::EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Fill given vector with the linear system row index for the element's degrees of freedom.
Definition: spalart_allmaras.cpp:273
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Check that all required data containers are properly initialized and registered in Kratos.
Definition: spalart_allmaras.cpp:20
Kratos::Vector ShapeFunctionsType
Type for shape function values container.
Definition: spalart_allmaras.h:68
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
#define KRATOS_ERROR
Definition: exception.h:161
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
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
def load(f)
Definition: ode_solve.py:307
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17