Skip to content

Commit

Permalink
Merge branch 'trm-bentonite-tests' into 'master'
Browse files Browse the repository at this point in the history
[TRM] Tests for a bentonite material model (implemented in generalmod, used via MFront)

See merge request ogs/ogs!5083
  • Loading branch information
endJunction committed Nov 19, 2024
2 parents 2c94b1c + 9a1f09f commit 1ea3dc3
Show file tree
Hide file tree
Showing 90 changed files with 10,834 additions and 15 deletions.
8 changes: 8 additions & 0 deletions Documentation/.vale/Vocab/ogs/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ frontmatter
Futurile
Galerkin
Genuchten
generalmod
Geoenergy
Geotechnica
Gerasimov
Giraldo
gml
GML
Expand All @@ -67,11 +70,13 @@ Guix
Guo
Haibing
Heidemann
Helfer
Hoek
Hoek-Brown
Homebrew
Horner
hyperelastic
Hypoplasticity
IC[s]
IPhreeqc
ipynb
Expand Down Expand Up @@ -158,6 +163,7 @@ SGrid
Shao
Shil
shortcode
Simo
Snakemake
Srivastava
ST[s?]
Expand All @@ -172,12 +178,14 @@ Taucha
Technische
TESPy
Theis
Thermohydromechanical
Thomas
Thuringia
Thuringian
Thury
TODO[s?]
Tresca
Tymofiy
Ucar
Unlicense
Unstrut
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ void checkMPLProperties(
std::array const required_medium_properties = {
MaterialPropertyLib::porosity, MaterialPropertyLib::biot_coefficient,
MaterialPropertyLib::bishops_effective_stress,
MaterialPropertyLib::relative_permeability,
MaterialPropertyLib::saturation};
MaterialPropertyLib::relative_permeability};
std::array const required_liquid_properties = {
MaterialPropertyLib::viscosity, MaterialPropertyLib::density};
std::array const required_solid_properties = {MaterialPropertyLib::density};
Expand Down
11 changes: 11 additions & 0 deletions ProcessLib/ThermoRichardsMechanics/Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,17 @@ if(OGS_USE_MFRONT)
mfront_A2_ts_76_t_2764800.000000.vtu A2_effective_stess0_test_ts_76_t_2764800.000000.vtu sigma_total sigma_total 6e-8 1e-8
)
endif()

add_subdirectory("${CMAKE_SOURCE_DIR}/Tests/Data/ThermoRichardsMechanics/MFront/BentoniteBehaviourGeneralMod/MFrontBehaviour/" "${CMAKE_BINARY_DIR}/Tests/Data/ThermoRichardsMechanics/MFront/BentoniteBehaviourGeneralMod/MFrontBehaviour/")

OgsTest(PROJECTFILE ThermoRichardsMechanics/MFront/BentoniteBehaviourGeneralMod/0d_confined_compression/confined_compression.prj RUNTIME 60)
OgsTest(PROJECTFILE ThermoRichardsMechanics/MFront/BentoniteBehaviourGeneralMod/0d_resaturation/resaturation.prj RUNTIME 10)

OgsTest(PROJECTFILE ThermoRichardsMechanics/MFront/BentoniteBehaviourGeneralMod/1d_column_resaturation/bentonite_column.prj RUNTIME 800)

OgsTest(PROJECTFILE ThermoRichardsMechanics/MFront/BentoniteBehaviourGeneralMod/1d_column_restart/bentonite_column_restart.xml RUNTIME 10)
OgsTest(PROJECTFILE ThermoRichardsMechanics/MFront/BentoniteBehaviourGeneralMod/1d_column_restart/bentonite_column_restart_fail.xml PROPERTIES PASS_REGULAR_EXPRESSION "Absolute and relative error [(]maximum norm[)] are larger than the corresponding thresholds 8[.]000000000000000e-03 and 2[.]000000000000000e-02[.]
" RUNTIME 10)
endif()

if (NOT OGS_USE_MPI)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,25 +127,37 @@ void ThermoRichardsMechanicsLocalAssembler<
NumLib::shapeFunctionInterpolate(-p_L, N, p_cap_ip);

MPL::VariableArray variables;
variables.capillary_pressure = p_cap_ip;
variables.liquid_phase_pressure = -p_cap_ip;
// setting pG to 1 atm
// TODO : rewrite equations s.t. p_L = pG-p_cap
variables.gas_phase_pressure = 1.0e5;
variables.temperature = T_ip;

double const S_L =
medium.property(MPL::PropertyType::saturation)
.template value<double>(variables, x_position, t, dt);
std::get<PrevState<SaturationData>>(this->prev_states_[ip])->S_L = S_L;

if (medium.hasProperty(MPL::PropertyType::saturation))
{
variables.capillary_pressure = p_cap_ip;
variables.liquid_phase_pressure = -p_cap_ip;
// setting pG to 1 atm
// TODO : rewrite equations s.t. p_L = pG-p_cap
variables.gas_phase_pressure = 1.0e5;
variables.temperature = T_ip;

double const S_L =
medium.property(MPL::PropertyType::saturation)
.template value<double>(variables, x_position, t, dt);
std::get<PrevState<SaturationData>>(this->prev_states_[ip])->S_L =
S_L;

variables.liquid_saturation = S_L;
}

constitutive_setting.init(models, t, dt, x_position, media_data,
{T_ip, 0, {}}, this->current_states_[ip],
this->prev_states_[ip]);

if (this->process_data_.initial_stress.value)
{
variables.liquid_saturation = S_L;
if (!medium.hasProperty(MPL::PropertyType::saturation))
{
OGS_FATAL(
"The medium has no saturation property required to compute "
"initial stress.");
}
convertInitialStressType(ip, t, x_position, medium, variables,
-p_cap_ip);
}
Expand Down
Loading

0 comments on commit 1ea3dc3

Please sign in to comment.