Skip to content

Commit

Permalink
Merge branch 'FE_mini_benchmark1' into 'master'
Browse files Browse the repository at this point in the history
[THM] A new benchmark: mini-benchmark1 of FE task force

See merge request ogs/ogs!4486
  • Loading branch information
endJunction committed Mar 10, 2023
2 parents 71bd62b + 5eed522 commit 1aa058a
Show file tree
Hide file tree
Showing 82 changed files with 945 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ProcessLib/ThermoHydroMechanics/Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ if (NOT OGS_USE_MPI)
OgsTest(PROJECTFILE ThermoHydroMechanics/A2/A2.prj RUNTIME 23)
OgsTest(PROJECTFILE ThermoHydroMechanics/A2/A2_heating.prj RUNTIME 23)
OgsTest(PROJECTFILE ThermoHydroMechanics/1D_freezing_column_Stefan/Stefan_problem.prj RUNTIME 15)
OgsTest(PROJECTFILE ThermoHydroMechanics/HeatingHomogeneousDomain/hex_THM.prj RUNTIME 30)
endif()

AddTest(
Expand Down Expand Up @@ -306,3 +307,34 @@ AddTest(
classical_transport_example_full_upwind_t_7200.00.vtu classical_transport_example_full_upwind_t_7200.00.vtu pressure pressure 1.e-9 1.0e-12
classical_transport_example_full_upwind_t_7200.00.vtu classical_transport_example_full_upwind_t_7200.00.vtu velocity velocity 1.e-12 1.0e-12
)

AddTest(
NAME ParallelFEM_HeatingHomogeneousDomain
PATH ThermoHydroMechanics/HeatingHomogeneousDomain
RUNTIME 5
EXECUTABLE ogs
EXECUTABLE_ARGS hex_THM.prj -m partitioned_mesh
WRAPPER mpirun
WRAPPER_ARGS -np 3
TESTER vtkdiff
REQUIREMENTS OGS_USE_MPI
DIFF_DATA
#
hex_ts_5_t_864000_000000_0.vtu hex_ts_5_t_864000_000000_0.vtu displacement displacement 1e-10 1.0e-9
hex_ts_5_t_864000_000000_0.vtu hex_ts_5_t_864000_000000_0.vtu pressure pressure 1e-10 1.0e-7
hex_ts_5_t_864000_000000_0.vtu hex_ts_5_t_864000_000000_0.vtu temperature temperature 1e-10 1.0e-9
hex_ts_5_t_864000_000000_0.vtu hex_ts_5_t_864000_000000_0.vtu epsilon epsilon 1e-10 1.0e-9
hex_ts_5_t_864000_000000_0.vtu hex_ts_5_t_864000_000000_0.vtu sigma sigma 1e-8 1.0e-7
#
hex_ts_5_t_864000_000000_1.vtu hex_ts_5_t_864000_000000_1.vtu displacement displacement 1e-10 1.0e-9
hex_ts_5_t_864000_000000_1.vtu hex_ts_5_t_864000_000000_1.vtu pressure pressure 1e-10 1.0e-7
hex_ts_5_t_864000_000000_1.vtu hex_ts_5_t_864000_000000_1.vtu temperature temperature 1e-10 1.0e-9
hex_ts_5_t_864000_000000_1.vtu hex_ts_5_t_864000_000000_1.vtu epsilon epsilon 1e-10 1.0e-9
hex_ts_5_t_864000_000000_1.vtu hex_ts_5_t_864000_000000_1.vtu sigma sigma 1e-8 1.0e-7
#
hex_ts_5_t_864000_000000_2.vtu hex_ts_5_t_864000_000000_2.vtu displacement displacement 1e-10 1.0e-9
hex_ts_5_t_864000_000000_2.vtu hex_ts_5_t_864000_000000_2.vtu pressure pressure 1e-10 1.0e-7
hex_ts_5_t_864000_000000_2.vtu hex_ts_5_t_864000_000000_2.vtu temperature temperature 1e-10 1.0e-9
hex_ts_5_t_864000_000000_2.vtu hex_ts_5_t_864000_000000_2.vtu epsilon epsilon 1e-10 1.0e-9
hex_ts_5_t_864000_000000_2.vtu hex_ts_5_t_864000_000000_2.vtu sigma sigma 1e-8 1.0e-7
)

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions Tests/Data/ThermoHydroMechanics/HeatingHomogeneousDomain/hex.vtu

Large diffs are not rendered by default.

354 changes: 354 additions & 0 deletions Tests/Data/ThermoHydroMechanics/HeatingHomogeneousDomain/hex_THM.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1,354 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<OpenGeoSysProject>
<meshes>
<mesh>hex.vtu</mesh>
<mesh>z1.vtu</mesh>
<mesh>z0.vtu</mesh>
<mesh>x0.vtu</mesh>
<mesh>x1.vtu</mesh>
<mesh>y0.vtu</mesh>
<mesh>y1.vtu</mesh>
</meshes>
<processes>
<process>
<name>THERMO_HYDRO_MECHANICS</name>
<type>THERMO_HYDRO_MECHANICS</type>
<integration_order>4</integration_order>
<dimension>3</dimension>
<constitutive_relation>
<type>LinearElasticIsotropic</type>
<youngs_modulus>E</youngs_modulus>
<poissons_ratio>nu</poissons_ratio>
</constitutive_relation>
<process_variables>
<displacement>displacement</displacement>
<pressure>pressure</pressure>
<temperature>temperature</temperature>
</process_variables>
<secondary_variables>
<secondary_variable internal_name="sigma" output_name="sigma"/>
<secondary_variable internal_name="epsilon" output_name="epsilon"/>
<secondary_variable internal_name="velocity" output_name="velocity"/>
</secondary_variables>
<specific_body_force>0 0 0.0</specific_body_force>
</process>
</processes>
<media>
<medium id="0">
<phases>
<phase>
<type>AqueousLiquid</type>
<properties>
<property>
<name>specific_heat_capacity</name>
<type>Constant</type>
<value>0.0</value>
</property>
<property>
<name>thermal_conductivity</name>
<type>Constant</type>
<value>0.6</value>
</property>
<property>
<name>density</name>
<type>Function</type>
<value>
<expression>1002.6 * exp(4.5e-10 * (phase_pressure - 1.e+5)-2.0e-4*(temperature-273.15))</expression>
</value>
<dvalue>
<variable_name>temperature</variable_name>
<expression>-0.20052 * exp(4.5e-10 * (phase_pressure - 1.e+5)-2.0e-4*(temperature-273.15))</expression>
</dvalue>
<dvalue>
<variable_name>phase_pressure</variable_name>
<expression>4.5117e-07 * exp(4.5e-10 * (phase_pressure - 1.e+5)-2.0e-4*(temperature-273.15))</expression>
</dvalue>
</property>
<property>
<name>viscosity</name>
<type>Function</type>
<value>
<expression> 2.1e-6 * exp(1808.5 / temperature)</expression>
</value>
<dvalue>
<variable_name>temperature</variable_name>
<expression>-0.0037978499999999998 * exp(1808.5 / temperature) / (temperature * temperature)</expression>
</dvalue>
<dvalue>
<variable_name>phase_pressure</variable_name>
<expression>0.0</expression>
</dvalue>
</property>
</properties>
</phase>
<phase>
<type>Solid</type>
<properties>
<property>
<name>density</name>
<type>Constant</type>
<value>2500</value>
</property>
<property>
<name>thermal_conductivity</name>
<type>Constant</type>
<value>1.2</value>
</property>
<property>
<name>specific_heat_capacity</name>
<type>Constant</type>
<value>0.0</value>
</property>
<property>
<name>thermal_expansivity</name>
<type>Constant</type>
<value>3.0e-6</value>
</property>
</properties>
</phase>
</phases>
<properties>
<property>
<name>permeability</name>
<type>Constant</type>
<value>3.5e-20</value>
</property>
<property>
<name>porosity</name>
<type>Constant</type>
<value>0.1</value>
</property>
<property>
<name>biot_coefficient</name>
<type>Constant</type>
<value>0.96111</value>
</property>
<property>
<name>thermal_conductivity</name>
<type>EffectiveThermalConductivityPorosityMixing</type>
</property>
</properties>
</medium>
</media>
<time_loop>
<processes>
<process ref="THERMO_HYDRO_MECHANICS">
<nonlinear_solver>basic_newton</nonlinear_solver>
<convergence_criterion>
<type>PerComponentDeltaX</type>
<norm_type>NORM2</norm_type>
<abstols>1.e-10 5.e-7 1.e-10 1.e-10 1.e-10</abstols>
</convergence_criterion>
<time_discretization>
<type>BackwardEuler</type>
</time_discretization>
<time_stepping>
<type>FixedTimeStepping</type>
<t_initial>0</t_initial>
<t_end>8.64e5</t_end>
<!-- Original end time defined in FE mini-benchmark 1: 100 days -->
<!--t_end>8.64e6</t_end-->
<timesteps>
<pair>
<repeat>50</repeat>
<delta_t>17.28e4</delta_t>
</pair>
</timesteps>
</time_stepping>
</process>
</processes>
<output>
<type>VTK</type>
<prefix>hex</prefix>
<timesteps>
<pair>
<repeat>50</repeat>
<each_steps>1</each_steps>
</pair>
</timesteps>
<variables>
<variable>displacement</variable>
<variable>pressure</variable>
<variable>temperature</variable>
<variable>sigma</variable>
<variable>epsilon</variable>
<variable>velocity</variable>
</variables>
<suffix>_ts_{:timestep}_t_{:time}</suffix>
</output>
</time_loop>
<parameters>
<parameter>
<name>E</name>
<type>Constant</type>
<value>1.e+9</value>
</parameter>
<parameter>
<name>nu</name>
<type>Constant</type>
<value>0.35</value>
</parameter>
<parameter>
<name>displacement0</name>
<type>Constant</type>
<values>0 0 0.</values>
</parameter>
<parameter>
<name>pressure_ic</name>
<type>Constant</type>
<values>2.0e+6</values>
</parameter>
<parameter>
<name>dirichlet0</name>
<type>Constant</type>
<value>0</value>
</parameter>
<parameter>
<name>Neumann0</name>
<type>Constant</type>
<value>0</value>
</parameter>
<parameter>
<name>temperature_ic</name>
<type>Constant</type>
<value>293.15</value>
</parameter>
<parameter>
<name>T_bc</name>
<type>Constant</type>
<value>1.0</value>
</parameter>
<parameter>
<name>T_bc_t</name>
<type>CurveScaled</type>
<curve>timeRamp</curve>
<parameter>T_bc</parameter>
</parameter>
</parameters>
<curves>
<curve>
<name>timeRamp</name>
<coords>0 8.64e6 17.28e6</coords>
<values>293.15 303.15 313.15</values>
</curve>
</curves>
<process_variables>
<process_variable>
<name>displacement</name>
<components>3</components>
<order>1</order>
<initial_condition>displacement0</initial_condition>
<boundary_conditions>
<boundary_condition>
<mesh>x0</mesh>
<type>Dirichlet</type>
<component>0</component>
<parameter>dirichlet0</parameter>
</boundary_condition>
<boundary_condition>
<mesh>x1</mesh>
<type>Dirichlet</type>
<component>0</component>
<parameter>dirichlet0</parameter>
</boundary_condition>
<boundary_condition>
<mesh>y0</mesh>
<type>Dirichlet</type>
<component>1</component>
<parameter>dirichlet0</parameter>
</boundary_condition>
<boundary_condition>
<mesh>y1</mesh>
<type>Dirichlet</type>
<component>1</component>
<parameter>dirichlet0</parameter>
</boundary_condition>
<boundary_condition>
<mesh>z0</mesh>
<type>Dirichlet</type>
<component>2</component>
<parameter>dirichlet0</parameter>
</boundary_condition>
<boundary_condition>
<mesh>z1</mesh>
<type>Dirichlet</type>
<component>2</component>
<parameter>dirichlet0</parameter>
</boundary_condition>
</boundary_conditions>
</process_variable>
<process_variable>
<name>pressure</name>
<components>1</components>
<order>1</order>
<initial_condition>pressure_ic</initial_condition>
</process_variable>
<process_variable>
<name>temperature</name>
<components>1</components>
<order>1</order>
<initial_condition>temperature_ic</initial_condition>
<boundary_conditions>
<boundary_condition>
<mesh>hex</mesh>
<type>Dirichlet</type>
<component>0</component>
<parameter>T_bc_t</parameter>
</boundary_condition>
</boundary_conditions>
</process_variable>
</process_variables>
<nonlinear_solvers>
<nonlinear_solver>
<name>basic_newton</name>
<type>Newton</type>
<max_iter>50</max_iter>
<linear_solver>general_linear_solver</linear_solver>
</nonlinear_solver>
</nonlinear_solvers>
<linear_solvers>
<linear_solver>
<name>general_linear_solver</name>
<eigen>
<solver_type>BiCGSTAB</solver_type>
<precon_type>ILUT</precon_type>
<max_iteration_step>10000</max_iteration_step>
<error_tolerance>1e-8</error_tolerance>
</eigen>
<petsc>
<parameters>
-ksp_type bcgs
-pc_type jacobi
-ksp_rtol 1.e-12 -ksp_atol 1.e-14
-ksp_max_it 4000
</parameters>
</petsc>
</linear_solver>
</linear_solvers>
<test_definition>
<vtkdiff>
<file>hex_ts_5_t_864000.000000.vtu</file>
<field>displacement</field>
<absolute_tolerance>1e-15</absolute_tolerance>
<relative_tolerance>1e-15</relative_tolerance>
</vtkdiff>
<vtkdiff>
<file>hex_ts_5_t_864000.000000.vtu</file>
<field>sigma</field>
<absolute_tolerance>5e-8</absolute_tolerance>
<relative_tolerance>1e-15</relative_tolerance>
</vtkdiff>
<vtkdiff>
<file>hex_ts_5_t_864000.000000.vtu</file>
<field>pressure</field>
<absolute_tolerance>3e-8</absolute_tolerance>
<relative_tolerance>1e-15</relative_tolerance>
</vtkdiff>
<vtkdiff>
<file>hex_ts_5_t_864000.000000.vtu</file>
<field>temperature</field>
<absolute_tolerance>1e-15</absolute_tolerance>
<relative_tolerance>1e-15</relative_tolerance>
</vtkdiff>
</test_definition>
</OpenGeoSysProject>
Loading

0 comments on commit 1aa058a

Please sign in to comment.