1
<?xml version='1.0' encoding='utf-8'?>
4
<string_value lines="1">advect_tracer_cons_imp_p1dg_2d</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">2</integer_value>
40
<mesh name="CoordinateMesh">
41
<from_file file_name="darcy_p0p1_test_cty_cv_pressBCinlet_2d_CoordinateMesh_1_checkpoint">
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>
88
<mesh name="OutputMesh">
90
<mesh name="CoordinateMesh"/>
92
<string_value>discontinuous</string_value>
101
<mesh name="CoordinateMesh"/>
104
<integer_value rank="0">1</integer_value>
108
<string_value>discontinuous</string_value>
117
<integer_value rank="0">5</integer_value>
123
<string_value>vtk</string_value>
125
<dump_period_in_timesteps>
127
<integer_value rank="0">10</integer_value>
129
</dump_period_in_timesteps>
130
<output_mesh name="OutputMesh"/>
135
<real_value rank="0">0.0</real_value>
138
<real_value rank="0">0.5</real_value>
141
<real_value rank="0">15.0</real_value>
144
<material_phase name="fluid">
145
<vector_field name="Velocity" rank="1">
147
<mesh name="VelocityMesh"/>
148
<value name="WholeMesh">
149
<from_file file_name="darcy_p0p1_test_cty_cv_pressBCinlet_2d_VelocityMesh_1_checkpoint.vtu">
158
<exclude_from_detectors/>
162
<scalar_field name="Tracer" rank="0">
165
<equation name="AdvectionDiffusion"/>
166
<spatial_discretisation>
167
<discontinuous_galerkin>
170
<integrate_advection_by_parts>
172
</integrate_advection_by_parts>
175
<compact_discontinuous_galerkin/>
177
</discontinuous_galerkin>
178
<conservative_advection>
179
<real_value rank="0">1.0</real_value>
180
</conservative_advection>
181
</spatial_discretisation>
182
<temporal_discretisation>
184
<real_value rank="0">1.0</real_value>
186
</temporal_discretisation>
188
<iterative_method name="gmres">
190
<integer_value rank="0">30</integer_value>
193
<preconditioner name="sor"/>
195
<real_value rank="0">1.0e-10</real_value>
198
<integer_value rank="0">1000</integer_value>
200
<never_ignore_solver_failures/>
205
<initial_condition name="WholeMesh">
207
<real_value rank="0">0.0</real_value>
210
<boundary_conditions name="left_inflow">
212
<integer_value shape="1" rank="1">10</integer_value>
214
<type name="dirichlet">
217
<real_value rank="0">1.0</real_value>
220
</boundary_conditions>
222
<porosity_field_name>Porosity</porosity_field_name>
223
<temporal_discretisation>
225
<real_value rank="0">1.0</real_value>
227
</temporal_discretisation>
234
<include_in_convergence/>
237
<include_in_detectors/>
240
<include_in_steady_state/>
242
<consistent_interpolation/>
245
<scalar_field name="TracerAnalytic" rank="0">
248
<value name="WholeMesh">
250
<string_value lines="20" type="python">def val(X, t):
256
if X[0] <= distance:
264
return analytic_val</string_value>
272
<exclude_from_detectors/>
276
<scalar_field name="AnalyticError" rank="0">
278
<algorithm source_field_2_type="scalar" name="scalar_difference" source_field_1_name="Tracer" source_field_2_name="TracerAnalytic" material_phase_support="single" source_field_1_type="scalar">
279
<absolute_difference/>
285
<include_in_convergence/>
288
<include_in_detectors/>
291
<include_in_steady_state/>
295
<scalar_field name="DG_CourantNumber" rank="0">
297
<algorithm name="Internal" material_phase_support="multiple"/>
298
<mesh name="VelocityMesh"/>
300
<porosity_field_name>Porosity</porosity_field_name>
301
<temporal_discretisation>
303
<real_value rank="0">1.0</real_value>
305
</temporal_discretisation>
310
<include_in_convergence/>
313
<include_in_detectors/>
316
<include_in_steady_state/>
322
<scalar_field name="Porosity">
325
<value name="WholeMesh">
327
<real_value rank="0">0.5</real_value>
333
<exclude_from_detectors/>