15
15
</problem_definition>
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"]
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"]
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"]
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"]
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"]
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"]
50
<test name="Final time is 60 seconds" language="python">
51
assert abs(time[-1]-60.0) < 0.5
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] > 30.0):
34
assert tephra_u_max[0:t-1].all() < 0.0025
57
assert tephra_velocity_max[0:t-1].all() < 0.0025
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] > 30.0):
41
assert min(tephra_u_max[t:]) > 0.002
42
assert max(tephra_u_max[t:]) < 0.05
64
assert min(tephra_velocity_max[t:]) > 0.002
65
assert max(tephra_velocity_max[t:]) < 0.05
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) < 0.025
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) < 0.5
77
<test name="SumVelocityDivergence is less than 1e-8 at the final timestep" language="python">
78
assert abs(divergence[-1]) < 1e-8