~fluidity-core/fluidity/sediment_restructure

« back to all changes in this revision

Viewing changes to tests/mms_tracer_fv_diff_excludemass_excludeadv/MMS_B.flml

merge with branch including remap_surface_to_field but then removed this change and approached it a different way which seems to work

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_B</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">2</integer_value>
12
 
    </dimension>
13
 
    <mesh name="CoordinateMesh">
14
 
      <from_file file_name="MMS_B">
15
 
        <format name="triangle"/>
16
 
        <stat>
17
 
          <include_in_stat/>
18
 
        </stat>
19
 
      </from_file>
20
 
    </mesh>
21
 
    <mesh name="TracerMesh">
22
 
      <from_mesh>
23
 
        <mesh name="CoordinateMesh"/>
24
 
        <mesh_shape>
25
 
          <polynomial_degree>
26
 
            <integer_value rank="0">0</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
 
    <quadrature>
38
 
      <degree>
39
 
        <integer_value rank="0">5</integer_value>
40
 
      </degree>
41
 
      <controlvolume_surface_degree>
42
 
        <integer_value rank="0">5</integer_value>
43
 
      </controlvolume_surface_degree>
44
 
    </quadrature>
45
 
  </geometry>
46
 
  <io>
47
 
    <dump_format>
48
 
      <string_value>vtk</string_value>
49
 
    </dump_format>
50
 
    <dump_period>
51
 
      <constant>
52
 
        <real_value rank="0">500.0</real_value>
53
 
        <comment>500.0</comment>
54
 
      </constant>
55
 
    </dump_period>
56
 
    <output_mesh name="CoordinateMesh"/>
57
 
    <stat/>
58
 
  </io>
59
 
  <timestepping>
60
 
    <current_time>
61
 
      <real_value rank="0">0.0</real_value>
62
 
    </current_time>
63
 
    <timestep>
64
 
      <real_value rank="0">0.011910999491063532</real_value>
65
 
      <comment>0.023821998982127064 gives a max cv cfl number of 1.0
66
 
0.011910999491063532 gives a max cv cfl number of 0.5</comment>
67
 
    </timestep>
68
 
    <finish_time>
69
 
      <real_value rank="0">500.0</real_value>
70
 
      <comment>5.0</comment>
71
 
    </finish_time>
72
 
    <steady_state>
73
 
      <tolerance>
74
 
        <real_value rank="0">1.E-10</real_value>
75
 
        <infinity_norm/>
76
 
      </tolerance>
77
 
    </steady_state>
78
 
  </timestepping>
79
 
  <physical_parameters/>
80
 
  <material_phase name="Burgers">
81
 
    <vector_field name="Velocity" rank="1">
82
 
      <prescribed>
83
 
        <mesh name="CoordinateMesh"/>
84
 
        <value name="WholeMesh">
85
 
          <constant>
86
 
            <real_value shape="2" dim1="dim" rank="1">100.0 100.0</real_value>
87
 
            <comment>def val(XX, t):
88
 
   from math import sin,cos
89
 
   x = XX[0];
90
 
   y = XX[1];
91
 
   x2 = x*x;
92
 
   y2 = y*y;
93
 
   u = sin(5*(x2+y2));
94
 
   v = cos(3*(x2-y2));
95
 
   return (u, v)</comment>
96
 
          </constant>
97
 
        </value>
98
 
        <output/>
99
 
        <stat>
100
 
          <include_in_stat/>
101
 
        </stat>
102
 
        <detectors>
103
 
          <exclude_from_detectors/>
104
 
        </detectors>
105
 
      </prescribed>
106
 
    </vector_field>
107
 
    <scalar_field name="NumericalSolution" rank="0">
108
 
      <prognostic>
109
 
        <mesh name="TracerMesh"/>
110
 
        <equation name="AdvectionDiffusion"/>
111
 
        <spatial_discretisation>
112
 
          <finite_volume>
113
 
            <mass_terms>
114
 
              <exclude_mass_terms/>
115
 
            </mass_terms>
116
 
            <advection_terms>
117
 
              <exclude_advection_terms/>
118
 
            </advection_terms>
119
 
          </finite_volume>
120
 
          <conservative_advection>
121
 
            <real_value rank="0">0.0</real_value>
122
 
          </conservative_advection>
123
 
        </spatial_discretisation>
124
 
        <temporal_discretisation>
125
 
          <theta>
126
 
            <real_value rank="0">1.0</real_value>
127
 
          </theta>
128
 
        </temporal_discretisation>
129
 
        <solver>
130
 
          <iterative_method name="gmres">
131
 
            <restart>
132
 
              <integer_value rank="0">30</integer_value>
133
 
            </restart>
134
 
          </iterative_method>
135
 
          <preconditioner name="sor"/>
136
 
          <relative_error>
137
 
            <real_value rank="0">1.E-10</real_value>
138
 
          </relative_error>
139
 
          <max_iterations>
140
 
            <integer_value rank="0">350</integer_value>
141
 
          </max_iterations>
142
 
          <never_ignore_solver_failures/>
143
 
          <diagnostics>
144
 
            <monitors/>
145
 
          </diagnostics>
146
 
        </solver>
147
 
        <initial_condition name="WholeMesh">
148
 
          <constant>
149
 
            <real_value rank="0">0.0</real_value>
150
 
          </constant>
151
 
        </initial_condition>
152
 
        <boundary_conditions name="sides">
153
 
          <surface_ids>
154
 
            <integer_value shape="2" rank="1">7 9</integer_value>
155
 
          </surface_ids>
156
 
          <type name="dirichlet">
157
 
            <python>
158
 
              <string_value lines="20" type="python">def val(XX, t):
159
 
   from math import sin,cos,sqrt
160
 
   omega = 0.0;
161
 
   x = XX[0];
162
 
   y = XX[1];
163
 
   x4 = x*x*x*x;
164
 
   y2 = y*y;
165
 
   u = sin(25*x*y+omega*t)-2*y/(sqrt(x));
166
 
   return u</string_value>
167
 
            </python>
168
 
          </type>
169
 
        </boundary_conditions>
170
 
        <boundary_conditions name="neumann_x_left">
171
 
          <surface_ids>
172
 
            <integer_value shape="1" rank="1">10</integer_value>
173
 
          </surface_ids>
174
 
          <type name="dirichlet">
175
 
            <python>
176
 
              <string_value lines="20" type="python">def val(XX, t):
177
 
   from math import sin,cos,sqrt
178
 
   omega = 0.0;
179
 
   x = XX[0];
180
 
   y = XX[1];
181
 
   x4 = x*x*x*x;
182
 
   y2 = y*y;
183
 
   u = sin(25*x*y+omega*t)-2*y/(sqrt(x));
184
 
   return u</string_value>
185
 
            </python>
186
 
          </type>
187
 
        </boundary_conditions>
188
 
        <boundary_conditions name="neumann_x_right">
189
 
          <surface_ids>
190
 
            <integer_value shape="1" rank="1">8</integer_value>
191
 
          </surface_ids>
192
 
          <type name="dirichlet">
193
 
            <python>
194
 
              <string_value lines="20" type="python">def val(XX, t):
195
 
   from math import sin,cos,sqrt
196
 
   omega = 0.0;
197
 
   x = XX[0];
198
 
   y = XX[1];
199
 
   x4 = x*x*x*x;
200
 
   y2 = y*y;
201
 
   u = sin(25*x*y+omega*t)-2*y/(sqrt(x));
202
 
   return u</string_value>
203
 
            </python>
204
 
          </type>
205
 
        </boundary_conditions>
206
 
        <tensor_field name="Diffusivity" rank="2">
207
 
          <prescribed>
208
 
            <value name="WholeMesh">
209
 
              <isotropic>
210
 
                <constant>
211
 
                  <real_value rank="0">0.7</real_value>
212
 
                </constant>
213
 
              </isotropic>
214
 
            </value>
215
 
            <output/>
216
 
          </prescribed>
217
 
        </tensor_field>
218
 
        <scalar_field name="Source" rank="0">
219
 
          <prescribed>
220
 
            <value name="WholeMesh">
221
 
              <python>
222
 
                <string_value lines="20" type="python">def val(XX, t):
223
 
   from math import sin,cos,sqrt
224
 
   nu = 0.7;
225
 
   omega = 0.0;
226
 
   adv = 0.0;
227
 
   beta = 0.0;
228
 
   x = XX[0];
229
 
   y = XX[1];
230
 
   x2 = x*x;
231
 
   y2 = y*y;
232
 
   xp5 = sqrt(x);
233
 
   x1p5 = xp5*x;
234
 
   x2p5 = x1p5*x;
235
 
   S = adv*((25*y*cos(25*x*y + omega*t) + y/x1p5)*sin(5*(y2 + x2)) + beta*(sin(25*x*y + omega*t) - 2*y/xp5)*(10*x*cos(5*(y2 + x2)) + 6*y*sin(3*(x2 - y2))) + (25*x*cos(25*x*y + omega*t) - 2/xp5)*cos(3*(x2 - y2))) - nu*(-625*y2*sin(25*x*y + omega*t) - 625*x2*sin(25*x*y + omega*t) - 3*y/(2*x2p5)) + omega*cos(25*x*y + omega*t);
236
 
   return S</string_value>
237
 
                <comment>T(x,y,t,nu,adv,beta,omega) = sin(25*x*y + omega*t) - 2*y/(sqrt(x))&#13;
238
 
T_t = diff(T,t)&#13;
239
 
T_x = diff(T,x)&#13;
240
 
T_y = diff(T,y)&#13;
241
 
T_xx = diff(T_x,x)
242
 
T_yy = diff(T_y,y)
243
 
 
244
 
u(x,y,t) = sin(5*(x^2+y^2))&#13;
245
 
v(x,y,t) = cos(3*(x^2-y^2))&#13;
246
 
u_x = diff(u,x)&#13;
247
 
u_y = diff(u,y)&#13;
248
 
v_x = diff(v,x)&#13;
249
 
v_y = diff(v,y)
250
 
 
251
 
S = T_t + adv*(u*T_x + v*T_y + beta*(T*(u_x + v_y))) - nu*(T_xx + T_yy)
252
 
#S = adv*((25*y*cos(25*x*y + omega*t) + y/x^(3/2))*sin(5*(y^2 + x^2)) + beta*(sin(25*x*y + omega*t) - 2*y/sqrt(x))*(10*x*cos(5*(y^2 + x^2)) + 6*y*sin(3*(x^2 - y^2))) + (25*x*cos(25*x*y + omega*t) - 2/sqrt(x))*cos(3*(x^2 - y^2))) - nu*(-625*y^2*sin(25*x*y + omega*t) - 625*x^2*sin(25*x*y + omega*t) - 3*y/(2*x^(5/2))) + omega*cos(25*x*y + omega*t)</comment>
253
 
              </python>
254
 
            </value>
255
 
            <output/>
256
 
            <stat/>
257
 
            <detectors>
258
 
              <exclude_from_detectors/>
259
 
            </detectors>
260
 
          </prescribed>
261
 
        </scalar_field>
262
 
        <output>
263
 
          <include_previous_time_step/>
264
 
        </output>
265
 
        <stat/>
266
 
        <convergence>
267
 
          <include_in_convergence/>
268
 
        </convergence>
269
 
        <detectors>
270
 
          <include_in_detectors/>
271
 
        </detectors>
272
 
        <steady_state>
273
 
          <include_in_steady_state/>
274
 
        </steady_state>
275
 
        <consistent_interpolation/>
276
 
      </prognostic>
277
 
    </scalar_field>
278
 
    <scalar_field name="AnalyticalSolution" rank="0">
279
 
      <prescribed>
280
 
        <mesh name="TracerMesh"/>
281
 
        <value name="WholeMesh">
282
 
          <python>
283
 
            <string_value lines="20" type="python">def val(XX, t):
284
 
   from math import sin,cos,sqrt
285
 
   omega = 0.0;
286
 
   x = XX[0];
287
 
   y = XX[1];
288
 
   u = sin(25*x*y + omega*t) - 2*y/(sqrt(x));
289
 
   return u</string_value>
290
 
          </python>
291
 
        </value>
292
 
        <output/>
293
 
        <stat/>
294
 
        <detectors>
295
 
          <exclude_from_detectors/>
296
 
        </detectors>
297
 
      </prescribed>
298
 
    </scalar_field>
299
 
    <scalar_field name="CFLNumber" rank="0">
300
 
      <diagnostic>
301
 
        <algorithm name="Internal" material_phase_support="multiple"/>
302
 
        <mesh name="TracerMesh"/>
303
 
        <output/>
304
 
        <stat/>
305
 
        <convergence>
306
 
          <include_in_convergence/>
307
 
        </convergence>
308
 
        <detectors>
309
 
          <include_in_detectors/>
310
 
        </detectors>
311
 
        <steady_state>
312
 
          <include_in_steady_state/>
313
 
        </steady_state>
314
 
      </diagnostic>
315
 
    </scalar_field>
316
 
    <scalar_field name="AbsoluteDifference" rank="0">
317
 
      <diagnostic field_name_b="NumericalSolution" field_name_a="AnalyticalSolution">
318
 
        <algorithm name="Internal" material_phase_support="multiple"/>
319
 
        <mesh name="TracerMesh"/>
320
 
        <output/>
321
 
        <stat>
322
 
          <include_cv_stats/>
323
 
        </stat>
324
 
        <convergence>
325
 
          <include_in_convergence/>
326
 
        </convergence>
327
 
        <detectors>
328
 
          <include_in_detectors/>
329
 
        </detectors>
330
 
        <steady_state>
331
 
          <include_in_steady_state/>
332
 
        </steady_state>
333
 
      </diagnostic>
334
 
    </scalar_field>
335
 
    <scalar_field name="ControlVolumeCFLNumber" rank="0">
336
 
      <diagnostic>
337
 
        <algorithm name="Internal" material_phase_support="multiple"/>
338
 
        <mesh name="TracerMesh"/>
339
 
        <output/>
340
 
        <stat/>
341
 
        <convergence>
342
 
          <include_in_convergence/>
343
 
        </convergence>
344
 
        <detectors>
345
 
          <include_in_detectors/>
346
 
        </detectors>
347
 
        <steady_state>
348
 
          <include_in_steady_state/>
349
 
        </steady_state>
350
 
      </diagnostic>
351
 
    </scalar_field>
352
 
  </material_phase>
353
 
</fluidity_options>