diff --git a/ProcessLib/HeatConduction/Tests.cmake b/ProcessLib/HeatConduction/Tests.cmake index 42874e37d524b10ee94cc6556f6faffb51555c13..087113f64388970fa15bf2cb473a8ff9c04c52e1 100644 --- a/ProcessLib/HeatConduction/Tests.cmake +++ b/ProcessLib/HeatConduction/Tests.cmake @@ -55,3 +55,15 @@ AddTest( standard_solution_bhe2d_pcs_0_ts_840_t_72576000.000000.vtu bhe2d_pcs_0_ts_840_t_72576000.000000.vtu temperature temperature 1e-12 0.0 REQUIREMENTS NOT OGS_USE_MPI ) + +# test the source term on a subdomain +AddTest( + NAME 1D_HeatConduction_dirichlet_SourceTerm + PATH Parabolic/T/1D_dirichlet_source-term + EXECUTABLE ogs + EXECUTABLE_ARGS line_1_line_1e2_source_term.prj + TESTER vtkdiff + DIFF_DATA + line_1_line_1e2_pcs_0_ts_500_t_39062500.000000_reference.vtu line_1_line_1e2_pcs_0_ts_500_t_39062500.000000.vtu temperature temperature 1e-11 0.0 + REQUIREMENTS NOT OGS_USE_MPI +) diff --git a/Tests/Data/Parabolic/T/1D_dirichlet_source-term/SourceTermDomain.vtu b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/SourceTermDomain.vtu new file mode 100644 index 0000000000000000000000000000000000000000..5c390d1e2931494609ffef75895040616c0687f9 --- /dev/null +++ b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/SourceTermDomain.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2990eedb2204d4bdc58002902b551e4bafc3ee186bf2ed4c05dfb4b1cf4907f +size 1407 diff --git a/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_geometry_left.vtu b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_geometry_left.vtu new file mode 100644 index 0000000000000000000000000000000000000000..2acfaf9fb2956770259901a765efd8d9d4938718 --- /dev/null +++ b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_geometry_left.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:612e6cc7d6f49da22c69cf3b4987541f2c40c77e3abe14db8af4b20f8e966742 +size 1253 diff --git a/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_geometry_right.vtu b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_geometry_right.vtu new file mode 100644 index 0000000000000000000000000000000000000000..59276ed37cede25d847e42cdd54ca2ee8ba7fc76 --- /dev/null +++ b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_geometry_right.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc509d0b26cc4a0af1e1f92bf7941db2b9cc7e31819ed6349bd5ed1796d83c88 +size 1259 diff --git a/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_line_1e2_pcs_0_ts_500_t_39062500.000000_reference.vtu b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_line_1e2_pcs_0_ts_500_t_39062500.000000_reference.vtu new file mode 100644 index 0000000000000000000000000000000000000000..7245032601d3e3efac54bf3b3443fdf51d5a4003 --- /dev/null +++ b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_line_1e2_pcs_0_ts_500_t_39062500.000000_reference.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ceb89b82bc5b0c6ede77a01da677c90a5f43aae6c1eb49ea61e72e4f64b44264 +size 3816 diff --git a/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_line_1e2_source_term.prj b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_line_1e2_source_term.prj new file mode 100644 index 0000000000000000000000000000000000000000..d92919aae4bc534a8bf2424b575a03b541887efa --- /dev/null +++ b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_line_1e2_source_term.prj @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<OpenGeoSysProject> + <meshes> + <mesh>line_1_lines_1e2.vtu</mesh> + <mesh>SourceTermDomain.vtu</mesh> + <mesh>line_1_geometry_left.vtu</mesh> + <mesh>line_1_geometry_right.vtu</mesh> + </meshes> + <processes> + <process> + <name>HeatConduction</name> + <type>HEAT_CONDUCTION</type> + <integration_order>2</integration_order> + <thermal_conductivity>K</thermal_conductivity> + <heat_capacity>Cp</heat_capacity> + <density>rho</density> + <process_variables> + <process_variable>temperature</process_variable> + </process_variables> + <secondary_variables> + <secondary_variable type="static" internal_name="heat_flux_x" output_name="heat_flux_x"/> + </secondary_variables> + </process> + </processes> + <time_loop> + <processes> + <process ref="HeatConduction"> + <nonlinear_solver>basic_picard</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> temperature </variable> + <variable> heat_flux_x </variable> + </variables> + </output> + <time_stepping> + <type>FixedTimeStepping</type> + <t_initial> 0.0 </t_initial> + <t_end> 39062500 </t_end> + <timesteps> + <pair> + <repeat>500</repeat> + <delta_t>78125</delta_t> + </pair> + </timesteps> + </time_stepping> + </process> + </processes> + <output> + <type>VTK</type> + <prefix>line_1_line_1e2</prefix> + <timesteps> + <pair> + <repeat> 1 </repeat> + <each_steps> 500 </each_steps> + </pair> + </timesteps> + </output> + </time_loop> + <parameters> + <parameter> + <name>K</name> + <type>Constant</type> + <value>5</value> + </parameter> + <parameter> + <name>Cp</name> + <type>Constant</type> + <value>1000</value> + </parameter> + <parameter> + <name>rho</name> + <type>Constant</type> + <value>2500</value> + </parameter> + <parameter> + <name>T0</name> + <type>Constant</type> + <value>273.15</value> + </parameter> + <parameter> + <name>T1</name> + <type>Constant</type> + <value>274.15</value> + </parameter> + <parameter> + <name>st_param</name> + <type>Constant</type> + <value>5</value> + </parameter> + </parameters> + <process_variables> + <process_variable> + <name>temperature</name> + <components>1</components> + <order>1</order> + <initial_condition>T0</initial_condition> + <boundary_conditions> + <boundary_condition> + <mesh>line_1_geometry_left</mesh> + <type>Dirichlet</type> + <parameter>T1</parameter> + </boundary_condition> + <boundary_condition> + <mesh>line_1_geometry_right</mesh> + <type>Dirichlet</type> + <parameter>T1</parameter> + </boundary_condition> + </boundary_conditions> + <source_terms> + <source_term> + <mesh>SourceTermDomain</mesh> + <type>Volumetric</type> + <parameter>st_param</parameter> + </source_term> + </source_terms> + </process_variable> + </process_variables> + <nonlinear_solvers> + <nonlinear_solver> + <name>basic_picard</name> + <type>Picard</type> + <max_iter>10</max_iter> + <linear_solver>general_linear_solver</linear_solver> + </nonlinear_solver> + </nonlinear_solvers> + <linear_solvers> + <linear_solver> + <name>general_linear_solver</name> + <lis>-i cg -p jacobi -tol 1e-16 -maxiter 10000</lis> + <eigen> + <solver_type>CG</solver_type> + <precon_type>DIAGONAL</precon_type> + <max_iteration_step>10000</max_iteration_step> + <error_tolerance>1e-16</error_tolerance> + </eigen> + <petsc> + <prefix>gw</prefix> + <parameters>-gw_ksp_type cg -gw_pc_type bjacobi -gw_ksp_rtol 1e-16 -gw_ksp_max_it 10000</parameters> + </petsc> + </linear_solver> + </linear_solvers> +</OpenGeoSysProject> diff --git a/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_lines_1e2.vtu b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_lines_1e2.vtu new file mode 100644 index 0000000000000000000000000000000000000000..fa08f9e37f628254798978e37c6c01b458a29cb3 --- /dev/null +++ b/Tests/Data/Parabolic/T/1D_dirichlet_source-term/line_1_lines_1e2.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44ce4d6db0975e9fb108401c3b80bed86473ff06fa7a3d92f895c8a567392430 +size 7173