Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jdannberg committed Jun 14, 2024
1 parent 19734ba commit b897961
Show file tree
Hide file tree
Showing 54 changed files with 9,253 additions and 9,360 deletions.
21 changes: 6 additions & 15 deletions benchmarks/solubility/solubility.prm
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
# depth and below 60 km depth, and a zero solubility in between. When
# the upwelling material reaches the boundary at 60 km depth, water is
# being released and can move relative to the solid as a free fluid
# phase. Due to its lower density, it moves upwards faster than the
# phase. Due to its lower density, it moves upwards twice as fast as the
# solid, until it reaches 30 km depth where it is reabsorbed into the
# solid. In steady state, the water content should be the same in the
# top and bottom layer, and in the middle layer it should be lower,
# proportional to the ratio between solid and melt velocity.
# top and bottom layer, and in the middle layer it should be zero (at
# least the water_content field, representing the bound water in the
# solid). The porosity (free water) should be 0.1, which is half of the
# bound water content in the upper and lower layer (which follows from
# mass conservation, since the free fluid moves twice as fast).

set Additional shared libraries = ./plugin/libsolubility.so
set Adiabatic surface temperature = 1600
Expand All @@ -27,18 +30,6 @@ set End time = 6e6
# the operator splitting scheme.
set Use operator splitting = true

subsection Solver parameters
subsection Operator splitting parameters
# We choose the size of the reaction time step as 200 years, small enough
# so that it can accurately model melting and freezing.
set Reaction time step = 1e4

# Additionally, we always want to do at least 10 operator splitting time
# steps in each model time step, to accurately compute the reactions.
set Reaction time steps per advection step = 10
end
end

# There are two compositional fields, one that tracks the amount of free water
# (the porosity) and one that tracks the amount of bound water (the water_content).
subsection Compositional fields
Expand Down
10 changes: 0 additions & 10 deletions cookbooks/mid_ocean_ridge/mid_ocean_ridge.prm
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ set End time = 8e6
set Use operator splitting = true

subsection Solver parameters
subsection Operator splitting parameters
# We choose the size of the reaction time step as 200 years, small enough
# so that it can accurately model melting and freezing.
set Reaction time step = 2e2

# Additionally, we always want to do at least 10 operator splitting time
# steps in each model time step, to accurately compute the reactions.
set Reaction time steps per advection step = 10
end

# Because this model includes strong localized viscosity contrasts we
# increase the robustness of the solver at the cost of memory consumption.
subsection Stokes solver parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,7 @@ subsection Discretization
end
end

# Do 10 reaction time steps per advection time step.
subsection Solver parameters
subsection Operator splitting parameters
set Reaction time step = 100
set Reaction time steps per advection step = 10
end

# Set a stricter linear solver tolerance to ensure convergence
subsection Stokes solver parameters
set Linear solver tolerance = 1e-10
Expand Down
11 changes: 4 additions & 7 deletions tests/advection_reaction.prm
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ set Maximum time step = 1
# there are now two different time steps in the model:
# We control the advection time step using the 'Maximum time step'
# parameter (for easy comparison with the exponential decay test
# case), and the reaction time step using the 'Reaction time step'
# parameter. We will vary both parameters in different model runs.
subsection Solver parameters
subsection Operator splitting parameters
set Reaction time step = 0.002
end
end
# case), and the reaction time step is controlled internally
# through the ODE solver scheme. Instead of changing the step
# for the ODE solver, we can make the solution more accurate by
# modifying the Reaction solver relative tolerance.

subsection Discretization
subsection Stabilization parameters
Expand Down
10 changes: 1 addition & 9 deletions tests/average_density_boundary_fluid_pressure.prm
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,13 @@ set Nonlinear solver tolerance = 1e-7
# In addition, melting and freezing normally happens on a much faster
# time scale than the flow of melt, so we want to decouple the advection
# of melt (and temperature) and the melting process itself. To do that,
# we use the operator splitting scheme, and define that for every
# advection time step, we want to do at least 50 reaction time step,
# and in addition, we limit the maximum reaction time step size to
# 500,000 years.
# we use the operator splitting scheme.
set Use operator splitting = true

# The end time of the simulation. We only do one time step.
set End time = 1e5

subsection Solver parameters
subsection Operator splitting parameters
set Reaction time step = 1e5
set Reaction time steps per advection step = 50
end

subsection Stokes solver parameters
set Linear solver tolerance = 1e-8
set Number of cheap Stokes solver steps = 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Number of degrees of freedom: 14,505 (4,290+2,097+4,290+561+2,145+561+561)


*** Timestep 1: t=100000 years, dt=100000 years
Solving composition reactions... in 50 substep(s).
Solving composition reactions... in 1 substep(s).
Solving temperature system... 6 iterations.
Solving porosity system ... 4 iterations.
Skipping peridotite composition solve because RHS is zero.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Number of active cells: 16 (on 2 levels)
Number of degrees of freedom: 989 (162+73+162+25+81+81+81+81+81+81+81)

Expand Down Expand Up @@ -38,7 +33,7 @@ Skipping mesh refinement, because the mesh did not change.
Writing graphical output: output-coupled_two_phase_tian_parameterization_kinematic_slab/solution/solution-00000

*** Timestep 1: t=1000 years, dt=1000 years
Solving composition reactions... in 10 substep(s).
Solving composition reactions... in 1 substep(s).
Solving temperature system... 8 iterations.
Skipping porosity composition solve because RHS is zero.
Solving bound_fluid system ... 11 iterations.
Expand All @@ -54,7 +49,7 @@ Skipping mesh refinement, because the mesh did not change.
Compositions min/max/mass: 0/0/0 // -0.002633/0.02/1.037e+06 // 0/1.008/9.91e+09 // -0.1319/1/1.296e+07 // -0.1316/1/5.185e+07 // 0/0/0

*** Timestep 2: t=2000 years, dt=1000 years
Solving composition reactions... in 10 substep(s).
Solving composition reactions... in 1 substep(s).
Solving temperature system... 7 iterations.
Solving porosity system ... 10 iterations.
Solving bound_fluid system ... 11 iterations.
Expand All @@ -67,7 +62,7 @@ Skipping mesh refinement, because the mesh did not change.
Solving fluid velocity system... 1 iterations.

Postprocessing:
Compositions min/max/mass: -1.366e-07/4.974e-05/8415 // -0.002346/0.02/1.083e+06 // 0/1.016/9.907e+09 // -0.1179/1/1.364e+07 // -0.1173/1/5.457e+07 // 0/0/0
Compositions min/max/mass: -1.365e-07/4.969e-05/8407 // -0.002346/0.02/1.083e+06 // 0/1.016/9.907e+09 // -0.1179/1/1.364e+07 // -0.1173/1/5.457e+07 // 0/0/0
Writing graphical output: output-coupled_two_phase_tian_parameterization_kinematic_slab/solution/solution-00001

Number of active cells: 25 (on 3 levels)
Expand All @@ -76,9 +71,4 @@ Number of degrees of freedom: 1,570 (258+113+258+38+129+129+129+129+129+129+129)
Termination requested by criterion: end time


+----------------------------------------------+------------+------------+
+----------------------------------+-----------+------------+------------+
+----------------------------------+-----------+------------+------------+

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Loading

0 comments on commit b897961

Please sign in to comment.