~reducedmodelling/fluidity/ROM_Non-intrusive-ann

« back to all changes in this revision

Viewing changes to tests/shallow_water_mms_wave_source/wave_periodic_source.swml

  • Committer: sf1409
  • Date: 2011-03-03 11:46:55 UTC
  • Revision ID: svn-v4:5bf5533e-7014-46e3-b1bb-cce4b9d03719:trunk:3142
replace the steady source test for the shallow water equation by one where the source is time and spatial varying.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0' encoding='utf-8'?>
 
2
<shallow_water_options>
 
3
  <simulation_name>
 
4
    <string_value lines="1">wave</string_value>
 
5
  </simulation_name>
 
6
  <geometry>
 
7
    <dimension>
 
8
      <integer_value rank="0">1</integer_value>
 
9
    </dimension>
 
10
    <embedded_manifold>
 
11
      <projection>
 
12
        <string_value lines="20" type="python">def val(X,t):
 
13
  return (X[0],0.0,0.0)</string_value>
 
14
      </projection>
 
15
      <vector_map>
 
16
        <string_value lines="20" type="python">def val(X,t):
 
17
  return ([1], [0], [0])</string_value>
 
18
      </vector_map>
 
19
      <up>
 
20
        <string_value lines="20" type="python">def val(X,t):
 
21
  return (0.0,0.0,1.0)</string_value>
 
22
      </up>
 
23
    </embedded_manifold>
 
24
    <mesh name="CoordinateMesh">
 
25
      <from_file file_name="src/mesh">
 
26
        <format name="triangle"/>
 
27
        <stat>
 
28
          <include_in_stat/>
 
29
        </stat>
 
30
      </from_file>
 
31
    </mesh>
 
32
    <mesh name="VelocityMesh">
 
33
      <from_mesh>
 
34
        <mesh name="PeriodicMesh"/>
 
35
        <mesh_continuity>
 
36
          <string_value>discontinuous</string_value>
 
37
        </mesh_continuity>
 
38
        <stat>
 
39
          <exclude_from_stat/>
 
40
        </stat>
 
41
      </from_mesh>
 
42
    </mesh>
 
43
    <mesh name="PressureMesh">
 
44
      <from_mesh>
 
45
        <mesh name="PeriodicMesh"/>
 
46
        <mesh_shape>
 
47
          <polynomial_degree>
 
48
            <integer_value rank="0">2</integer_value>
 
49
          </polynomial_degree>
 
50
        </mesh_shape>
 
51
        <stat>
 
52
          <exclude_from_stat/>
 
53
        </stat>
 
54
      </from_mesh>
 
55
    </mesh>
 
56
    <mesh name="PeriodicMesh">
 
57
      <from_mesh>
 
58
        <mesh name="CoordinateMesh"/>
 
59
        <periodic_boundary_conditions name="periodicity">
 
60
          <physical_boundary_ids>
 
61
            <integer_value shape="1" rank="1">1</integer_value>
 
62
          </physical_boundary_ids>
 
63
          <aliased_boundary_ids>
 
64
            <integer_value shape="1" rank="1">2</integer_value>
 
65
          </aliased_boundary_ids>
 
66
          <coordinate_map>
 
67
            <string_value lines="20" type="python">def val(X,t):
 
68
  result = list(X)
 
69
  result[0]=result[0]-1.0
 
70
  return result</string_value>
 
71
          </coordinate_map>
 
72
        </periodic_boundary_conditions>
 
73
        <stat>
 
74
          <exclude_from_stat/>
 
75
        </stat>
 
76
      </from_mesh>
 
77
    </mesh>
 
78
    <quadrature>
 
79
      <degree>
 
80
        <integer_value rank="0">4</integer_value>
 
81
      </degree>
 
82
    </quadrature>
 
83
  </geometry>
 
84
  <io>
 
85
    <dump_format>
 
86
      <string_value>vtk</string_value>
 
87
    </dump_format>
 
88
    <dump_period>
 
89
      <constant>
 
90
        <real_value rank="0">0.0</real_value>
 
91
      </constant>
 
92
    </dump_period>
 
93
    <output_coordinates name="Manifold"/>
 
94
    <output_mesh name="CoordinateMesh"/>
 
95
  </io>
 
96
  <timestepping>
 
97
    <current_time>
 
98
      <real_value rank="0">0</real_value>
 
99
    </current_time>
 
100
    <timestep>
 
101
      <real_value rank="0">0.01</real_value>
 
102
    </timestep>
 
103
    <nonlinear_iterations>
 
104
      <integer_value rank="0">1</integer_value>
 
105
    </nonlinear_iterations>
 
106
    <finish_time>
 
107
      <real_value rank="0">5</real_value>
 
108
    </finish_time>
 
109
  </timestepping>
 
110
  <physical_parameters>
 
111
    <gravity>
 
112
      <magnitude>
 
113
        <real_value rank="0">1.0</real_value>
 
114
      </magnitude>
 
115
    </gravity>
 
116
  </physical_parameters>
 
117
  <material_phase name="Fluid">
 
118
    <vector_field name="Velocity" rank="1">
 
119
      <prognostic>
 
120
        <mesh name="VelocityMesh"/>
 
121
        <equation name="ShallowWater"/>
 
122
        <spatial_discretisation>
 
123
          <discontinuous_galerkin>
 
124
            <advection_scheme>
 
125
              <none/>
 
126
            </advection_scheme>
 
127
          </discontinuous_galerkin>
 
128
          <conservative_advection>
 
129
            <real_value rank="0">0</real_value>
 
130
          </conservative_advection>
 
131
        </spatial_discretisation>
 
132
        <solver>
 
133
          <iterative_method name="preonly"/>
 
134
          <preconditioner name="lu"/>
 
135
          <relative_error>
 
136
            <real_value rank="0">1.0e-7</real_value>
 
137
          </relative_error>
 
138
          <max_iterations>
 
139
            <integer_value rank="0">500</integer_value>
 
140
          </max_iterations>
 
141
          <never_ignore_solver_failures/>
 
142
          <diagnostics>
 
143
            <monitors/>
 
144
          </diagnostics>
 
145
        </solver>
 
146
        <initial_condition name="WholeMesh">
 
147
          <python>
 
148
            <string_value lines="20" type="python">def val(X, t):
 
149
  from math import cos,pi, sin
 
150
  c = 1.0
 
151
  k = 2.0*pi
 
152
  Ku = 0.0
 
153
  x=X[0]  
 
154
  return [c*sin(k*x + t)]</string_value>
 
155
          </python>
 
156
        </initial_condition>
 
157
        <vector_field name="Source" rank="1">
 
158
          <prescribed>
 
159
            <value name="WholeMesh">
 
160
              <python>
 
161
                <string_value lines="20" type="python">def val(X, t):
 
162
  from math import cos, pi, sin
 
163
  c = 1.0
 
164
  k = 2.0*pi
 
165
  x=X[0]  
 
166
  return [-c*k*cos(k*x + t) + c*cos(k*x + t)]</string_value>
 
167
              </python>
 
168
            </value>
 
169
            <output/>
 
170
            <stat>
 
171
              <include_in_stat/>
 
172
            </stat>
 
173
            <detectors>
 
174
              <exclude_from_detectors/>
 
175
            </detectors>
 
176
            <adjoint_storage>
 
177
              <exists_in_forward/>
 
178
            </adjoint_storage>
 
179
          </prescribed>
 
180
        </vector_field>
 
181
        <output/>
 
182
        <stat>
 
183
          <include_in_stat/>
 
184
          <previous_time_step>
 
185
            <exclude_from_stat/>
 
186
          </previous_time_step>
 
187
          <nonlinear_field>
 
188
            <exclude_from_stat/>
 
189
          </nonlinear_field>
 
190
        </stat>
 
191
        <convergence>
 
192
          <include_in_convergence/>
 
193
        </convergence>
 
194
        <detectors>
 
195
          <include_in_detectors/>
 
196
        </detectors>
 
197
        <steady_state>
 
198
          <include_in_steady_state/>
 
199
        </steady_state>
 
200
        <consistent_interpolation/>
 
201
      </prognostic>
 
202
    </vector_field>
 
203
    <scalar_field name="LayerThickness" rank="0">
 
204
      <prognostic>
 
205
        <mesh name="PressureMesh"/>
 
206
        <spatial_discretisation>
 
207
          <continuous_galerkin>
 
208
            <advection_terms>
 
209
              <exclude_advection_terms/>
 
210
            </advection_terms>
 
211
          </continuous_galerkin>
 
212
          <conservative_advection>
 
213
            <real_value rank="0">0</real_value>
 
214
          </conservative_advection>
 
215
        </spatial_discretisation>
 
216
        <temporal_discretisation>
 
217
          <theta>
 
218
            <real_value rank="0">0.5</real_value>
 
219
          </theta>
 
220
          <relaxation>
 
221
            <real_value rank="0">1</real_value>
 
222
          </relaxation>
 
223
        </temporal_discretisation>
 
224
        <solver>
 
225
          <iterative_method name="preonly"/>
 
226
          <preconditioner name="lu"/>
 
227
          <relative_error>
 
228
            <real_value rank="0">1.0e-7</real_value>
 
229
          </relative_error>
 
230
          <max_iterations>
 
231
            <integer_value rank="0">500</integer_value>
 
232
          </max_iterations>
 
233
          <never_ignore_solver_failures/>
 
234
          <diagnostics>
 
235
            <monitors/>
 
236
          </diagnostics>
 
237
        </solver>
 
238
        <initial_condition name="WholeMesh">
 
239
          <python>
 
240
            <string_value lines="20" type="python">def val(X, t):
 
241
  from math import cos,pi, sin
 
242
  c = 1.0
 
243
  k = 2.0*pi
 
244
  x=X[0]
 
245
  return -c*sin(k*x + t)</string_value>
 
246
          </python>
 
247
        </initial_condition>
 
248
        <mean_layer_thickness>
 
249
          <real_value rank="0">1.0</real_value>
 
250
        </mean_layer_thickness>
 
251
        <scalar_field name="Source">
 
252
          <prescribed>
 
253
            <value name="WholeMesh">
 
254
              <python>
 
255
                <string_value type="python" lines="20">def val(X, t):
 
256
  from math import cos, pi, sin
 
257
  c = 1.0
 
258
  k = 2.0*pi
 
259
  x=X[0]  
 
260
  return c*k*cos(k*x + t) - c*cos(k*x + t)</string_value>
 
261
              </python>
 
262
            </value>
 
263
            <output/>
 
264
            <stat/>
 
265
            <detectors>
 
266
              <exclude_from_detectors/>
 
267
            </detectors>
 
268
            <adjoint_storage>
 
269
              <exists_in_forward/>
 
270
            </adjoint_storage>
 
271
          </prescribed>
 
272
        </scalar_field>
 
273
        <output/>
 
274
        <stat/>
 
275
        <consistent_interpolation/>
 
276
      </prognostic>
 
277
    </scalar_field>
 
278
    <scalar_field name="AnalyticalSolutionLayerThickness" rank="0">
 
279
      <prescribed>
 
280
        <mesh name="PressureMesh"/>
 
281
        <value name="WholeMesh">
 
282
          <python>
 
283
            <string_value lines="20" type="python">def val(X, t):
 
284
  from math import cos,pi, sin
 
285
  c = 1.0
 
286
  k = 2.0*pi
 
287
  Kp = 0.0
 
288
  x=X[0]
 
289
  return -c*sin(k*x + t)</string_value>
 
290
          </python>
 
291
        </value>
 
292
        <output/>
 
293
        <stat/>
 
294
        <detectors>
 
295
          <exclude_from_detectors/>
 
296
        </detectors>
 
297
        <adjoint_storage>
 
298
          <exists_in_forward/>
 
299
        </adjoint_storage>
 
300
      </prescribed>
 
301
    </scalar_field>
 
302
    <scalar_field name="AbsErrorLayerThickness" rank="0">
 
303
      <diagnostic>
 
304
        <algorithm source_field_2_type="scalar" name="scalar_difference" source_field_1_name="LayerThickness" source_field_2_name="AnalyticalSolutionLayerThickness" material_phase_support="single" source_field_1_type="scalar">
 
305
          <absolute_difference/>
 
306
        </algorithm>
 
307
        <mesh name="PressureMesh"/>
 
308
        <output/>
 
309
        <stat/>
 
310
        <convergence>
 
311
          <include_in_convergence/>
 
312
        </convergence>
 
313
        <detectors>
 
314
          <include_in_detectors/>
 
315
        </detectors>
 
316
        <steady_state>
 
317
          <include_in_steady_state/>
 
318
        </steady_state>
 
319
        <adjoint_storage>
 
320
          <exists_in_forward/>
 
321
        </adjoint_storage>
 
322
      </diagnostic>
 
323
    </scalar_field>
 
324
    <vector_field name="AnalyticalVelocity" rank="1">
 
325
      <prescribed>
 
326
        <mesh name="VelocityMesh"/>
 
327
        <value name="WholeMesh">
 
328
          <python>
 
329
            <string_value lines="20" type="python">def val(X, t):
 
330
  from math import cos,pi, sin
 
331
  c = 1.0
 
332
  k = 2.0*pi
 
333
  Ku = 0.0
 
334
  x=X[0]
 
335
  return [c*sin(k*x + t)]</string_value>
 
336
          </python>
 
337
        </value>
 
338
        <output/>
 
339
        <stat>
 
340
          <include_in_stat/>
 
341
        </stat>
 
342
        <detectors>
 
343
          <exclude_from_detectors/>
 
344
        </detectors>
 
345
        <adjoint_storage>
 
346
          <exists_in_forward/>
 
347
        </adjoint_storage>
 
348
      </prescribed>
 
349
    </vector_field>
 
350
    <vector_field name="AbsErrorVelocity" rank="1">
 
351
      <diagnostic>
 
352
        <algorithm source_field_2_type="vector" name="vector_difference" source_field_1_name="AnalyticalVelocity" source_field_2_name="Velocity" material_phase_support="single" source_field_1_type="vector">
 
353
          <absolute_difference/>
 
354
        </algorithm>
 
355
        <mesh name="VelocityMesh"/>
 
356
        <output/>
 
357
        <stat>
 
358
          <include_in_stat/>
 
359
        </stat>
 
360
        <convergence>
 
361
          <include_in_convergence/>
 
362
        </convergence>
 
363
        <detectors>
 
364
          <include_in_detectors/>
 
365
        </detectors>
 
366
        <steady_state>
 
367
          <include_in_steady_state/>
 
368
        </steady_state>
 
369
        <adjoint_storage>
 
370
          <exists_in_forward/>
 
371
        </adjoint_storage>
 
372
      </diagnostic>
 
373
    </vector_field>
 
374
  </material_phase>
 
375
</shallow_water_options>