~fluidity-core/fluidity/shallow-water-dev

« back to all changes in this revision

Viewing changes to tests/sw_williamson1/advection.swml

  • Committer: colin.cotter at ac
  • Date: 2012-02-15 14:43:38 UTC
  • Revision ID: colin.cotter@imperial.ac.uk-20120215144338-kto2belf5y8spgrk
Some dead tests.

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">blob</string_value>
5
 
  </simulation_name>
6
 
  <geometry>
7
 
    <dimension>
8
 
      <integer_value rank="0">3</integer_value>
9
 
    </dimension>
10
 
    <mesh name="CoordinateMesh">
11
 
      <from_file file_name="sphere">
12
 
        <format name="triangle"/>
13
 
        <dimension>
14
 
          <integer_value rank="0">2</integer_value>
15
 
        </dimension>
16
 
        <stat>
17
 
          <include_in_stat/>
18
 
        </stat>
19
 
      </from_file>
20
 
    </mesh>
21
 
    <mesh name="VelocityMesh">
22
 
      <from_mesh>
23
 
        <mesh name="PeriodicMesh"/>
24
 
        <mesh_continuity>
25
 
          <string_value>discontinuous</string_value>
26
 
        </mesh_continuity>
27
 
        <stat>
28
 
          <exclude_from_stat/>
29
 
        </stat>
30
 
      </from_mesh>
31
 
    </mesh>
32
 
    <mesh name="PressureMesh">
33
 
      <from_mesh>
34
 
        <mesh name="PeriodicMesh"/>
35
 
        <mesh_shape>
36
 
          <polynomial_degree>
37
 
            <integer_value rank="0">2</integer_value>
38
 
          </polynomial_degree>
39
 
        </mesh_shape>
40
 
        <stat>
41
 
          <exclude_from_stat/>
42
 
        </stat>
43
 
      </from_mesh>
44
 
    </mesh>
45
 
    <mesh name="PeriodicMesh">
46
 
      <from_mesh>
47
 
        <mesh name="CoordinateMesh"/>
48
 
        <periodic_boundary_conditions name="SidesPeriodic">
49
 
          <physical_boundary_ids>
50
 
            <integer_value shape="1" rank="1">3</integer_value>
51
 
          </physical_boundary_ids>
52
 
          <aliased_boundary_ids>
53
 
            <integer_value shape="1" rank="1">4</integer_value>
54
 
          </aliased_boundary_ids>
55
 
          <coordinate_map>
56
 
            <string_value lines="20" type="python">def val(x,t):
57
 
        return [x[0]-2.0,x[1],x[2]]</string_value>
58
 
          </coordinate_map>
59
 
        </periodic_boundary_conditions>
60
 
        <stat>
61
 
          <exclude_from_stat/>
62
 
        </stat>
63
 
      </from_mesh>
64
 
    </mesh>
65
 
    <quadrature>
66
 
      <degree>
67
 
        <integer_value rank="0">4</integer_value>
68
 
      </degree>
69
 
    </quadrature>
70
 
  </geometry>
71
 
  <io>
72
 
    <dump_format>
73
 
      <string_value>vtk</string_value>
74
 
    </dump_format>
75
 
    <dump_period>
76
 
      <constant>
77
 
        <real_value rank="0">0.0</real_value>
78
 
      </constant>
79
 
    </dump_period>
80
 
    <output_mesh name="VelocityMesh"/>
81
 
  </io>
82
 
  <timestepping>
83
 
    <current_time>
84
 
      <real_value rank="0">0.0</real_value>
85
 
    </current_time>
86
 
    <timestep>
87
 
      <real_value rank="0">2500.0</real_value>
88
 
    </timestep>
89
 
    <theta>
90
 
      <real_value rank="0">0.5</real_value>
91
 
    </theta>
92
 
    <nonlinear_iterations>
93
 
      <integer_value rank="0">1</integer_value>
94
 
    </nonlinear_iterations>
95
 
    <finish_time>
96
 
      <real_value rank="0">10000.0</real_value>
97
 
    </finish_time>
98
 
  </timestepping>
99
 
  <physical_parameters>
100
 
    <gravity>
101
 
      <magnitude>
102
 
        <real_value rank="0">1.0</real_value>
103
 
      </magnitude>
104
 
      <vector_field name="GravityDirection" rank="1">
105
 
        <prescribed>
106
 
          <mesh name="CoordinateMesh"/>
107
 
          <value name="WholeMesh">
108
 
            <constant>
109
 
              <real_value shape="3" dim1="dim" rank="1">0.0 0.0 -1.0</real_value>
110
 
            </constant>
111
 
          </value>
112
 
          <output/>
113
 
          <stat>
114
 
            <exclude_from_stat/>
115
 
          </stat>
116
 
          <detectors>
117
 
            <exclude_from_detectors/>
118
 
          </detectors>
119
 
          <adjoint_storage>
120
 
            <exists_in_forward/>
121
 
          </adjoint_storage>
122
 
        </prescribed>
123
 
      </vector_field>
124
 
    </gravity>
125
 
    <coriolis>
126
 
      <string_value lines="20" type="python">def val(X,t):
127
 
  return 1.0</string_value>
128
 
    </coriolis>
129
 
  </physical_parameters>
130
 
  <material_phase name="Fluid">
131
 
    <vector_field name="Velocity" rank="1">
132
 
      <prognostic>
133
 
        <mesh name="VelocityMesh"/>
134
 
        <equation name="ShallowWater"/>
135
 
        <spatial_discretisation>
136
 
          <discontinuous_galerkin>
137
 
            <advection_scheme>
138
 
              <upwind/>
139
 
            </advection_scheme>
140
 
          </discontinuous_galerkin>
141
 
        </spatial_discretisation>
142
 
        <temporal_discretisation>
143
 
          <relaxation>
144
 
            <real_value rank="0">1</real_value>
145
 
          </relaxation>
146
 
          <discontinuous_galerkin>
147
 
            <maximum_courant_number_per_subcycle>
148
 
              <real_value rank="0">0.4</real_value>
149
 
            </maximum_courant_number_per_subcycle>
150
 
          </discontinuous_galerkin>
151
 
        </temporal_discretisation>
152
 
        <solver>
153
 
          <iterative_method name="gmres">
154
 
            <restart>
155
 
              <integer_value rank="0">30</integer_value>
156
 
            </restart>
157
 
          </iterative_method>
158
 
          <preconditioner name="sor"/>
159
 
          <relative_error>
160
 
            <real_value rank="0">1.0e-7</real_value>
161
 
          </relative_error>
162
 
          <max_iterations>
163
 
            <integer_value rank="0">2000</integer_value>
164
 
          </max_iterations>
165
 
          <never_ignore_solver_failures/>
166
 
          <diagnostics>
167
 
            <monitors/>
168
 
          </diagnostics>
169
 
        </solver>
170
 
        <initial_condition name="WholeMesh">
171
 
          <balanced/>
172
 
        </initial_condition>
173
 
        <vector_field name="Source" rank="1">
174
 
          <prescribed>
175
 
            <value name="WholeMesh">
176
 
              <python>
177
 
                <string_value lines="20" type="python">def val(X,t):
178
 
  from spheretools import cart2polar, spherical_basis_vecs
179
 
  from math import sin, cos, pi
180
 
  from numpy import dot
181
 
  [theta,phi]=cart2polar(X)
182
 
  a=6371220.0
183
 
  alpha=0.0
184
 
  u0=2*pi*a/(12.0*24.0*60.0*60.0)
185
 
  u=[u0*(cos(phi)*cos(alpha)+sin(phi)*cos(theta)*sin(alpha)),-u0*sin(theta)*sin(alpha)]
186
 
  return dot(spherical_basis_vecs(X),u)</string_value>
187
 
                <comment>The Williamson paper uses the notation (lambda, theta) instead of (theta, phi).</comment>
188
 
              </python>
189
 
            </value>
190
 
            <output/>
191
 
            <stat>
192
 
              <include_in_stat/>
193
 
            </stat>
194
 
            <detectors>
195
 
              <exclude_from_detectors/>
196
 
            </detectors>
197
 
            <adjoint_storage>
198
 
              <exists_in_forward/>
199
 
            </adjoint_storage>
200
 
          </prescribed>
201
 
        </vector_field>
202
 
        <output/>
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
 
        <consistent_interpolation/>
213
 
      </prognostic>
214
 
    </vector_field>
215
 
    <scalar_field name="LayerThickness" rank="0">
216
 
      <prognostic>
217
 
        <mesh name="PressureMesh"/>
218
 
        <spatial_discretisation>
219
 
          <continuous_galerkin>
220
 
            <advection_terms>
221
 
              <exclude_advection_terms/>
222
 
            </advection_terms>
223
 
          </continuous_galerkin>
224
 
          <conservative_advection>
225
 
            <real_value rank="0">0.</real_value>
226
 
          </conservative_advection>
227
 
        </spatial_discretisation>
228
 
        <temporal_discretisation/>
229
 
        <solver>
230
 
          <iterative_method name="gmres">
231
 
            <restart>
232
 
              <integer_value rank="0">30</integer_value>
233
 
            </restart>
234
 
          </iterative_method>
235
 
          <preconditioner name="sor"/>
236
 
          <relative_error>
237
 
            <real_value rank="0">1.0E-6</real_value>
238
 
          </relative_error>
239
 
          <max_iterations>
240
 
            <integer_value rank="0">1000</integer_value>
241
 
          </max_iterations>
242
 
          <never_ignore_solver_failures/>
243
 
          <diagnostics>
244
 
            <monitors/>
245
 
          </diagnostics>
246
 
        </solver>
247
 
        <initial_condition name="WholeMesh">
248
 
          <python>
249
 
            <string_value lines="20" type="python">def val(X,t):
250
 
  from math import pi, sin, cos, acos
251
 
  from spheretools import cart2polar
252
 
  [theta,phi]=cart2polar(X)
253
 
  a=6371220.0
254
 
  h0=1000.0
255
 
  R=a/3.0
256
 
  theta_c=3*pi/2.0
257
 
  phi_c=0.0
258
 
  rr=a*acos(sin(phi_c)*sin(phi)+cos(phi_c)*cos(phi)*cos(theta-theta_c))
259
 
  if(rr&lt;R):
260
 
    return (h0/2.0)*(1+cos(pi*rr/R))
261
 
  else:
262
 
    return 0.0</string_value>
263
 
          </python>
264
 
        </initial_condition>
265
 
        <mean_layer_thickness>
266
 
          <real_value rank="0">1000.0</real_value>
267
 
        </mean_layer_thickness>
268
 
        <output/>
269
 
        <stat/>
270
 
        <consistent_interpolation/>
271
 
      </prognostic>
272
 
    </scalar_field>
273
 
    <scalar_field name="DG_CourantNumber" rank="0">
274
 
      <diagnostic>
275
 
        <algorithm name="Internal" material_phase_support="multiple"/>
276
 
        <mesh name="VelocityMesh"/>
277
 
        <output/>
278
 
        <stat/>
279
 
        <convergence>
280
 
          <include_in_convergence/>
281
 
        </convergence>
282
 
        <detectors>
283
 
          <include_in_detectors/>
284
 
        </detectors>
285
 
        <steady_state>
286
 
          <include_in_steady_state/>
287
 
        </steady_state>
288
 
        <adjoint_storage>
289
 
          <exists_in_forward/>
290
 
        </adjoint_storage>
291
 
      </diagnostic>
292
 
    </scalar_field>
293
 
  </material_phase>
294
 
</shallow_water_options>