-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GeoMechanicsApplication] Partially saturated flow does not work as expected #12914
base: master
Are you sure you want to change the base?
Changes from 30 commits
93e1263
6fcc7fa
37758a7
409851f
bf5bd8d
188099f
7e10e65
85cb890
d31ed60
c4412d9
60eb250
e203f4c
124346e
62f388d
28ff169
6574b78
c5871a2
ef05087
2a98e5c
83debf8
04ce103
dd719eb
021cc95
0a1cdba
03c1ba7
fb3b09e
eb14f80
5825e04
437df1f
bd43cc4
162c3f4
f7c0261
be608a3
83d65fe
35b9872
27b69bc
856256e
5e78ddd
eec6c84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -283,8 +283,6 @@ void UPwSmallStrainElement<TDim, TNumNodes>::InitializeSolutionStep(const Proces | |
noalias(Variables.StressVector) = mStressVector[GPoint]; | ||
ConstitutiveParameters.SetStressVector(Variables.StressVector); | ||
mConstitutiveLawVector[GPoint]->InitializeMaterialResponseCauchy(ConstitutiveParameters); | ||
|
||
mRetentionLawVector[GPoint]->InitializeSolutionStep(RetentionParameters); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. RetentionParameters is not used any longer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
} | ||
|
||
// Reset hydraulic discharge | ||
|
@@ -299,9 +297,8 @@ void UPwSmallStrainElement<TDim, TNumNodes>::ResetHydraulicDischarge() | |
KRATOS_TRY | ||
|
||
// Reset hydraulic discharge | ||
GeometryType& rGeom = this->GetGeometry(); | ||
for (unsigned int i = 0; i < TNumNodes; ++i) { | ||
ThreadSafeNodeWrite(rGeom[i], HYDRAULIC_DISCHARGE, 0.0); | ||
for (auto& r_node : this->GetGeometry()) { | ||
ThreadSafeNodeWrite(r_node, HYDRAULIC_DISCHARGE, 0.0); | ||
} | ||
|
||
KRATOS_CATCH("") | ||
|
@@ -357,8 +354,7 @@ void UPwSmallStrainElement<TDim, TNumNodes>::InitializeNonLinearIteration(const | |
{ | ||
KRATOS_TRY | ||
|
||
const GeometryType& rGeom = this->GetGeometry(); | ||
ConstitutiveLaw::Parameters ConstitutiveParameters(rGeom, this->GetProperties(), rCurrentProcessInfo); | ||
ConstitutiveLaw::Parameters ConstitutiveParameters(this->GetGeometry(), this->GetProperties(), rCurrentProcessInfo); | ||
ConstitutiveParameters.Set(ConstitutiveLaw::COMPUTE_STRESS); | ||
ConstitutiveParameters.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN); | ||
ConstitutiveParameters.Set(ConstitutiveLaw::INITIALIZE_MATERIAL_RESPONSE); // Note: this is for nonlocal damage | ||
|
@@ -434,8 +430,6 @@ void UPwSmallStrainElement<TDim, TNumNodes>::FinalizeSolutionStep(const ProcessI | |
mStateVariablesFinalized[GPoint] = | ||
mConstitutiveLawVector[GPoint]->GetValue(STATE_VARIABLES, mStateVariablesFinalized[GPoint]); | ||
|
||
mRetentionLawVector[GPoint]->FinalizeSolutionStep(RetentionParameters); | ||
|
||
if (rCurrentProcessInfo[NODAL_SMOOTHING]) | ||
this->SaveGPStress(StressContainer, mStressVector[GPoint], GPoint); | ||
} | ||
|
@@ -1246,17 +1240,18 @@ void UPwSmallStrainElement<TDim, TNumNodes>::CalculateAndAddLHS(MatrixType& rLef | |
KRATOS_TRY | ||
|
||
this->CalculateAndAddStiffnessMatrix(rLeftHandSideMatrix, rVariables); | ||
this->CalculateAndAddCompressibilityMatrix(rLeftHandSideMatrix, rVariables); | ||
|
||
if (!rVariables.IgnoreUndrained) { | ||
this->CalculateAndAddCouplingMatrix(rLeftHandSideMatrix, rVariables); | ||
this->CalculateAndAddCouplingMatrix(rLeftHandSideMatrix, rVariables); | ||
|
||
if (!rVariables.IgnoreUndrained) { | ||
const auto permeability_matrix = | ||
GeoTransportEquationUtilities::CalculatePermeabilityMatrix<TDim, TNumNodes>( | ||
rVariables.GradNpT, rVariables.DynamicViscosityInverse, rVariables.PermeabilityMatrix, | ||
rVariables.RelativePermeability, rVariables.IntegrationCoefficient); | ||
GeoElementUtilities::AssemblePPBlockMatrix(rLeftHandSideMatrix, permeability_matrix); | ||
} | ||
|
||
this->CalculateAndAddCompressibilityMatrix(rLeftHandSideMatrix, rVariables); | ||
} | ||
|
||
KRATOS_CATCH("") | ||
} | ||
|
@@ -1280,17 +1275,18 @@ void UPwSmallStrainElement<TDim, TNumNodes>::CalculateAndAddCouplingMatrix(Matri | |
{ | ||
KRATOS_TRY | ||
|
||
const auto coupling_matrix = GeoTransportEquationUtilities::CalculateCouplingMatrix( | ||
rVariables.B, this->GetStressStatePolicy().GetVoigtVector(), rVariables.Np, | ||
const Matrix coupling_matrix_up = GeoTransportEquationUtilities::CalculateCouplingMatrix( | ||
rVariables.B, GetStressStatePolicy().GetVoigtVector(), rVariables.Np, | ||
rVariables.BiotCoefficient, rVariables.BishopCoefficient, rVariables.IntegrationCoefficient); | ||
GeoElementUtilities::AssembleUPBlockMatrix(rLeftHandSideMatrix, coupling_matrix); | ||
GeoElementUtilities::AssembleUPBlockMatrix(rLeftHandSideMatrix, coupling_matrix_up); | ||
|
||
if (!rVariables.IgnoreUndrained) { | ||
const double SaturationCoefficient = rVariables.DegreeOfSaturation / rVariables.BishopCoefficient; | ||
const BoundedMatrix<double, TNumNodes, TNumNodes * TDim> transposed_coupling_matrix = | ||
PORE_PRESSURE_SIGN_FACTOR * SaturationCoefficient * rVariables.VelocityCoefficient * | ||
trans(coupling_matrix); | ||
GeoElementUtilities::AssemblePUBlockMatrix(rLeftHandSideMatrix, transposed_coupling_matrix); | ||
const Matrix coupling_matrix_pu = GeoTransportEquationUtilities::CalculateCouplingMatrix( | ||
rVariables.B, GetStressStatePolicy().GetVoigtVector(), rVariables.Np, | ||
rVariables.BiotCoefficient, rVariables.DegreeOfSaturation, rVariables.IntegrationCoefficient); | ||
GeoElementUtilities::AssemblePUBlockMatrix( | ||
rLeftHandSideMatrix, | ||
PORE_PRESSURE_SIGN_FACTOR * rVariables.VelocityCoefficient * trans(coupling_matrix_pu)); | ||
} | ||
|
||
KRATOS_CATCH("") | ||
|
@@ -1389,15 +1385,18 @@ void UPwSmallStrainElement<TDim, TNumNodes>::CalculateAndAddCouplingTerms(Vector | |
rVariables.B, this->GetStressStatePolicy().GetVoigtVector(), rVariables.Np, | ||
rVariables.BiotCoefficient, rVariables.BishopCoefficient, rVariables.IntegrationCoefficient); | ||
|
||
const array_1d<double, TNumNodes * TDim> coupling_terms = prod(coupling_matrix, rVariables.PressureVector); | ||
GeoElementUtilities::AssembleUBlockVector(rRightHandSideVector, coupling_terms); | ||
const array_1d<double, TNumNodes * TDim> coupling_force = prod(coupling_matrix, rVariables.PressureVector); | ||
GeoElementUtilities::AssembleUBlockVector(rRightHandSideVector, coupling_force); | ||
|
||
if (!rVariables.IgnoreUndrained) { | ||
const double SaturationCoefficient = rVariables.DegreeOfSaturation / rVariables.BishopCoefficient; | ||
const array_1d<double, TNumNodes> transposed_coupling_matrix = | ||
PORE_PRESSURE_SIGN_FACTOR * SaturationCoefficient * | ||
prod(trans(coupling_matrix), rVariables.VelocityVector); | ||
GeoElementUtilities::AssemblePBlockVector(rRightHandSideVector, transposed_coupling_matrix); | ||
const Matrix p_coupling_matrix = | ||
(-1.0) * GeoTransportEquationUtilities::CalculateCouplingMatrix( | ||
rVariables.B, GetStressStatePolicy().GetVoigtVector(), rVariables.Np, | ||
rVariables.BiotCoefficient, rVariables.DegreeOfSaturation, | ||
rVariables.IntegrationCoefficient); | ||
const array_1d<double, TNumNodes> coupling_flow = | ||
PORE_PRESSURE_SIGN_FACTOR * prod(trans(p_coupling_matrix), rVariables.VelocityVector); | ||
GeoElementUtilities::AssemblePBlockVector(rRightHandSideVector, coupling_flow); | ||
} | ||
|
||
KRATOS_CATCH("") | ||
|
@@ -1493,7 +1492,7 @@ array_1d<double, TNumNodes> UPwSmallStrainElement<TDim, TNumNodes>::CalculateFlu | |
const BoundedMatrix<double, TNumNodes, TDim> temp_matrix = | ||
prod(rVariables.GradNpT, rVariables.PermeabilityMatrix) * rVariables.IntegrationCoefficient; | ||
|
||
return rVariables.DynamicViscosityInverse * this->GetProperties()[DENSITY_WATER] * | ||
return rVariables.DynamicViscosityInverse * this->GetProperties()[DENSITY_WATER] * rVariables.BishopCoefficient * | ||
rVariables.RelativePermeability * prod(temp_matrix, rVariables.BodyAcceleration); | ||
|
||
KRATOS_CATCH("") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -206,9 +206,6 @@ void UPwSmallStrainInterfaceElement<TDim, TNumNodes>::InitializeSolutionStep(con | |
noalias(StressVector) = mStressVector[GPoint]; | ||
ConstitutiveParameters.SetStressVector(StressVector); | ||
mConstitutiveLawVector[GPoint]->InitializeMaterialResponseCauchy(ConstitutiveParameters); | ||
|
||
// Initialize retention law | ||
mRetentionLawVector[GPoint]->InitializeSolutionStep(RetentionParameters); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. RetentionParameters should be removed as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed. |
||
} | ||
|
||
KRATOS_CATCH("") | ||
|
@@ -279,9 +276,6 @@ void UPwSmallStrainInterfaceElement<TDim, TNumNodes>::FinalizeSolutionStep(const | |
|
||
mStateVariablesFinalized[GPoint] = | ||
mConstitutiveLawVector[GPoint]->GetValue(STATE_VARIABLES, mStateVariablesFinalized[GPoint]); | ||
|
||
// retention law | ||
mRetentionLawVector[GPoint]->FinalizeSolutionStep(RetentionParameters); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, again about RetentionParameters There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed. |
||
} | ||
|
||
if (rCurrentProcessInfo[NODAL_SMOOTHING]) this->ExtrapolateGPValues(JointWidthContainer); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand, InitializeMaterial and other retention law functions were doing nothing after certain changes. Nice to remove them finally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.