14 #if !defined(KRATOS_DYNAMIC_VMS_H_INCLUDED )
15 #define KRATOS_DYNAMIC_VMS_H_INCLUDED
104 template<
unsigned int TDim >
155 DynamicVMS(
IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
189 PropertiesType::Pointer pProperties)
const override;
199 GeometryType::Pointer pGeom,
200 PropertiesType::Pointer pProperties)
const override;
252 const ProcessInfo& rCurrentProcessInfo)
const override;
260 const ProcessInfo& rCurrentProcessInfo)
const override;
291 std::vector<double>& rValues,
302 std::vector<Vector>& rValues,
308 std::vector<Matrix>& rValues,
333 std::string
Info()
const override;
336 void PrintInfo(std::ostream& rOStream)
const override;
338 void PrintData(std::ostream &rOStream)
const override;
390 template<
typename TValueType >
398 rValue = rN[0] * rGeom[0].FastGetSolutionStepValue(rVariable);
399 for (
unsigned int i = 1;
i < NumNodes;
i++)
400 rValue += rN[
i] * rGeom[
i].FastGetSolutionStepValue(rVariable);
403 template<
typename TValueType >
407 const unsigned int Step)
412 rValue = rN[0] * rGeom[0].FastGetSolutionStepValue(rVariable,Step);
413 for (
unsigned int i = 1;
i < NumNodes;
i++)
414 rValue += rN[
i] * rGeom[
i].FastGetSolutionStepValue(rVariable,Step);
443 virtual double TauOne(
const double Density,
444 const double Viscosity,
445 const double ConvVel);
454 virtual double TauTwo(
const double Density,
455 const double Viscosity,
456 const double ConvVel);
466 virtual double TauTime(
const double Density,
467 const double Viscosity,
468 const double ConvVel,
472 virtual double InvTauTime(
const double Density,
473 const double Viscosity,
474 const double ConvVel,
479 const double Density,
484 const double Density,
524 static const double mSubscaleTol;
527 static const double mSubscaleRHSTol;
542 std::vector< array_1d<double,3> > mSubscaleVel;
545 std::vector< array_1d<double,3> > mOldSubscaleVel;
548 std::vector< unsigned int > mIterCount;
561 void save(
Serializer& rSerializer)
const override;
613 template<
unsigned int TDim >
621 template<
unsigned int TDim >
626 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
A stabilized element for the incompressible Navier-Stokes equations.
Definition: dynamic_vms.h:106
virtual void UpdateSubscale(const ProcessInfo &rCurrentProcessInfo)
Calculate the value of the subscale velocity for next iteration.
Definition: dynamic_vms.cpp:617
void GetFirstDerivativesVector(Vector &rValues, int Step=0) const override
Returns VELOCITY_X, VELOCITY_Y, (VELOCITY_Z,) PRESSURE for each node.
Definition: dynamic_vms.cpp:332
void GetSecondDerivativesVector(Vector &rValues, int Step=0) const override
Returns ACCELERATION_X, ACCELERATION_Y, (ACCELERATION_Z,) 0 for each node.
Definition: dynamic_vms.cpp:355
virtual void CalculateASGSVelocityContribution(MatrixType &rDampingMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: dynamic_vms.cpp:799
virtual void OSSMomentumResidual(array_1d< double, 3 > &rResult, const double Density, const array_1d< double, 3 > &rConvVel, const ShapeFunctionsType &rN)
Definition: dynamic_vms.cpp:1277
Kratos::Vector ShapeFunctionsType
Type for shape function values container.
Definition: dynamic_vms.h:115
virtual void EvaluateViscosity(double &rViscosity, const ShapeFunctionsType &rN)
Evaluate kinematic viscosity at the given area coordinates. This function is intended to be used for ...
Definition: dynamic_vms.cpp:1198
void EvaluateVorticity(array_1d< double, 3 > &rVorticity, const ShapeDerivativesType &rDN_DX)
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Initialize containters for subscales on integration points.
Definition: dynamic_vms.cpp:90
std::string Info() const override
Turn back information as a string.
Definition: dynamic_vms.cpp:552
virtual double TauTime(const double Density, const double Viscosity, const double ConvVel, const double Dt)
Calculate 1 / ( rho/dt + 1/TauOne )
Definition: dynamic_vms.cpp:1231
void Calculate(const Variable< array_1d< double, 3 > > &rVariable, array_1d< double, 3 > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: dynamic_vms.cpp:378
Kratos::Matrix ShapeDerivativesType
Type for shape function derivatives container.
Definition: dynamic_vms.h:118
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(DynamicVMS)
Pointer definition of DynamicVMS.
virtual void ConvectionOperator(Vector &rResult, const array_1d< double, 3 > &rConvVel)
Definition: dynamic_vms.cpp:1204
virtual void CalculateGeometryData()
Initialize shape functions derivatives and calculate the determinant of the element's Jacobian.
Definition: dynamic_vms.cpp:577
virtual void ASGSMomentumResidual(array_1d< double, 3 > &rResult, const double Density, const array_1d< double, 3 > &rConvVel, const ShapeFunctionsType &rN)
Definition: dynamic_vms.cpp:1249
~DynamicVMS() override
Destructor.
Definition: dynamic_vms.cpp:72
virtual void CalculateOSSVelocityContribution(MatrixType &rDampingMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: dynamic_vms.cpp:940
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: dynamic_vms.cpp:566
virtual double InvTauTime(const double Density, const double Viscosity, const double ConvVel, const double Dt)
Calculate 1 / TauTime.
Definition: dynamic_vms.cpp:1240
void EvaluateInPoint(TValueType &rValue, const Kratos::Variable< TValueType > &rVariable, const ShapeFunctionsType &rN)
Definition: dynamic_vms.h:391
virtual void DenseSystemSolve(const Matrix &rA, const Vector &rB, Vector &rX)
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Provides the global indices for each one of this element's local rows.
virtual void MassResidual(double &rResult)
Definition: dynamic_vms.cpp:1305
GeometryData::IntegrationMethod GetIntegrationMethod() const override
Accessor to the integration method.
Definition: dynamic_vms.cpp:545
virtual void LumpedMassMatrix(MatrixType &rMassMatrix)
Definition: dynamic_vms.cpp:1089
void EvaluateInPoint(TValueType &rValue, const Kratos::Variable< TValueType > &rVariable, const ShapeFunctionsType &rN, const unsigned int Step)
Definition: dynamic_vms.h:404
void CalculateLocalVelocityContribution(MatrixType &rDampingMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Computes the local contribution associated to 'new' velocity and pressure values.
Definition: dynamic_vms.cpp:149
void InitializeSolutionStep(const ProcessInfo &rCurrentProcessInfo) override
Prepare the element for a new solution step. Update the values on the subscales and evaluate elementa...
Definition: dynamic_vms.cpp:94
void InitializeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo) override
Calculate a new value for the velocity subscale.
Definition: dynamic_vms.cpp:104
void CalculateOnIntegrationPoints(const Variable< Vector > &rVariable, std::vector< Vector > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Empty implementation of unused CalculateOnIntegrationPoints overloads to avoid compilation warning.
Definition: dynamic_vms.h:301
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: dynamic_vms.cpp:560
void CalculateMassMatrix(MatrixType &rMassMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: dynamic_vms.cpp:161
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new element of this type.
Definition: dynamic_vms.cpp:77
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: dynamic_vms.cpp:135
void CalculateOnIntegrationPoints(const Variable< Matrix > &rVariable, std::vector< Matrix > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Empty implementation of unused CalculateOnIntegrationPoints overloads to avoid compilation warning.
Definition: dynamic_vms.h:307
void CalculateOnIntegrationPoints(const Variable< array_1d< double, 3 > > &rVariable, std::vector< array_1d< double, 3 > > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: dynamic_vms.cpp:493
virtual void AddViscousTerm(MatrixType &rDampingMatrix, const double Weight, const ShapeDerivativesType &rDN_DX)
virtual double TauTwo(const double Density, const double Viscosity, const double ConvVel)
Calculate pressure subscale stabilization parameter.
Definition: dynamic_vms.cpp:1225
void CalculateOnIntegrationPoints(const Variable< array_1d< double, 6 > > &rVariable, std::vector< array_1d< double, 6 > > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Empty implementation of unused CalculateOnIntegrationPoints overloads to avoid compilation warning.
Definition: dynamic_vms.h:295
virtual void LinearUpdateSubscale(const ProcessInfo &rCurrentProcessInfo)
Definition: dynamic_vms.cpp:747
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: dynamic_vms.cpp:114
void SetValuesOnIntegrationPoints(const Variable< double > &rVariable, const std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: dynamic_vms.cpp:514
virtual void EvaluateConvVelocity(array_1d< double, 3 > &rConvection, const ShapeFunctionsType &rN)
Definition: dynamic_vms.cpp:1173
virtual void ConsistentMassMatrix(MatrixType &rMassMatrix)
Definition: dynamic_vms.cpp:1126
virtual double TauOne(const double Density, const double Viscosity, const double ConvVel)
Calculate velocity subscale stabilization parameter.
Definition: dynamic_vms.cpp:1216
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Returns a list of the element's Dofs.
Base class for all Elements.
Definition: element.h:60
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
IntegrationMethod
Definition: geometry_data.h:76
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
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
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
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
Dt
Definition: face_heat.py:78
def load(f)
Definition: ode_solve.py:307
integer i
Definition: TensorModule.f:17