From d8be02cb00b5e7470ec7af39d333b98e9c1b7170 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Fri, 1 Jun 2018 10:37:46 +0200 Subject: [PATCH] [T/Data] Add test for the constraint Dirichlet bc. --- ProcessLib/HT/Tests.cmake | 12 + ...hermalConvection_pcs_0_ts_0_t_0.000000.vtu | 3 + ...hermalConvection_pcs_0_ts_1_t_0.000000.vtu | 3 + ...hermalConvection_pcs_0_ts_2_t_0.000010.vtu | 3 + ...hermalConvection_pcs_0_ts_3_t_0.001010.vtu | 3 + ...hermalConvection_pcs_0_ts_4_t_0.101010.vtu | 3 + ...hermalConvection_pcs_0_ts_5_t_1.101010.vtu | 3 + ...ermalConvection_pcs_0_ts_6_t_10.000000.vtu | 3 + .../HT/SimpleSynthetics/constraint_bc_1e3.prj | 405 ++++++++++++++++++ .../HT/SimpleSynthetics/cube_1x1x1.gml | 4 +- 10 files changed, 440 insertions(+), 2 deletions(-) create mode 100644 Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_0_t_0.000000.vtu create mode 100644 Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_1_t_0.000000.vtu create mode 100644 Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_2_t_0.000010.vtu create mode 100644 Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_3_t_0.001010.vtu create mode 100644 Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_4_t_0.101010.vtu create mode 100644 Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_5_t_1.101010.vtu create mode 100644 Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_6_t_10.000000.vtu create mode 100644 Tests/Data/Parabolic/HT/SimpleSynthetics/constraint_bc_1e3.prj diff --git a/ProcessLib/HT/Tests.cmake b/ProcessLib/HT/Tests.cmake index 872fa49e430..4036ed06b33 100644 --- a/ProcessLib/HT/Tests.cmake +++ b/ProcessLib/HT/Tests.cmake @@ -349,6 +349,18 @@ AddTest( CoupledPressureParabolicTemperatureParabolic_ts_10_expected.vtu CoupledPressureParabolicTemperatureParabolicStaggered_pcs_1_ts_10_t_1.000000.vtu darcy_velocity darcy_velocity 1e-10 1e-10 ) +AddTest( + NAME HT_SimpleSynthetics_constraint_dirichlet_bc + PATH Parabolic/HT/SimpleSynthetics + EXECUTABLE ogs + EXECUTABLE_ARGS constraint_bc_1e3.prj + TESTER vtkdiff + REQUIREMENTS NOT OGS_USE_MPI + DIFF_DATA + GLOB ConstViscosityThermalConvection_pcs_0_ts_*.vtu T T 1e-14 1e-13 + GLOB ConstViscosityThermalConvection_pcs_0_ts_*.vtu p p 1e-15 1e-14 +) + # MPI/PETSc tests AddTest( NAME Parallel_LARGE_2D_ThermalConvection_constviscosity diff --git a/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_0_t_0.000000.vtu b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_0_t_0.000000.vtu new file mode 100644 index 00000000000..8459471b969 --- /dev/null +++ b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_0_t_0.000000.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a71f2792610cb5301f403cb9db81ff7ffb292a07fa9838a4bfa9280cb974944f +size 38479 diff --git a/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_1_t_0.000000.vtu b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_1_t_0.000000.vtu new file mode 100644 index 00000000000..3f91edb6d91 --- /dev/null +++ b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_1_t_0.000000.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f877b776ec381e0bb2565f21da42aa78c3df860a9ec2ef67d78de7c06c4c7a83 +size 53644 diff --git a/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_2_t_0.000010.vtu b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_2_t_0.000010.vtu new file mode 100644 index 00000000000..10918fcdaa2 --- /dev/null +++ b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_2_t_0.000010.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15236a721f365aef10fae0fc2d8002cee0aa66d80f0713ae780b16bf17551d81 +size 54049 diff --git a/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_3_t_0.001010.vtu b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_3_t_0.001010.vtu new file mode 100644 index 00000000000..0c4003561a9 --- /dev/null +++ b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_3_t_0.001010.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6227f1e0703c4468020492ab37d3d49444264d15eb688837240ba3f495ebbbe1 +size 53972 diff --git a/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_4_t_0.101010.vtu b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_4_t_0.101010.vtu new file mode 100644 index 00000000000..4532a88fa7f --- /dev/null +++ b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_4_t_0.101010.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:888c4a960d53d26817702c30e4f241be67c81b44c57fad54234ec0d362317590 +size 54273 diff --git a/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_5_t_1.101010.vtu b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_5_t_1.101010.vtu new file mode 100644 index 00000000000..c4e6f9a697e --- /dev/null +++ b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_5_t_1.101010.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b1ed670e29384ded16d9fdb55d6fe44fac2a710f2e5a5bd28a25b84d01e8039 +size 53867 diff --git a/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_6_t_10.000000.vtu b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_6_t_10.000000.vtu new file mode 100644 index 00000000000..513e31a8397 --- /dev/null +++ b/Tests/Data/Parabolic/HT/SimpleSynthetics/ConstViscosityThermalConvection_pcs_0_ts_6_t_10.000000.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:975dec6ad7bcaa8bcd2a8c8669fcc35b5c44172638738b4d6e0945a74f0edbd0 +size 53011 diff --git a/Tests/Data/Parabolic/HT/SimpleSynthetics/constraint_bc_1e3.prj b/Tests/Data/Parabolic/HT/SimpleSynthetics/constraint_bc_1e3.prj new file mode 100644 index 00000000000..e76ad2b33bb --- /dev/null +++ b/Tests/Data/Parabolic/HT/SimpleSynthetics/constraint_bc_1e3.prj @@ -0,0 +1,405 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<OpenGeoSysProject> + <mesh>cube_1x1x1_hex_1e3.vtu</mesh> + <geometry>cube_1x1x1.gml</geometry> + <processes> + <process> + <name>SimpleThermalConvection</name> + <type>HT</type> + <integration_order>2</integration_order> + <process_variables> + <temperature>T</temperature> + <pressure>p</pressure> + </process_variables> + <fluid> + <density> + <type>TemperatureDependent</type> + <rho0>1000</rho0> + <temperature0>20</temperature0> + <beta>4.3e-4</beta> + </density> + <viscosity> + <type>Constant</type> + <value>1.0e-3</value> + </viscosity> + <specific_heat_capacity> + <type>Constant</type> + <value>4200</value> + </specific_heat_capacity> + </fluid> + <porous_medium> + <porous_medium id="0"> + <permeability> + <permeability_tensor_entries>kappa1</permeability_tensor_entries> + <type>Constant</type> + </permeability> + <porosity> + <type>Constant</type> + <porosity_parameter>constant_porosity_parameter</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_solid</specific_heat_capacity_solid> + <thermal_conductivity_solid>lambda_solid</thermal_conductivity_solid> + <thermal_conductivity_fluid>lambda_fluid</thermal_conductivity_fluid> + <thermal_dispersivity> + <longitudinal>alpha_l</longitudinal> + <transversal>alpha_t</transversal> + </thermal_dispersivity> + <specific_body_force>0 0 0</specific_body_force> + <secondary_variables> + <secondary_variable type="static" internal_name="darcy_velocity" output_name="darcy_velocity"/> + </secondary_variables> + </process> + </processes> + <time_loop> + <processes> + <process ref="SimpleThermalConvection"> + <nonlinear_solver>basic_picard</nonlinear_solver> + <convergence_criterion> + <type>DeltaX</type> + <norm_type>NORM2</norm_type> + <abstol>1.e-3</abstol> + </convergence_criterion> + <time_discretization> + <type>BackwardEuler</type> + </time_discretization> + <output> + <variables> + <variable>T</variable> + <variable>p</variable> + <variable>darcy_velocity</variable> + </variables> + </output> + <time_stepping> + <type>FixedTimeStepping</type> + <t_initial> 0.0 </t_initial> + <t_end> 10 </t_end> + <timesteps> + <pair> + <repeat>1</repeat> + <delta_t>1e-7</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>1e-5</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>1e-3</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>1e-1</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>1</delta_t> + </pair> + <pair> + <repeat>1</repeat> + <delta_t>10</delta_t> + </pair> + </timesteps> + </time_stepping> + </process> + </processes> + <output> + <type>VTK</type> + <prefix>ConstViscosityThermalConvection</prefix> + <timesteps> + <pair> + <repeat> 10 </repeat> + <each_steps> 1 </each_steps> + </pair> + </timesteps> + </output> + </time_loop> + <parameters> + <parameter> + <name>rho_solid</name> + <type>Constant</type> + <value>0.0</value> + </parameter> + <parameter> + <name>rho_fluid</name> + <type>Constant</type> + <value>1000</value> + </parameter> + <parameter> + <name>lambda_solid</name> + <type>Constant</type> + <value>3.0</value> + </parameter> + <parameter> + <name>lambda_fluid</name> + <type>Constant</type> + <value>0.65</value> + </parameter> + <parameter> + <name>alpha_l</name> + <type>Constant</type> + <value>0.0</value> + </parameter> + <parameter> + <name>alpha_t</name> + <type>Constant</type> + <value>0.0</value> + </parameter> + <parameter> + <name>c_solid</name> + <type>Constant</type> + <value>0</value> + </parameter> + <parameter> + <name>T0</name> + <type>Constant</type> + <value>20</value> + </parameter> + <parameter> + <name>P0</name> + <type>Constant</type> + <value>2.99e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_left0</name> + <type>Constant</type> + <value>3e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_left1</name> + <type>Constant</type> + <value>2.999e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_left2</name> + <type>Constant</type> + <value>2.998e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_left3</name> + <type>Constant</type> + <value>2.997e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_left4</name> + <type>Constant</type> + <value>2.996e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_left5</name> + <type>Constant</type> + <value>2.995e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_left6</name> + <type>Constant</type> + <value>2.994e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_left7</name> + <type>Constant</type> + <value>2.993e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_left8</name> + <type>Constant</type> + <value>2.992e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_left9</name> + <type>Constant</type> + <value>2.991e7</value> + </parameter> + <parameter> + <name>p_Dirichlet_right</name> + <type>Constant</type> + <value>2.99e7</value> + </parameter> + <parameter> + <name>t_Dirichlet_left</name> + <type>Constant</type> + <value>20</value> + </parameter> + <parameter> + <name>t_Dirichlet_right</name> + <type>Constant</type> + <value>10</value> + </parameter> + <parameter> + <name>constant_porosity_parameter</name> + <type>Constant</type> + <value>0.001</value> + </parameter> + <parameter> + <name>kappa1</name> + <type>Constant</type> + <values>1.e-14 0 0 0 1.e-14 0 0 0 1.e-14</values> + </parameter> + </parameters> + <process_variables> + <process_variable> + <name>T</name> + <components>1</components> + <order>1</order> + <initial_condition>T0</initial_condition> + <boundary_conditions> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>left</geometry> + <type>Dirichlet</type> + <parameter>t_Dirichlet_left</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>right</geometry> + <type>Dirichlet</type> + <parameter>t_Dirichlet_right</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>cube_1x1x1_geometry</geometrical_set> + <geometry>left0</geometry> + <type>ConstraintDirichlet</type> + <constraint_type>Flux</constraint_type> + <constraining_process_variable>p</constraining_process_variable> + <constraint_threshold>0.0</constraint_threshold> + <constraint_direction>greater</constraint_direction> + <parameter>p_Dirichlet_left0</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>left1</geometry> + <type>ConstraintDirichlet</type> + <constraint_type>Flux</constraint_type> + <constraining_process_variable>p</constraining_process_variable> + <constraint_threshold>0.0</constraint_threshold> + <constraint_direction>greater</constraint_direction> + <parameter>p_Dirichlet_left1</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>left2</geometry> + <type>ConstraintDirichlet</type> + <parameter>p_Dirichlet_left2</parameter> + <constraint_type>Flux</constraint_type> + <constraining_process_variable>p</constraining_process_variable> + <constraint_threshold>0.0</constraint_threshold> + <constraint_direction>greater</constraint_direction> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>left3</geometry> + <type>ConstraintDirichlet</type> + <constraint_type>Flux</constraint_type> + <constraining_process_variable>p</constraining_process_variable> + <constraint_threshold>0.0</constraint_threshold> + <constraint_direction>greater</constraint_direction> + <parameter>p_Dirichlet_left3</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>left4</geometry> + <type>ConstraintDirichlet</type> + <constraint_type>Flux</constraint_type> + <constraining_process_variable>p</constraining_process_variable> + <constraint_threshold>0.0</constraint_threshold> + <constraint_direction>greater</constraint_direction> + <parameter>p_Dirichlet_left4</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>left5</geometry> + <type>ConstraintDirichlet</type> + <constraint_type>Flux</constraint_type> + <constraining_process_variable>p</constraining_process_variable> + <constraint_threshold>0.0</constraint_threshold> + <constraint_direction>greater</constraint_direction> + <parameter>p_Dirichlet_left5</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>left6</geometry> + <type>ConstraintDirichlet</type> + <constraint_type>Flux</constraint_type> + <constraining_process_variable>p</constraining_process_variable> + <constraint_threshold>0.0</constraint_threshold> + <constraint_direction>greater</constraint_direction> + <parameter>p_Dirichlet_left6</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>left7</geometry> + <type>ConstraintDirichlet</type> + <constraint_type>Flux</constraint_type> + <constraining_process_variable>p</constraining_process_variable> + <constraint_threshold>0.0</constraint_threshold> + <constraint_direction>greater</constraint_direction> + <parameter>p_Dirichlet_left7</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>left8</geometry> + <type>ConstraintDirichlet</type> + <constraint_type>Flux</constraint_type> + <constraining_process_variable>p</constraining_process_variable> + <constraint_threshold>0.0</constraint_threshold> + <constraint_direction>greater</constraint_direction> + <parameter>p_Dirichlet_left8</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>left9</geometry> + <type>ConstraintDirichlet</type> + <constraint_type>Flux</constraint_type> + <constraining_process_variable>p</constraining_process_variable> + <constraint_threshold>0.0</constraint_threshold> + <constraint_direction>greater</constraint_direction> + <parameter>p_Dirichlet_left9</parameter> + </boundary_condition> + <boundary_condition> + <geometrical_set>cube_1x1x1_geometry</geometrical_set> + <geometry>right</geometry> + <type>Dirichlet</type> + <parameter>p_Dirichlet_right</parameter> + </boundary_condition> + </boundary_conditions> + </process_variable> + </process_variables> + <nonlinear_solvers> + <nonlinear_solver> + <name>basic_picard</name> + <type>Picard</type> + <max_iter>1000</max_iter> + <linear_solver>general_linear_solver</linear_solver> + </nonlinear_solver> + </nonlinear_solvers> + <linear_solvers> + <linear_solver> + <name>general_linear_solver</name> + <lis>-i bicgstab -p jacobi -tol 1e-12 -maxiter 10000</lis> + <petsc> + <prefix>T</prefix> + <parameters> -T_ksp_type bcgs -T_pc_type bjacobi -T_ksp_rtol 1e-16 -T_ksp_max_it 4000</parameters> + </petsc> + <eigen> + <solver_type>BiCGSTAB</solver_type> + <precon_type>ILUT</precon_type> + <max_iteration_step>10000</max_iteration_step> + <error_tolerance>1e-12</error_tolerance> + </eigen> + </linear_solver> + </linear_solvers> +</OpenGeoSysProject> diff --git a/Tests/Data/Parabolic/HT/SimpleSynthetics/cube_1x1x1.gml b/Tests/Data/Parabolic/HT/SimpleSynthetics/cube_1x1x1.gml index 46b181cb390..fc62efe078c 100644 --- a/Tests/Data/Parabolic/HT/SimpleSynthetics/cube_1x1x1.gml +++ b/Tests/Data/Parabolic/HT/SimpleSynthetics/cube_1x1x1.gml @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2a6b8f99867442bfc6f06c8b81cd5aa29b208d07842327cb0076ebc923e087a -size 1690 +oid sha256:32af7a16c6e10edd667a7634dc4b355328bb8c5448f21b71cf6d55a8001f2970 +size 3998 -- GitLab