~reducedmodelling/fluidity/ReducedModel_running

« back to all changes in this revision

Viewing changes to tests/mphase_tephra_settling/mphase_tephra_settling.xml

  • Committer: Christian Jacobs
  • Date: 2011-09-29 22:38:40 UTC
  • mfrom: (3408.1.160 ctjacobs-multiphase)
  • Revision ID: c.jacobs10@imperial.ac.uk-20110929223840-yiwz4nt5hfuraqey
Merging ctjacobs-multiphase branch revisions (from r3533 to r3568 inclusive) into trunk. Branch queue passes all unit, short and medium tests on buildbot.

Summary of changes:
===================

- Added multiphase support to the CV discretisation of the Pressure field. A multiphase MMS longtest for the P0-P1CV element pair has been added and shows first order convergence for Velocity and Pressure.

- When checking the field_bc_type in assemble_divergence_matrix_cv, we now compare against the more meaningful integer parameters BC_TYPE_WEAKDIRICHLET (=1), BC_TYPE_NO_NORMAL_FLOW (=2), etc.

- In Momentum_CG.F90: Using dnvfrac_t instead of du_t if PhaseVolumeFraction and Velocity are on different meshes.

In Divergence_Matrix_CG.F90: Using dnvfrac_t instead of dfield_t if nvfrac and field are on different meshes.

- A few minor changes to multiphase test cases and the manual.

- Added a multiphase diagnostic algorithm called apparent_density, which computes Density*PhaseVolumeFraction.

- Bug fix: The logical 'prognostic_velocity' was assigned a value of .true. regardless of whether the Velocity field was prognostic, prescribed or aliased. Now fixed.

- Bug fix for lp:854398: In Multimaterials.F90, we now only count the number of diagnostic MaterialVolumeFraction fields in the submaterials array instead of the entire state array.

- Bug fix for the particle_reynolds_number diagnostic algorithm: Including the continuous phase's PhaseVolumeFraction and using the magnitude of the relative velocity. Also updated the related comments in the schema.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
  <owner userid="ctj10"/>
8
8
  <tags>flml</tags>
9
9
  
10
 
  <problem_definition length="special" nprocs="1">
 
10
  <problem_definition length="medium" nprocs="1">
11
11
    <command_line>make run</command_line>
12
12
    <!-- This is a 2D simulation of the formation of density currents. We consider a -->
13
13
    <!-- body of water with a constant inflow of (denser) tephra at the top boundary. -->
15
15
  </problem_definition>
16
16
  
17
17
  <variables>
18
 
    <variable name="tephra_u_max" language="python">
19
 
from fluidity_tools import stat_parser
20
 
s = stat_parser("mphase_tephra_settling.stat")
21
 
tephra_u_max=s["Tephra"]["Velocity%magnitude"]["max"]
22
 
    </variable>
23
18
    <variable name="time" language="python">
24
19
from fluidity_tools import stat_parser
25
20
s = stat_parser("mphase_tephra_settling.stat")
26
21
time=s["ElapsedTime"]["value"]
27
22
    </variable>
 
23
    
 
24
    <variable name="tephra_velocity_max" language="python">
 
25
from fluidity_tools import stat_parser
 
26
s = stat_parser("mphase_tephra_settling.stat")
 
27
tephra_velocity_max=s["Tephra"]["Velocity%magnitude"]["max"]
 
28
    </variable>
 
29
    
 
30
    <variable name="apparent_density_max" language="python">
 
31
from fluidity_tools import stat_parser
 
32
s = stat_parser("mphase_tephra_settling.stat")
 
33
apparent_density_max=s["Tephra"]["ApparentDensity"]["max"]
 
34
    </variable>
 
35
    
 
36
    <variable name="particle_reynolds_number_max" language="python">
 
37
from fluidity_tools import stat_parser
 
38
s = stat_parser("mphase_tephra_settling.stat")
 
39
particle_reynolds_number_max=s["Tephra"]["ParticleReynoldsNumber"]["max"]
 
40
    </variable>
 
41
    
 
42
    <variable name="divergence" language="python">
 
43
from fluidity_tools import stat_parser
 
44
s = stat_parser("mphase_tephra_settling.stat")
 
45
divergence = s["Tephra"]["SumVelocityDivergence"]["max"]
 
46
    </variable>
28
47
  </variables>
29
48
    
30
49
  <pass_tests>
 
50
    <test name="Final time is 60 seconds" language="python">
 
51
assert abs(time[-1]-60.0) &lt; 0.5
 
52
    </test>
 
53
    
31
54
    <test name="Maximum Tephra velocity is less than 0.0025 for the first 30 seconds" language="python">
32
55
for t in range(0,len(time)):
33
56
   if(time[t] &gt; 30.0):
34
 
      assert tephra_u_max[0:t-1].all() &lt; 0.0025
 
57
      assert tephra_velocity_max[0:t-1].all() &lt; 0.0025
35
58
      break
36
59
    </test>
37
60
 
38
61
    <test name="Maximum Tephra velocity is between 0.002 and 0.05 for the rest of the simulation" language="python">
39
62
for t in range(0,len(time)):
40
63
   if(time[t] &gt; 30.0):
41
 
      assert min(tephra_u_max[t:]) &gt; 0.002
42
 
      assert max(tephra_u_max[t:]) &lt; 0.05
 
64
      assert min(tephra_velocity_max[t:]) &gt; 0.002
 
65
      assert max(tephra_velocity_max[t:]) &lt; 0.05
43
66
      break
44
67
    </test>
 
68
    
 
69
    <test name="Maximum ApparentDensity is between 0.25 and 0.30 at the final timestep" language="python">
 
70
assert abs(apparent_density_max[-1] - 0.275) &lt; 0.025
 
71
    </test>
 
72
    
 
73
    <test name="Maximum ParticleReynoldsNumber is around 0.08 at the final timestep" language="python">
 
74
assert abs(particle_reynolds_number_max[-1] - 0.08) &lt; 0.5
 
75
    </test>
 
76
    
 
77
    <test name="SumVelocityDivergence is less than 1e-8 at the final timestep" language="python">
 
78
assert abs(divergence[-1]) &lt; 1e-8
 
79
    </test>
45
80
  </pass_tests>
46
81
  
47
82
  <warn_tests>