1
<?xml version='1.0' encoding='utf-8'?>
4
<string_value lines="1">darcy_p0p1cv_velBCinlet_1solidphase_3d</string_value>
5
<comment>a simple short test case for darcy flow using the element type p0p1cv for velocity-pressure
7
the intestitial velocity is solved for via defining a second phase with the solid volume fraction.
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
sigma is a function of viscosity and permeability which are two input fields that are named in the flml - not on fluidity special names (ie. this doesnt use the porous media object options)
17
python diagnostics are used to form the sigma term that is assoicated with a p0 dg mesh (ie. element wise) and the interstitial velocity
19
this case has a 1 region 1 material with velocity boundary condition inflow.
21
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.
23
the absorption term is included in the pressure correction (being a necessity as it is the only term in the matrix equation)
25
the geometry is 3d (although this is a 1d problem) and one time step is done (as nothing depends on time)
29
<string_value lines="1">fluids</string_value>
33
<integer_value rank="0">3</integer_value>
35
<mesh name="CoordinateMesh">
36
<from_file file_name="cube">
43
<mesh name="VelocityMesh">
45
<mesh name="CoordinateMesh"/>
48
<integer_value rank="0">0</integer_value>
52
<string_value>discontinuous</string_value>
59
<mesh name="PressureMesh">
61
<mesh name="CoordinateMesh"/>
64
<integer_value rank="0">1</integer_value>
72
<mesh name="OutputMesh">
74
<mesh name="CoordinateMesh"/>
76
<string_value>discontinuous</string_value>
85
<integer_value rank="0">5</integer_value>
91
<string_value>vtk</string_value>
93
<dump_period_in_timesteps>
95
<integer_value rank="0">0</integer_value>
97
</dump_period_in_timesteps>
98
<output_mesh name="OutputMesh"/>
103
<real_value rank="0">0.0</real_value>
106
<real_value rank="0">1.0</real_value>
109
<real_value rank="0">1.0</real_value>
112
<material_phase name="fluid">
113
<scalar_field name="Pressure" rank="0">
115
<mesh name="PressureMesh"/>
116
<spatial_discretisation>
118
</spatial_discretisation>
120
<poisson_pressure_solution>
121
<string_value lines="1">never</string_value>
122
</poisson_pressure_solution>
123
<use_projection_method/>
126
<iterative_method name="cg"/>
127
<preconditioner name="sor"/>
129
<real_value rank="0">1.0e-10</real_value>
132
<integer_value rank="0">1000</integer_value>
134
<never_ignore_solver_failures/>
139
<boundary_conditions name="right_outflow">
141
<integer_value shape="1" rank="1">4</integer_value>
143
<type name="dirichlet">
145
<real_value rank="0">0.0</real_value>
148
</boundary_conditions>
152
<include_in_convergence/>
155
<exclude_from_detectors/>
158
<include_in_steady_state/>
163
<vector_field name="Velocity" rank="1">
165
<mesh name="VelocityMesh"/>
166
<equation name="Boussinesq"/>
167
<spatial_discretisation>
168
<discontinuous_galerkin>
170
<exclude_mass_terms/>
173
<compact_discontinuous_galerkin/>
177
<integrate_advection_by_parts>
179
</integrate_advection_by_parts>
181
</discontinuous_galerkin>
182
<conservative_advection>
183
<real_value rank="0">0.0</real_value>
184
</conservative_advection>
185
</spatial_discretisation>
186
<temporal_discretisation>
188
<real_value rank="0">1.0</real_value>
191
<real_value rank="0">1.0</real_value>
193
</temporal_discretisation>
195
<iterative_method name="gmres">
197
<integer_value rank="0">30</integer_value>
200
<preconditioner name="sor"/>
202
<real_value rank="0">1.0e-10</real_value>
205
<integer_value rank="0">1000</integer_value>
207
<never_ignore_solver_failures/>
212
<initial_condition name="WholeMesh">
214
<real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value>
217
<boundary_conditions name="left_inflow">
219
<integer_value shape="1" rank="1">3</integer_value>
221
<type name="dirichlet">
223
<align_bc_with_cartesian>
226
<real_value rank="0">10.0</real_value>
229
</align_bc_with_cartesian>
231
</boundary_conditions>
232
<boundary_conditions name="no_outflow_top_bottom">
234
<integer_value shape="2" rank="1">1 2</integer_value>
236
<type name="dirichlet">
238
<align_bc_with_cartesian>
241
<real_value rank="0">0.0</real_value>
244
</align_bc_with_cartesian>
246
</boundary_conditions>
247
<boundary_conditions name="no_outflow_front_back">
249
<integer_value shape="2" rank="1">5 6</integer_value>
251
<type name="dirichlet">
253
<align_bc_with_cartesian>
256
<real_value rank="0">0.0</real_value>
259
</align_bc_with_cartesian>
261
</boundary_conditions>
262
<vector_field name="Absorption" rank="1">
264
<mesh name="PressureMesh"/>
265
<algorithm name="vector_python_diagnostic" material_phase_support="multiple">
266
<string_value lines="20" type="python"># get the prescribed fields
267
perm = states["fluid"].scalar_fields["Permeability"]
268
visc = states["fluid"].scalar_fields["Viscosity"]
269
volf_f = states["fluid"].scalar_fields["PhaseVolumeFraction"]
271
for n in range(field.node_count):
272
perm_n = perm.node_val(n)
273
visc_n = visc.node_val(n)
274
volf_f_n = volf_f.node_val(n)
276
# porosity is this fluid volf for one phase
279
# calc the absorption term
280
sigma_n = phi_n*visc_n/perm_n
282
# set the absorption term
283
field.set(n,sigma_n)</string_value>
290
<include_in_convergence/>
293
<include_in_detectors/>
296
<include_in_steady_state/>
299
<include_pressure_correction/>
306
</previous_time_step>
312
<include_in_convergence/>
315
<include_in_detectors/>
318
<include_in_steady_state/>
320
<consistent_interpolation/>
323
<scalar_field name="Permeability" rank="0">
325
<mesh name="PressureMesh"/>
326
<value name="WholeMesh">
328
<real_value rank="0">1.0e-10</real_value>
334
<exclude_from_detectors/>
338
<scalar_field name="Viscosity" rank="0">
340
<mesh name="PressureMesh"/>
341
<value name="WholeMesh">
343
<real_value rank="0">1.0e-04</real_value>
349
<exclude_from_detectors/>
353
<scalar_field name="PhaseVolumeFraction" rank="0">
355
<mesh name="PressureMesh"/>
356
<algorithm name="Internal" material_phase_support="multiple"/>
360
<include_in_detectors/>
365
<material_phase name="solid">
366
<vector_field name="Velocity" rank="1">
368
<mesh name="VelocityMesh"/>
369
<value name="WholeMesh">
371
<real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value>
379
<exclude_from_detectors/>
383
<scalar_field name="PhaseVolumeFraction" rank="0">
385
<mesh name="PressureMesh"/>
386
<value name="WholeMesh">
388
<real_value rank="0">0.5</real_value>
394
<exclude_from_detectors/>