Skip to content
Snippets Groups Projects
Commit cfc3de91 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MPL] Add early exit in if saturation change is 0

This change is twofold; one one side the complicated
matrix multiplication is avoided, but on the other side
it is also preventing in initialization of the processes,
when dt = 0 the division by zero.

Naturally, this is a hack due to lag of separation of
constitutive variables update in the time step from
initialization (where dt, S_L_prev relevant for this
property, are not yet initialized).
parent ca414e86
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,11 @@ PropertyDataType SaturationDependentSwelling::value(
double const delta_S_eff = S_eff - S_eff_prev;
if (delta_S_eff == 0.)
{
return delta_sigma_sw; // still being zero.
}
// \Delta\sigma_{sw} = - \sum_i k_i (\lambda p S_{eff}^{(\lambda_i - 1)}
// e_i \otimes e_i \Delta S_L / (S_{max} - S_{min}), where
// e_i \otimes e_i is a square matrix with e_i,0^2 e_i,0*e_i,1 etc.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment