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
Richards and material models #2188
Richards and material models #2188
Conversation
(capillary_pressure < 0.0) ? _minor_offset : capillary_pressure; | ||
double Se = std::pow(pc / _pb, 1.0 / (1.0 - _m)) + 1.0; | ||
Se = std::pow(Se, -_m); | ||
const double pc = std::max(_minor_offset, capillary_pressure); |
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.
The previous expression and the new one are not equal. For instance if capillary_pressure = 0.1
and _minor_offset = 0.5
the previous expression set pc
to 0.1
while the new expression results in pc = 0.5
. Is this intended?
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.
Intended. This moves the cutoff to correct point; the pc value is set to "minor_offset" not only for non-positive values, but for pc < minor_offset.
With capillary_pressure(x) = x, minor_offset = 0.1, the pc(x = 0.05) = 0.05 in the previous implementation, now it is does not have this "negative tooth" between x = 0 and 0.1.
@@ -77,6 +76,11 @@ double VanGenuchtenCapillaryPressureSaturation::getdPcdS( | |||
|
|||
return -getdPcdSvGBar(1 - _saturation_r); | |||
} | |||
if (saturation < _saturation_r) | |||
return 0; |
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.
Is _saturation_r
a lower bound? Then I would expect to set the saturation to _saturation_r
.
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.
This one is indeed correct: there is a cut-off in the function for s < s_r, so the derivative (this function) is 0.
if (saturation < _saturation_r) | ||
return 0; | ||
if (saturation > _saturation_max) | ||
return 0; |
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.
Why not _saturation_max
?
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.
Same cut-off in function => derivative = 0
if (_has_regularized) | ||
{ | ||
OGS_FATAL("Not implemented."); | ||
/* |
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.
What is the plan for the commented code? Is it a suggestion for the implementation?
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.
Fixing... Added a descriptive error message. Removed the commented section.
3ba68e8
to
2dc97b7
Compare
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.
Thanks for answering questions. ⏩
... and also comments.
One is the d permeability / d saturation, another is the second derivative d^2 p_cap / dS^2
2dc97b7
to
9cecfe4
Compare
OpenGeoSys development has been moved to GitLab. |
A set of smaller fixes and extension of the unsaturated material model by permeability derivative and second derivative of capillary pressure wrt saturation. The derivatives are used in the RichardsMechanics process implementation in the following PR.