~fluidity-core/fluidity/dev-trunk

« back to all changes in this revision

Viewing changes to tests/mms_tracer_P1dg_cdg_diff_steady_3d_cjc_inhNmnnbc/cdg_cjc.flml

  • Committer: Alexandros Avdis
  • Date: 2012-09-18 21:03:09 UTC
  • mfrom: (3879.2.7 DG_Neumann)
  • Revision ID: a.avdis@imperial.ac.uk-20120918210309-bbbxgowwsmhrcl3k
Merge-in of DG_Neumann branch.

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">cdg</string_value>
 
5
  </simulation_name>
 
6
  <problem_type>
 
7
    <string_value lines="1">fluids</string_value>
 
8
  </problem_type>
 
9
  <geometry>
 
10
    <dimension>
 
11
      <integer_value rank="0">3</integer_value>
 
12
    </dimension>
 
13
    <mesh name="CoordinateMesh">
 
14
      <from_file file_name="box">
 
15
        <format name="triangle"/>
 
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">1</integer_value>
 
27
          </polynomial_degree>
 
28
        </mesh_shape>
 
29
        <mesh_continuity>
 
30
          <string_value>discontinuous</string_value>
 
31
        </mesh_continuity>
 
32
        <stat>
 
33
          <exclude_from_stat/>
 
34
        </stat>
 
35
      </from_mesh>
 
36
    </mesh>
 
37
    <mesh name="PressureMesh">
 
38
      <from_mesh>
 
39
        <mesh name="CoordinateMesh"/>
 
40
        <stat>
 
41
          <exclude_from_stat/>
 
42
        </stat>
 
43
      </from_mesh>
 
44
    </mesh>
 
45
    <quadrature>
 
46
      <degree>
 
47
        <integer_value rank="0">4</integer_value>
 
48
      </degree>
 
49
    </quadrature>
 
50
  </geometry>
 
51
  <io>
 
52
    <dump_format>
 
53
      <string_value>vtk</string_value>
 
54
    </dump_format>
 
55
    <dump_period>
 
56
      <constant>
 
57
        <real_value rank="0">500.0</real_value>
 
58
      </constant>
 
59
    </dump_period>
 
60
    <output_mesh name="VelocityMesh"/>
 
61
    <stat/>
 
62
  </io>
 
63
  <timestepping>
 
64
    <current_time>
 
65
      <real_value rank="0">0</real_value>
 
66
    </current_time>
 
67
    <timestep>
 
68
      <real_value rank="0">0.05</real_value>
 
69
    </timestep>
 
70
    <finish_time>
 
71
      <real_value rank="0">1.0e-10</real_value>
 
72
    </finish_time>
 
73
    <steady_state>
 
74
      <tolerance>
 
75
        <real_value rank="0">1.E-6</real_value>
 
76
        <infinity_norm/>
 
77
      </tolerance>
 
78
    </steady_state>
 
79
  </timestepping>
 
80
  <physical_parameters/>
 
81
  <material_phase name="Stuff">
 
82
    <vector_field name="Velocity" rank="1">
 
83
      <prescribed>
 
84
        <mesh name="VelocityMesh"/>
 
85
        <value name="WholeMesh">
 
86
          <constant>
 
87
            <real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value>
 
88
            <comment>def val(XX, t):
 
89
   from math import sin,cos
 
90
   x = XX[0];
 
91
   y = XX[1];
 
92
   z = XX[2];
 
93
   x2 = x*x;
 
94
   y2 = y*y;
 
95
   z2 = z*z;
 
96
   u = sin(5*(x2+y2+z2));
 
97
   v = cos(3*(x2-y2+z2));
 
98
   w = sin(3*(-x2-y2+z2));
 
99
   return (u, v, w)</comment>
 
100
          </constant>
 
101
        </value>
 
102
        <output/>
 
103
        <stat>
 
104
          <include_in_stat/>
 
105
        </stat>
 
106
        <detectors>
 
107
          <exclude_from_detectors/>
 
108
        </detectors>
 
109
      </prescribed>
 
110
    </vector_field>
 
111
    <scalar_field name="NumericalSolution" rank="0">
 
112
      <prognostic>
 
113
        <mesh name="VelocityMesh"/>
 
114
        <equation name="AdvectionDiffusion"/>
 
115
        <spatial_discretisation>
 
116
          <discontinuous_galerkin>
 
117
            <advection_scheme>
 
118
              <none/>
 
119
              <integrate_advection_by_parts>
 
120
                <twice/>
 
121
              </integrate_advection_by_parts>
 
122
            </advection_scheme>
 
123
            <diffusion_scheme>
 
124
              <compact_discontinuous_galerkin/>
 
125
            </diffusion_scheme>
 
126
            <mass_terms>
 
127
              <exclude_mass_terms/>
 
128
            </mass_terms>
 
129
          </discontinuous_galerkin>
 
130
          <conservative_advection>
 
131
            <real_value rank="0">0.0</real_value>
 
132
          </conservative_advection>
 
133
        </spatial_discretisation>
 
134
        <temporal_discretisation>
 
135
          <theta>
 
136
            <real_value rank="0">1.0</real_value>
 
137
          </theta>
 
138
        </temporal_discretisation>
 
139
        <solver>
 
140
          <iterative_method name="cg"/>
 
141
          <preconditioner name="mg"/>
 
142
          <relative_error>
 
143
            <real_value rank="0">1.E-10</real_value>
 
144
          </relative_error>
 
145
          <max_iterations>
 
146
            <integer_value rank="0">10000</integer_value>
 
147
          </max_iterations>
 
148
          <start_from_zero/>
 
149
          <never_ignore_solver_failures/>
 
150
          <diagnostics>
 
151
            <monitors/>
 
152
          </diagnostics>
 
153
        </solver>
 
154
        <initial_condition name="WholeMesh">
 
155
          <constant>
 
156
            <real_value rank="0">0</real_value>
 
157
          </constant>
 
158
        </initial_condition>
 
159
        <boundary_conditions name="Diriclet">
 
160
          <surface_ids>
 
161
            <integer_value shape="5" rank="1">28 29 30 31 32</integer_value>
 
162
          </surface_ids>
 
163
          <type name="dirichlet">
 
164
            <apply_weakly>
 
165
              <boundary_overwrites_initial_condition/>
 
166
            </apply_weakly>
 
167
            <python>
 
168
              <string_value lines="20" type="code" language="python">def val(XX, t):
 
169
   from math import exp
 
170
   x = XX[0];
 
171
   y = XX[1];
 
172
   z = XX[2];
 
173
   u = exp(-((x-0.5)**2 + (y-0.5)**2 + (z-0.5)**2)/2)
 
174
   return u</string_value>
 
175
            </python>
 
176
          </type>
 
177
        </boundary_conditions>
 
178
        <boundary_conditions name="inhomogeneous_Neumann_on_x_normal_boundary_surface">
 
179
          <surface_ids>
 
180
            <integer_value shape="1" rank="1">33</integer_value>
 
181
          </surface_ids>
 
182
          <type name="neumann">
 
183
            <python>
 
184
              <string_value lines="20" type="code" language="python">def val(XX, t):
 
185
   from math import exp
 
186
   x = XX[0];
 
187
   y = XX[1];
 
188
   z = XX[2];
 
189
   u = exp(-((x-0.5)**2 + (y-0.5)**2 + (z-0.5)**2)/2)*(0.5-x)
 
190
   return u</string_value>
 
191
            </python>
 
192
          </type>
 
193
        </boundary_conditions>
 
194
        <tensor_field name="Diffusivity" rank="2">
 
195
          <prescribed>
 
196
            <value name="WholeMesh">
 
197
              <isotropic>
 
198
                <constant>
 
199
                  <real_value rank="0">1.0</real_value>
 
200
                </constant>
 
201
              </isotropic>
 
202
            </value>
 
203
            <output/>
 
204
          </prescribed>
 
205
        </tensor_field>
 
206
        <scalar_field name="Source" rank="0">
 
207
          <prescribed>
 
208
            <value name="WholeMesh">
 
209
              <python>
 
210
                <string_value lines="20" type="code" language="python">def val(XX, t):
 
211
   from math import exp
 
212
   x = XX[0];
 
213
   y = XX[1];
 
214
   z = XX[2];
 
215
   T = exp(-((x-0.5)**2 + (y-0.5)**2 + (z-0.5)**2)/2)
 
216
   S = (3 - (x-0.5)**2 - (y-0.5)**2 - (z-0.5)**2)*T
 
217
   return S</string_value>
 
218
                <comment>sage: T(x,y,z,t,nu,adv,beta,omega) = sin(25*x*y*z + omega*t) - 2*(y+z)/(sqrt(x*z+1.0))
 
219
sage: T_t = diff(T,t)
 
220
sage: T_x = diff(T,x)
 
221
sage: T_y = diff(T,y)
 
222
sage: T_z = diff(T,z)
 
223
sage: T_xx = diff(T_x,x)
 
224
sage: T_yy = diff(T_y,y)
 
225
sage: T_zz = diff(T_z,z)
 
226
sage: 
 
227
sage: u(x,y,z,t) = sin(5*(x^2+y^2+z^2))
 
228
sage: v(x,y,z,t) = cos(3*(x^2-y^2+z^2))
 
229
sage: w(x,y,z,t) = sin(3*(-x^2-y^2+z^2))
 
230
sage: 
 
231
sage: u_x = diff(u,x)
 
232
sage: u_y = diff(u,y)
 
233
sage: u_z = diff(u,z)
 
234
sage: v_x = diff(v,x)
 
235
sage: v_y = diff(v,y)
 
236
sage: v_z = diff(v,z)
 
237
sage: w_x = diff(w,x)
 
238
sage: w_y = diff(w,y)
 
239
sage: w_z = diff(w,z)
 
240
sage: 
 
241
sage: S = T_t + adv*(u*T_x + v*T_y + w*T_z + beta*(T*(u_x + v_y + w_z))) - nu*(T_xx + T_yy + T_zz)
 
242
sage: 
 
243
sage: 
 
244
sage: S
 
245
(x, y, z, t, nu, adv, beta, omega) |--&gt; -(2*(2*(y + z)/sqrt(x*z + 1.00000000000000) - sin(25*x*y*z + omega*t))*(5*x*cos(5*x^2 + 5*y^2 + 5*z^2) + 3*y*sin(3*x^2 - 3*y^2 + 3*z^2) + 3*z*cos(-3*x^2 - 3*y^2 + 3*z^2))*beta - (25*y*z*cos(25*x*y*z + omega*t) + (y + z)*z/(x*z + 1.00000000000000)^(3/2))*sin(5*x^2 + 5*y^2 + 5*z^2) - (25*x*z*cos(25*x*y*z + omega*t) - 2/sqrt(x*z + 1.00000000000000))*cos(3*x^2 - 3*y^2 + 3*z^2) - (25*x*y*cos(25*x*y*z + omega*t) + (y + z)*x/(x*z + 1.00000000000000)^(3/2) - 2/sqrt(x*z + 1.00000000000000))*sin(-3*x^2 - 3*y^2 + 3*z^2))*adv + 1/2*(1250*x^2*y^2*sin(25*x*y*z + omega*t) + 1250*x^2*z^2*sin(25*x*y*z + omega*t) + 1250*y^2*z^2*sin(25*x*y*z + omega*t) + 3*(y + z)*x^2/(x*z + 1.00000000000000)^(5/2) + 3*(y + z)*z^2/(x*z + 1.00000000000000)^(5/2) - 4*x/(x*z + 1.00000000000000)^(3/2))*nu + omega*cos(25*x*y*z + omega*t)</comment>
 
246
              </python>
 
247
            </value>
 
248
            <output/>
 
249
            <stat/>
 
250
            <detectors>
 
251
              <exclude_from_detectors/>
 
252
            </detectors>
 
253
          </prescribed>
 
254
        </scalar_field>
 
255
        <output>
 
256
          <include_previous_time_step/>
 
257
        </output>
 
258
        <stat/>
 
259
        <convergence>
 
260
          <include_in_convergence/>
 
261
        </convergence>
 
262
        <detectors>
 
263
          <include_in_detectors/>
 
264
        </detectors>
 
265
        <steady_state>
 
266
          <include_in_steady_state/>
 
267
        </steady_state>
 
268
        <consistent_interpolation/>
 
269
      </prognostic>
 
270
    </scalar_field>
 
271
    <scalar_field name="AnalyticalSolution" rank="0">
 
272
      <prescribed>
 
273
        <mesh name="VelocityMesh"/>
 
274
        <value name="WholeMesh">
 
275
          <python>
 
276
            <string_value lines="20" type="code" language="python">def val(XX, t):
 
277
   from math import exp
 
278
   x = XX[0];
 
279
   y = XX[1];
 
280
   z = XX[2];
 
281
   u = exp(-((x-0.5)**2 + (y-0.5)**2 + (z-0.5)**2)/2)
 
282
   return u</string_value>
 
283
          </python>
 
284
        </value>
 
285
        <output/>
 
286
        <stat/>
 
287
        <detectors>
 
288
          <exclude_from_detectors/>
 
289
        </detectors>
 
290
      </prescribed>
 
291
    </scalar_field>
 
292
    <scalar_field name="AbsoluteDifference" rank="0">
 
293
      <diagnostic field_name_b="NumericalSolution" field_name_a="AnalyticalSolution">
 
294
        <algorithm name="Internal" material_phase_support="multiple"/>
 
295
        <mesh name="VelocityMesh"/>
 
296
        <output/>
 
297
        <stat/>
 
298
        <convergence>
 
299
          <include_in_convergence/>
 
300
        </convergence>
 
301
        <detectors>
 
302
          <include_in_detectors/>
 
303
        </detectors>
 
304
        <steady_state>
 
305
          <include_in_steady_state/>
 
306
        </steady_state>
 
307
      </diagnostic>
 
308
    </scalar_field>
 
309
    <scalar_field name="DG_CourantNumber" rank="0">
 
310
      <diagnostic>
 
311
        <algorithm name="Internal" material_phase_support="multiple"/>
 
312
        <mesh name="VelocityMesh"/>
 
313
        <output/>
 
314
        <stat/>
 
315
        <convergence>
 
316
          <include_in_convergence/>
 
317
        </convergence>
 
318
        <detectors>
 
319
          <include_in_detectors/>
 
320
        </detectors>
 
321
        <steady_state>
 
322
          <include_in_steady_state/>
 
323
        </steady_state>
 
324
      </diagnostic>
 
325
    </scalar_field>
 
326
  </material_phase>
 
327
</fluidity_options>