13 #if !defined(KRATOS_EMBEDDED_NAVIER_STOKES)
14 #define KRATOS_EMBEDDED_NAVIER_STOKES
52 template<
unsigned int TDim,
unsigned int TNumNodes = TDim + 1 >
111 :
NavierStokes<TDim, TNumNodes>(NewId, pGeometry, pProperties)
128 return Kratos::make_intrusive< EmbeddedNavierStokes < TDim, TNumNodes > >(NewId, this->
GetGeometry().
Create(rThisNodes), pProperties);
133 Element::Pointer
Create(
IndexType NewId, Element::GeometryType::Pointer pGeom, Element::PropertiesType::Pointer pProperties)
const override {
134 return Kratos::make_intrusive< EmbeddedNavierStokes < TDim, TNumNodes > >(NewId, pGeom, pProperties);
147 pNewElement->SetData(this->
GetData());
148 pNewElement->SetFlags(this->
GetFlags());
168 for(
unsigned int i=0;
i<TNumNodes;
i++) {
169 distances[
i] = this->
GetGeometry()[
i].FastGetSolutionStepValue(DISTANCE);
176 for (
unsigned int inode = 0; inode<TNumNodes; inode++) {
177 if(distances[inode] > 0.0) {
192 ModifiedShapeFunctions::Pointer p_modified_sh_func =
nullptr;
193 if constexpr (TNumNodes == 4) {
194 p_modified_sh_func = Kratos::make_shared<Tetrahedra3D4ModifiedShapeFunctions>(p_geom, distances);
196 p_modified_sh_func = Kratos::make_shared<Triangle2D3ModifiedShapeFunctions>(p_geom, distances);
200 p_modified_sh_func->ComputePositiveSideShapeFunctionsAndGradientsValues(
207 p_modified_sh_func->ComputeInterfacePositiveSideShapeFunctionsAndGradientsValues(
214 p_modified_sh_func->ComputePositiveSideInterfaceAreaNormals(
219 const double tol = std::pow(1
e-3*rData.
h, TDim-1);
222 for (
unsigned int i_gauss = 0; i_gauss < n_gauss; ++i_gauss) {
224 const double n_norm =
norm_2(normal);
243 constexpr
unsigned int MatrixSize = TNumNodes*(TDim+1);
246 if (rLeftHandSideMatrix.size1() != MatrixSize) {
247 rLeftHandSideMatrix.
resize(MatrixSize, MatrixSize,
false);
248 }
else if (rLeftHandSideMatrix.size2() != MatrixSize) {
249 rLeftHandSideMatrix.
resize(MatrixSize, MatrixSize,
false);
252 if (rRightHandSideVector.size() != MatrixSize) {
253 rRightHandSideVector.
resize(MatrixSize,
false);
264 if(
data.n_pos == TNumNodes) {
265 ComputeElementAsFluid<MatrixSize>(rLeftHandSideMatrix, rRightHandSideVector,
data, rCurrentProcessInfo);
266 }
else if ((
data.n_pos != 0) && (
data.n_neg != 0)) {
267 ComputeElementAsMixed<MatrixSize>(rLeftHandSideMatrix, rRightHandSideVector,
data, rCurrentProcessInfo);
270 KRATOS_CATCH(
"Error in embedded Navier-Stokes element CalculateLocalSystem method.");
281 template<
unsigned int MatrixSize>
298 for(
unsigned int igauss = 0; igauss<Ncontainer.size1(); igauss++) {
307 noalias(rLeftHandSideMatrix) += lhs_local;
308 noalias(rRightHandSideVector) += rhs_local;
311 rLeftHandSideMatrix *= rData.
volume/
static_cast<double>(TNumNodes);
312 rRightHandSideVector *= rData.
volume/
static_cast<double>(TNumNodes);
323 template<
unsigned int MatrixSize>
337 for(
unsigned int i_gauss = 0; i_gauss < n_gauss_pts; i_gauss++) {
347 noalias(rLeftHandSideMatrix) += weight*lhs_local;
348 noalias(rRightHandSideVector) += weight*rhs_local;
369 if (error_code != 0){
375 if (this->
GetGeometry()[
i].SolutionStepsDataHas(DISTANCE) ==
false){
401 if (rVariable == DRAG_FORCE) {
407 if (
data.n_pos != 0 &&
data.n_neg != 0){
410 const unsigned int n_int_pos_gauss = (
data.w_gauss_pos_int).size();
411 for (
unsigned int i_gauss = 0; i_gauss < n_int_pos_gauss; ++i_gauss) {
413 const double w_gauss =
data.w_gauss_pos_int(i_gauss);
432 for (
unsigned int i = 0;
i < TDim ; ++
i){
433 rOutput(
i) -= shear_proj(
i);
441 KRATOS_ERROR <<
"Calculate method not implemented for the requested variable.";
476 std::string
Info()
const override {
477 return "EmbeddedNavierStokes3D #";
518 constexpr
unsigned int BlockSize = TDim+1;
519 constexpr
unsigned int MatrixSize = TNumNodes*BlockSize;
530 for (
unsigned int i_gauss_int = 0; i_gauss_int < n_gauss_total; ++i_gauss_int) {
552 for (
unsigned int i=0;
i<TNumNodes; ++
i) {
553 for (
unsigned int comp=0; comp<TDim; ++comp) {
554 pres_to_voigt_matrix_op(comp,
i*BlockSize+TDim) = aux_N(
i);
560 for (
unsigned int i=0;
i<TNumNodes; ++
i) {
561 for (
unsigned int comp=0; comp<TDim; ++comp) {
562 N_aux_trans(
i*BlockSize+comp, comp) = aux_N(
i);
567 noalias(auxLeftHandSideMatrix) += weight*
prod(N_aux_trans, aux_matrix_ACB);
570 const BoundedMatrix<
double, MatrixSize, (TDim-1)*3> N_voigt_proj_matrix =
prod(N_aux_trans, voigt_normal_projection_matrix);
571 noalias(auxLeftHandSideMatrix) -= weight*
prod(N_voigt_proj_matrix, pres_to_voigt_matrix_op);
575 noalias(rLeftHandSideMatrix) -= auxLeftHandSideMatrix;
578 noalias(rRightHandSideVector) +=
prod(auxLeftHandSideMatrix, prev_sol);
591 double intersection_area = 0.0;
592 for (
unsigned int i_gauss = 0; i_gauss < (rData.
w_gauss_pos_int).size(); ++i_gauss) {
598 for (
unsigned int i_node = 0; i_node < TNumNodes; ++i_node) {
599 avg_vel +=
row(rData.
v, i_node);
601 avg_vel /= TNumNodes;
603 const double v_norm =
norm_2(avg_vel);
606 const double pen_cons = rData.
rho*std::pow(rData.
h, TDim)/rData.
dt +
607 rData.
rho*rData.
mu*std::pow(rData.
h,TDim-2) +
608 rData.
rho*v_norm*std::pow(rData.
h, TDim-1);
611 const double K = rCurrentProcessInfo[PENALTY_COEFFICIENT];
612 const double pen_coef =
K * pen_cons / intersection_area;
630 constexpr
unsigned int BlockSize = TDim+1;
631 constexpr
unsigned int MatrixSize = TNumNodes*BlockSize;
639 for (
unsigned int i_node = 0; i_node < TNumNodes; ++i_node) {
640 const auto &r_i_emb_vel = r_geom[i_node].GetValue(EMBEDDED_VELOCITY);
641 for (
unsigned int d = 0;
d < TDim; ++
d) {
642 prev_sol(i_node * BlockSize +
d) -= r_i_emb_vel(
d);
652 for (
unsigned int i_gauss_int = 0; i_gauss_int < n_gauss_total; ++i_gauss_int) {
666 for (
unsigned int i = 0;
i<TNumNodes;
i++) {
668 for (
unsigned int comp = 0; comp<TDim; comp++) {
669 auxLeftHandSideMatrix(
i*BlockSize+comp,
i*BlockSize+comp) = P_gamma(
i,
i);
672 for (
unsigned int j =
i+1;
j<TNumNodes;
j++) {
673 for (
unsigned int comp = 0; comp<TDim; comp++) {
674 auxLeftHandSideMatrix(
i*BlockSize+comp,
j*BlockSize+comp) = P_gamma(
i,
j);
675 auxLeftHandSideMatrix(
j*BlockSize+comp,
i*BlockSize+comp) = P_gamma(
i,
j);
680 noalias(rLeftHandSideMatrix) += auxLeftHandSideMatrix;
681 noalias(rRightHandSideVector) -=
prod(auxLeftHandSideMatrix, prev_sol);
695 constexpr
unsigned int BlockSize = TDim+1;
696 constexpr
unsigned int MatrixSize = TNumNodes*BlockSize;
712 for (
unsigned int i_gauss_int = 0; i_gauss_int < n_gauss_total; ++i_gauss_int) {
717 for (
unsigned int i_out = 0; i_out < rData.
n_neg; ++i_out) {
719 aux_out(i_out) = aux_cut(i_out_nodeid);
722 for (
unsigned int i_int = 0; i_int < rData.
n_pos; ++i_int) {
724 aux_int(i_int) = aux_cut(i_int_nodeid);
727 M_gamma += weight*
outer_prod(aux_out,aux_out);
728 N_gamma += weight*
outer_prod(aux_out,aux_int);
729 f_gamma += weight*
outer_prod(aux_out,aux_cut);
737 for (
unsigned int i = 0;
i<rData.
n_neg;
i++) {
740 for (
unsigned int j = 0;
j<rData.
n_neg;
j++) {
743 for (
unsigned int comp = 0; comp<TDim; comp++) {
744 auxLeftHandSideMatrix(out_node_row_id*BlockSize+comp, out_node_col_id*BlockSize+comp) = M_gamma(
i,
j);
750 for (
unsigned int i = 0;
i<rData.
n_neg;
i++) {
753 for (
unsigned int j = 0;
j<rData.
n_pos;
j++) {
756 for (
unsigned int comp = 0; comp<TDim; comp++) {
757 auxLeftHandSideMatrix(out_node_row_id*BlockSize+comp, int_node_col_id*BlockSize+comp) = N_gamma(
i,
j);
763 noalias(rLeftHandSideMatrix) += auxLeftHandSideMatrix;
767 noalias(rRightHandSideVector) -=
prod(auxLeftHandSideMatrix, prev_sol);
771 for (
unsigned int i_gauss = 0; i_gauss < n_gauss_total; ++i_gauss) {
778 for (
unsigned int i_node = 0; i_node < r_geom.PointsNumber(); ++i_node) {
779 aux_emb_v += N_cut(i_node) * r_geom[i_node].GetValue(EMBEDDED_VELOCITY);
783 for (
unsigned int i = 0;
i < rData.
n_neg; ++
i) {
785 for (
unsigned int j = 0;
j < TNumNodes; ++
j) {
786 const double aux = weight * N_cut(i_out_node_id) * N_cut(
j);
787 for (
unsigned int d = 0;
d < TDim; ++
d) {
788 rRightHandSideVector(i_out_node_id * BlockSize +
d) += aux * aux_emb_v(
d);
806 constexpr
unsigned int BlockSize = TDim+1;
807 constexpr
unsigned int MatrixSize = TNumNodes*BlockSize;
810 for (
unsigned int i=0;
i<rData.
n_neg; ++
i) {
813 for (
unsigned int j=0;
j<TDim; ++
j) {
815 for (
unsigned int col = 0; col<MatrixSize; col++) {
816 rLeftHandSideMatrix(out_node_row_id*BlockSize+
j, col) = 0.0;
820 rRightHandSideVector(out_node_row_id*BlockSize+
j) = 0.0;
837 constexpr
unsigned int BlockSize = TDim+1;
838 constexpr
unsigned int MatrixSize = TNumNodes*BlockSize;
846 for (
unsigned int i_node = 0; i_node < TNumNodes; ++i_node) {
847 const auto &r_i_emb_vel = r_geom[i_node].GetValue(EMBEDDED_VELOCITY);
848 for (
unsigned int d = 0;
d < TDim; ++
d) {
849 prev_sol(i_node * BlockSize +
d) -= r_i_emb_vel(
d);
858 for (
unsigned int comp=0; comp<TDim; ++comp) {
859 double aux_vel = 0.0;
860 for (
unsigned int j=0;
j<TNumNodes; ++
j) {
861 aux_vel += rData.
v(
j,comp);
863 aux_vel /= TNumNodes;
864 v_norm += aux_vel*aux_vel;
866 v_norm = std::sqrt(v_norm);
869 const double penalty = 1.0/rCurrentProcessInfo[PENALTY_COEFFICIENT];
870 const double cons_coef = (eff_mu + eff_mu + rData.
rho*v_norm*rData.
h + rData.
rho*rData.
h*rData.
h/rData.
dt)/(rData.
h*penalty);
876 for (
unsigned int i_gauss_int = 0; i_gauss_int < n_gauss_total; ++i_gauss_int) {
884 for (
unsigned int i=0;
i<TNumNodes; ++
i) {
885 for (
unsigned int comp=0; comp<TDim; ++comp) {
886 N_aux(comp,
i*BlockSize+comp) = aux_N(
i);
898 noalias(auxLeftHandSideMatrix) += cons_coef*weight*aux_2;
902 noalias(rLeftHandSideMatrix) += auxLeftHandSideMatrix;
906 noalias(rRightHandSideVector) -=
prod(auxLeftHandSideMatrix, prev_sol);
920 constexpr
unsigned int BlockSize = TDim+1;
921 constexpr
unsigned int MatrixSize = TNumNodes*BlockSize;
929 for (
unsigned int i_node = 0; i_node < TNumNodes; ++i_node) {
930 const auto &r_i_emb_vel = r_geom[i_node].GetValue(EMBEDDED_VELOCITY);
931 for (
unsigned int d = 0;
d < TDim; ++
d) {
932 prev_sol(i_node * BlockSize +
d) -= r_i_emb_vel(
d);
937 const double adjoint_consistency_term = -1.0;
943 for (
unsigned int i_gauss_int = 0; i_gauss_int < n_gauss_total; ++i_gauss_int) {
952 for (
unsigned int i=0;
i<TNumNodes; ++
i) {
953 for (
unsigned int comp=0; comp<TDim; ++comp) {
954 trans_pres_to_voigt_matrix_normal_op(
i*BlockSize+TDim, comp) = aux_N(
i)*aux_unit_normal(comp);
960 for (
unsigned int i=0;
i<TNumNodes; ++
i) {
961 for (
unsigned int comp=0; comp<TDim; ++comp) {
962 N_aux(comp,
i*BlockSize+comp) = aux_N(
i);
980 const BoundedMatrix<
double, (TDim-1)*3, TDim> aux_matrix_APnorm =
prod(
trans(voigt_normal_projection_matrix), normal_projection_matrix);
984 noalias(auxLeftHandSideMatrix) += adjoint_consistency_term*weight*
prod(aux_matrix_BCAPnorm, N_aux);
988 noalias(auxLeftHandSideMatrix) += weight*
prod(aux_matrix_VPnorm, N_aux);
993 noalias(rLeftHandSideMatrix) -= auxLeftHandSideMatrix;
996 noalias(rRightHandSideVector) +=
prod(auxLeftHandSideMatrix, prev_sol);
1011 constexpr
unsigned int BlockSize = TDim+1;
1012 constexpr
unsigned int MatrixSize = TNumNodes*BlockSize;
1020 const double penalty = 1.0/rCurrentProcessInfo[PENALTY_COEFFICIENT];
1021 const double slip_length = rCurrentProcessInfo[SLIP_LENGTH];
1022 const double coeff_1 = slip_length / (slip_length + penalty*rData.
h);
1023 const double coeff_2 = eff_mu / (slip_length + penalty*rData.
h);
1032 for (
unsigned int i_gauss_int = 0; i_gauss_int < n_gauss_total; ++i_gauss_int) {
1041 for (
unsigned int i=0;
i<TNumNodes; ++
i) {
1042 for (
unsigned int comp=0; comp<TDim; ++comp) {
1043 N_aux_trans(
i*BlockSize+comp, comp) = aux_N(
i);
1061 const BoundedMatrix<
double, (TDim-1)*3, TDim> aux_matrix_PtangA =
prod(tangential_projection_matrix, voigt_normal_projection_matrix);
1065 noalias(auxLeftHandSideMatrix_1) += coeff_1*weight*
prod(N_aux_trans, aux_matrix_PtangACB);
1069 noalias(auxLeftHandSideMatrix_2) += coeff_2*weight*
prod(aux_matrix_N_trans_tang,
trans(N_aux_trans));
1073 noalias(rLeftHandSideMatrix) += auxLeftHandSideMatrix_1;
1074 noalias(rLeftHandSideMatrix) += auxLeftHandSideMatrix_2;
1080 for (
unsigned int i_node = 0; i_node < TNumNodes; ++i_node) {
1081 const auto &r_i_emb_vel = r_geom[i_node].GetValue(EMBEDDED_VELOCITY);
1082 for (
unsigned int d = 0;
d < TDim; ++
d) {
1083 embedded_vel_exp(i_node * BlockSize +
d) -= r_i_emb_vel(
d);
1088 noalias(rRightHandSideVector) += auxRightHandSideVector;
1089 noalias(rRightHandSideVector) -=
prod(auxLeftHandSideMatrix_1, prev_sol);
1090 noalias(rRightHandSideVector) -=
prod(auxLeftHandSideMatrix_2, prev_sol);
1091 noalias(auxRightHandSideVector) +=
prod(auxLeftHandSideMatrix_2, embedded_vel_exp);
1106 constexpr
unsigned int BlockSize = TDim+1;
1107 constexpr
unsigned int MatrixSize = TNumNodes*BlockSize;
1114 const double adjoint_consistency_term = -1.0;
1118 const double penalty = 1.0/rCurrentProcessInfo[PENALTY_COEFFICIENT];
1119 const double slip_length = rCurrentProcessInfo[SLIP_LENGTH];
1120 const double coeff_1 = slip_length*penalty*rData.
h / (slip_length + penalty*rData.
h);
1121 const double coeff_2 = eff_mu*penalty*rData.
h / (slip_length + penalty*rData.
h);
1130 for (
unsigned int i_gauss_int = 0; i_gauss_int < n_gauss_total; ++i_gauss_int) {
1139 for (
unsigned int i=0;
i<TNumNodes; ++
i) {
1140 for (
unsigned int comp=0; comp<TDim; ++comp) {
1141 N_aux(comp,
i*BlockSize+comp) = aux_N(
i);
1165 noalias(auxLeftHandSideMatrix_1) += adjoint_consistency_term*coeff_1*weight*aux_matrix_BtransAtransPtanACB;
1168 noalias(auxLeftHandSideMatrix_2) += adjoint_consistency_term*coeff_2*weight*
prod(aux_matrix_BtransAtransPtan, N_aux);
1173 noalias(rLeftHandSideMatrix) -= auxLeftHandSideMatrix_1;
1174 noalias(rLeftHandSideMatrix) -= auxLeftHandSideMatrix_2;
1180 for (
unsigned int i_node = 0; i_node < TNumNodes; ++i_node) {
1181 const auto &r_i_emb_vel = r_geom[i_node].GetValue(EMBEDDED_VELOCITY);
1182 for (
unsigned int d = 0;
d < TDim; ++
d) {
1183 embedded_vel_exp(i_node * BlockSize +
d) -= r_i_emb_vel(
d);
1188 noalias(rRightHandSideVector) -= auxRightHandSideVector;
1189 noalias(rRightHandSideVector) +=
prod(auxLeftHandSideMatrix_1, prev_sol);
1190 noalias(rRightHandSideVector) +=
prod(auxLeftHandSideMatrix_2, prev_sol);
1191 noalias(auxRightHandSideVector) -=
prod(auxLeftHandSideMatrix_2, embedded_vel_exp);
1209 if (this->
Is(SLIP)) {
1233 BoundedMatrix<
double, (TDim-1)*3, TNumNodes*(TDim+1)>& rB_matrix) {
1235 constexpr
unsigned int BlockSize = TDim+1;
1238 if constexpr (TDim == 3) {
1239 for (
unsigned int i=0;
i<TNumNodes;
i++) {
1240 rB_matrix(0,
i*BlockSize) = rDN_DX(
i,0);
1241 rB_matrix(1,
i*BlockSize+1) = rDN_DX(
i,1);
1242 rB_matrix(2,
i*BlockSize+2) = rDN_DX(
i,2);
1243 rB_matrix(3,
i*BlockSize) = rDN_DX(
i,1);
1244 rB_matrix(3,
i*BlockSize+1) = rDN_DX(
i,0);
1245 rB_matrix(4,
i*BlockSize+1) = rDN_DX(
i,2);
1246 rB_matrix(4,
i*BlockSize+2) = rDN_DX(
i,1);
1247 rB_matrix(5,
i*BlockSize) = rDN_DX(
i,2);
1248 rB_matrix(5,
i*BlockSize+2) = rDN_DX(
i,0);
1251 for (
unsigned int i=0;
i<TNumNodes;
i++) {
1252 rB_matrix(0,
i*BlockSize) = rDN_DX(
i,0);
1253 rB_matrix(1,
i*BlockSize+1) = rDN_DX(
i,1);
1254 rB_matrix(2,
i*BlockSize) = rDN_DX(
i,1);
1255 rB_matrix(2,
i*BlockSize+1) = rDN_DX(
i,0);
1269 rNormProjMatrix.
clear();
1272 if constexpr (TDim == 3) {
1275 rNormProjMatrix(0,0) = rUnitNormal(0)*rUnitNormal(0);
1276 rNormProjMatrix(0,1) = rUnitNormal(0)*rUnitNormal(1);
1277 rNormProjMatrix(1,0) = rUnitNormal(1)*rUnitNormal(0);
1278 rNormProjMatrix(1,1) = rUnitNormal(1)*rUnitNormal(1);
1291 rTangProjMatrix.
clear();
1294 if constexpr (TDim == 3) {
1298 rTangProjMatrix(0,0) = 1.0 - rUnitNormal(0)*rUnitNormal(0);
1299 rTangProjMatrix(0,1) = - rUnitNormal(0)*rUnitNormal(1);
1300 rTangProjMatrix(1,0) = - rUnitNormal(1)*rUnitNormal(0);
1301 rTangProjMatrix(1,1) = 1.0 - rUnitNormal(1)*rUnitNormal(1);
1312 BoundedMatrix<
double, TDim, (TDim-1)*3>& rVoigtNormProjMatrix) {
1314 rVoigtNormProjMatrix.clear();
1316 if constexpr (TDim == 3) {
1317 rVoigtNormProjMatrix(0,0) = rUnitNormal(0);
1318 rVoigtNormProjMatrix(0,3) = rUnitNormal(1);
1319 rVoigtNormProjMatrix(0,5) = rUnitNormal(2);
1320 rVoigtNormProjMatrix(1,1) = rUnitNormal(1);
1321 rVoigtNormProjMatrix(1,3) = rUnitNormal(0);
1322 rVoigtNormProjMatrix(1,4) = rUnitNormal(2);
1323 rVoigtNormProjMatrix(2,2) = rUnitNormal(2);
1324 rVoigtNormProjMatrix(2,4) = rUnitNormal(1);
1325 rVoigtNormProjMatrix(2,5) = rUnitNormal(0);
1327 rVoigtNormProjMatrix(0,0) = rUnitNormal(0);
1328 rVoigtNormProjMatrix(0,2) = rUnitNormal(1);
1329 rVoigtNormProjMatrix(1,1) = rUnitNormal(1);
1330 rVoigtNormProjMatrix(1,2) = rUnitNormal(0);
1341 array_1d<
double, TNumNodes*(TDim+1)>& rPrevSolVector) {
1343 rPrevSolVector.clear();
1345 for (
unsigned int i=0;
i<TNumNodes;
i++) {
1346 for (
unsigned int comp=0; comp<TDim; comp++) {
1347 rPrevSolVector(
i*(TDim+1)+comp) = rData.
v(
i,comp);
1349 rPrevSolVector(
i*(TDim+1)+TDim) = rData.
p(
i);
1379 void save(
Serializer& rSerializer)
const override {
Vector VectorType
Definition: element.h:88
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: element.h:86
Matrix MatrixType
Definition: element.h:90
PropertiesType::Pointer pGetProperties()
returns the pointer to the property of the element. Does not throw an error, to allow copying of elem...
Definition: element.h:1014
Definition: embedded_navier_stokes.h:54
~EmbeddedNavierStokes() override
Destructor.
Definition: embedded_navier_stokes.h:115
void Calculate(const Variable< array_1d< double, 3 >> &rVariable, array_1d< double, 3 > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_navier_stokes.h:392
void Calculate(const Variable< Matrix > &rVariable, Matrix &Output, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_navier_stokes.h:455
BaseType::IndexType IndexType
Definition: embedded_navier_stokes.h:70
void Calculate(const Variable< Vector > &rVariable, Vector &Output, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_navier_stokes.h:450
void AddSlipWinterTangentialPenaltyContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_navier_stokes.h:1005
void AddSlipWinterNormalPenaltyContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_navier_stokes.h:831
Element::Pointer Create(IndexType NewId, Element::GeometryType::Pointer pGeom, Element::PropertiesType::Pointer pProperties) const override
Definition: embedded_navier_stokes.h:133
void Calculate(const Variable< double > &rVariable, double &Output, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_navier_stokes.h:445
void AddBoundaryConditionModifiedNitcheContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedElementDataStruct &rData)
Definition: embedded_navier_stokes.h:690
BaseType::PropertiesType::Pointer PropertiesPointerType
Definition: embedded_navier_stokes.h:76
Element::Pointer Clone(IndexType NewId, NodesArrayType const &rThisNodes) const override
Definition: embedded_navier_stokes.h:144
void ComputeElementAsFluid(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, EmbeddedElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_navier_stokes.h:282
void SetInterfaceStrainMatrix(const BoundedMatrix< double, TNumNodes, TDim > &rDN_DX, BoundedMatrix< double,(TDim-1) *3, TNumNodes *(TDim+1)> &rB_matrix)
Definition: embedded_navier_stokes.h:1231
EmbeddedNavierStokes(IndexType NewId, GeometryPointerType pGeometry)
Default constructor.
Definition: embedded_navier_stokes.h:106
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Definition: embedded_navier_stokes.h:363
BaseType::MatrixType MatrixType
Definition: embedded_navier_stokes.h:68
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(EmbeddedNavierStokes)
Counted pointer of.
void AddSlipWinterTangentialSymmetricCounterpartContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_navier_stokes.h:1100
BaseType::GeometryType::Pointer GeometryPointerType
Definition: embedded_navier_stokes.h:72
BaseType::ElementDataStruct ElementDataType
Definition: embedded_navier_stokes.h:64
EmbeddedNavierStokes()
Definition: embedded_navier_stokes.h:499
void AddIntersectionBoundaryTermsContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedElementDataStruct &rData)
Definition: embedded_navier_stokes.h:513
void SetTangentialProjectionMatrix(const array_1d< double, 3 > &rUnitNormal, BoundedMatrix< double, TDim, TDim > &rTangProjMatrix)
Definition: embedded_navier_stokes.h:1287
void AddSlipWinterNormalSymmetricCounterpartContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedElementDataStruct &rData)
Definition: embedded_navier_stokes.h:915
void ComputeElementAsMixed(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, EmbeddedElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_navier_stokes.h:324
void AddBoundaryConditionPenaltyContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_navier_stokes.h:624
void GetPreviousSolutionVector(const ElementDataType &rData, array_1d< double, TNumNodes *(TDim+1)> &rPrevSolVector)
Definition: embedded_navier_stokes.h:1339
double ComputePenaltyCoefficient(const EmbeddedElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_navier_stokes.h:586
std::string Info() const override
Turn back information as a string.
Definition: embedded_navier_stokes.h:476
void FillEmbeddedElementData(EmbeddedElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_navier_stokes.h:159
EmbeddedNavierStokes(IndexType NewId, GeometryPointerType pGeometry, PropertiesPointerType pProperties)
Definition: embedded_navier_stokes.h:110
BaseType::NodesArrayType NodesArrayType
Definition: embedded_navier_stokes.h:74
void SetVoigtNormalProjectionMatrix(const array_1d< double, 3 > &rUnitNormal, BoundedMatrix< double, TDim,(TDim-1) *3 > &rVoigtNormProjMatrix)
Definition: embedded_navier_stokes.h:1310
void SetNormalProjectionMatrix(const array_1d< double, 3 > &rUnitNormal, BoundedMatrix< double, TDim, TDim > &rNormProjMatrix)
Definition: embedded_navier_stokes.h:1265
NavierStokes< TDim, TNumNodes > BaseType
Definition: embedded_navier_stokes.h:62
Element::Pointer Create(IndexType NewId, NodesArrayType const &rThisNodes, Element::PropertiesType::Pointer pProperties) const override
Definition: embedded_navier_stokes.h:126
void DropOuterNodesVelocityContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedElementDataStruct &rData)
Definition: embedded_navier_stokes.h:801
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_navier_stokes.h:236
BaseType::VectorType VectorType
Definition: embedded_navier_stokes.h:66
void AddBoundaryConditionElementContribution(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const EmbeddedElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: embedded_navier_stokes.h:1200
BaseType::GeometryType::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: embedded_navier_stokes.h:79
std::size_t IndexType
Definition: flags.h:74
bool Is(Flags const &rOther) const
Definition: flags.h:274
GeometryType::Pointer pGetGeometry()
Returns the pointer to the geometry.
Definition: geometrical_object.h:140
Flags & GetFlags()
Returns the flags of the object.
Definition: geometrical_object.h:176
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
std::size_t IndexType
Defines the index type.
Definition: geometrical_object.h:73
DataValueContainer & GetData()
Definition: geometrical_object.h:212
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
GeometryData::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: geometry.h:189
virtual Pointer Create(PointsArrayType const &rThisPoints) const
Creates a new geometry pointer.
Definition: geometry.h:813
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
void clear()
Definition: amatrix_interface.h:284
Definition: navier_stokes.h:63
void GetShapeFunctionsOnGauss(BoundedMatrix< double, 4, 4 > &Ncontainer)
Definition: navier_stokes.h:442
void ComputeGaussPointLHSContribution(BoundedMatrix< double, TNumNodes *(TDim+1), TNumNodes *(TDim+1)> &lhs, const ElementDataStruct &data)
void FillElementData(ElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: navier_stokes.h:374
void ComputeGaussPointRHSContribution(array_1d< double, TNumNodes *(TDim+1)> &rhs, const ElementDataStruct &data)
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Checks the input and that all required Kratos variables have been registered.
Definition: navier_stokes.h:239
virtual double ComputeEffectiveViscosity(const ElementDataStruct &rData)
Definition: navier_stokes.h:533
virtual void ComputeConstitutiveResponse(ElementDataStruct &rData, const ProcessInfo &rCurrentProcessInfo)
Definition: navier_stokes.h:499
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
typename CompressibleNavierStokesExplicit< TDim, TNumNodes >::ElementDataStruct ElementDataStruct
Definition: compressible_navier_stokes_explicit.h:705
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
AMatrix::IdentityMatrix< double > IdentityMatrix
Definition: amatrix_interface.h:564
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
AMatrix::VectorOuterProductExpression< TExpression1Type, TExpression2Type > outer_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:582
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
AMatrix::TransposeMatrix< const T > trans(const T &TheMatrix)
Definition: amatrix_interface.h:486
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
w_gauss
Definition: generate_convection_diffusion_explicit_element.py:136
p_gauss
Data interpolation to the Gauss points.
Definition: generate_droplet_dynamics.py:128
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 j
Definition: quadrature.py:648
K
Definition: sensitivityMatrix.py:73
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31
Definition: embedded_navier_stokes.h:81
ShapeFunctionsGradientsType DN_DX_pos_int
Definition: embedded_navier_stokes.h:89
ShapeFunctionsGradientsType DN_DX_pos_side
Definition: embedded_navier_stokes.h:84
MatrixType N_pos_int
Definition: embedded_navier_stokes.h:88
unsigned int n_neg
Definition: embedded_navier_stokes.h:97
std::vector< array_1d< double, 3 > > pos_int_unit_normals
Definition: embedded_navier_stokes.h:91
VectorType w_gauss_pos_side
Definition: embedded_navier_stokes.h:85
unsigned int n_pos
Definition: embedded_navier_stokes.h:96
MatrixType N_pos_side
Definition: embedded_navier_stokes.h:83
std::vector< unsigned int > out_vec_identifiers
Definition: embedded_navier_stokes.h:94
std::vector< unsigned int > int_vec_identifiers
Definition: embedded_navier_stokes.h:93
VectorType w_gauss_pos_int
Definition: embedded_navier_stokes.h:90
Definition: navier_stokes.h:72
double rho
Definition: navier_stokes.h:92
BoundedMatrix< double, TNumNodes, TDim > v
Definition: navier_stokes.h:73
array_1d< double, TNumNodes > N
Definition: navier_stokes.h:77
double dt
Definition: navier_stokes.h:89
Matrix C
Definition: navier_stokes.h:79
double volume
Definition: navier_stokes.h:88
array_1d< double, TNumNodes > p
Definition: navier_stokes.h:74
double mu
Definition: navier_stokes.h:91
double h
Definition: navier_stokes.h:87
BoundedMatrix< double, TNumNodes, TDim > DN_DX
Definition: navier_stokes.h:76