14 #if !defined(KRATOS_TWO_FLUID_VMS_H_INCLUDED )
15 #define KRATOS_TWO_FLUID_VMS_H_INCLUDED
25 #include "utilities/geometry_utilities.h"
77 template<
unsigned int TDim,
78 unsigned int TNumNodes = TDim + 1 >
167 PropertiesType::Pointer pProperties)
const override
169 return Kratos::make_intrusive< TwoFluidVMS >(NewId, (this->
GetGeometry()).
Create(ThisNodes), pProperties);
172 GeometryType::Pointer pGeom,
173 PropertiesType::Pointer pProperties)
const override
175 return Kratos::make_intrusive< TwoFluidVMS >(NewId, pGeom, pProperties);
190 const unsigned int local_size = (TDim+1)*(TDim+1);
205 KRATOS_THROW_ERROR(std::logic_error,
"MassMatrix function shall not be called when using this type of element",
"");
217 const unsigned int LocalSize = (TDim + 1) * TNumNodes;
219 const ProcessInfo& rConstProcessInfo = rCurrentProcessInfo;
223 if(rRightHandSideVector.size() != LocalSize)
224 rRightHandSideVector.
resize(LocalSize,
false);
228 if (rLeftHandSideMatrix.size1() != LocalSize)
229 rLeftHandSideMatrix.
resize(LocalSize, LocalSize,
false);
236 const Vector& BDFVector = rConstProcessInfo[BDF_COEFFICIENTS];
254 Vector distances(TNumNodes);
255 Matrix coords(TNumNodes, TDim);
262 std::vector< Matrix > gauss_gradients;
266 for (
unsigned int i = 0;
i < TNumNodes;
i++)
270 distances[
i] = this->
GetGeometry()[
i].FastGetSolutionStepValue(DISTANCE);
271 for (
unsigned int j = 0;
j < TDim;
j++)
272 coords(
i,
j) = xyz[
j];
280 const unsigned int nenrichments = Nenriched.size2();
286 Vector enriched_rhs(nenrichments,0.0);
289 double positive_volume = 0.0;
290 double negative_volume = 0.0;
298 volumes.
resize(IntegrationPoints.size(),
false);
302 volumes[g] = 6.0*Area * IntegrationPoints[g].Weight();
319 for (
unsigned int igauss = 0; igauss < Ngauss.size1(); igauss++)
321 double wGauss = volumes[igauss];
324 if(signs[igauss] > 0)
325 positive_volume += wGauss;
327 negative_volume += wGauss;
331 const double min_area_ratio = 1
e-6;
352 const double c1 = r_properties[LIN_DARCY_COEF];
353 const double c2 = r_properties[NONLIN_DARCY_COEF];
358 for (
unsigned int igauss = 0; igauss < Ngauss.size1(); igauss++)
361 for (
unsigned int k = 0;
k < TNumNodes;
k++)
362 N[
k] = Ngauss(igauss,
k);
363 double wGauss = volumes[igauss];
389 double TauOne, TauTwo;
394 this->
AddIntegrationPointVelocityContribution(rLeftHandSideMatrix, rRightHandSideVector, Density, Viscosity, AdvVel, DarcyTerm, TauOne, TauTwo,
N, DN_DX, wGauss);
412 for(
unsigned int jjj=0; jjj<(this->
GetGeometry()).size(); jjj++)
413 OldAcceleration +=
N[jjj] * BDFVector[
step] * (this->
GetGeometry())[jjj].FastGetSolutionStepValue(VELOCITY,
step);
416 for(
unsigned int enriched_id = 0; enriched_id < nenrichments; enriched_id++)
418 const Matrix& enriched_grad = gauss_gradients[igauss];
423 for (
unsigned int inode = 0; inode < TNumNodes; inode++)
425 int base_index = (TDim + 1) * inode;
429 for (
unsigned int k = 0;
k < TDim;
k++)
431 double convection_stab = wGauss * TauOne * enriched_grad(enriched_id,
k)* Density * AGradN[inode];
432 double darcy_stab = wGauss * TauOne * enriched_grad(enriched_id,
k) * DarcyTerm *
N[inode];
435 enrichment_terms_vertical(base_index +
k,enriched_id) += convection_stab - darcy_stab - wGauss * DN_DX(inode,
k) * Nenriched(igauss, enriched_id);
436 enrichment_terms_horizontal(enriched_id,base_index +
k) += convection_stab + darcy_stab + wGauss * DN_DX(inode,
k) * Nenriched(igauss, enriched_id);
441 for (
unsigned int k = 0;
k < TDim;
k++)
443 double temp = wGauss * TauOne* DN_DX(inode,
k) * enriched_grad(enriched_id,
k);
444 enrichment_terms_vertical(base_index + TDim,enriched_id) +=
temp;
445 enrichment_terms_horizontal(enriched_id,base_index + TDim) +=
temp;
448 for (
unsigned int k = 0;
k < TDim;
k++)
450 double coeff = wGauss * TauOne *Density * enriched_grad(enriched_id,
k)*
N[inode] * BDFVector[0];
451 enrichment_terms_horizontal(enriched_id,base_index +
k) +=
coeff;
459 for (
unsigned int k = 0;
k < TDim;
k++)
461 for(
unsigned int lll=0; lll<nenrichments; lll++)
463 enrichment_diagonal(enriched_id,lll) += wGauss * TauOne * enriched_grad(enriched_id,
k) * enriched_grad(lll,
k);
467 enriched_rhs[enriched_id] += wGauss * TauOne *Density * enriched_grad(enriched_id,
k)*(bf[
k]-OldAcceleration[
k]);
485 for (
unsigned int igauss = 0; igauss < Ngauss.size1(); igauss++)
488 for (
unsigned int k = 0;
k < TNumNodes;
k++)
489 N[
k] = Ngauss(igauss,
k);
490 double wGauss = volumes[igauss];
505 double TauOne,TauTwo;
509 this->
AddMassStabTerms(MassMatrix, Density, AdvVel, DarcyTerm, TauOne,
N, DN_DX, wGauss);
521 for(
unsigned int k = 0;
k<TNumNodes;
k++)
523 unsigned int base=
k*(TDim+1);
527 const double& bdf_coeff = BDFVector[
step];
528 aaa[base] += bdf_coeff*
u[0];
529 aaa[base+1] += bdf_coeff*
u[1];
530 aaa[base+2] += bdf_coeff*
u[2];
540 for (
unsigned int iNode = 0; iNode < TNumNodes; ++iNode)
543 for (
unsigned int d = 0;
d < TDim; ++
d)
545 U[LocalIndex] = rVel[
d];
548 U[LocalIndex] = this->
GetGeometry()[iNode].FastGetSolutionStepValue(PRESSURE);
551 noalias(rRightHandSideVector) -=
prod(rLeftHandSideMatrix, U);
561 if (positive_volume / Area > min_area_ratio && negative_volume / Area > min_area_ratio) {
563 noalias(enriched_rhs) -=
prod(enrichment_terms_horizontal,U);
565 double max_diag = 0.0;
566 for(
unsigned int k=0;
k<TDim+1;
k++)
567 if(fabs(enrichment_diagonal(
k,
k) ) > max_diag) max_diag = fabs(enrichment_diagonal(
k,
k) );
568 if(max_diag == 0) max_diag = 1.0;
570 for (
unsigned int i = 0;
i < TDim;
i++)
572 const double di = fabs(distances[
i]);
574 for (
unsigned int j =
i + 1;
j < TDim + 1;
j++)
576 const double dj = fabs(distances[
j]);
578 if (distances[
i] * distances[
j] < 0.0)
580 double sum_d = di + dj;
581 double Ni = dj / sum_d;
582 double Nj = di / sum_d;
584 double penalty_coeff = max_diag * 0.001;
585 enrichment_diagonal(
i,
i) += penalty_coeff * Ni*Ni;
586 enrichment_diagonal(
i,
j) -= penalty_coeff * Ni*Nj;
587 enrichment_diagonal(
j,
i) -= penalty_coeff * Nj*Ni;
588 enrichment_diagonal(
j,
j) += penalty_coeff * Nj*Nj;
594 Matrix inverse_diag(nenrichments, nenrichments);
598 Matrix tmp =
prod(inverse_diag, enrichment_terms_horizontal);
599 noalias(rLeftHandSideMatrix) -=
prod(enrichment_terms_vertical,
tmp);
601 Vector tmp2 =
prod(inverse_diag, enriched_rhs);
602 noalias(rRightHandSideVector) -=
prod(enrichment_terms_vertical, tmp2);
639 if (ErrorCode != 0)
return ErrorCode;
645 if (this->
GetGeometry()[
i].SolutionStepsDataHas(DISTANCE) ==
false)
647 if (this->
GetGeometry()[
i].SolutionStepsDataHas(VELOCITY) ==
false)
649 if (this->
GetGeometry()[
i].SolutionStepsDataHas(PRESSURE) ==
false)
651 if (this->
GetGeometry()[
i].SolutionStepsDataHas(MESH_VELOCITY) ==
false)
653 if (this->
GetGeometry()[
i].HasDofFor(VELOCITY_X) ==
false ||
654 this->
GetGeometry()[
i].HasDofFor(VELOCITY_Y) ==
false ||
657 if (this->
GetGeometry()[
i].HasDofFor(PRESSURE) ==
false)
686 std::string
Info()
const override
688 std::stringstream buffer;
689 buffer <<
"TwoFluidVMS #" << this->
Id();
695 rOStream <<
"TwoFluidVMS" << TDim <<
"D";
719 for (
unsigned int i = 0;
i < rMassMatrix.size1(); ++
i)
721 double diag_factor = 0.0;
722 for (
unsigned int j = 0;
j < rMassMatrix.size2(); ++
j)
724 diag_factor += rMassMatrix(
i,
j);
725 rMassMatrix(
i,
j) = 0.0;
727 rMassMatrix(
i,
i) = diag_factor;
745 const double Weight = 1.0)
749 rResult += Weight*
temp;
767 for (
unsigned int i = 0;
i < TNumNodes;
i++)
768 dist += rShapeFunc[
i] * this->
GetGeometry()[
i].FastGetSolutionStepValue(DISTANCE);
772 for (
unsigned int i = 0;
i < TNumNodes;
i++)
774 if ( (
dist * this->
GetGeometry()[
i].FastGetSolutionStepValue(DISTANCE)) > 0.0)
777 value += this->
GetGeometry()[
i].FastGetSolutionStepValue(rVariable);
800 const double Weight = 1.0)
804 rResult += Weight*
temp;
822 for (
unsigned int i = 0;
i < TNumNodes;
i++)
823 dist += rShapeFunc[
i] * this->
GetGeometry()[
i].FastGetSolutionStepValue(DISTANCE);
826 for (
unsigned int i = 0;
i < TNumNodes;
i++)
831 value += this->
GetGeometry()[
i].FastGetSolutionStepValue(rVariable);
845 const double Density,
846 const double Viscosity,
848 const double ReactionTerm,
855 const unsigned int BlockSize = TDim + 1;
862 unsigned int FirstRow(0), FirstCol(0);
863 double K, PDivV,
L, qF;
867 BodyForce *= Density;
870 noalias(StabilizationOperator) -= ReactionTerm * rShapeFunc;
871 StabilizationOperator *= TauOne;
873 for (
unsigned int i = 0;
i < TNumNodes; ++
i)
875 for (
unsigned int j = 0;
j < TNumNodes; ++
j)
879 K = rShapeFunc[
i] * ( Density*AGradN[
j] + ReactionTerm*rShapeFunc[
j] );
881 K += StabilizationOperator[
i] * ( Density*AGradN[
j] + ReactionTerm*rShapeFunc[
j] );
889 for (
unsigned int m = 0;
m < TDim; ++
m)
892 double div_v_p = rShapeDeriv(
i,
m) * rShapeFunc[
j];
893 double stab_grad_p = StabilizationOperator[
i] * rShapeDeriv(
j,
m);
894 rDampingMatrix(FirstRow +
m, FirstCol + TDim) += Weight * (stab_grad_p - div_v_p);
897 double q_div_u = rShapeFunc[
i] * rShapeDeriv(
j,
m);
898 double stab_div_u = TauOne*rShapeDeriv(
i,
m)* ( Density*AGradN[
j] + ReactionTerm * rShapeFunc[
j] );
899 rDampingMatrix(FirstRow + TDim, FirstCol +
m) += Weight * ( q_div_u + stab_div_u );
901 PDivV = rShapeDeriv(
i,
m) * rShapeFunc[
j];
902 rDampRHS[FirstCol + TDim] -= Weight * PDivV*OldVel[
m];
905 L += rShapeDeriv(
i,
m) * rShapeDeriv(
j,
m);
907 for (
unsigned int n = 0;
n < TDim; ++
n)
910 rDampingMatrix(FirstRow +
m, FirstCol +
n) += Weight * TauTwo * rShapeDeriv(
i,
m) * rShapeDeriv(
j,
n);
915 for (
unsigned int d = 0;
d < TDim; ++
d)
916 rDampingMatrix(FirstRow +
d, FirstCol +
d) +=
K;
919 rDampingMatrix(FirstRow + TDim, FirstCol + TDim) += Weight * TauOne *
L;
922 FirstCol += BlockSize;
927 for (
unsigned int d = 0;
d < TDim; ++
d)
929 rDampRHS[FirstRow +
d] += Weight * StabilizationOperator[
i] * BodyForce[
d];
930 qF += rShapeDeriv(
i,
d) * BodyForce[
d];
932 rDampRHS[FirstRow + TDim] += Weight * TauOne * qF;
935 FirstRow += BlockSize;
939 this->
AddViscousTerm(rDampingMatrix,rShapeDeriv,Viscosity*Weight);
943 const double Density,
945 const double ReactionTerm,
951 const unsigned int BlockSize = TDim + 1;
953 unsigned int FirstRow(0), FirstCol(0);
961 noalias(StabilizationOperator) -= ReactionTerm * rShapeFunc;
962 StabilizationOperator *= TauOne;
965 for (
unsigned int i = 0;
i < TNumNodes; ++
i)
968 for (
unsigned int j = 0;
j < TNumNodes; ++
j)
971 K = Weight * StabilizationOperator[
i] * Density * rShapeFunc[
j];
973 for (
unsigned int d = 0;
d < TDim; ++
d)
975 rLHSMatrix(FirstRow +
d, FirstCol +
d) +=
K;
977 rLHSMatrix(FirstRow + TDim, FirstCol +
d) += Weight * TauOne * rShapeDeriv(
i,
d) * Density * rShapeFunc[
j];
980 FirstCol += BlockSize;
983 FirstRow += BlockSize;
991 const double VelNorm,
992 const double ElemSize,
993 const double Density,
994 const double DynamicViscosity,
995 const double ReactionTerm,
998 const double DynamicTerm = rCurrentProcessInfo[DYNAMIC_TAU] / rCurrentProcessInfo[DELTA_TIME];
999 double InvTau = Density * ( DynamicTerm + 2.0*VelNorm / ElemSize ) + 4.0*DynamicViscosity/ (ElemSize * ElemSize) + ReactionTerm;
1000 TauOne = 1.0 / InvTau;
1002 TauTwo = DynamicViscosity + 0.5 * Density * ElemSize * VelNorm;
1006 const double Density,
1007 const double DynamicViscosity,
1008 const double LinearCoefficient,
1009 const double NonlinearCoefficient,
1016 return DynamicViscosity * LinearCoefficient + Density * NonlinearCoefficient*velocity_norm;
1039 void save(
Serializer& rSerializer)
const override
1075 template<
unsigned int TDim,
1076 unsigned int TNumNodes >
1083 template<
unsigned int TDim,
1084 unsigned int TNumNodes >
1089 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
PropertiesType & GetProperties()
Definition: element.h:1024
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: element.h:1135
virtual int Check(const ProcessInfo &rCurrentProcessInfo) const
Definition: element.h:904
virtual void MassMatrix(MatrixType &rMassMatrix, const ProcessInfo &rCurrentProcessInfo)
Definition: element.h:926
static int CalculateTetrahedraEnrichedShapeFuncions(TMatrixType const &rPoints, TGradientType const &DN_DX, TVectorType &rDistances, TVectorType &rVolumes, TMatrixType &rShapeFunctionValues, TVectorType &rPartitionsSign, std::vector< TMatrixType > &rGradientsValue, TMatrixType &NEnriched)
Definition: enrichment_utilities_duplicate_dofs.h:89
std::size_t IndexType
Definition: flags.h:74
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
const Matrix & ShapeFunctionsValues() const
Definition: geometry.h:3393
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
const IntegrationPointsArrayType & IntegrationPoints() const
Definition: geometry.h:2284
SizeType WorkingSpaceDimension() const
Definition: geometry.h:1287
SizeType IntegrationPointsNumber() const
Definition: geometry.h:2257
static void CalculateGeometryData(const GeometryType &rGeometry, BoundedMatrix< double, 4, 3 > &rDN_DX, array_1d< double, 4 > &rN, double &rVolume)
This function is designed to compute the shape function derivatives, shape functions and volume in 3D...
Definition: geometry_utilities.h:176
This object defines an indexed object.
Definition: indexed_object.h:54
IndexType Id() const
Definition: indexed_object.h:107
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
static double Norm3(const TVectorType &a)
Calculates the norm of vector "a" which is assumed to be of size 3.
Definition: math_utils.h:691
static BoundedMatrix< double, TDim, TDim > InvertMatrix(const BoundedMatrix< double, TDim, TDim > &rInputMatrix, double &rInputMatrixDet, const double Tolerance=ZeroTolerance)
Calculates the inverse of a 2x2, 3x3 and 4x4 matrices (using bounded matrix for performance)
Definition: math_utils.h:197
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Definition: two_fluid_vms.h:80
TwoFluidVMS(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using a geometry object.
Definition: two_fluid_vms.h:134
VMS< TDim, TNumNodes > ElementBaseType
Element from which it is derived.
Definition: two_fluid_vms.h:89
void CalculateStabilizationTau(double &TauOne, double &TauTwo, const double VelNorm, const double ElemSize, const double Density, const double DynamicViscosity, const double ReactionTerm, const ProcessInfo &rCurrentProcessInfo)
Definition: two_fluid_vms.h:988
void AddIntegrationPointVelocityContribution(MatrixType &rDampingMatrix, VectorType &rDampRHS, const double Density, const double Viscosity, const array_1d< double, 3 > &rAdvVel, const double ReactionTerm, const double TauOne, const double TauTwo, const array_1d< double, TNumNodes > &rShapeFunc, const BoundedMatrix< double, TNumNodes, TDim > &rShapeDeriv, const double Weight)
Add a the contribution from a single integration point to the velocity contribution.
Definition: two_fluid_vms.h:843
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: two_fluid_vms.h:213
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: two_fluid_vms.h:107
TwoFluidVMS(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constuctor using geometry and properties.
Definition: two_fluid_vms.h:144
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: two_fluid_vms.h:106
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Provides local contributions from body forces to the RHS.
Definition: two_fluid_vms.h:187
virtual double CalculateDarcyTerm(const double Density, const double DynamicViscosity, const double LinearCoefficient, const double NonlinearCoefficient, const array_1d< double, TNumNodes > &rShapefunctions)
Definition: two_fluid_vms.h:1005
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: two_fluid_vms.h:100
Vector VectorType
Definition: two_fluid_vms.h:101
std::string Info() const override
Turn back information as a string.
Definition: two_fluid_vms.h:686
void EvaluateInPoint(double &rResult, const Variable< double > &rVariable, const array_1d< double, TNumNodes > &rShapeFunc) override
Write the value of a variable at a point inside the element to a double.
Definition: two_fluid_vms.h:761
ElementBaseType::MatrixType MatrixType
Definition: two_fluid_vms.h:102
void AddMassStabTerms(MatrixType &rLHSMatrix, const double Density, const array_1d< double, 3 > &rAdvVel, const double ReactionTerm, const double TauOne, const array_1d< double, TNumNodes > &rShapeFunc, const BoundedMatrix< double, TNumNodes, TDim > &rShapeDeriv, const double Weight)
Definition: two_fluid_vms.h:942
Properties PropertiesType
Definition: two_fluid_vms.h:96
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Definition: two_fluid_vms.h:166
virtual void AddPointContribution(array_1d< double, 3 > &rResult, const Variable< array_1d< double, 3 > > &rVariable, const array_1d< double, TNumNodes > &rShapeFunc, const double Weight=1.0)
Add the weighted value of a variable at a point inside the element to a vector.
Definition: two_fluid_vms.h:797
std::size_t IndexType
Definition: two_fluid_vms.h:103
void LumpMassMatrix(MatrixType &rMassMatrix)
Add lumped mass matrix.
Definition: two_fluid_vms.h:717
void Calculate(const Variable< array_1d< double, 3 > > &rVariable, array_1d< double, 3 > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: two_fluid_vms.h:619
void EvaluateInPoint(array_1d< double, 3 > &rResult, const Variable< array_1d< double, 3 > > &rVariable, const array_1d< double, TNumNodes > &rShapeFunc) override
Write the value of a variable at a point inside the element to a double.
Definition: two_fluid_vms.h:816
virtual void AddPointContribution(double &rResult, const Variable< double > &rVariable, const array_1d< double, TNumNodes > &rShapeFunc, const double Weight=1.0)
Add the weighted value of a variable at a point inside the element to a double.
Definition: two_fluid_vms.h:742
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: two_fluid_vms.h:693
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Checks the input and that all required Kratos variables have been registered.
Definition: two_fluid_vms.h:634
TwoFluidVMS(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: two_fluid_vms.h:125
Node NodeType
definition of node type (default is: Node)
Definition: two_fluid_vms.h:91
std::size_t SizeType
Definition: two_fluid_vms.h:104
Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: two_fluid_vms.h:171
TwoFluidVMS(IndexType NewId=0)
Default constuctor.
Definition: two_fluid_vms.h:116
IndexedObject BaseType
base type: an IndexedObject that automatically has a unique number
Definition: two_fluid_vms.h:87
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: two_fluid_vms.h:98
void CalculateMassMatrix(MatrixType &rMassMatrix, const ProcessInfo &rCurrentProcessInfo) override
Computes local contributions to the mass matrix.
Definition: two_fluid_vms.h:203
~TwoFluidVMS() override
Destructor.
Definition: two_fluid_vms.h:149
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(TwoFluidVMS)
std::vector< std::size_t > EquationIdVectorType
Definition: two_fluid_vms.h:105
A stabilized element for the incompressible Navier-Stokes equations.
Definition: vms.h:104
virtual void GetAdvectiveVel(array_1d< double, 3 > &rAdvVel, const array_1d< double, TNumNodes > &rShapeFunc)
Write the advective velocity evaluated at this point to an array.
Definition: vms.h:1434
double ElementSize(const double)
Return an estimate for the element size h, used to calculate the stabilization parameters.
virtual void EvaluateInPoint(double &rResult, const Variable< double > &rVariable, const array_1d< double, TNumNodes > &rShapeFunc)
Write the value of a variable at a point inside the element to a double.
Definition: vms.h:1495
virtual void AddMomentumRHS(VectorType &F, const double Density, const array_1d< double, TNumNodes > &rShapeFunc, const double Weight)
Add the momentum equation contribution to the RHS (body forces)
Definition: vms.h:994
void AddConsistentMassMatrixContribution(MatrixType &rLHSMatrix, const array_1d< double, TNumNodes > &rShapeFunc, const double Density, const double Weight)
Definition: vms.h:1076
virtual double EffectiveViscosity(double Density, const array_1d< double, TNumNodes > &rN, const BoundedMatrix< double, TNumNodes, TDim > &rDN_DX, double ElemSize, const ProcessInfo &rProcessInfo)
EffectiveViscosity Calculate the viscosity at given integration point, using Smagorinsky if enabled.
Definition: vms.h:1392
virtual void AddViscousTerm(MatrixType &rDampingMatrix, const BoundedMatrix< double, TNumNodes, TDim > &rShapeDeriv, const double Weight)
Adds the contribution of the viscous term to the momentum equation.
void GetConvectionOperator(array_1d< double, TNumNodes > &rResult, const array_1d< double, 3 > &rVelocity, const BoundedMatrix< double, TNumNodes, TDim > &rShapeDeriv)
Write the convective operator evaluated at this point (for each nodal funciton) to an array.
Definition: vms.h:1471
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
scalar_matrix< double > ScalarMatrix
Definition: amatrix_interface.h:728
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
float velocity
Definition: PecletTest.py:54
list coeff
Definition: bombardelli_test.py:41
float dist
Definition: edgebased_PureConvection.py:89
int step
Definition: face_heat.py:88
int local_size
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:17
tuple tmp
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:98
u
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:30
def load(f)
Definition: ode_solve.py:307
int L
Definition: ode_solve.py:390
int d
Definition: ode_solve.py:397
int n
manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)
Definition: ode_solve.py:402
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
float temp
Definition: rotating_cone.py:85
int m
Definition: run_marine_rain_substepping.py:8
N
Definition: sensitivityMatrix.py:29
K
Definition: sensitivityMatrix.py:73
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31