~reducedmodelling/fluidity/ROM_Non-intrusive-ann

« back to all changes in this revision

Viewing changes to tests/gravity-col-press_cg_test_cty_cv/gravity-col-press_cg_test_cty_cv_p2lumpedp1_2d.flml

  • Committer: Brendan Tollit
  • Date: 2011-11-17 19:04:13 UTC
  • mto: This revision was merged to the branch mainline in revision 3862.
  • Revision ID: brendan.tollit05@imperial.ac.uk-20111117190413-sdmxzdlk4845qvuo
Add the capability when using a CG pressure to test the continuity 
with the CV dual (instead of the usual CG).

This adds the option to the schema, which comments that this is currently 
only for incompressible flow and will make your pressure matrix non symmetric.

State_Matrices is then changed slightly for getting the divergence matrix 
from state via passing in an optional name argument. If not present 
defaults to normal name.

Momentum_Equation is adjusted to include an option that triggers the desired 
behaviour. For incompressible flow this implies if chosen there is a need 
for two ct_m matrices (the left and right are different). This is allocated, 
grabbed from state, which allocates and inserts if not present, forms 
if then uses it and deallocates.

Include 4 initial test cases for this. 

1/ Sinlge phase checking pressure - gravity balance using a range of element types.
2/ mmaterial checking pressure - gravity balance again using a range of element types.
3/ Single phase checking divergence free (from a CV perspective) velocity in 3d using p0p1
4/ A single phase Stokes flow using p2p1 that checks for convergence using mms. 

These are all duplicates of tests already there. The desire is for a CV tested continuity 
with a momentum element pair that works. Some of the above would not work if pressure in 
the momentum was also CV.

Perhaps a few more tests, perhaps a warnig on the schema that this is new and a little unknown 
as well as entries to manual required.

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">gravity-col-press_cg_test_cty_cv_p2lumpedp1_2d</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="column">
 
15
        <format name="gmsh"/>
 
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">2</integer_value>
 
27
          </polynomial_degree>
 
28
        </mesh_shape>
 
29
        <mesh_continuity>
 
30
          <string_value>continuous</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
        <mesh_shape>
 
41
          <polynomial_degree>
 
42
            <integer_value rank="0">1</integer_value>
 
43
          </polynomial_degree>
 
44
        </mesh_shape>
 
45
        <stat>
 
46
          <exclude_from_stat/>
 
47
        </stat>
 
48
      </from_mesh>
 
49
    </mesh>
 
50
    <quadrature>
 
51
      <degree>
 
52
        <integer_value rank="0">5</integer_value>
 
53
      </degree>
 
54
    </quadrature>
 
55
  </geometry>
 
56
  <io>
 
57
    <dump_format>
 
58
      <string_value>vtk</string_value>
 
59
    </dump_format>
 
60
    <dump_period_in_timesteps>
 
61
      <constant>
 
62
        <integer_value rank="0">1</integer_value>
 
63
      </constant>
 
64
    </dump_period_in_timesteps>
 
65
    <output_mesh name="VelocityMesh"/>
 
66
    <stat/>
 
67
  </io>
 
68
  <timestepping>
 
69
    <current_time>
 
70
      <real_value rank="0">0.0</real_value>
 
71
    </current_time>
 
72
    <timestep>
 
73
      <real_value rank="0">0.005</real_value>
 
74
    </timestep>
 
75
    <finish_time>
 
76
      <real_value rank="0">0.01</real_value>
 
77
      <comment>0.01</comment>
 
78
    </finish_time>
 
79
    <nonlinear_iterations>
 
80
      <integer_value rank="0">2</integer_value>
 
81
    </nonlinear_iterations>
 
82
  </timestepping>
 
83
  <physical_parameters>
 
84
    <gravity>
 
85
      <magnitude>
 
86
        <real_value rank="0">10.0</real_value>
 
87
      </magnitude>
 
88
      <vector_field name="GravityDirection" rank="1">
 
89
        <prescribed>
 
90
          <mesh name="CoordinateMesh"/>
 
91
          <value name="WholeMesh">
 
92
            <constant>
 
93
              <real_value shape="2" dim1="dim" rank="1">0.0 -1.0</real_value>
 
94
            </constant>
 
95
          </value>
 
96
          <output/>
 
97
          <stat>
 
98
            <include_in_stat/>
 
99
          </stat>
 
100
          <detectors>
 
101
            <exclude_from_detectors/>
 
102
          </detectors>
 
103
        </prescribed>
 
104
      </vector_field>
 
105
    </gravity>
 
106
  </physical_parameters>
 
107
  <material_phase name="Material1">
 
108
    <equation_of_state>
 
109
      <fluids>
 
110
        <linear>
 
111
          <reference_density>
 
112
            <real_value rank="0">1.0</real_value>
 
113
          </reference_density>
 
114
        </linear>
 
115
      </fluids>
 
116
    </equation_of_state>
 
117
    <scalar_field name="Pressure" rank="0">
 
118
      <prognostic>
 
119
        <mesh name="PressureMesh"/>
 
120
        <spatial_discretisation>
 
121
          <continuous_galerkin>
 
122
            <test_continuity_with_cv_dual/>
 
123
          </continuous_galerkin>
 
124
        </spatial_discretisation>
 
125
        <scheme>
 
126
          <poisson_pressure_solution>
 
127
            <string_value lines="1">never</string_value>
 
128
          </poisson_pressure_solution>
 
129
          <use_projection_method/>
 
130
        </scheme>
 
131
        <solver>
 
132
          <iterative_method name="cg"/>
 
133
          <preconditioner name="eisenstat"/>
 
134
          <relative_error>
 
135
            <real_value rank="0">1.E-10</real_value>
 
136
          </relative_error>
 
137
          <max_iterations>
 
138
            <integer_value rank="0">350</integer_value>
 
139
          </max_iterations>
 
140
          <never_ignore_solver_failures/>
 
141
          <diagnostics>
 
142
            <monitors/>
 
143
          </diagnostics>
 
144
        </solver>
 
145
        <output/>
 
146
        <stat/>
 
147
        <convergence>
 
148
          <include_in_convergence/>
 
149
        </convergence>
 
150
        <detectors>
 
151
          <exclude_from_detectors/>
 
152
        </detectors>
 
153
        <steady_state>
 
154
          <include_in_steady_state/>
 
155
        </steady_state>
 
156
        <consistent_interpolation/>
 
157
      </prognostic>
 
158
    </scalar_field>
 
159
    <vector_field name="Velocity" rank="1">
 
160
      <prognostic>
 
161
        <mesh name="VelocityMesh"/>
 
162
        <equation name="Boussinesq"/>
 
163
        <spatial_discretisation>
 
164
          <continuous_galerkin>
 
165
            <stabilisation>
 
166
              <no_stabilisation/>
 
167
            </stabilisation>
 
168
            <mass_terms>
 
169
              <lump_mass_matrix>
 
170
                <use_submesh/>
 
171
              </lump_mass_matrix>
 
172
            </mass_terms>
 
173
            <advection_terms/>
 
174
            <stress_terms>
 
175
              <tensor_form/>
 
176
            </stress_terms>
 
177
          </continuous_galerkin>
 
178
          <conservative_advection>
 
179
            <real_value rank="0">0.0</real_value>
 
180
          </conservative_advection>
 
181
        </spatial_discretisation>
 
182
        <temporal_discretisation>
 
183
          <theta>
 
184
            <real_value rank="0">1.0</real_value>
 
185
          </theta>
 
186
          <relaxation>
 
187
            <real_value rank="0">1.0</real_value>
 
188
          </relaxation>
 
189
        </temporal_discretisation>
 
190
        <solver>
 
191
          <iterative_method name="gmres">
 
192
            <restart>
 
193
              <integer_value rank="0">30</integer_value>
 
194
            </restart>
 
195
          </iterative_method>
 
196
          <preconditioner name="eisenstat"/>
 
197
          <relative_error>
 
198
            <real_value rank="0">1.E-10</real_value>
 
199
          </relative_error>
 
200
          <max_iterations>
 
201
            <integer_value rank="0">500</integer_value>
 
202
          </max_iterations>
 
203
          <never_ignore_solver_failures/>
 
204
          <diagnostics>
 
205
            <monitors/>
 
206
          </diagnostics>
 
207
        </solver>
 
208
        <initial_condition name="WholeMesh">
 
209
          <constant>
 
210
            <real_value shape="2" dim1="dim" rank="1">0.0 0.0</real_value>
 
211
          </constant>
 
212
        </initial_condition>
 
213
        <boundary_conditions name="no_flow_out_sides">
 
214
          <surface_ids>
 
215
            <integer_value shape="2" rank="1">2 4</integer_value>
 
216
          </surface_ids>
 
217
          <type name="dirichlet">
 
218
            <align_bc_with_cartesian>
 
219
              <x_component>
 
220
                <constant>
 
221
                  <real_value rank="0">0.0</real_value>
 
222
                </constant>
 
223
              </x_component>
 
224
            </align_bc_with_cartesian>
 
225
          </type>
 
226
        </boundary_conditions>
 
227
        <boundary_conditions name="no_flow_out_bottom">
 
228
          <surface_ids>
 
229
            <integer_value shape="1" rank="1">1</integer_value>
 
230
          </surface_ids>
 
231
          <type name="dirichlet">
 
232
            <align_bc_with_cartesian>
 
233
              <y_component>
 
234
                <constant>
 
235
                  <real_value rank="0">0.0</real_value>
 
236
                </constant>
 
237
              </y_component>
 
238
            </align_bc_with_cartesian>
 
239
          </type>
 
240
        </boundary_conditions>
 
241
        <output/>
 
242
        <stat>
 
243
          <include_in_stat/>
 
244
          <previous_time_step>
 
245
            <exclude_from_stat/>
 
246
          </previous_time_step>
 
247
          <nonlinear_field>
 
248
            <exclude_from_stat/>
 
249
          </nonlinear_field>
 
250
        </stat>
 
251
        <convergence>
 
252
          <include_in_convergence/>
 
253
        </convergence>
 
254
        <detectors>
 
255
          <include_in_detectors/>
 
256
        </detectors>
 
257
        <steady_state>
 
258
          <include_in_steady_state/>
 
259
        </steady_state>
 
260
        <consistent_interpolation/>
 
261
      </prognostic>
 
262
    </vector_field>
 
263
  </material_phase>
 
264
</fluidity_options>