1
<?xml version='1.0' encoding='utf-8'?>
4
<string_value lines="1">darcy_p0p1_test_cty_cv_pressBCinlet_3d</string_value>
5
<comment>a simple short test case for darcy flow using the element type p0p1_test_cty_cv for velocity-pressure
7
the darcy velocity is solved for then the tracer is advected using DG.
9
it compares the pressure gradient against the analytic, as well as checking that the interstitial velocity is correct
11
the darcy flow equation is
13
sigma*darcy_vel = - grad P
15
where darcy_vel = porosity*interstitial_velocity
17
sigma is a function of viscosity and permeability
19
python diagnostics are used to form the sigma term that is assoicated with a p0 dg mesh (ie. element wise) and the interstitial velocity
21
this case has a 1 region 1 material with pressure boundary condition inflow.
23
to get a darcy equation the time, stress and advection terms are not included in a bousinessq formulation (to avoid needing to specify a density). Ideally it would be better to actually have a darcy momentum option to simplify the input.
25
the absorption term is included in the pressure correction (being a necessity as it is the only term in the matrix equation)
27
the geometry is 2d (although this is a 1d problem)
29
NOTE: Because the velocity and pressure are time independent the simulation is broken into two.
30
First the velocity and pressure are solved and checkpointed.
31
Second the tracer is advected using a prescribed velocity from the previous checkpointed run.</comment>
34
<string_value lines="1">fluids</string_value>
38
<integer_value rank="0">3</integer_value>
40
<mesh name="CoordinateMesh">
41
<from_file file_name="cube">
48
<mesh name="VelocityMesh">
50
<mesh name="CoordinateMesh"/>
53
<integer_value rank="0">0</integer_value>
57
<string_value>discontinuous</string_value>
64
<mesh name="PressureMesh">
66
<mesh name="CoordinateMesh"/>
74
<mesh name="CoordinateMesh"/>
77
<integer_value rank="0">0</integer_value>
81
<string_value>discontinuous</string_value>
90
<integer_value rank="0">3</integer_value>
96
<string_value>vtk</string_value>
98
<dump_period_in_timesteps>
100
<integer_value rank="0">0</integer_value>
102
</dump_period_in_timesteps>
103
<output_mesh name="VelocityMesh"/>
105
<checkpoint_period_in_dumps>
106
<integer_value rank="0">1000</integer_value>
107
</checkpoint_period_in_dumps>
114
<real_value rank="0">0.0</real_value>
117
<real_value rank="0">0.5</real_value>
120
<real_value rank="0">15.0</real_value>
123
<integer_value rank="0">1</integer_value>
126
<material_phase name="fluid">
127
<scalar_field name="Pressure" rank="0">
129
<mesh name="PressureMesh"/>
130
<spatial_discretisation>
131
<continuous_galerkin>
132
<test_continuity_with_cv_dual/>
133
</continuous_galerkin>
134
</spatial_discretisation>
136
<poisson_pressure_solution>
137
<string_value lines="1">never</string_value>
138
</poisson_pressure_solution>
139
<use_projection_method/>
140
<update_discretised_equation/>
143
<iterative_method name="gmres">
145
<integer_value rank="0">30</integer_value>
148
<preconditioner name="sor"/>
150
<real_value rank="0">1.0e-10</real_value>
153
<integer_value rank="0">1000</integer_value>
155
<never_ignore_solver_failures/>
160
<boundary_conditions name="right_outflow">
162
<integer_value shape="1" rank="1">4</integer_value>
164
<type name="dirichlet">
166
<real_value rank="0">0.0</real_value>
169
</boundary_conditions>
170
<boundary_conditions name="left_inflow">
172
<integer_value shape="1" rank="1">3</integer_value>
174
<type name="dirichlet">
176
<real_value rank="0">1.5e+09</real_value>
179
</boundary_conditions>
183
<include_in_convergence/>
186
<exclude_from_detectors/>
189
<include_in_steady_state/>
194
<vector_field name="Velocity" rank="1">
196
<mesh name="VelocityMesh"/>
197
<equation name="Boussinesq"/>
198
<spatial_discretisation>
199
<discontinuous_galerkin>
201
<exclude_mass_terms/>
204
<compact_discontinuous_galerkin/>
208
<integrate_advection_by_parts>
210
</integrate_advection_by_parts>
212
</discontinuous_galerkin>
213
<conservative_advection>
214
<real_value rank="0">0.0</real_value>
215
</conservative_advection>
216
</spatial_discretisation>
217
<temporal_discretisation>
219
<real_value rank="0">1.0</real_value>
222
<real_value rank="0">1.0</real_value>
224
</temporal_discretisation>
226
<iterative_method name="gmres">
228
<integer_value rank="0">30</integer_value>
231
<preconditioner name="sor"/>
233
<real_value rank="0">1.0e-10</real_value>
236
<integer_value rank="0">1000</integer_value>
238
<never_ignore_solver_failures/>
243
<initial_condition name="WholeMesh">
245
<real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value>
248
<boundary_conditions name="no_outflow_top_bottom">
250
<integer_value shape="2" rank="1">1 2</integer_value>
252
<type name="dirichlet">
254
<align_bc_with_cartesian>
257
<real_value rank="0">0.0</real_value>
260
</align_bc_with_cartesian>
262
</boundary_conditions>
263
<boundary_conditions name="no_outflow_front_back">
265
<integer_value shape="2" rank="1">5 6</integer_value>
267
<type name="dirichlet">
269
<align_bc_with_cartesian>
272
<real_value rank="0">0.0</real_value>
275
</align_bc_with_cartesian>
277
</boundary_conditions>
278
<vector_field name="Absorption" rank="1">
281
<algorithm name="vector_python_diagnostic" material_phase_support="multiple">
282
<string_value lines="20" type="python"># get the prescribed fields
283
perm = states["fluid"].scalar_fields["Permeability"]
284
visc = states["fluid"].scalar_fields["Viscosity"]
286
# loop the DMmesh_p0 nodes (which are element centred)
287
for n in range(field.node_count):
288
perm_n = perm.node_val(n)
289
visc_n = visc.node_val(n)
291
# calc the absorption term
292
sigma_n = visc_n/perm_n
294
# set the absorption term
295
field.set(n,sigma_n)</string_value>
296
<comment>this assumes that the porosity, absorption, permeability, and viscosity are defined on a p0 dg mesh (ie. element wise) such that the number of nodes is also the number of elements
298
also assume that the velocity is dg</comment>
305
<include_in_convergence/>
308
<include_in_detectors/>
311
<include_in_steady_state/>
314
<include_pressure_correction/>
321
</previous_time_step>
327
<include_in_convergence/>
330
<include_in_detectors/>
333
<include_in_steady_state/>
335
<consistent_interpolation/>
338
<scalar_field name="Viscosity" rank="0">
341
<value name="WholeMesh">
343
<real_value rank="0">1.0e-04</real_value>
349
<exclude_from_detectors/>
355
<scalar_field name="Porosity">
358
<value name="WholeMesh">
360
<real_value rank="0">0.5</real_value>
366
<exclude_from_detectors/>
370
<scalar_field name="Permeability">
373
<value name="WholeMesh">
375
<real_value rank="0">1.0e-10</real_value>
381
<exclude_from_detectors/>