Skip to content
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

Open
wants to merge 39 commits into
base: master
Choose a base branch
from

Conversation

mnabideltares
Copy link
Contributor

This issue is time-boxed to 10 developer days.

22/10/2024 - JDN - Comment
I need more information to able to prioritize this for this sprint or beyond. i.e. whats the urgency ? who is it for ? also needs refinement ? I wasn't aware we were using partial saturation anywhere and we are currently awaiting for 2025 to do so, but do I interpret correctly that the mechanism also fails when the zone above the phreatic line is fully unsaturated

Description

The Partially saturated flow is implemented but it has been never tested. Moreover, instability arrised when we tried to apply it.

The equation for partially saturated flow is:

$$\left[ (\alpha + n \beta) \rho^w S + n \rho^w \frac{d S}{dp} \right] \frac{\partial p}{\partial t} = \frac{\partial}{\partial x_i} \left[ \frac{\rho^w k_r K_{ij}}{\mu} \left( \frac{\partial p}{\partial x_j} - \rho^w g_j \right) \right]$$

where

$$k_r = S_e^{g_l} \left[ 1 - \left( 1 -S_e^{1/g_m} \right)^{g_m} \right]$$ $$S_e = \frac{S - S_r}{S_s - S_r}$$

Here we start from a simple test case, with saturated flow below the phreatic line:
In the case of $S_r = 0$, the pressure above the phreatic line needs to be zero. However, from this equation, the left hand side includes the saturation $S$ which is zero. It leads to a zero $C$ matrix. Morover, $k_r = 0$ too, which leads to a zero $K$ matrix. Therefore, a zero matrix is added which makes the diagonal of the generic matrix partly to be zero, and it lead to a singular matrix.
This can be probably avoided to adding "BIOT_COEFFICIENT" to the material parameters to set the $C$ matrix manually as a user defined parameter.

In the case of $S_r > 0$, then $K_r =0$`but the left hand side gets a nonzero value. it means $\frac{dp}{dt} = 0$. This is proposed to lead to unchanged pressure above the phreatic line.

However, here we see a change in pressure. It indicates there is driving force, which leads the water pressure goes up. Which is an unexpected behaviour,

@WPK4FEM WPK4FEM removed the request for review from a team December 9, 2024 16:07
Copy link
Contributor

@markelov208 markelov208 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Mohamed and Wijtze-Pieter, the code looks very professional! Sorry I missed what was done to fix the problem. Based on the recent discussion, a higher order shall be used; however, I do not see it here. Does it mean that this PR's goal is to make the code professional? Many thanks.

@@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RetentionParameters is not used any longer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@@ -135,10 +135,8 @@ void UPwBaseElement::Initialize(const ProcessInfo& rCurrentProcessInfo)
}

mRetentionLawVector.resize(number_of_integration_points);
for (unsigned int i = 0; i < mRetentionLawVector.size(); ++i) {
mRetentionLawVector[i] = RetentionLawFactory::Clone(r_properties);
mRetentionLawVector[i]->InitializeMaterial(
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RetentionParameters should be removed as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, again about RetentionParameters

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Comment on lines 294 to 296
const double p0 = r_geom[0].FastGetSolutionStepValue(WATER_PRESSURE);
const double p1 = r_geom[1].FastGetSolutionStepValue(WATER_PRESSURE);
const double p2 = r_geom[2].FastGetSolutionStepValue(WATER_PRESSURE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many assignments for pressure values. What do you think on using
Vector pressure(3);
std::transform(r_geom.begin(), r_geom.begin()+3, pressure.begin(), [](const auto& node) {
return node.FastGetSolutionStepValue(WATER_PRESSURE);
});
It can be a separate function that returns pressure vector of given size.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried, see the version on github now.
Eventually, I would like to replace the whole summation below with shapefunctions of the pressure geometry multiplied by the p gotten from this pressure geometry. That is what it should be, there is no real need to write out this interpolation in the way it is done here. ( This is only very error prone )

"domain_size" : 2,
"model_import_settings": {
"input_type" : "mdpa",
"input_filename" : "kolom"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the file name be column?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

Comment on lines 26 to 27
"K0_MAIN_DIRECTION": 1,
"K0_NC": 0.6,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

Comment on lines 26 to 27
"K0_MAIN_DIRECTION": 1,
"K0_NC": 0.6,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

"domain_size" : 2,
"model_import_settings": {
"input_type" : "mdpa",
"input_filename" : "kolom"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

column?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

"domain_size" : 2,
"model_import_settings": {
"input_type" : "mdpa",
"input_filename" : "kolom"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

column?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Review in progress
4 participants