Skip to content
Snippets Groups Projects
Commit 22d77c7a authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[T] Test newtonls SNES solver on HeatConduction.

Same results as in the OGS's version of the Newton.
parent 1a169360
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,25 @@ AddTest(
REQUIREMENTS NOT OGS_USE_MPI
)
AddTest(
NAME 1D_HeatConduction_neumann_petsc_newtonls
PATH Parabolic/T/1D_neumann
EXECUTABLE ogs
EXECUTABLE_ARGS petsc_newtonls.prj
TESTER vtkdiff
DIFF_DATA
newton_ts_1_t_78125.000000.vtu petsc_newtonls_ts_1_t_78125_000000_0.vtu temperature temperature 1e-12 1e-16
newton_ts_3_t_234375.000000.vtu petsc_newtonls_ts_3_t_234375_000000_0.vtu temperature temperature 1e-12 1e-16
newton_ts_65_t_5078125.000000.vtu petsc_newtonls_ts_65_t_5078125_000000_0.vtu temperature temperature 1e-12 1e-16
newton_ts_405_t_31640625.000000.vtu petsc_newtonls_ts_405_t_31640625_000000_0.vtu temperature temperature 1e-12 1e-16
newton_ts_500_t_39062500.000000.vtu petsc_newtonls_ts_500_t_39062500_000000_0.vtu temperature temperature 1e-12 1e-16
temperature_analytical.vtu petsc_newtonls_ts_1_t_78125_000000_0.vtu temperature_78125s temperature 8e-2 1e-4
temperature_analytical.vtu petsc_newtonls_ts_3_t_234375_000000_0.vtu temperature_234375s temperature 6e-2 1e-4
temperature_analytical.vtu petsc_newtonls_ts_65_t_5078125_000000_0.vtu temperature_5078125s temperature 1e-4 1e-4
temperature_analytical.vtu petsc_newtonls_ts_405_t_31640625_000000_0.vtu temperature_31640625s temperature 1e-4 1e-4
temperature_analytical.vtu petsc_newtonls_ts_500_t_39062500_000000_0.vtu temperature_39062500s temperature 1e-4 1e-4
REQUIREMENTS OGS_USE_MPI
)
# SQUARE 1x1 HEAT CONDUCTION TEST -- AXIALLY SYMMETRIC
# test results are compared to 3D simulation on a wedge-shaped domain
AddTest(
......
<?xml version="1.0" encoding="ISO-8859-1"?>
<OpenGeoSysProject>
<mesh>mesh.vtu</mesh>
<geometry>line_60_geometry.gml</geometry>
<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 internal_name="heat_flux_x" output_name="heat_flux_x"/>
</secondary_variables>
</process>
</processes>
<time_loop>
<processes>
<process ref="HeatConduction">
<nonlinear_solver>nonlinear_solver</nonlinear_solver>
<convergence_criterion>
<type>DeltaX</type>
<norm_type>NORM2</norm_type>
<abstol>1e-16</abstol>
</convergence_criterion>
<time_discretization>
<type>BackwardEuler</type>
</time_discretization>
<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>petsc_newtonls</prefix>
<timesteps>
<pair>
<repeat> 1 </repeat>
<each_steps> 1 </each_steps>
</pair>
<pair>
<repeat> 1 </repeat>
<each_steps> 2 </each_steps>
</pair>
<pair>
<repeat> 1 </repeat>
<each_steps> 62 </each_steps>
</pair>
<pair>
<repeat> 1 </repeat>
<each_steps> 340 </each_steps>
</pair>
</timesteps>
<variables>
<variable> temperature </variable>
<variable> heat_flux_x </variable>
</variables>
<suffix>_ts_{:timestep}_t_{:time}</suffix>
</output>
</time_loop>
<parameters>
<parameter>
<name>K</name>
<type>Constant</type>
<value>3.2</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>T_neumann</name>
<type>Constant</type>
<value>2</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>
<geometrical_set>line_60_geometry</geometrical_set>
<geometry>left</geometry>
<type>Neumann</type>
<parameter>T_neumann</parameter>
</boundary_condition>
</boundary_conditions>
</process_variable>
</process_variables>
<nonlinear_solvers>
<nonlinear_solver>
<name>nonlinear_solver</name>
<type>PetscSNES</type>
<max_iter>10</max_iter>
<linear_solver>linear_solver</linear_solver>
</nonlinear_solver>
</nonlinear_solvers>
<linear_solvers>
<linear_solver>
<name>linear_solver</name>
<petsc>
<parameters>-snes_type newtonls -snes_monitor -snes_atol 1e-16 -snes_rtol 1e-16 -ksp_type cg -pc_type bjacobi</parameters>
</petsc>
</linear_solver>
</linear_solvers>
</OpenGeoSysProject>
newton_ts_1_t_78125.000000.vtu
\ No newline at end of file
newton_ts_3_t_234375.000000.vtu
\ No newline at end of file
newton_ts_405_t_31640625.000000.vtu
\ No newline at end of file
newton_ts_500_t_39062500.000000.vtu
\ No newline at end of file
newton_ts_65_t_5078125.000000.vtu
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment