~fluidity-core/fluidity/shallow-water-dev

« back to all changes in this revision

Viewing changes to tests/darcy_p0p1_test_cty_cv_pressBCinlet_advect_tracer_p1cv/advect_tracer_cons_exp_weakbc_hyperc_p1cv_2d.flml

  • Committer: colin.cotter at ac
  • Date: 2012-02-16 17:35:27 UTC
  • mfrom: (3565.1.365 fluidity)
  • Revision ID: colin.cotter@imperial.ac.uk-20120216173527-wpnlu4v9v1kmf4xz
MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0' encoding='utf-8'?>
 
2
<fluidity_options>
 
3
  <simulation_name>
 
4
    <string_value lines="1">advect_tracer_cons_exp_weakbc_hyperc_p1cv_2d</string_value>
 
5
    <comment>a simple short test case for darcy flow using the element type p0p1_test_cty_cv for velocity-pressure
 
6
 
 
7
the darcy velocity is solved for then the tracer is advected using a CV scheme on a continuous mesh.
 
8
 
 
9
it compares the pressure gradient against the analytic, as well as checking that the interstitial velocity is correct 
 
10
 
 
11
the darcy flow equation is
 
12
 
 
13
sigma*darcy_vel = - grad P
 
14
 
 
15
where darcy_vel = porosity*interstitial_velocity
 
16
 
 
17
sigma is a function of viscosity and permeability
 
18
 
 
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
 
20
 
 
21
this case has a 1 region 1 material with pressure boundary condition inflow. 
 
22
 
 
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.
 
24
 
 
25
the absorption term is included in the pressure correction (being a necessity as it is the only term in the matrix equation) 
 
26
 
 
27
the geometry is 2d (although this is a 1d problem)
 
28
 
 
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>
 
32
  </simulation_name>
 
33
  <problem_type>
 
34
    <string_value lines="1">fluids</string_value>
 
35
  </problem_type>
 
36
  <geometry>
 
37
    <dimension>
 
38
      <integer_value rank="0">2</integer_value>
 
39
    </dimension>
 
40
    <mesh name="CoordinateMesh">
 
41
      <from_file file_name="darcy_p0p1_test_cty_cv_pressBCinlet_2d_CoordinateMesh_1_checkpoint">
 
42
        <format name="gmsh"/>
 
43
        <stat>
 
44
          <include_in_stat/>
 
45
        </stat>
 
46
      </from_file>
 
47
    </mesh>
 
48
    <mesh name="VelocityMesh">
 
49
      <from_mesh>
 
50
        <mesh name="CoordinateMesh"/>
 
51
        <mesh_shape>
 
52
          <polynomial_degree>
 
53
            <integer_value rank="0">0</integer_value>
 
54
          </polynomial_degree>
 
55
        </mesh_shape>
 
56
        <mesh_continuity>
 
57
          <string_value>discontinuous</string_value>
 
58
        </mesh_continuity>
 
59
        <stat>
 
60
          <exclude_from_stat/>
 
61
        </stat>
 
62
      </from_mesh>
 
63
    </mesh>
 
64
    <mesh name="PressureMesh">
 
65
      <from_mesh>
 
66
        <mesh name="CoordinateMesh"/>
 
67
        <stat>
 
68
          <exclude_from_stat/>
 
69
        </stat>
 
70
      </from_mesh>
 
71
    </mesh>
 
72
    <mesh name="DGP0">
 
73
      <from_mesh>
 
74
        <mesh name="CoordinateMesh"/>
 
75
        <mesh_shape>
 
76
          <polynomial_degree>
 
77
            <integer_value rank="0">0</integer_value>
 
78
          </polynomial_degree>
 
79
        </mesh_shape>
 
80
        <mesh_continuity>
 
81
          <string_value>discontinuous</string_value>
 
82
        </mesh_continuity>
 
83
        <stat>
 
84
          <exclude_from_stat/>
 
85
        </stat>
 
86
      </from_mesh>
 
87
    </mesh>
 
88
    <mesh name="OutputMesh">
 
89
      <from_mesh>
 
90
        <mesh name="CoordinateMesh"/>
 
91
        <mesh_continuity>
 
92
          <string_value>discontinuous</string_value>
 
93
        </mesh_continuity>
 
94
        <stat>
 
95
          <exclude_from_stat/>
 
96
        </stat>
 
97
      </from_mesh>
 
98
    </mesh>
 
99
    <quadrature>
 
100
      <degree>
 
101
        <integer_value rank="0">5</integer_value>
 
102
      </degree>
 
103
    </quadrature>
 
104
  </geometry>
 
105
  <io>
 
106
    <dump_format>
 
107
      <string_value>vtk</string_value>
 
108
    </dump_format>
 
109
    <dump_period_in_timesteps>
 
110
      <constant>
 
111
        <integer_value rank="0">10</integer_value>
 
112
      </constant>
 
113
    </dump_period_in_timesteps>
 
114
    <output_mesh name="OutputMesh"/>
 
115
    <stat/>
 
116
  </io>
 
117
  <timestepping>
 
118
    <current_time>
 
119
      <real_value rank="0">0.0</real_value>
 
120
    </current_time>
 
121
    <timestep>
 
122
      <real_value rank="0">0.5</real_value>
 
123
    </timestep>
 
124
    <finish_time>
 
125
      <real_value rank="0">15.0</real_value>
 
126
    </finish_time>
 
127
  </timestepping>
 
128
  <material_phase name="fluid">
 
129
    <vector_field name="Velocity" rank="1">
 
130
      <prescribed>
 
131
        <mesh name="VelocityMesh"/>
 
132
        <value name="WholeMesh">
 
133
          <from_file file_name="darcy_p0p1_test_cty_cv_pressBCinlet_2d_VelocityMesh_1_checkpoint.vtu">
 
134
            <format name="vtu"/>
 
135
          </from_file>
 
136
        </value>
 
137
        <output/>
 
138
        <stat>
 
139
          <include_in_stat/>
 
140
        </stat>
 
141
        <detectors>
 
142
          <exclude_from_detectors/>
 
143
        </detectors>
 
144
      </prescribed>
 
145
    </vector_field>
 
146
    <scalar_field name="Tracer" rank="0">
 
147
      <prognostic>
 
148
        <mesh name="PressureMesh"/>
 
149
        <equation name="AdvectionDiffusion"/>
 
150
        <spatial_discretisation>
 
151
          <control_volumes>
 
152
            <face_value name="HyperC">
 
153
              <locally_bound_upwind_value/>
 
154
              <courant_number name="ControlVolumeCFLNumber"/>
 
155
            </face_value>
 
156
            <diffusion_scheme name="ElementGradient"/>
 
157
          </control_volumes>
 
158
          <conservative_advection>
 
159
            <real_value rank="0">1.0</real_value>
 
160
          </conservative_advection>
 
161
        </spatial_discretisation>
 
162
        <temporal_discretisation>
 
163
          <theta>
 
164
            <real_value rank="0">0.0</real_value>
 
165
          </theta>
 
166
          <control_volumes>
 
167
            <maximum_courant_number_per_subcycle>
 
168
              <real_value rank="0">0.25</real_value>
 
169
              <courant_number name="ControlVolumeCFLNumber"/>
 
170
            </maximum_courant_number_per_subcycle>
 
171
            <pivot_theta>
 
172
              <real_value rank="0">0.0</real_value>
 
173
            </pivot_theta>
 
174
          </control_volumes>
 
175
        </temporal_discretisation>
 
176
        <explicit/>
 
177
        <initial_condition name="WholeMesh">
 
178
          <constant>
 
179
            <real_value rank="0">0.0</real_value>
 
180
          </constant>
 
181
        </initial_condition>
 
182
        <boundary_conditions name="left_inflow">
 
183
          <surface_ids>
 
184
            <integer_value shape="1" rank="1">10</integer_value>
 
185
          </surface_ids>
 
186
          <type name="dirichlet">
 
187
            <apply_weakly/>
 
188
            <constant>
 
189
              <real_value rank="0">1.0</real_value>
 
190
            </constant>
 
191
          </type>
 
192
        </boundary_conditions>
 
193
        <porosity/>
 
194
        <output/>
 
195
        <stat>
 
196
          <include_cv_stats/>
 
197
        </stat>
 
198
        <convergence>
 
199
          <include_in_convergence/>
 
200
        </convergence>
 
201
        <detectors>
 
202
          <include_in_detectors/>
 
203
        </detectors>
 
204
        <steady_state>
 
205
          <include_in_steady_state/>
 
206
        </steady_state>
 
207
        <consistent_interpolation/>
 
208
      </prognostic>
 
209
    </scalar_field>
 
210
    <scalar_field name="ControlVolumeCFLNumber" rank="0">
 
211
      <diagnostic>
 
212
        <algorithm name="Internal" material_phase_support="multiple"/>
 
213
        <mesh name="PressureMesh"/>
 
214
        <porosity/>
 
215
        <output/>
 
216
        <stat/>
 
217
        <convergence>
 
218
          <include_in_convergence/>
 
219
        </convergence>
 
220
        <detectors>
 
221
          <include_in_detectors/>
 
222
        </detectors>
 
223
        <steady_state>
 
224
          <include_in_steady_state/>
 
225
        </steady_state>
 
226
      </diagnostic>
 
227
    </scalar_field>
 
228
    <scalar_field name="TracerAnalytic" rank="0">
 
229
      <prescribed>
 
230
        <mesh name="PressureMesh"/>
 
231
        <value name="WholeMesh">
 
232
          <python>
 
233
            <string_value lines="20" type="python">def val(X, t):
 
234
   
 
235
   speed = 10
 
236
   
 
237
   distance = speed * t
 
238
   
 
239
   if X[0] &lt;= distance:
 
240
      
 
241
      analytic_val = 1.0
 
242
   
 
243
   else:
 
244
      
 
245
      analytic_val = 0.0
 
246
   
 
247
   return analytic_val</string_value>
 
248
          </python>
 
249
        </value>
 
250
        <output/>
 
251
        <stat>
 
252
          <include_cv_stats/>
 
253
        </stat>
 
254
        <detectors>
 
255
          <exclude_from_detectors/>
 
256
        </detectors>
 
257
      </prescribed>
 
258
    </scalar_field>
 
259
    <scalar_field name="AnalyticError" rank="0">
 
260
      <diagnostic>
 
261
        <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">
 
262
          <absolute_difference/>
 
263
        </algorithm>
 
264
        <mesh name="PressureMesh"/>
 
265
        <output/>
 
266
        <stat/>
 
267
        <convergence>
 
268
          <include_in_convergence/>
 
269
        </convergence>
 
270
        <detectors>
 
271
          <include_in_detectors/>
 
272
        </detectors>
 
273
        <steady_state>
 
274
          <include_in_steady_state/>
 
275
        </steady_state>
 
276
      </diagnostic>
 
277
    </scalar_field>
 
278
  </material_phase>
 
279
  <porous_media>
 
280
    <scalar_field name="Porosity">
 
281
      <prescribed>
 
282
        <mesh name="DGP0"/>
 
283
        <value name="WholeMesh">
 
284
          <constant>
 
285
            <real_value rank="0">0.5</real_value>
 
286
          </constant>
 
287
        </value>
 
288
        <output/>
 
289
        <stat/>
 
290
        <detectors>
 
291
          <exclude_from_detectors/>
 
292
        </detectors>
 
293
      </prescribed>
 
294
    </scalar_field>
 
295
  </porous_media>
 
296
</fluidity_options>