-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5856 from danieldouglas92/limit_timestep_by_darcy…
…_velocity Add Darcy field convection timestep
- Loading branch information
Showing
7 changed files
with
320 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Added: Functionality to limit the timestep based on the | ||
Darcy velocity. | ||
<br> | ||
(Daniel Douglas, 2024/06/09) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
######################################################### | ||
# This is a test for limiting the time step when advecting | ||
# a field with the 'darcy field' method without setting | ||
# Include melt transport = true. With the 'darcy field' | ||
# advection method, the field is advected using the Darcy | ||
# velocity, which is expressed as: | ||
# | ||
# u_f = u_s - K_D / phi * (rho_s * g - rho_f * g) | ||
# u_f = fluid velocity # m/yr | ||
# u_s = solid velocity # m/yr | ||
# K_D = Darcy Coefficient = k / eta_f | ||
# k = permeability # m2 / s | ||
# eta_f = fluid viscosity # Pa s | ||
# phi = porosity | ||
# rho_f = fluid density # kg/m3 | ||
# rhos_s = solid density # kg/m3 | ||
# g = gravity # m/s2 | ||
# | ||
# Additionally, K_D and k can be expanded into: | ||
# K_D = k / eta_f | ||
# k = k_0 * phi**3 * (1 - phi)**2 | ||
# | ||
# Where k_0 is the reference permeability. The test is a 10 km x 10 km 2D | ||
# box with a uniform porosity of 0.02 (2%) everywhere. The fluid has a | ||
# density of 1000 kg/m3, and a viscosity of 10 Pa s, and the solid has a | ||
# density of 3000 kg/m3 and a uniform velocity of 0 m/yr. The reference | ||
# pemeability is 1e-6, and gravity is set to -10. This results in a fluid | ||
# velocity of 24.25 m/yr. The mesh is 2.5 km x 2.5 km, and with CFL = 1, | ||
# this means that the time step should be 2500 m / 24.25 m/yr = 103.11 | ||
|
||
############### Global parameters | ||
|
||
set Dimension = 2 | ||
set Start time = 0 | ||
set End time = 200 | ||
set Use years in output instead of seconds = true | ||
set Nonlinear solver scheme = iterated Advection and Stokes | ||
set Max nonlinear iterations = 1 | ||
set CFL number = 1.0 | ||
set Output directory = darcy_convection_step | ||
set Pressure normalization = surface | ||
set Surface pressure = 0 | ||
set Maximum time step = 200 | ||
set Use operator splitting = true | ||
|
||
# 10 km x 10 km box | ||
subsection Geometry model | ||
set Model name = box | ||
subsection Box | ||
set X extent = 10e3 | ||
set Y extent = 10e3 | ||
end | ||
end | ||
|
||
# Uniform temperature of 293 K | ||
subsection Initial temperature model | ||
set Model name = function | ||
subsection Function | ||
set Function expression = 293 | ||
end | ||
end | ||
|
||
subsection Boundary temperature model | ||
set List of model names = box | ||
set Fixed temperature boundary indicators = top, bottom, left, right | ||
subsection Box | ||
set Bottom temperature = 293 | ||
set Top temperature = 293 | ||
set Left temperature = 293 | ||
set Right temperature = 293 | ||
end | ||
end | ||
|
||
# Free slip boundary on all sides | ||
subsection Boundary velocity model | ||
set Tangential velocity boundary indicators = left, right, top, bottom | ||
end | ||
|
||
# porosity and bound_fluid are required compositional fields when | ||
# using the reactive fluid transport. Set the porosity field method | ||
# to 'darcy field' so that the fluid is adveted with the Darcy | ||
# velocity. | ||
subsection Compositional fields | ||
set Number of fields = 2 | ||
set Names of fields = porosity, bound_fluid | ||
set Compositional field methods = darcy field, field | ||
end | ||
|
||
# Initialize a porosity of 2% (0.02) everywhere. | ||
subsection Initial composition model | ||
set Model name = function | ||
|
||
subsection Function | ||
set Variable names = x,y | ||
set Function constants = | ||
set Function expression = 0.02; 0.0 | ||
end | ||
end | ||
|
||
# 10 m/s2 vertical gravity | ||
subsection Gravity model | ||
set Model name = vertical | ||
|
||
subsection Vertical | ||
set Magnitude = 10.0 | ||
end | ||
end | ||
|
||
# The reactive fluid transport model allows us to set the parameters which | ||
# influence fluid velocity, such as the fluid viscosity, fluid density, and | ||
# the reference permeability. We set the fluid weakening factors (shear to | ||
# bulk viscosity ratio, exponential fluid weakening factor) to 0 for | ||
# simplicity. We use the zero solubility fluid-solid reaction scheme to prevent | ||
# the fluid from partitioning into the solid. | ||
subsection Material model | ||
set Model name = reactive fluid transport | ||
subsection Reactive Fluid Transport Model | ||
set Base model = visco plastic | ||
set Reference fluid density = 1000 | ||
set Shear to bulk viscosity ratio = 0. | ||
set Reference fluid viscosity = 10 | ||
set Reference permeability = 1e-6 | ||
set Exponential fluid weakening factor = 0 | ||
set Fluid-solid reaction scheme = zero solubility | ||
end | ||
|
||
# Set the solid density to 3000 kg/m3, and set the minimum/maximum viscosity | ||
# to 1e21 Pa s for an isoviscous model. | ||
subsection Visco Plastic | ||
set Reference temperature = 1600 | ||
set Prefactors for diffusion creep = 5e-21 | ||
set Viscous flow law = diffusion | ||
set Densities = 3000 | ||
set Viscosity averaging scheme = harmonic | ||
set Minimum viscosity = 1e21 | ||
set Maximum viscosity = 1e21 | ||
set Thermal expansivities = 0 | ||
end | ||
end | ||
|
||
# Set the global refinement to 1, bringing the global mesh to 2.5 km x 2.5 km. | ||
subsection Mesh refinement | ||
set Initial adaptive refinement = 0 | ||
set Initial global refinement = 1 | ||
set Time steps between mesh refinement = 0 | ||
end | ||
|
||
# Melt transport = false | ||
subsection Melt settings | ||
set Include melt transport = false | ||
end | ||
|
||
subsection Postprocess | ||
set List of postprocessors = | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
Number of active cells: 4 (on 2 levels) | ||
Number of degrees of freedom: 134 (50+9+25+25+25) | ||
|
||
*** Timestep 0: t=0 years, dt=0 years | ||
Solving temperature system... 0 iterations. | ||
Solving porosity system ... 0 iterations. | ||
Skipping bound_fluid composition solve because RHS is zero. | ||
Solving Stokes system... 7+0 iterations. | ||
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 6.2054e-17, 1.34414e-16, 0, 5.09696e-16 | ||
Relative nonlinear residual (total system) after nonlinear iteration 1: 5.09696e-16 | ||
|
||
|
||
Postprocessing: | ||
|
||
*** Timestep 1: t=103.11 years, dt=103.11 years | ||
Solving composition reactions... in 1 substep(s). | ||
Solving temperature system... 0 iterations. | ||
Solving porosity system ... 0 iterations. | ||
Skipping bound_fluid composition solve because RHS is zero. | ||
Solving Stokes system... 6+0 iterations. | ||
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.51395e-16, 1.5726e-16, 0, 2.2185e-16 | ||
Relative nonlinear residual (total system) after nonlinear iteration 1: 3.51395e-16 | ||
|
||
|
||
Postprocessing: | ||
|
||
*** Timestep 2: t=200 years, dt=96.8895 years | ||
Solving composition reactions... in 1 substep(s). | ||
Solving temperature system... 0 iterations. | ||
Solving porosity system ... 0 iterations. | ||
Skipping bound_fluid composition solve because RHS is zero. | ||
Solving Stokes system... 7+0 iterations. | ||
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 1.14854e-16, 1.32969e-16, 0, 3.48944e-16 | ||
Relative nonlinear residual (total system) after nonlinear iteration 1: 3.48944e-16 | ||
|
||
|
||
Postprocessing: | ||
|
||
Termination requested by criterion: end time | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 1: Time step number | ||
# 2: Time (years) | ||
# 3: Time step size (years) | ||
# 4: Number of mesh cells | ||
# 5: Number of Stokes degrees of freedom | ||
# 6: Number of temperature degrees of freedom | ||
# 7: Number of degrees of freedom for all compositions | ||
# 8: Number of nonlinear iterations | ||
# 9: Iterations for temperature solver | ||
# 10: Iterations for composition solver 1 | ||
# 11: Iterations for composition solver 2 | ||
# 12: Iterations for Stokes solver | ||
# 13: Velocity iterations in Stokes preconditioner | ||
# 14: Schur complement iterations in Stokes preconditioner | ||
0 0.000000000000e+00 0.000000000000e+00 4 59 25 50 1 0 0 0 6 8 8 | ||
1 1.031104829590e+02 1.031104829590e+02 4 59 25 50 1 0 0 0 5 7 7 | ||
2 2.000000000000e+02 9.688951704104e+01 4 59 25 50 1 0 0 0 6 8 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters