diff --git a/ProcessLib/HT/Tests.cmake b/ProcessLib/HT/Tests.cmake index cc2b9c39e4339fa6ba16da62f37def1675be5c76..8207994e1f65bcd39e1727329ab228adc585bac3 100644 --- a/ProcessLib/HT/Tests.cmake +++ b/ProcessLib/HT/Tests.cmake @@ -39,6 +39,20 @@ AddTest( VIS ConstViscosityThermalConvectionStaggeredAdaptive_dt_pcs_1_ts_135_t_50000000000.000000.vtu ) +AddTest( + NAME HT_a_DECOVALEX_THMC_based_Example + PATH Parabolic/HT//StaggeredCoupling/ADecovalexTHMCBasedHTExample + EXECUTABLE ogs + EXECUTABLE_ARGS th_decovalex.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI) + DIFF_DATA + th_decovalex.vtu th_decovalex_pcs_1_ts_40_t_18.000000.vtu T_ref T 1e-14 1.e-14 + th_decovalex.vtu th_decovalex_pcs_1_ts_40_t_18.000000.vtu p_ref p 1e-14 1.e-14 + VIS th_decovalex_pcs_1_ts_78_t_1000.000000.vtu +) + # MPI/PETSc tests AddTest( NAME Parallel_LARGE_2D_ThermalConvection_constviscosity @@ -86,3 +100,17 @@ AddTest( square_5500x5500.vtu ConstViscosityThermalConvectionStaggeredAdaptive_dt_pcs_1_ts_135_t_50000000000_000000_0.vtu p_ref p 1e-3 1.e-3 VIS ConstViscosityThermalConvectionStaggeredAdaptive_dt_pcs_1_ts_135_t_50000000000_000000_0.vtu ) + +AddTest( + NAME HT_a_DECOVALEX_THMC_based_Example + PATH Parabolic/HT//StaggeredCoupling/ADecovalexTHMCBasedHTExample + EXECUTABLE_ARGS th_decovalex.prj + WRAPPER mpirun + WRAPPER_ARGS -np 1 + TESTER vtkdiff + REQUIREMENTS OGS_USE_MPI + DIFF_DATA + th_decovalex.vtu th_decovalex_pcs_1_ts_40_t_18_000000_0.vtu T_ref T 1e-10 1.e-10 + th_decovalex.vtu th_decovalex_pcs_1_ts_40_t_18_000000_0.vtu p_ref p 1e-10 1.e-10 + VIS th_decovalex_pcs_1_ts_78_t_1000_000000_0.vtu +) diff --git a/Tests/Data/Parabolic/HT/StaggeredCoupling/ADecovalexTHMCBasedHTExample/boundary.gml b/Tests/Data/Parabolic/HT/StaggeredCoupling/ADecovalexTHMCBasedHTExample/boundary.gml new file mode 100644 index 0000000000000000000000000000000000000000..1a3f7779ef8e4115c3fe6330e541235abc33ad20 --- /dev/null +++ b/Tests/Data/Parabolic/HT/StaggeredCoupling/ADecovalexTHMCBasedHTExample/boundary.gml @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1211ebec2574570d7e2aaf4797d4ab0ab62788fb0e716d9c8786ed065f131185 +size 3303 diff --git a/Tests/Data/Parabolic/HT/StaggeredCoupling/ADecovalexTHMCBasedHTExample/th_decovalex.prj b/Tests/Data/Parabolic/HT/StaggeredCoupling/ADecovalexTHMCBasedHTExample/th_decovalex.prj new file mode 100644 index 0000000000000000000000000000000000000000..82f52cf90ef7ec2a245640da2d60bc46c429b5f5 --- /dev/null +++ b/Tests/Data/Parabolic/HT/StaggeredCoupling/ADecovalexTHMCBasedHTExample/th_decovalex.prj @@ -0,0 +1,684 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<OpenGeoSysProject> + <mesh>th_decovalex.vtu</mesh> + <geometry>boundary.gml</geometry> + <processes> + <process> + <name>th_decovalex</name> + <type>HT</type> + <coupling_scheme>staggered</coupling_scheme> + <integration_order>2</integration_order> + <process_variables> + <temperature>T</temperature> + <pressure>p</pressure> + </process_variables> + + <fluid> + <density> + <type>TemperatureDependent</type> + <temperature0> 293.0 </temperature0> + <beta> 4.3e-4 </beta> + <rho0>1000.</rho0> + </density> + <viscosity> + <type>Constant</type> + <value> 1.e-3 </value> + </viscosity> + <specific_heat_capacity> + <type>Constant</type> + <value> 4000. </value> + </specific_heat_capacity> + </fluid> + + <porous_medium> + <porous_medium id="0"> + <permeability> + <permeability_tensor_entries>mu0</permeability_tensor_entries> + <type>Constant</type> + </permeability> + <porosity> + <type>Constant</type> + <porosity_parameter>n0</porosity_parameter> + </porosity> + <storage> + <type>Constant</type> + <value>0.0</value> + </storage> + </porous_medium> + <porous_medium id="1"> + <permeability> + <permeability_tensor_entries>mu1</permeability_tensor_entries> + <type>Constant</type> + </permeability> + <porosity> + <type>Constant</type> + <porosity_parameter>n1</porosity_parameter> + </porosity> + <storage> + <type>Constant</type> + <value>0.0</value> + </storage> + </porous_medium> + </porous_medium> + <density_solid>rho_solid</density_solid> + <specific_heat_capacity_solid>c_p</specific_heat_capacity_solid> + <thermal_conductivity_solid>lambda</thermal_conductivity_solid> + <thermal_conductivity_fluid>lambda_fluid</thermal_conductivity_fluid> + <specific_body_force>0 -9.81</specific_body_force> + <secondary_variables> + <secondary_variable type="static" internal_name="darcy_velocity" output_name="darcy_velocity"/> + </secondary_variables> + </process> + </processes> + + <time_loop> + <global_process_coupling> + <max_iter> 6 </max_iter> + <convergence_criteria> + <!-- convergence criterion for the first process --> + <convergence_criterion> + <type>DeltaX</type> + <norm_type>NORM2</norm_type> + <reltol>1.e-14</reltol> + </convergence_criterion> + <!-- convergence criterion for the second process --> + <convergence_criterion> + <type>DeltaX</type> + <norm_type>NORM2</norm_type> + <reltol>1.e-14</reltol> + </convergence_criterion> + </convergence_criteria> + </global_process_coupling> + <processes> + <process ref="th_decovalex"> + <nonlinear_solver>basic_picard_T</nonlinear_solver> + <convergence_criterion> + <type>DeltaX</type> + <norm_type>NORM2</norm_type> + <abstol>1.e-6</abstol> + </convergence_criterion> + <time_discretization> + <type>BackwardEuler</type> + </time_discretization> + <output> + <variables> + <variable> T </variable> + </variables> + </output> + <time_stepping> + <type>FixedTimeStepping</type> + <t_initial> 0.0 </t_initial> + <t_end> 1e3 </t_end> + <timesteps> + <pair> + <repeat>4</repeat> + <delta_t>0.001</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>0.006</delta_t> + </pair> + <pair> + <repeat>9</repeat> + <delta_t>0.01</delta_t> + </pair> + <pair> + <repeat>9</repeat> + <delta_t>0.1</delta_t> + </pair> + <pair> + <repeat>39</repeat> + <delta_t>1.</delta_t> + </pair> + <pair> + <repeat>2</repeat> + <delta_t>2.0</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>16.0</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>30.0</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>40.0</delta_t> + </pair> + <pair> + <repeat>10</repeat> + <delta_t>86.0</delta_t> + </pair> + <pair> + <repeat>90</repeat> + <delta_t>100.0</delta_t> + </pair> + <pair> + <repeat>100</repeat> + <delta_t>900</delta_t> + </pair> + <pair> + <repeat>90</repeat> + <delta_t>1.e4</delta_t> + </pair> + </timesteps> + </time_stepping> + </process> + <process ref="th_decovalex"> + <nonlinear_solver>basic_picard_H</nonlinear_solver> + <convergence_criterion> + <type>DeltaX</type> + <norm_type>NORM2</norm_type> + <abstol>1.e-6</abstol> + </convergence_criterion> + <time_discretization> + <type>BackwardEuler</type> + </time_discretization> + <output> + <variables> + <variable> p </variable> + <variable>darcy_velocity</variable> + </variables> + </output> + <time_stepping> + <type>FixedTimeStepping</type> + <t_initial> 0.0 </t_initial> + <t_end> 1.e3 </t_end> + <timesteps> + <pair> + <repeat>4</repeat> + <delta_t>0.001</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>0.006</delta_t> + </pair> + <pair> + <repeat>9</repeat> + <delta_t>0.01</delta_t> + </pair> + <pair> + <repeat>9</repeat> + <delta_t>0.1</delta_t> + </pair> + <pair> + <repeat>39</repeat> + <delta_t>1.</delta_t> + </pair> + <pair> + <repeat>2</repeat> + <delta_t>2.0</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>16.0</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>30.0</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>40.0</delta_t> + </pair> + <pair> + <repeat>10</repeat> + <delta_t>86.0</delta_t> + </pair> + <pair> + <repeat>90</repeat> + <delta_t>100.0</delta_t> + </pair> + <pair> + <repeat>100</repeat> + <delta_t>900</delta_t> + </pair> + <pair> + <repeat>90</repeat> + <delta_t>1.e4</delta_t> + </pair> + </timesteps> + </time_stepping> + </process> + </processes> + <output> + <type>VTK</type> + <prefix>th_decovalex</prefix> + <timesteps> + <pair> + <repeat> 1 </repeat> + <each_steps> 10 </each_steps> + </pair> + </timesteps> + </output> + </time_loop> + <parameters> + <parameter> + <name>p0</name> + <type>Constant</type> + <value>4.7e6</value> + </parameter> + <parameter> + <name>p_bc_top</name> + <type>Constant</type> + <value>4.3e+6</value> + </parameter> + <parameter> + <name>p_bc_bottom</name> + <type>Constant</type> + <value>4.7e+6</value> + </parameter> + <parameter> + <name>lambda</name> + <type>MeshElement</type> + <field_name>scaled_solid_thermal_conductivity</field_name> + <!--3.0 * 86400 * 365. Scaled with the time unit of year--> + </parameter> + <parameter> + <name>lambda_fluid</name> + <type>Constant</type> + <!--0.6 * 86400 * 365 with the time unit of year--> + <value>18921600.0</value> + </parameter> + <parameter> + <name>c_p</name> + <type>MeshElement</type> + <field_name>solid_heat_capacity</field_name> + </parameter> + <parameter> + <name>rho_solid</name> + <type>MeshElement</type> + <field_name>solid_density</field_name> + </parameter> + <parameter> + <name>n0</name> + <type>Constant</type> + <value>0.01</value> + </parameter> + <parameter> + <name>n1</name> + <type>Constant</type> + <value>0.41</value> + </parameter> + <parameter> + <name>T0</name> + <type>Constant</type> + <value>298</value> + </parameter> + <parameter> + <name>TB_top</name> + <type>Constant</type> + <value>294.0</value> + </parameter> + <parameter> + <name>TB_bottom</name> + <type>Constant</type> + <value>310</value> + </parameter> + <parameter> + <name>mu0</name> + <type>Constant</type> + <!--2.e-21 * 86400 * 365 with the time unit of year--> + <values>6.3072e-14 0. 0. 6.3072e-14</values> + </parameter> + <parameter> + <name>mu1</name> + <type>Constant</type> + <!--1.e-17 * 86400 * 365 with the time unit of year--> + <values>3.1536e-10 0. 0. 3.1536e-10</values> + </parameter> + <parameter> + <name>hpower_on_arc</name> + <type>Constant</type> + <value>1.0</value> + </parameter> + <parameter> + <name>heat_power</name> + <type>CurveScaled</type> + <curve>time_heat_power</curve> + <parameter>hpower_on_arc</parameter> + </parameter> + <parameter> + <name>heat_power_c</name> + <type>Constant</type> + <value>2477507279.46192</value> + </parameter> + </parameters> + + <curves> + <curve> + <name>time_heat_power</name> + <coords> + 0 + 1.00E-03 + 0.002 + 0.003 + 0.004 + 0.005 + 0.006 + 0.007 + 0.008 + 0.009 + 0.01 + 0.1 + 0.2 + 0.3 + 0.4 + 0.5 + 0.6 + 0.7 + 0.8 + 0.9 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 20 + 30 + 40 + 50 + 60 + 70 + 80 + 90 + 100 + 200 + 300 + 400 + 500 + 600 + 700 + 800 + 900 + 1000 + 2000 + 3000 + 4000 + 5000 + 6000 + 7000 + 8000 + 9000 + 10000 + 20000 + 30000 + 40000 + 50000 + 60000 + 70000 + 80000 + 90000 + 100000 + 200000 + 300000 + 400000 + 500000 + 600000 + 700000 + 800000 + 900000 + 1000000 + 1.00E+10 + </coords> + <!-- 86400 * 365 * original heat power data --> + <values> + 2477507279.46192 + 2477459529.54288 + 2477411689.43088 + 2477363767.32528 + 2477315670.51024 + 2477267748.40464 + 2477219911.13088 + 2477171729.484 + 2477123892.21024 + 2477075710.56336 + 2477027873.2896 + 2472672907.16208 + 2467757091.56544 + 2462762401.59456 + 2457693385.056 + 2452552352.27712 + 2447343250.9344 + 2442069507.41424 + 2436734637.66528 + 2431341468.88992 + 2425894034.2272 + 2369163847.82544 + 2310711582.0096 + 2253930470.64432 + 2202214690.836 + 2158958419.37568 + 2112431166.82368 + 2078620739.1 + 2045550770.03376 + 2013204028.0392 + 1726032720.05136 + 1495088443.47744 + 1308713237.89344 + 1157694104.67264 + 1034749222.15824 + 934122524.20848 + 851262379.89264 + 782568686.43936 + 725193373.44672 + 448276352.8464 + 341492110.56144 + 277947936.256176 + 236509762.562928 + 209106613.956816 + 190948269.79944 + 178912492.01208 + 154295944.435872 + 143838731.939184 + 87693573.405456 + 68334737.77152 + 58916070.8136 + 52907269.428288 + 48548275.775136 + 45238544.066592 + 42688989.27792 + 41088819.808944 + 36699991.77528 + 21249719.02512 + 14044626.9792 + 9640538.832816 + 6944041.074528 + 5293033.113744 + 4282092.927936 + 3663114.947568 + 3284183.858832 + 3052109.993328 + 1972070.615664 + 1660867.028928 + 1472515.998336 + 1358407.99656 + 1289308.804704 + 1247386.360032 + 1222095.6864 + 1206749.827296 + 1197405.142848 + 1197405.142848 + </values> + + <!-- Original heat power data --> + <!--values> + 78.561240470 + 78.559726330 + 78.558209330 + 78.556689730 + 78.555164590 + 78.553644990 + 78.552128080 + 78.550600250 + 78.549083340 + 78.547555510 + 78.546038600 + 78.407943530 + 78.252064040 + 78.093683460 + 77.932946000 + 77.769924920 + 77.604745400 + 77.437516090 + 77.268348480 + 77.097332220 + 76.924595200 + 75.125692790 + 73.272183600 + 71.471666370 + 69.831769750 + 68.460122380 + 66.984752880 + 65.912631250 + 64.863989410 + 63.838280950 + 54.732138510 + 47.408943540 + 41.499024540 + 36.710239240 + 32.811682590 + 29.620830930 + 26.993352990 + 24.815090260 + 22.995731020 + 14.214749900 + 10.828643790 + 8.813671241 + 7.499675373 + 6.630727231 + 6.054929915 + 5.673277905 + 4.892692302 + 4.561096269 + 2.780744971 + 2.166880320 + 1.868216350 + 1.677678508 + 1.539455726 + 1.434504822 + 1.353658970 + 1.302917929 + 1.163749105 + 0.673824170 + 0.445352200 + 0.305699481 + 0.220194098 + 0.167840979 + 0.135784276 + 0.116156613 + 0.104140787 + 0.096781773 + 0.062533949 + 0.052665748 + 0.046693176 + 0.043074835 + 0.040883714 + 0.039554362 + 0.038752400 + 0.038265786 + 0.037969468 + 0.037969468 + </values--> + </curve> + </curves> + + <process_variables> + <process_variable> + <name>T</name> + <components>1</components> + <order>1</order> + <initial_condition>T0</initial_condition> + <boundary_conditions> + <boundary_condition> + <geometrical_set>th_decovalex</geometrical_set> + <geometry>top</geometry> + <type>Dirichlet</type> + <parameter>TB_top</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>th_decovalex</geometrical_set> + <geometry>bottom</geometry> + <type>Dirichlet</type> + <parameter>TB_bottom</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>th_decovalex</geometrical_set> + <geometry>arc</geometry> + <type>Neumann</type> + <parameter>heat_power</parameter> + </boundary_condition> + </boundary_conditions> + </process_variable> + <process_variable> + <name>p</name> + <components>1</components> + <order>1</order> + <initial_condition>p0</initial_condition> + <boundary_conditions> + <boundary_condition> + <geometrical_set>th_decovalex</geometrical_set> + <geometry>top</geometry> + <type>Dirichlet</type> + <parameter>p_bc_top</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>th_decovalex</geometrical_set> + <geometry>bottom</geometry> + <type>Dirichlet</type> + <parameter>p_bc_bottom</parameter> + </boundary_condition> + </boundary_conditions> + </process_variable> + </process_variables> + <nonlinear_solvers> + <nonlinear_solver> + <name>basic_picard_T</name> + <type>Picard</type> + <max_iter>10</max_iter> + <linear_solver>linear_solver_T</linear_solver> + </nonlinear_solver> + <nonlinear_solver> + <name>basic_picard_H</name> + <type>Picard</type> + <max_iter>10</max_iter> + <linear_solver>linear_solver_H</linear_solver> + </nonlinear_solver> + </nonlinear_solvers> + <linear_solvers> + <linear_solver> + <name>linear_solver_T</name> + <lis>-i cg -p jacobi -tol 1e-20 -maxiter 10000</lis> + <eigen> + <solver_type>BiCGSTAB</solver_type> + <precon_type>DIAGONAL</precon_type> + <max_iteration_step>10000</max_iteration_step> + <error_tolerance>1e-20</error_tolerance> + </eigen> + <petsc> + <prefix>T</prefix> + <parameters>-T_ksp_type bcgs -T_pc_type bjacobi -T_ksp_rtol 1e-16 -T_ksp_max_it 10000</parameters> + </petsc> + </linear_solver> + <linear_solver> + <name>linear_solver_H</name> + <lis>-i cg -p jacobi -tol 1e-20 -maxiter 10000</lis> + <eigen> + <solver_type>CG</solver_type> + <precon_type>DIAGONAL</precon_type> + <max_iteration_step>10000</max_iteration_step> + <error_tolerance>1e-20</error_tolerance> + </eigen> + <petsc> + <prefix>H</prefix> + <parameters>-H_ksp_type cg -H_pc_type bjacobi -H_ksp_rtol 1e-16 -H_ksp_max_it 10000</parameters> + </petsc> + </linear_solver> + </linear_solvers> +</OpenGeoSysProject> diff --git a/Tests/Data/Parabolic/HT/StaggeredCoupling/ADecovalexTHMCBasedHTExample/th_decovalex.vtu b/Tests/Data/Parabolic/HT/StaggeredCoupling/ADecovalexTHMCBasedHTExample/th_decovalex.vtu new file mode 100644 index 0000000000000000000000000000000000000000..b56ebce3967231f8166ffff395398c3e2da8e6fd --- /dev/null +++ b/Tests/Data/Parabolic/HT/StaggeredCoupling/ADecovalexTHMCBasedHTExample/th_decovalex.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49dcfd009445a7b2da399ab3d96b2977144a1aba00488ead4037a2eb7ea44990 +size 86763