~fluidity-core/fluidity/zoltan-tweaks

« back to all changes in this revision

Viewing changes to tests/Stokes_mms_cg_p2p1_periodic/MMS_A.flml

  • Committer: Sam Parkinson
  • Date: 2013-11-28 11:44:06 UTC
  • mfrom: (4201.1.100 zoltan-tweaks)
  • Revision ID: s.parkinson11@imperial.ac.uk-20131128114406-12n1opiiftwfif65
merge with 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">MMS_A</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_mesh>
 
15
        <mesh name="InputMesh"/>
 
16
        <stat>
 
17
          <exclude_from_stat/>
 
18
        </stat>
 
19
      </from_mesh>
 
20
    </mesh>
 
21
    <mesh name="VelocityMesh">
 
22
      <from_mesh>
 
23
        <mesh name="PressureMesh"/>
 
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="PressureMesh">
 
35
      <from_mesh>
 
36
        <mesh name="InputMesh"/>
 
37
        <periodic_boundary_conditions name="Periodic">
 
38
          <physical_boundary_ids>
 
39
            <integer_value shape="1" rank="1">10</integer_value>
 
40
          </physical_boundary_ids>
 
41
          <aliased_boundary_ids>
 
42
            <integer_value shape="1" rank="1">8</integer_value>
 
43
          </aliased_boundary_ids>
 
44
          <coordinate_map>
 
45
            <string_value lines="20" type="code" language="python">def val(X,t):
 
46
  return 0,X[1]</string_value>
 
47
          </coordinate_map>
 
48
        </periodic_boundary_conditions>
 
49
        <stat>
 
50
          <exclude_from_stat/>
 
51
        </stat>
 
52
      </from_mesh>
 
53
    </mesh>
 
54
    <mesh name="InputMesh">
 
55
      <from_file file_name="MMS_A">
 
56
        <format name="gmsh"/>
 
57
        <stat>
 
58
          <include_in_stat/>
 
59
        </stat>
 
60
      </from_file>
 
61
    </mesh>
 
62
    <quadrature>
 
63
      <degree>
 
64
        <integer_value rank="0">4</integer_value>
 
65
      </degree>
 
66
    </quadrature>
 
67
  </geometry>
 
68
  <io>
 
69
    <dump_format>
 
70
      <string_value>vtk</string_value>
 
71
    </dump_format>
 
72
    <dump_period>
 
73
      <constant>
 
74
        <real_value rank="0">15.0</real_value>
 
75
      </constant>
 
76
    </dump_period>
 
77
    <output_mesh name="CoordinateMesh"/>
 
78
    <checkpointing>
 
79
      <checkpoint_period_in_dumps>
 
80
        <integer_value rank="0">1000</integer_value>
 
81
      </checkpoint_period_in_dumps>
 
82
      <checkpoint_at_end/>
 
83
    </checkpointing>
 
84
    <stat/>
 
85
  </io>
 
86
  <timestepping>
 
87
    <current_time>
 
88
      <real_value rank="0">0.0</real_value>
 
89
    </current_time>
 
90
    <timestep>
 
91
      <real_value rank="0">0.0072673325013204136</real_value>
 
92
      <comment>gives a max cfl number of 0.1</comment>
 
93
    </timestep>
 
94
    <finish_time>
 
95
      <real_value rank="0">10.0</real_value>
 
96
      <comment>10.0</comment>
 
97
    </finish_time>
 
98
    <steady_state>
 
99
      <tolerance>
 
100
        <real_value rank="0">1.E-8</real_value>
 
101
        <infinity_norm/>
 
102
      </tolerance>
 
103
    </steady_state>
 
104
  </timestepping>
 
105
  <physical_parameters/>
 
106
  <material_phase name="NS">
 
107
    <equation_of_state>
 
108
      <fluids>
 
109
        <linear>
 
110
          <reference_density>
 
111
            <real_value rank="0">1.0</real_value>
 
112
          </reference_density>
 
113
        </linear>
 
114
      </fluids>
 
115
    </equation_of_state>
 
116
    <scalar_field name="Pressure" rank="0">
 
117
      <prognostic>
 
118
        <mesh name="PressureMesh"/>
 
119
        <spatial_discretisation>
 
120
          <continuous_galerkin>
 
121
            <remove_stabilisation_term/>
 
122
          </continuous_galerkin>
 
123
        </spatial_discretisation>
 
124
        <scheme>
 
125
          <poisson_pressure_solution>
 
126
            <string_value lines="1">never</string_value>
 
127
          </poisson_pressure_solution>
 
128
          <use_projection_method>
 
129
            <full_schur_complement>
 
130
              <inner_matrix name="FullMomentumMatrix">
 
131
                <solver>
 
132
                  <iterative_method name="cg"/>
 
133
                  <preconditioner name="sor"/>
 
134
                  <relative_error>
 
135
                    <real_value rank="0">1E-10</real_value>
 
136
                  </relative_error>
 
137
                  <max_iterations>
 
138
                    <integer_value rank="0">10000</integer_value>
 
139
                  </max_iterations>
 
140
                  <start_from_zero/>
 
141
                  <remove_null_space>
 
142
                    <specify_components>
 
143
                      <x_component/>
 
144
                    </specify_components>
 
145
                    <test_null_space/>
 
146
                  </remove_null_space>
 
147
                  <never_ignore_solver_failures/>
 
148
                  <diagnostics>
 
149
                    <monitors/>
 
150
                  </diagnostics>
 
151
                </solver>
 
152
              </inner_matrix>
 
153
              <preconditioner_matrix name="DiagonalSchurComplement"/>
 
154
            </full_schur_complement>
 
155
          </use_projection_method>
 
156
        </scheme>
 
157
        <solver>
 
158
          <iterative_method name="fgmres"/>
 
159
          <preconditioner name="jacobi"/>
 
160
          <relative_error>
 
161
            <real_value rank="0">1.E-10</real_value>
 
162
          </relative_error>
 
163
          <absolute_error>
 
164
            <real_value rank="0">1e-16</real_value>
 
165
          </absolute_error>
 
166
          <max_iterations>
 
167
            <integer_value rank="0">1000</integer_value>
 
168
          </max_iterations>
 
169
          <remove_null_space>
 
170
            <test_null_space/>
 
171
          </remove_null_space>
 
172
          <never_ignore_solver_failures/>
 
173
          <diagnostics>
 
174
            <monitors/>
 
175
          </diagnostics>
 
176
        </solver>
 
177
        <output>
 
178
          <include_previous_time_step/>
 
179
        </output>
 
180
        <stat/>
 
181
        <convergence>
 
182
          <include_in_convergence/>
 
183
        </convergence>
 
184
        <detectors>
 
185
          <exclude_from_detectors/>
 
186
        </detectors>
 
187
        <steady_state>
 
188
          <include_in_steady_state/>
 
189
        </steady_state>
 
190
        <consistent_interpolation/>
 
191
      </prognostic>
 
192
    </scalar_field>
 
193
    <scalar_field name="Density" rank="0">
 
194
      <diagnostic>
 
195
        <algorithm name="Internal" material_phase_support="multiple"/>
 
196
        <mesh name="VelocityMesh"/>
 
197
        <output/>
 
198
        <stat/>
 
199
        <convergence>
 
200
          <include_in_convergence/>
 
201
        </convergence>
 
202
        <detectors>
 
203
          <include_in_detectors/>
 
204
        </detectors>
 
205
        <steady_state>
 
206
          <include_in_steady_state/>
 
207
        </steady_state>
 
208
      </diagnostic>
 
209
    </scalar_field>
 
210
    <vector_field name="Velocity" rank="1">
 
211
      <prognostic>
 
212
        <mesh name="VelocityMesh"/>
 
213
        <equation name="LinearMomentum"/>
 
214
        <spatial_discretisation>
 
215
          <continuous_galerkin>
 
216
            <stabilisation>
 
217
              <no_stabilisation/>
 
218
            </stabilisation>
 
219
            <mass_terms>
 
220
              <exclude_mass_terms/>
 
221
            </mass_terms>
 
222
            <advection_terms>
 
223
              <exclude_advection_terms/>
 
224
            </advection_terms>
 
225
            <stress_terms>
 
226
              <tensor_form/>
 
227
            </stress_terms>
 
228
          </continuous_galerkin>
 
229
          <conservative_advection>
 
230
            <real_value rank="0">0.0</real_value>
 
231
          </conservative_advection>
 
232
        </spatial_discretisation>
 
233
        <temporal_discretisation>
 
234
          <theta>
 
235
            <real_value rank="0">1</real_value>
 
236
          </theta>
 
237
          <relaxation>
 
238
            <real_value rank="0">1</real_value>
 
239
          </relaxation>
 
240
        </temporal_discretisation>
 
241
        <solver>
 
242
          <iterative_method name="cg"/>
 
243
          <preconditioner name="eisenstat"/>
 
244
          <relative_error>
 
245
            <real_value rank="0">1.E-7</real_value>
 
246
          </relative_error>
 
247
          <max_iterations>
 
248
            <integer_value rank="0">1000</integer_value>
 
249
          </max_iterations>
 
250
          <remove_null_space>
 
251
            <specify_components>
 
252
              <x_component/>
 
253
            </specify_components>
 
254
            <test_null_space/>
 
255
          </remove_null_space>
 
256
          <never_ignore_solver_failures/>
 
257
          <diagnostics>
 
258
            <monitors/>
 
259
          </diagnostics>
 
260
        </solver>
 
261
        <initial_condition name="WholeMesh">
 
262
          <constant>
 
263
            <real_value shape="2" dim1="dim" rank="1">0.0 0.0</real_value>
 
264
          </constant>
 
265
        </initial_condition>
 
266
        <boundary_conditions name="TopBottom">
 
267
          <surface_ids>
 
268
            <integer_value shape="2" rank="1">7 9</integer_value>
 
269
          </surface_ids>
 
270
          <type name="dirichlet">
 
271
            <align_bc_with_surface>
 
272
              <normal_component>
 
273
                <constant>
 
274
                  <real_value rank="0">0.0</real_value>
 
275
                </constant>
 
276
              </normal_component>
 
277
            </align_bc_with_surface>
 
278
          </type>
 
279
        </boundary_conditions>
 
280
        <tensor_field name="Viscosity" rank="2">
 
281
          <prescribed>
 
282
            <value name="WholeMesh">
 
283
              <isotropic>
 
284
                <constant>
 
285
                  <real_value rank="0">0.7</real_value>
 
286
                </constant>
 
287
              </isotropic>
 
288
            </value>
 
289
            <output/>
 
290
          </prescribed>
 
291
        </tensor_field>
 
292
        <vector_field name="Source" rank="1">
 
293
          <prescribed>
 
294
            <value name="WholeMesh">
 
295
              <python>
 
296
                <string_value lines="20" type="code" language="python">def val(XX, t):
 
297
   from math import sin,cos
 
298
   nu = 0.7;
 
299
   adv = 0.0;
 
300
   beta = 0.0;
 
301
   mass = 0.0;
 
302
   rho = 1.0;
 
303
   x = XX[0];
 
304
   y = XX[1];
 
305
   Su = adv*rho*(cos(x)*sin(x)*sin(y)**2 + cos(x)*sin(x)*cos(y)**2) + 2*nu*sin(x)*cos(y) - sin(x)*cos(y)
 
306
   Sv = adv*rho*(sin(x)**2*cos(y)*sin(y) + cos(x)**2*cos(y)*sin(y)) - 2*nu*cos(x)*sin(y) - cos(x)*sin(y)
 
307
   return (Su, Sv)</string_value>
 
308
                <comment>u(x,y,rho,beta,nu,adv,mass,t) = sin(x)*cos(y)&#13;
 
309
v(x,y,rho,beta,nu,adv,masst) = -cos(x)*sin(y)
 
310
p(x,y,rho,beta,nu,adv,mass,t) = cos(x)*cos(y)&#13;
 
311
 
 
312
u_t = diff(u,t)
 
313
v_t = diff(v,t)
 
314
 
 
315
u_x = diff(u,x)&#13;
 
316
u_y = diff(u,y)
 
317
v_x = diff(v,x)
 
318
v_y = diff(v,y)
 
319
 
 
320
p_x = diff(p,x)
 
321
p_y = diff(p,y)
 
322
&#13;
 
323
u_xx = diff(u_x,x)
 
324
u_yy = diff(u_y,y)
 
325
v_xx = diff(v_x,x)
 
326
v_yy = diff(v_y,y)
 
327
 
 
328
mass*rho*u_t + adv*rho*(u*u_x+v*u_y + beta*(u*u_x + u*v_y)) + p_x - nu*u_xx - nu*u_yy
 
329
mass*rho*v_t + adv*rho*(u*v_x+v*v_y + beta*(v*u_x + v*v_y)) + p_y - nu*v_xx - nu*v_yy</comment>
 
330
              </python>
 
331
            </value>
 
332
            <output/>
 
333
            <stat>
 
334
              <include_in_stat/>
 
335
            </stat>
 
336
            <detectors>
 
337
              <exclude_from_detectors/>
 
338
            </detectors>
 
339
          </prescribed>
 
340
        </vector_field>
 
341
        <output>
 
342
          <include_previous_time_step/>
 
343
        </output>
 
344
        <stat>
 
345
          <include_in_stat/>
 
346
          <previous_time_step>
 
347
            <exclude_from_stat/>
 
348
          </previous_time_step>
 
349
          <nonlinear_field>
 
350
            <exclude_from_stat/>
 
351
          </nonlinear_field>
 
352
        </stat>
 
353
        <convergence>
 
354
          <include_in_convergence/>
 
355
        </convergence>
 
356
        <detectors>
 
357
          <include_in_detectors/>
 
358
        </detectors>
 
359
        <steady_state>
 
360
          <include_in_steady_state/>
 
361
        </steady_state>
 
362
        <consistent_interpolation/>
 
363
      </prognostic>
 
364
    </vector_field>
 
365
    <scalar_field name="CFLNumber" rank="0">
 
366
      <diagnostic>
 
367
        <algorithm name="Internal" material_phase_support="multiple"/>
 
368
        <mesh name="VelocityMesh"/>
 
369
        <output/>
 
370
        <stat/>
 
371
        <convergence>
 
372
          <include_in_convergence/>
 
373
        </convergence>
 
374
        <detectors>
 
375
          <include_in_detectors/>
 
376
        </detectors>
 
377
        <steady_state>
 
378
          <include_in_steady_state/>
 
379
        </steady_state>
 
380
      </diagnostic>
 
381
    </scalar_field>
 
382
    <scalar_field name="PressureAnalytical" rank="0">
 
383
      <prescribed>
 
384
        <mesh name="PressureMesh"/>
 
385
        <value name="WholeMesh">
 
386
          <python>
 
387
            <string_value lines="20" type="code" language="python">def val(X,t):
 
388
   from math import cos
 
389
   p = cos(X[0])*cos(X[1])
 
390
   return p</string_value>
 
391
          </python>
 
392
        </value>
 
393
        <output/>
 
394
        <stat/>
 
395
        <detectors>
 
396
          <exclude_from_detectors/>
 
397
        </detectors>
 
398
      </prescribed>
 
399
    </scalar_field>
 
400
    <scalar_field name="ScalarAbsoluteDifference" rank="0">
 
401
      <diagnostic field_name_b="Pressure" field_name_a="PressureAnalytical">
 
402
        <algorithm name="Internal" material_phase_support="multiple"/>
 
403
        <mesh name="PressureMesh"/>
 
404
        <output/>
 
405
        <stat/>
 
406
        <convergence>
 
407
          <include_in_convergence/>
 
408
        </convergence>
 
409
        <detectors>
 
410
          <include_in_detectors/>
 
411
        </detectors>
 
412
        <steady_state>
 
413
          <include_in_steady_state/>
 
414
        </steady_state>
 
415
        <relative_to_average/>
 
416
      </diagnostic>
 
417
    </scalar_field>
 
418
    <scalar_field name="FiniteElementDivergence" rank="0">
 
419
      <diagnostic field_name="Velocity">
 
420
        <algorithm legacy="true" name="Internal" material_phase_support="multiple"/>
 
421
        <mesh name="PressureMesh"/>
 
422
        <solver>
 
423
          <iterative_method name="cg"/>
 
424
          <preconditioner name="sor"/>
 
425
          <relative_error>
 
426
            <real_value rank="0">1.E-10</real_value>
 
427
          </relative_error>
 
428
          <max_iterations>
 
429
            <integer_value rank="0">10000</integer_value>
 
430
          </max_iterations>
 
431
          <never_ignore_solver_failures/>
 
432
          <diagnostics>
 
433
            <monitors/>
 
434
          </diagnostics>
 
435
        </solver>
 
436
        <output/>
 
437
        <stat/>
 
438
        <convergence>
 
439
          <include_in_convergence/>
 
440
        </convergence>
 
441
        <detectors>
 
442
          <include_in_detectors/>
 
443
        </detectors>
 
444
        <steady_state>
 
445
          <include_in_steady_state/>
 
446
        </steady_state>
 
447
      </diagnostic>
 
448
    </scalar_field>
 
449
    <vector_field name="VelocityAnalytical" rank="1">
 
450
      <prescribed>
 
451
        <mesh name="VelocityMesh"/>
 
452
        <value name="WholeMesh">
 
453
          <python>
 
454
            <string_value lines="20" type="code" language="python">def val(X,t):
 
455
   from math import sin, cos
 
456
   # Shear rotation about origin.
 
457
   return (sin(X[0])*cos(X[1]), -1.0*cos(X[0])*sin(X[1]))</string_value>
 
458
          </python>
 
459
        </value>
 
460
        <output/>
 
461
        <stat>
 
462
          <include_in_stat/>
 
463
        </stat>
 
464
        <detectors>
 
465
          <exclude_from_detectors/>
 
466
        </detectors>
 
467
      </prescribed>
 
468
    </vector_field>
 
469
    <vector_field name="VectorAbsoluteDifference" rank="1">
 
470
      <diagnostic field_name_b="Velocity" field_name_a="VelocityAnalytical">
 
471
        <algorithm name="Internal" material_phase_support="multiple"/>
 
472
        <mesh name="VelocityMesh"/>
 
473
        <output/>
 
474
        <stat>
 
475
          <include_in_stat/>
 
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
    </vector_field>
 
488
  </material_phase>
 
489
</fluidity_options>