13 #if !defined(KRATOS_EMBEDDED_AUSAS_NAVIER_STOKES)
14 #define KRATOS_EMBEDDED_AUSAS_NAVIER_STOKES
24 #include "utilities/geometry_utilities.h"
60 template<
unsigned int TDim,
unsigned int TNumNodes = TDim + 1 >
146 :
Element(NewId, pGeometry, pProperties)
164 return Kratos::make_intrusive< EmbeddedAusasNavierStokes < TDim, TNumNodes > >(NewId, this->
GetGeometry().
Create(rThisNodes), pProperties);
168 Element::Pointer
Create(
IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties)
const override {
170 return Kratos::make_intrusive< EmbeddedAusasNavierStokes < TDim, TNumNodes > >(NewId, pGeom, pProperties);
182 constexpr
unsigned int MatrixSize = TNumNodes*(TDim+1);
184 if (rLeftHandSideMatrix.size1() != MatrixSize) {
185 rLeftHandSideMatrix.
resize(MatrixSize, MatrixSize,
false);
186 }
else if (rLeftHandSideMatrix.size2() != MatrixSize) {
187 rLeftHandSideMatrix.
resize(MatrixSize, MatrixSize,
false);
190 if (rRightHandSideVector.size() != MatrixSize) {
191 rRightHandSideVector.
resize(MatrixSize,
false);
205 KRATOS_CATCH(
"Error in embedded Ausas Navier-Stokes element CalculateLocalSystem!")
215 constexpr
unsigned int MatrixSize = TNumNodes*(TDim+1);
217 if (rRightHandSideVector.size() != MatrixSize) {
218 rRightHandSideVector.
resize(MatrixSize,
false);
248 if(ErrorCode != 0)
return ErrorCode;
251 for(
unsigned int i_node = 0; i_node < this->
GetGeometry().
size(); ++i_node) {
252 if(this->
GetGeometry()[i_node].SolutionStepsDataHas(VELOCITY) ==
false)
254 if(this->
GetGeometry()[i_node].SolutionStepsDataHas(PRESSURE) ==
false)
256 if(this->
GetGeometry()[i_node].HasDofFor(VELOCITY_X) ==
false ||
257 this->
GetGeometry()[i_node].HasDofFor(VELOCITY_Y) ==
false ||
258 this->
GetGeometry()[i_node].HasDofFor(VELOCITY_Z) ==
false)
260 if(this->
GetGeometry()[i_node].HasDofFor(PRESSURE) ==
false)
266 KRATOS_ERROR <<
"The constitutive law was not set. Cannot proceed. Call the navier_stokes.h Initialize() method needs to be called.";
284 if (rVariable == DRAG_FORCE) {
290 if (
data.n_pos != 0 &&
data.n_neg != 0){
293 const unsigned int n_int_pos_gauss = (
data.w_gauss_pos_int).size();
294 for (
unsigned int i_gauss = 0; i_gauss < n_int_pos_gauss; ++i_gauss) {
296 const double w_gauss =
data.w_gauss_pos_int(i_gauss);
315 for (
unsigned int i = 0;
i < TDim ; ++
i){
316 rOutput(
i) -= shear_proj(
i);
322 const unsigned int n_int_neg_gauss = (
data.w_gauss_neg_int).size();
323 for (
unsigned int i_gauss = 0; i_gauss < n_int_neg_gauss; ++i_gauss) {
325 const double w_gauss =
data.w_gauss_neg_int(i_gauss);
344 for (
unsigned int i = 0;
i < TDim ; ++
i){
345 rOutput(
i) -= shear_proj(
i);
351 KRATOS_ERROR <<
"Calculate method not implemented for the requested variable.";
370 std::string
Info()
const override {
371 std::stringstream buffer;
372 buffer <<
"EmbeddedAusasNavierStokesElement" << TDim <<
"D" << TNumNodes <<
"N";
378 rOStream <<
Info() <<
"\nElement id: " <<
Id();
382 virtual void PrintData(std::ostream& rOStream)
const override {}
430 if (!this->
Has(ELEMENTAL_DISTANCES)) {
431 Vector zero_vector(TNumNodes, 0.0);
432 this->
SetValue(ELEMENTAL_DISTANCES, zero_vector);
439 if (!r_node.Has(EMBEDDED_VELOCITY)) {
440 r_node.SetValue(EMBEDDED_VELOCITY, zero_vel);
461 const Vector& BDFVector = rCurrentProcessInfo[BDF_COEFFICIENTS];
462 rData.
bdf0 = BDFVector[0];
463 rData.
bdf1 = BDFVector[1];
464 rData.
bdf2 = BDFVector[2];
466 rData.
dyn_tau = rCurrentProcessInfo[DYNAMIC_TAU];
467 rData.
dt = rCurrentProcessInfo[DELTA_TIME];
469 rData.
c = rCurrentProcessInfo[SOUND_VELOCITY];
473 rData.
rho = r_prop.GetValue(DENSITY);
474 rData.
mu = r_prop.GetValue(DYNAMIC_VISCOSITY);
476 for (
unsigned int i = 0;
i < TNumNodes;
i++) {
484 for(
unsigned int k=0;
k<TDim;
k++) {
486 rData.
vn(
i,
k) = vel_n[
k];
487 rData.
vnn(
i,
k) = vel_nn[
k];
492 rData.
p[
i] = r_geom[
i].FastGetSolutionStepValue(PRESSURE);
493 rData.
pn[
i] = r_geom[
i].FastGetSolutionStepValue(PRESSURE,1);
494 rData.
pnn[
i] = r_geom[
i].FastGetSolutionStepValue(PRESSURE,2);
504 for (
unsigned int inode = 0; inode<TNumNodes; inode++) {
505 if(distances[inode] > 0.0) {
520 ModifiedShapeFunctions::Pointer p_ausas_modified_sh_func =
nullptr;
521 if constexpr (TNumNodes == 4) {
522 p_ausas_modified_sh_func = Kratos::make_shared<Tetrahedra3D4AusasModifiedShapeFunctions>(p_geom, distances);
524 p_ausas_modified_sh_func = Kratos::make_shared<Triangle2D3AusasModifiedShapeFunctions>(p_geom, distances);
528 p_ausas_modified_sh_func->ComputePositiveSideShapeFunctionsAndGradientsValues(
535 p_ausas_modified_sh_func->ComputeNegativeSideShapeFunctionsAndGradientsValues(
542 p_ausas_modified_sh_func->ComputeInterfacePositiveSideShapeFunctionsAndGradientsValues(
549 p_ausas_modified_sh_func->ComputeInterfaceNegativeSideShapeFunctionsAndGradientsValues(
556 p_ausas_modified_sh_func->ComputePositiveSideInterfaceAreaNormals(
561 p_ausas_modified_sh_func->ComputeNegativeSideInterfaceAreaNormals(
566 const double tol = std::pow(1
e-3*rData.
h, TDim-1);
570 for (
unsigned int i_gauss = 0; i_gauss < n_gauss_pos; ++i_gauss) {
572 const double n_norm =
norm_2(normal);
576 for (
unsigned int i_gauss = 0; i_gauss < n_gauss_neg; ++i_gauss) {
578 const double n_norm =
norm_2(normal);
594 for (
unsigned int i_gauss = 0; i_gauss<n_gauss; ++i_gauss) {
595 rData.
w_gauss[i_gauss] = det_jacobian[i_gauss] * rIntegrationPoints[i_gauss].Weight();
606 constexpr
unsigned int MatrixSize = TNumNodes*(TDim+1);
617 for (
unsigned int i_pos_gauss = 0; i_pos_gauss < n_pos_gauss; ++i_pos_gauss) {
634 for (
unsigned int i_neg_gauss = 0; i_neg_gauss < n_neg_gauss; ++i_neg_gauss) {
657 const unsigned int n_gauss = (rData.
w_gauss).size();
658 for (
unsigned int i_gauss = 0; i_gauss < n_gauss; ++i_gauss) {
680 constexpr
unsigned int MatrixSize = TNumNodes*(TDim+1);
690 for (
unsigned int i_pos_gauss = 0; i_pos_gauss < n_pos_gauss; ++i_pos_gauss) {
705 for (
unsigned int i_neg_gauss = 0; i_neg_gauss < n_neg_gauss; ++i_neg_gauss) {
727 const unsigned int n_gauss = (rData.
w_gauss).size();
728 for (
unsigned int i_gauss = 0; i_gauss < n_gauss; ++i_gauss) {
757 constexpr
unsigned int BlockSize = TDim + 1;
758 constexpr
unsigned int MatrixSize = TNumNodes * BlockSize;
770 for (
unsigned int i_gauss = 0; i_gauss < n_int_pos_gauss; ++i_gauss) {
783 for (
unsigned int i = 0;
i < TNumNodes; ++
i) {
784 for (
unsigned int j = 0;
j < TNumNodes; ++
j) {
785 for (
unsigned int d = 0;
d < TDim; ++
d) {
786 auxLeftHandSideMatrix(
i * BlockSize +
d,
j * BlockSize + TDim) +=
w_gauss * aux_N(
i) * aux_N(
j) * side_normal(
d);
795 for (
unsigned int i_gauss = 0; i_gauss < n_int_neg_gauss; ++i_gauss) {
808 for (
unsigned int i = 0;
i < TNumNodes; ++
i) {
809 for (
unsigned int j = 0;
j < TNumNodes; ++
j) {
810 for (
unsigned int d = 0;
d < TDim; ++
d) {
811 auxLeftHandSideMatrix(
i * BlockSize +
d,
j * BlockSize + TDim) +=
w_gauss * aux_N(
i) * aux_N(
j) * side_normal(
d);
818 rLeftHandSideMatrix += auxLeftHandSideMatrix;
821 rRightHandSideVector -=
prod(auxLeftHandSideMatrix, prev_sol);
836 constexpr
unsigned int BlockSize = TDim + 1;
837 constexpr
unsigned int MatrixSize = TNumNodes * BlockSize;
849 for (
unsigned int i_gauss = 0; i_gauss < n_int_pos_gauss; ++i_gauss) {
862 for (
unsigned int i = 0;
i < TNumNodes; ++
i) {
863 for (
unsigned int j = 0;
j < TNumNodes; ++
j) {
864 for (
unsigned int d = 0;
d < TDim; ++
d) {
865 rRightHandSideVector(
i * BlockSize +
d) -=
w_gauss * aux_N(
i) * aux_N(
j) * side_normal(
d) * prev_sol(
j * BlockSize + TDim);
874 for (
unsigned int i_gauss = 0; i_gauss < n_int_neg_gauss; ++i_gauss) {
887 for (
unsigned int i = 0;
i < TNumNodes; ++
i) {
888 for (
unsigned int j = 0;
j < TNumNodes; ++
j) {
889 for (
unsigned int d = 0;
d < TDim; ++
d) {
890 rRightHandSideVector(
i * BlockSize +
d) -=
w_gauss * aux_N(
i) * aux_N(
j) * side_normal(
d) * prev_sol(
j * BlockSize + TDim);
910 constexpr
unsigned int BlockSize = TDim + 1;
911 constexpr
unsigned int MatrixSize = TNumNodes * BlockSize;
921 for (
unsigned int i_gauss = 0; i_gauss < n_int_pos_gauss; ++i_gauss) {
931 for (
unsigned int i = 0;
i < TNumNodes; ++
i) {
932 for (
unsigned int j = 0;
j < TNumNodes; ++
j) {
933 const auto j_v =
row(rData.
v,
j);
934 const auto j_v_emb = r_geom[
j].GetValue(EMBEDDED_VELOCITY);
935 for (
unsigned int m = 0;
m < TDim; ++
m) {
936 const unsigned int row =
i * BlockSize +
m;
937 for (
unsigned int n = 0;
n < TDim; ++
n) {
938 const unsigned int col =
j * BlockSize +
n;
939 const double aux_val = pen_coef *
w_gauss * aux_N(
i) * side_normal(
m) * side_normal(
n) * aux_N(
j);
940 rLeftHandSideMatrix(
row,col) += aux_val;
941 rRightHandSideVector(
row) -= aux_val * j_v(
n);
942 rRightHandSideVector(
row) += aux_val * j_v_emb(
n);
951 for (
unsigned int i_gauss = 0; i_gauss < n_int_neg_gauss; ++i_gauss) {
961 for (
unsigned int i = 0;
i < TNumNodes; ++
i) {
962 for (
unsigned int j = 0;
j < TNumNodes; ++
j) {
963 const auto j_v =
row(rData.
v,
j);
964 const auto j_v_emb = r_geom[
j].GetValue(EMBEDDED_VELOCITY);
965 for (
unsigned int m = 0;
m < TDim; ++
m) {
966 const unsigned int row =
i * BlockSize +
m;
967 for (
unsigned int n = 0;
n < TDim; ++
n) {
968 const unsigned int col =
j * BlockSize +
n;
969 const double aux_val = pen_coef *
w_gauss * aux_N(
i) * side_normal(
m) * side_normal(
n) * aux_N(
j);
970 rLeftHandSideMatrix(
row,col) += aux_val;
971 rRightHandSideVector(
row) -= aux_val * j_v(
n);
972 rRightHandSideVector(
row) += aux_val * j_v_emb(
n);
990 constexpr
unsigned int BlockSize = TDim + 1;
991 constexpr
unsigned int MatrixSize = TNumNodes * BlockSize;
1001 for (
unsigned int i_node = 0; i_node < TNumNodes; ++i_node) {
1002 const auto &r_i_emb_vel = r_geom[i_node].GetValue(EMBEDDED_VELOCITY);
1003 for (
unsigned int d = 0;
d < TDim; ++
d) {
1004 prev_sol(i_node * BlockSize +
d) -= r_i_emb_vel(
d);
1013 for (
unsigned int i_gauss = 0; i_gauss < n_int_pos_gauss; ++i_gauss) {
1023 for (
unsigned int i = 0;
i < TNumNodes; ++
i) {
1024 for (
unsigned int j = 0;
j < TNumNodes; ++
j) {
1025 for (
unsigned int m = 0;
m < TDim; ++
m) {
1026 const unsigned int row =
i * BlockSize +
m;
1027 for (
unsigned int n = 0;
n < TDim; ++
n) {
1028 rRightHandSideVector(
row) -= pen_coef *
w_gauss * aux_N(
i) * side_normal(
m) * side_normal(
n) * aux_N(
j) * solution_jump(
row);
1037 for (
unsigned int i_gauss = 0; i_gauss < n_int_neg_gauss; ++i_gauss) {
1047 for (
unsigned int i = 0;
i < TNumNodes; ++
i) {
1048 for (
unsigned int j = 0;
j < TNumNodes; ++
j) {
1049 for (
unsigned int m = 0;
m < TDim; ++
m) {
1050 const unsigned int row =
i * BlockSize +
m;
1051 for (
unsigned int n = 0;
n < TDim; ++
n) {
1052 rRightHandSideVector(
row) -= pen_coef *
w_gauss * aux_N(
i) * side_normal(
m) * side_normal(
n) * aux_N(
j) * solution_jump(
row);
1073 for(
unsigned int i=0;
i<TNumNodes;
i++) {
1075 for(
unsigned int k=0;
k<TDim;
k++) {
1076 h_inv += aux_DN_DX(
i,
k)*aux_DN_DX(
i,
k);
1081 h = sqrt(
h)/
static_cast<double>(TNumNodes);
1095 double intersection_area = 0.0;
1096 for (
unsigned int i_gauss = 0; i_gauss < (rData.
w_gauss_pos_int).size(); ++i_gauss) {
1102 for (
unsigned int i_node = 0; i_node < TNumNodes; ++i_node) {
1103 avg_vel +=
row(rData.
v, i_node);
1105 avg_vel /= TNumNodes;
1107 const double v_norm =
norm_2(avg_vel);
1110 const double pen_cons = rData.
rho*std::pow(rData.
h, TDim)/rData.
dt +
1111 rData.
mu*std::pow(rData.
h,TDim-2) +
1112 rData.
rho*v_norm*std::pow(rData.
h, TDim-1);
1115 const double K = rCurrentProcessInfo[PENALTY_COEFFICIENT];
1116 const double pen_coef =
K * pen_cons / intersection_area;
1128 array_1d<
double, TNumNodes*(TDim+1)>& rPrevSolVector) {
1130 rPrevSolVector.clear();
1132 for (
unsigned int i=0;
i<TNumNodes;
i++) {
1133 for (
unsigned int comp=0; comp<TDim; comp++) {
1134 rPrevSolVector(
i*(TDim+1)+comp) = rData.
v(
i,comp);
1136 rPrevSolVector(
i*(TDim+1)+TDim) = rData.
p(
i);
1147 const unsigned int StrainSize) {
1153 if (StrainSize == 6) {
1158 rData.
strain[3] =
DN(0,0)*
v(0,1) +
DN(0,1)*
v(0,0) +
DN(1,0)*
v(1,1) +
DN(1,1)*
v(1,0) +
DN(2,0)*
v(2,1) +
DN(2,1)*
v(2,0) +
DN(3,0)*
v(3,1) +
DN(3,1)*
v(3,0);
1159 rData.
strain[4] =
DN(0,1)*
v(0,2) +
DN(0,2)*
v(0,1) +
DN(1,1)*
v(1,2) +
DN(1,2)*
v(1,1) +
DN(2,1)*
v(2,2) +
DN(2,2)*
v(2,1) +
DN(3,1)*
v(3,2) +
DN(3,2)*
v(3,1);
1160 rData.
strain[5] =
DN(0,0)*
v(0,2) +
DN(0,2)*
v(0,0) +
DN(1,0)*
v(1,2) +
DN(1,2)*
v(1,0) +
DN(2,0)*
v(2,2) +
DN(2,2)*
v(2,0) +
DN(3,0)*
v(3,2) +
DN(3,2)*
v(3,0);
1161 }
else if (StrainSize == 3) {
1165 rData.
strain[2] =
DN(0,1)*
v(0,0) +
DN(1,1)*
v(1,0) +
DN(2,1)*
v(2,0) +
DN(0,0)*
v(0,1) +
DN(1,0)*
v(1,1) +
DN(2,0)*
v(2,1);
1203 ConstitutiveLawOptions.
Set(ConstitutiveLaw::COMPUTE_STRESS);
1204 ConstitutiveLawOptions.
Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR);
1222 double mu_eff = 0.0;
1237 BoundedMatrix<
double, TDim, (TDim-1)*3>& rVoigtNormProjMatrix) {
1239 rVoigtNormProjMatrix.clear();
1241 if constexpr (TDim == 3) {
1242 rVoigtNormProjMatrix(0,0) = rUnitNormal(0);
1243 rVoigtNormProjMatrix(0,3) = rUnitNormal(1);
1244 rVoigtNormProjMatrix(0,5) = rUnitNormal(2);
1245 rVoigtNormProjMatrix(1,1) = rUnitNormal(1);
1246 rVoigtNormProjMatrix(1,3) = rUnitNormal(0);
1247 rVoigtNormProjMatrix(1,4) = rUnitNormal(2);
1248 rVoigtNormProjMatrix(2,2) = rUnitNormal(2);
1249 rVoigtNormProjMatrix(2,4) = rUnitNormal(1);
1250 rVoigtNormProjMatrix(2,5) = rUnitNormal(0);
1252 rVoigtNormProjMatrix(0,0) = rUnitNormal(0);
1253 rVoigtNormProjMatrix(0,2) = rUnitNormal(1);
1254 rVoigtNormProjMatrix(1,1) = rUnitNormal(1);
1255 rVoigtNormProjMatrix(1,2) = rUnitNormal(0);
1288 void save(
Serializer& rSerializer)
const override
Base class for all Elements.
Definition: element.h:60
PropertiesType & GetProperties()
Definition: element.h:1024
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
virtual int Check(const ProcessInfo &rCurrentProcessInfo) const
Definition: element.h:904
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
Definition: embedded_ausas_navier_stokes.h:62
Element::Pointer Create(IndexType NewId, NodesArrayType const &rThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: embedded_ausas_navier_stokes.h:162
void ComputeGaussPointLHSContribution(BoundedMatrix< double, TNumNodes *(TDim+1), TNumNodes *(TDim+1)> &lhs, const EmbeddedAusasElementDataStruct &data)
void CalculateLocalSystemContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, EmbeddedAusasElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_ausas_navier_stokes.h:600
void AddRHSNormalVelocityPenaltyContribution(VectorType &rRightHandSideVector, const EmbeddedAusasElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_ausas_navier_stokes.h:985
~EmbeddedAusasNavierStokes() override
Destructor.
Definition: embedded_ausas_navier_stokes.h:150
GeometryType::IntegrationPointsArrayType InteGrationPointsType
Definition: embedded_ausas_navier_stokes.h:69
std::string Info() const override
Turn back information as a string.
Definition: embedded_ausas_navier_stokes.h:370
double ComputeEffectiveViscosity(const EmbeddedAusasElementDataStruct &rData)
Definition: embedded_ausas_navier_stokes.h:1221
void FillEmbeddedAusasElementData(EmbeddedAusasElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_ausas_navier_stokes.h:450
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: embedded_ausas_navier_stokes.h:377
void ComputeStrain(EmbeddedAusasElementDataStruct &rData, const unsigned int StrainSize)
Definition: embedded_ausas_navier_stokes.h:1145
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_ausas_navier_stokes.h:209
EmbeddedAusasNavierStokes()
Definition: embedded_ausas_navier_stokes.h:414
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_ausas_navier_stokes.h:422
void AddSystemNormalVelocityPenaltyContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedAusasElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_ausas_navier_stokes.h:903
double ComputePenaltyCoefficient(const EmbeddedAusasElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_ausas_navier_stokes.h:1090
void AddRHSBoundaryTermsContribution(VectorType &rRightHandSideVector, const EmbeddedAusasElementDataStruct &rData)
Definition: embedded_ausas_navier_stokes.h:832
void SetVoigtNormalProjectionMatrix(const array_1d< double, 3 > &rUnitNormal, BoundedMatrix< double, TDim,(TDim-1) *3 > &rVoigtNormProjMatrix)
Definition: embedded_ausas_navier_stokes.h:1235
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
void CalculateRightHandSideContribution(VectorType &rRightHandSideVector, EmbeddedAusasElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_ausas_navier_stokes.h:675
GeometryType::Pointer GeometryPointerType
Definition: embedded_ausas_navier_stokes.h:67
void ComputeConstitutiveResponse(EmbeddedAusasElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_ausas_navier_stokes.h:1174
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: embedded_ausas_navier_stokes.h:382
void AddSystemBoundaryTermsContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedAusasElementDataStruct &rData)
Definition: embedded_ausas_navier_stokes.h:752
void GetDofList(DofsVectorType &ElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: embedded_ausas_navier_stokes.h:168
double ComputeH()
Definition: embedded_ausas_navier_stokes.h:1064
void GetPreviousSolutionVector(const EmbeddedAusasElementDataStruct &rData, array_1d< double, TNumNodes *(TDim+1)> &rPrevSolVector)
Definition: embedded_ausas_navier_stokes.h:1126
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_ausas_navier_stokes.h:175
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(EmbeddedAusasNavierStokes)
Counted pointer of.
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Checks the input and that all required Kratos variables have been registered.
Definition: embedded_ausas_navier_stokes.h:243
EmbeddedAusasNavierStokes(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: embedded_ausas_navier_stokes.h:145
void Calculate(const Variable< array_1d< double, 3 > > &rVariable, array_1d< double, 3 > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_ausas_navier_stokes.h:275
GeometryType::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: embedded_ausas_navier_stokes.h:71
EmbeddedAusasNavierStokes(IndexType NewId, GeometryType::Pointer pGeometry)
Default constructor.
Definition: embedded_ausas_navier_stokes.h:141
void ComputeGaussPointRHSContribution(array_1d< double, TNumNodes *(TDim+1)> &rhs, const EmbeddedAusasElementDataStruct &data)
ConstitutiveLaw::Pointer mpConstitutiveLaw
Definition: embedded_ausas_navier_stokes.h:401
std::size_t IndexType
Definition: flags.h:74
void Set(const Flags ThisFlag)
Definition: flags.cpp:33
GeometryType::Pointer pGetGeometry()
Returns the pointer to the geometry.
Definition: geometrical_object.h:140
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometrical_object.h:248
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
bool Has(const Variable< TDataType > &rThisVariable) const
Definition: geometrical_object.h:230
void SetValue(const TVariableType &rThisVariable, typename TVariableType::Type const &rValue)
Definition: geometrical_object.h:238
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
void ShapeFunctionsIntegrationPointsGradients(ShapeFunctionsGradientsType &rResult) const
Definition: geometry.h:3708
const IntegrationPointsArrayType & IntegrationPoints() const
Definition: geometry.h:2284
virtual Pointer Create(PointsArrayType const &rThisPoints) const
Creates a new geometry pointer.
Definition: geometry.h:813
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
IndexType Id() const
Definition: indexed_object.h:107
Definition: amatrix_interface.h:41
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
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
#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
#define KRATOS_ERROR
Definition: exception.h:161
static double max(double a, double b)
Definition: GeometryFunctions.h:79
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
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
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
AMatrix::MatrixRow< const TExpressionType > row(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression, std::size_t RowIndex)
Definition: amatrix_interface.h:649
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182
v
Definition: generate_convection_diffusion_explicit_element.py:114
DN
Definition: generate_convection_diffusion_explicit_element.py:98
w_gauss
Definition: generate_convection_diffusion_explicit_element.py:136
p_gauss
Data interpolation to the Gauss points.
Definition: generate_droplet_dynamics.py:128
h
Definition: generate_droplet_dynamics.py:91
rhs
Definition: generate_frictional_mortar_condition.py:297
lhs
Definition: generate_frictional_mortar_condition.py:297
int strain_size
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:16
int tol
Definition: hinsberg_optimization.py:138
data
Definition: mesh_to_mdpa_converter.py:59
def load(f)
Definition: ode_solve.py:307
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
vel
Definition: pure_conduction.py:76
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
int m
Definition: run_marine_rain_substepping.py:8
body_force
Definition: script_ELASTIC.py:102
K
Definition: sensitivityMatrix.py:73
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31
Definition: constitutive_law.h:189
void SetConstitutiveMatrix(VoigtSizeMatrixType &rConstitutiveMatrix)
Definition: constitutive_law.h:403
void SetStrainVector(StrainVectorType &rStrainVector)
Definition: constitutive_law.h:401
Flags & GetOptions()
Definition: constitutive_law.h:412
void SetStressVector(StressVectorType &rStressVector)
Definition: constitutive_law.h:402
void SetShapeFunctionsValues(const Vector &rShapeFunctionsValues)
Definition: constitutive_law.h:396
Definition: embedded_ausas_navier_stokes.h:76
VectorType w_gauss_neg_side
Definition: embedded_ausas_navier_stokes.h:113
MatrixType N_pos_int
Definition: embedded_ausas_navier_stokes.h:116
std::vector< unsigned int > int_vec_identifiers
Definition: embedded_ausas_navier_stokes.h:127
double bdf1
Definition: embedded_ausas_navier_stokes.h:89
double rho
Definition: embedded_ausas_navier_stokes.h:97
BoundedMatrix< double, TNumNodes, TDim > vn
Definition: embedded_ausas_navier_stokes.h:78
BoundedMatrix< double, TNumNodes, TDim > vnn
Definition: embedded_ausas_navier_stokes.h:78
MatrixType N_neg_side
Definition: embedded_ausas_navier_stokes.h:111
ShapeFunctionsGradientsType DN_DX_neg_int
Definition: embedded_ausas_navier_stokes.h:123
array_1d< double, TNumNodes > N
Definition: embedded_ausas_navier_stokes.h:81
BoundedMatrix< double, TNumNodes, TDim > DN_DX
Definition: embedded_ausas_navier_stokes.h:82
array_1d< double, TNumNodes > p
Definition: embedded_ausas_navier_stokes.h:79
std::vector< array_1d< double, 3 > > pos_int_unit_normals
Definition: embedded_ausas_navier_stokes.h:119
array_1d< double, TNumNodes > pn
Definition: embedded_ausas_navier_stokes.h:79
ShapeFunctionsGradientsType DN_DX_gauss
Definition: embedded_ausas_navier_stokes.h:102
ShapeFunctionsGradientsType DN_DX_pos_int
Definition: embedded_ausas_navier_stokes.h:117
unsigned int n_pos
Definition: embedded_ausas_navier_stokes.h:130
double dyn_tau
Definition: embedded_ausas_navier_stokes.h:95
BoundedMatrix< double, TNumNodes, TDim > f
Definition: embedded_ausas_navier_stokes.h:78
BoundedMatrix< double, TNumNodes, TDim > vmesh
Definition: embedded_ausas_navier_stokes.h:78
array_1d< double, TNumNodes > pnn
Definition: embedded_ausas_navier_stokes.h:79
Vector strain
Definition: embedded_ausas_navier_stokes.h:86
Vector stress
Definition: embedded_ausas_navier_stokes.h:85
MatrixType N_gauss
Definition: embedded_ausas_navier_stokes.h:101
double c
Definition: embedded_ausas_navier_stokes.h:91
Matrix C
Definition: embedded_ausas_navier_stokes.h:84
double bdf2
Definition: embedded_ausas_navier_stokes.h:90
MatrixType N_neg_int
Definition: embedded_ausas_navier_stokes.h:122
VectorType w_gauss_neg_int
Definition: embedded_ausas_navier_stokes.h:124
double bdf0
Definition: embedded_ausas_navier_stokes.h:88
double dt
Definition: embedded_ausas_navier_stokes.h:94
VectorType w_gauss_pos_int
Definition: embedded_ausas_navier_stokes.h:118
VectorType w_gauss_pos_side
Definition: embedded_ausas_navier_stokes.h:108
unsigned int n_neg
Definition: embedded_ausas_navier_stokes.h:131
double h
Definition: embedded_ausas_navier_stokes.h:92
std::vector< array_1d< double, 3 > > neg_int_unit_normals
Definition: embedded_ausas_navier_stokes.h:125
MatrixType N_pos_side
Definition: embedded_ausas_navier_stokes.h:106
VectorType w_gauss
Definition: embedded_ausas_navier_stokes.h:100
std::vector< unsigned int > out_vec_identifiers
Definition: embedded_ausas_navier_stokes.h:128
double mu
Definition: embedded_ausas_navier_stokes.h:96
BoundedMatrix< double, TNumNodes, TDim > v
Definition: embedded_ausas_navier_stokes.h:78
double volume
Definition: embedded_ausas_navier_stokes.h:93
ShapeFunctionsGradientsType DN_DX_neg_side
Definition: embedded_ausas_navier_stokes.h:112
ShapeFunctionsGradientsType DN_DX_pos_side
Definition: embedded_ausas_navier_stokes.h:107