~amcg-stokes/fluidity/multimaterial_diagnostic_dependencies

« back to all changes in this revision

Viewing changes to tests/viscous_fs_simpletopbottom/viscous_fs_simpletopbottom_G.flml

  • Committer: Cian Wilson
  • Date: 2012-12-10 20:21:07 UTC
  • mfrom: (4132.1.7 fluidity)
  • Revision ID: cwilson@ldeo.columbia.edu-20121210202107-5wppwqcba4bfd1r3
Merging in changes from lp:fluidity.

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">viscous_fs_simpletopbottom_G</string_value>
 
5
  </simulation_name>
 
6
  <problem_type>
 
7
    <string_value lines="1">stokes</string_value>
 
8
  </problem_type>
 
9
  <geometry>
 
10
    <dimension>
 
11
      <integer_value rank="0">2</integer_value>
 
12
    </dimension>
 
13
    <mesh name="CoordinateMesh">
 
14
      <from_file file_name="src/square">
 
15
        <format name="gmsh"/>
 
16
        <stat>
 
17
          <include_in_stat/>
 
18
        </stat>
 
19
      </from_file>
 
20
    </mesh>
 
21
    <mesh name="VelocityMesh">
 
22
      <from_mesh>
 
23
        <mesh name="CoordinateMesh"/>
 
24
        <mesh_shape>
 
25
          <polynomial_degree>
 
26
            <integer_value rank="0">2</integer_value>
 
27
          </polynomial_degree>
 
28
        </mesh_shape>
 
29
        <stat>
 
30
          <exclude_from_stat/>
 
31
        </stat>
 
32
      </from_mesh>
 
33
    </mesh>
 
34
    <mesh name="FreeSurfaceSquaredMesh">
 
35
      <from_mesh>
 
36
        <mesh name="CoordinateMesh"/>
 
37
        <mesh_shape>
 
38
          <polynomial_degree>
 
39
            <integer_value rank="0">2</integer_value>
 
40
          </polynomial_degree>
 
41
        </mesh_shape>
 
42
        <stat>
 
43
          <exclude_from_stat/>
 
44
        </stat>
 
45
      </from_mesh>
 
46
    </mesh>
 
47
    <quadrature>
 
48
      <degree>
 
49
        <integer_value rank="0">5</integer_value>
 
50
      </degree>
 
51
    </quadrature>
 
52
  </geometry>
 
53
  <io>
 
54
    <dump_format>
 
55
      <string_value>vtk</string_value>
 
56
    </dump_format>
 
57
    <dump_period>
 
58
      <constant>
 
59
        <real_value rank="0">1.0</real_value>
 
60
      </constant>
 
61
    </dump_period>
 
62
    <output_mesh name="CoordinateMesh"/>
 
63
    <stat>
 
64
      <output_at_start/>
 
65
      <output_before_adapts/>
 
66
      <output_after_adapts/>
 
67
    </stat>
 
68
  </io>
 
69
  <timestepping>
 
70
    <current_time>
 
71
      <real_value rank="0">0.0</real_value>
 
72
    </current_time>
 
73
    <timestep>
 
74
      <real_value rank="0">0.5</real_value>
 
75
    </timestep>
 
76
    <finish_time>
 
77
      <real_value rank="0">4.0</real_value>
 
78
    </finish_time>
 
79
  </timestepping>
 
80
  <physical_parameters>
 
81
    <gravity>
 
82
      <magnitude>
 
83
        <real_value rank="0">12.225727727</real_value>
 
84
        <comment>solution.nond_factor()</comment>
 
85
      </magnitude>
 
86
      <vector_field name="GravityDirection" rank="1">
 
87
        <prescribed>
 
88
          <mesh name="CoordinateMesh"/>
 
89
          <value name="WholeMesh">
 
90
            <constant>
 
91
              <real_value shape="2" dim1="dim" rank="1">0.0 -1.0</real_value>
 
92
            </constant>
 
93
          </value>
 
94
          <output/>
 
95
          <stat>
 
96
            <include_in_stat/>
 
97
          </stat>
 
98
          <detectors>
 
99
            <exclude_from_detectors/>
 
100
          </detectors>
 
101
        </prescribed>
 
102
      </vector_field>
 
103
    </gravity>
 
104
  </physical_parameters>
 
105
  <material_phase name="Fluid">
 
106
    <equation_of_state>
 
107
      <fluids>
 
108
        <linear>
 
109
          <reference_density>
 
110
            <real_value rank="0">1.0</real_value>
 
111
          </reference_density>
 
112
          <subtract_out_hydrostatic_level/>
 
113
        </linear>
 
114
      </fluids>
 
115
    </equation_of_state>
 
116
    <scalar_field name="Pressure" rank="0">
 
117
      <prognostic>
 
118
        <mesh name="CoordinateMesh"/>
 
119
        <spatial_discretisation>
 
120
          <continuous_galerkin>
 
121
            <remove_stabilisation_term/>
 
122
            <integrate_continuity_by_parts/>
 
123
          </continuous_galerkin>
 
124
        </spatial_discretisation>
 
125
        <scheme>
 
126
          <poisson_pressure_solution>
 
127
            <string_value lines="1">never</string_value>
 
128
          </poisson_pressure_solution>
 
129
          <use_projection_method>
 
130
            <full_schur_complement>
 
131
              <inner_matrix name="FullMomentumMatrix">
 
132
                <solver>
 
133
                  <iterative_method name="cg"/>
 
134
                  <preconditioner name="mg"/>
 
135
                  <relative_error>
 
136
                    <real_value rank="0">1.e-12</real_value>
 
137
                  </relative_error>
 
138
                  <max_iterations>
 
139
                    <integer_value rank="0">1000</integer_value>
 
140
                  </max_iterations>
 
141
                  <never_ignore_solver_failures/>
 
142
                  <diagnostics>
 
143
                    <monitors/>
 
144
                  </diagnostics>
 
145
                </solver>
 
146
              </inner_matrix>
 
147
              <preconditioner_matrix name="ScaledPressureMassMatrix"/>
 
148
            </full_schur_complement>
 
149
          </use_projection_method>
 
150
        </scheme>
 
151
        <solver>
 
152
          <iterative_method name="fgmres"/>
 
153
          <preconditioner name="ksp">
 
154
            <solver>
 
155
              <iterative_method name="cg"/>
 
156
              <preconditioner name="sor"/>
 
157
              <relative_error>
 
158
                <real_value rank="0">1.e-12</real_value>
 
159
              </relative_error>
 
160
              <max_iterations>
 
161
                <integer_value rank="0">1000</integer_value>
 
162
              </max_iterations>
 
163
              <never_ignore_solver_failures/>
 
164
              <diagnostics>
 
165
                <monitors/>
 
166
              </diagnostics>
 
167
            </solver>
 
168
          </preconditioner>
 
169
          <relative_error>
 
170
            <real_value rank="0">1.e-10</real_value>
 
171
          </relative_error>
 
172
          <absolute_error>
 
173
            <real_value rank="0">1.e-16</real_value>
 
174
          </absolute_error>
 
175
          <max_iterations>
 
176
            <integer_value rank="0">1000</integer_value>
 
177
          </max_iterations>
 
178
          <never_ignore_solver_failures/>
 
179
          <diagnostics>
 
180
            <monitors/>
 
181
          </diagnostics>
 
182
        </solver>
 
183
        <output/>
 
184
        <stat/>
 
185
        <convergence>
 
186
          <include_in_convergence/>
 
187
        </convergence>
 
188
        <detectors>
 
189
          <exclude_from_detectors/>
 
190
        </detectors>
 
191
        <steady_state>
 
192
          <include_in_steady_state/>
 
193
        </steady_state>
 
194
        <no_interpolation/>
 
195
      </prognostic>
 
196
    </scalar_field>
 
197
    <scalar_field name="Density" rank="0">
 
198
      <diagnostic>
 
199
        <algorithm name="Internal" material_phase_support="multiple"/>
 
200
        <mesh name="CoordinateMesh"/>
 
201
        <output/>
 
202
        <stat/>
 
203
        <convergence>
 
204
          <include_in_convergence/>
 
205
        </convergence>
 
206
        <detectors>
 
207
          <include_in_detectors/>
 
208
        </detectors>
 
209
        <steady_state>
 
210
          <include_in_steady_state/>
 
211
        </steady_state>
 
212
      </diagnostic>
 
213
    </scalar_field>
 
214
    <vector_field name="Velocity" rank="1">
 
215
      <prognostic>
 
216
        <mesh name="VelocityMesh"/>
 
217
        <equation name="LinearMomentum"/>
 
218
        <spatial_discretisation>
 
219
          <continuous_galerkin>
 
220
            <stabilisation>
 
221
              <no_stabilisation/>
 
222
            </stabilisation>
 
223
            <mass_terms>
 
224
              <exclude_mass_terms/>
 
225
            </mass_terms>
 
226
            <advection_terms>
 
227
              <exclude_advection_terms/>
 
228
            </advection_terms>
 
229
            <stress_terms>
 
230
              <partial_stress_form/>
 
231
            </stress_terms>
 
232
          </continuous_galerkin>
 
233
          <conservative_advection>
 
234
            <real_value rank="0">1.0</real_value>
 
235
          </conservative_advection>
 
236
        </spatial_discretisation>
 
237
        <temporal_discretisation>
 
238
          <theta>
 
239
            <real_value rank="0">1.0</real_value>
 
240
          </theta>
 
241
          <relaxation>
 
242
            <real_value rank="0">1.0</real_value>
 
243
          </relaxation>
 
244
          <theta_pressure_gradient>
 
245
            <real_value rank="0">0.5</real_value>
 
246
          </theta_pressure_gradient>
 
247
        </temporal_discretisation>
 
248
        <reference_coordinates>
 
249
          <real_value shape="2" dim1="dim" rank="1">0.25 0.5</real_value>
 
250
          <specify_components>
 
251
            <y_component/>
 
252
          </specify_components>
 
253
        </reference_coordinates>
 
254
        <solver>
 
255
          <iterative_method name="cg"/>
 
256
          <preconditioner name="mg"/>
 
257
          <relative_error>
 
258
            <real_value rank="0">1.e-12</real_value>
 
259
          </relative_error>
 
260
          <max_iterations>
 
261
            <integer_value rank="0">1000</integer_value>
 
262
          </max_iterations>
 
263
          <never_ignore_solver_failures/>
 
264
          <diagnostics>
 
265
            <monitors/>
 
266
          </diagnostics>
 
267
        </solver>
 
268
        <initial_condition name="WholeMesh">
 
269
          <constant>
 
270
            <real_value shape="2" dim1="dim" rank="1">0.0 0.0</real_value>
 
271
          </constant>
 
272
        </initial_condition>
 
273
        <boundary_conditions name="Sides">
 
274
          <surface_ids>
 
275
            <integer_value shape="2" rank="1">7 9</integer_value>
 
276
          </surface_ids>
 
277
          <type name="dirichlet">
 
278
            <align_bc_with_cartesian>
 
279
              <x_component>
 
280
                <constant>
 
281
                  <real_value rank="0">0.0</real_value>
 
282
                </constant>
 
283
              </x_component>
 
284
            </align_bc_with_cartesian>
 
285
          </type>
 
286
        </boundary_conditions>
 
287
        <boundary_conditions name="Bottom">
 
288
          <surface_ids>
 
289
            <integer_value shape="1" rank="1">6</integer_value>
 
290
          </surface_ids>
 
291
          <type name="free_surface">
 
292
            <no_normal_stress/>
 
293
            <external_density>
 
294
              <real_value rank="0">2.0</real_value>
 
295
            </external_density>
 
296
          </type>
 
297
        </boundary_conditions>
 
298
        <boundary_conditions name="Top">
 
299
          <surface_ids>
 
300
            <integer_value shape="1" rank="1">8</integer_value>
 
301
          </surface_ids>
 
302
          <type name="free_surface">
 
303
            <no_normal_stress/>
 
304
          </type>
 
305
        </boundary_conditions>
 
306
        <tensor_field name="Viscosity" rank="2">
 
307
          <prescribed>
 
308
            <value name="WholeMesh">
 
309
              <anisotropic_symmetric>
 
310
                <constant>
 
311
                  <real_value symmetric="true" dim2="dim" shape="2 2" dim1="dim" rank="2">1.0 1.0 1.0 1.0</real_value>
 
312
                </constant>
 
313
              </anisotropic_symmetric>
 
314
            </value>
 
315
            <output/>
 
316
          </prescribed>
 
317
        </tensor_field>
 
318
        <output/>
 
319
        <stat>
 
320
          <include_in_stat/>
 
321
          <previous_time_step>
 
322
            <exclude_from_stat/>
 
323
          </previous_time_step>
 
324
          <nonlinear_field>
 
325
            <exclude_from_stat/>
 
326
          </nonlinear_field>
 
327
        </stat>
 
328
        <convergence>
 
329
          <include_in_convergence/>
 
330
        </convergence>
 
331
        <detectors>
 
332
          <include_in_detectors/>
 
333
        </detectors>
 
334
        <steady_state>
 
335
          <include_in_steady_state/>
 
336
        </steady_state>
 
337
        <consistent_interpolation/>
 
338
      </prognostic>
 
339
    </vector_field>
 
340
    <scalar_field name="FreeSurface" rank="0">
 
341
      <prognostic>
 
342
        <mesh name="CoordinateMesh"/>
 
343
        <initial_condition name="WholeMesh">
 
344
          <python>
 
345
            <string_value lines="20" type="code" language="python">import solution
 
346
global dx, F, G
 
347
dx = solution.dx
 
348
F = solution.nond_F
 
349
G = solution.nond_G
 
350
 
 
351
def val(X,t):
 
352
  if(X[1]&gt;(1.-dx/2.)):
 
353
    return F(X[0], t)
 
354
  elif(X[1]&lt;dx/2.):
 
355
    return G(X[0], t)
 
356
  else:
 
357
    return 0.0</string_value>
 
358
          </python>
 
359
        </initial_condition>
 
360
        <solver>
 
361
          <iterative_method name="cg"/>
 
362
          <preconditioner name="sor"/>
 
363
          <relative_error>
 
364
            <real_value rank="0">1.e-6</real_value>
 
365
          </relative_error>
 
366
          <max_iterations>
 
367
            <integer_value rank="0">1000</integer_value>
 
368
          </max_iterations>
 
369
          <never_ignore_solver_failures/>
 
370
          <diagnostics>
 
371
            <monitors/>
 
372
          </diagnostics>
 
373
        </solver>
 
374
        <output/>
 
375
        <stat>
 
376
          <surface_integral type="value" name="Top">
 
377
            <surface_ids>
 
378
              <integer_value shape="1" rank="1">8</integer_value>
 
379
            </surface_ids>
 
380
          </surface_integral>
 
381
          <surface_integral type="value" name="Bottom">
 
382
            <surface_ids>
 
383
              <integer_value shape="1" rank="1">6</integer_value>
 
384
            </surface_ids>
 
385
          </surface_integral>
 
386
        </stat>
 
387
        <convergence>
 
388
          <include_in_convergence/>
 
389
        </convergence>
 
390
        <detectors>
 
391
          <include_in_detectors/>
 
392
        </detectors>
 
393
        <steady_state>
 
394
          <include_in_steady_state/>
 
395
        </steady_state>
 
396
        <consistent_interpolation/>
 
397
      </prognostic>
 
398
    </scalar_field>
 
399
    <scalar_field name="AnalyticalFreeSurface" rank="0">
 
400
      <prescribed>
 
401
        <mesh name="CoordinateMesh"/>
 
402
        <value name="WholeMesh">
 
403
          <python>
 
404
            <string_value lines="20" type="code" language="python">import solution
 
405
global dx, F, G
 
406
dx = solution.dx
 
407
F = solution.nond_F
 
408
G = solution.nond_G
 
409
 
 
410
def val(X,t):
 
411
  if(X[1]&gt;(1.-dx/2.)):
 
412
    return F(X[0], t)
 
413
  elif(X[1]&lt;dx/2.):
 
414
    return G(X[0], t)
 
415
  else:
 
416
    return 0.0</string_value>
 
417
          </python>
 
418
        </value>
 
419
        <output/>
 
420
        <stat/>
 
421
        <detectors>
 
422
          <exclude_from_detectors/>
 
423
        </detectors>
 
424
      </prescribed>
 
425
    </scalar_field>
 
426
    <scalar_field name="FreeSurfaceDifference" rank="0">
 
427
      <diagnostic>
 
428
        <algorithm source_field_2_type="scalar" name="scalar_difference" source_field_1_name="FreeSurface" source_field_2_name="AnalyticalFreeSurface" material_phase_support="single" source_field_1_type="scalar">
 
429
          <absolute_difference/>
 
430
        </algorithm>
 
431
        <mesh name="FreeSurfaceSquaredMesh"/>
 
432
        <output/>
 
433
        <stat/>
 
434
        <convergence>
 
435
          <include_in_convergence/>
 
436
        </convergence>
 
437
        <detectors>
 
438
          <include_in_detectors/>
 
439
        </detectors>
 
440
        <steady_state>
 
441
          <include_in_steady_state/>
 
442
        </steady_state>
 
443
      </diagnostic>
 
444
    </scalar_field>
 
445
    <scalar_field name="DifferenceSquared" rank="0">
 
446
      <diagnostic>
 
447
        <algorithm name="scalar_python_diagnostic" material_phase_support="single">
 
448
          <string_value lines="20" type="code" language="python">fsd = state.scalar_fields["FreeSurfaceDifference"]
 
449
 
 
450
assert(field.node_count==fsd.node_count)
 
451
 
 
452
for i in range(field.node_count):
 
453
  field.set(i, fsd.node_val(i)*fsd.node_val(i))</string_value>
 
454
          <depends>
 
455
            <string_value lines="1">FreeSurfaceDifference</string_value>
 
456
          </depends>
 
457
        </algorithm>
 
458
        <mesh name="FreeSurfaceSquaredMesh"/>
 
459
        <output/>
 
460
        <stat>
 
461
          <surface_integral type="value" name="SurfaceL2Norm">
 
462
            <surface_ids>
 
463
              <integer_value shape="1" rank="1">6 8</integer_value>
 
464
            </surface_ids>
 
465
          </surface_integral>
 
466
          <surface_integral type="value" name="TopSurfaceL2Norm">
 
467
            <surface_ids>
 
468
              <integer_value shape="1" rank="1">8</integer_value>
 
469
            </surface_ids>
 
470
          </surface_integral>
 
471
          <surface_integral type="value" name="BottomSurfaceL2Norm">
 
472
            <surface_ids>
 
473
              <integer_value shape="1" rank="1">6</integer_value>
 
474
            </surface_ids>
 
475
          </surface_integral>
 
476
        </stat>
 
477
        <convergence>
 
478
          <include_in_convergence/>
 
479
        </convergence>
 
480
        <detectors>
 
481
          <include_in_detectors/>
 
482
        </detectors>
 
483
        <steady_state>
 
484
          <include_in_steady_state/>
 
485
        </steady_state>
 
486
      </diagnostic>
 
487
    </scalar_field>
 
488
  </material_phase>
 
489
</fluidity_options>