~reducedmodelling/fluidity/ROM_Non-intrusive-ann

« back to all changes in this revision

Viewing changes to tests/divergence_free_velocity_press_cg_test_cty_cv/divergence_free_velocity_press_cg_test_cty_cv.xml

  • 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
<testproblem>
 
3
  <name>Checks that velocity is divergence free with CG pressure and the continuity tested with the CV dual functions</name>
 
4
  <owner userid="btollit"/>
 
5
  <tags>flml</tags>
 
6
  <problem_definition length="short" nprocs="1">
 
7
    <command_line>
 
8
fluidity divergence_free_velocity_press_cg_test_cty_cv_p0p1_3d.flml
 
9
    </command_line>
 
10
  </problem_definition>
 
11
  <variables>
 
12
    <variable name="MaxControlVolumeDivergence_p0p1_3d" language="python">
 
13
from fluidity_tools import stat_parser as stat
 
14
MaxControlVolumeDivergence_p0p1_3d = max(abs(stat("divergence_free_velocity_press_cg_test_cty_cv_p0p1_3d.stat")['water']['ControlVolumeDivergence']['max'][-1]),
 
15
                                         abs(stat("divergence_free_velocity_press_cg_test_cty_cv_p0p1_3d.stat")['water']['ControlVolumeDivergence']['min'][-1]))
 
16
   </variable>
 
17
  </variables>
 
18
  <pass_tests>
 
19
    <test name="MaxControlVolumeDivergence_p0p1_3d lower than tolerance 1.0e-10" language="python">
 
20
assert(MaxControlVolumeDivergence_p0p1_3d &lt; 1.0e-10)
 
21
   </test>
 
22
  </pass_tests>
 
23
</testproblem>