-
Notifications
You must be signed in to change notification settings - Fork 271
Expand file tree
/
Copy pathadvection_reaction.base.prm
More file actions
149 lines (123 loc) · 4.32 KB
/
advection_reaction.base.prm
File metadata and controls
149 lines (123 loc) · 4.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#########################################################
# This is a benchmark case that tests the operator split
# solver scheme, which can use a different time step to
# compute reactions between compositional fields than
# the time step used for advection.
# In comparison to the example 'exponential_decay', the
# initial comosition depends on x, and there is a constant
# horizontal velocity. The composition decays over time,
# following the equations for exponential decay with a decay
# rate that depends on y.
set Additional shared libraries = ./libadvection_reaction.so
############### Global parameters
set Dimension = 2
set Start time = 0
set End time = 1
set Use years instead of seconds = false
# We use a new solver scheme option that enables the operator split.
set Nonlinear solver scheme = single Advection, single Stokes
set Use operator splitting = true
set Maximum time step = 1
# As we split the time-stepping of advection and reactions,
# 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.0005
end
end
subsection Discretization
subsection Stabilization parameters
set beta = 0.0
set cR = 0.0
end
end
subsection Geometry model
set Model name = box
subsection Box
set X extent = 1
set Y extent = 1
end
end
subsection Compositional fields
set Number of fields = 1
end
# The velocity on all boundaries is prescribed to a constant
# value, leading to horizontal flow from left to right.
subsection Boundary velocity model
set Prescribed velocity boundary indicators = 0:function, 1:function, 2:function, 3:function
subsection Function
set Variable names = x,z,t
set Function constants =
set Function expression = 0.01;0.0
end
end
# We then choose a vertical gravity model and describe the
# initial temperature with a vertical gradient. The default
# strength for gravity is one. The material model is the
# same as before.
subsection Gravity model
set Model name = vertical
end
# For this model, we choose a sinusoidal initial temperature
# and composition, so that we can see how the field changes
# over time as it is advected and decays over time.
subsection Initial temperature model
set Model name = function
subsection Function
set Variable names = x,z
set Function constants = pi=3.1415926
set Function expression = sin(2*pi*x)
end
end
subsection Initial composition model
set Model name = function
subsection Function
set Variable names = x,z
set Function constants = pi=3.1415926
set Function expression = sin(2*pi*x)
end
end
subsection Boundary temperature model
set Fixed temperature boundary indicators = 0
set List of model names = ExponentialDecayBoundary
end
subsection Boundary composition model
set Fixed composition boundary indicators = 0
set List of model names = ExponentialDecayBoundary
end
# We choose material and heating models that let temperature
# and composition decay over time, and that is implemented in
# a plugin.
subsection Heating model
set List of model names = exponential decay heating
subsection Exponential decay heating
set Half life = 10
end
end
subsection Material model
set Model name = exponential decay
subsection Exponential decay
set Half life = 10
end
subsection Composition reaction model
set Thermal conductivity = 0
set Thermal expansion coefficient = 0
set Viscosity = 1e5
set Density differential for compositional field 1 = 0
end
end
subsection Mesh refinement
set Initial adaptive refinement = 0
set Initial global refinement = 5
set Time steps between mesh refinement = 0
end
subsection Postprocess
set List of postprocessors = composition statistics, visualization, ExponentialDecayPostprocessor
subsection Visualization
set Time between graphical output = 0
end
end