1
<?xml version="1.0" encoding="UTF-8" ?>
5
<name>mphase_mms_p2p1_stress_form</name>
6
<owner userid="ctj10"/>
9
<problem_definition length="medium" nprocs="1">
10
<command_line>make run</command_line>
15
<variable name="ab_convergence_vel" language="python">
16
from fluidity_tools import stat_parser as stat
19
print "Calculating errors for Fluid1 Velocity in A-B convergence test"
20
a_error_x = stat("MMS_A.stat")["Fluid1"]["VelocityError%1"]["l2norm"][-1]
21
a_error_y = stat("MMS_A.stat")["Fluid1"]["VelocityError%2"]["l2norm"][-1]
22
b_error_x = stat("MMS_B.stat")["Fluid1"]["VelocityError%1"]["l2norm"][-1]
23
b_error_y = stat("MMS_B.stat")["Fluid1"]["VelocityError%2"]["l2norm"][-1]
30
ab_ratio_x = a_error_x / b_error_x
31
ab_ratio_y = a_error_y / b_error_y
32
ab_ratio_f1 = [log(ab_ratio_x, 2), log(ab_ratio_y, 2)]
34
print "Calculating errors for Fluid2 Velocity in A-B convergence test"
35
a_error_x = stat("MMS_A.stat")["Fluid2"]["VelocityError%1"]["l2norm"][-1]
36
a_error_y = stat("MMS_A.stat")["Fluid2"]["VelocityError%2"]["l2norm"][-1]
37
b_error_x = stat("MMS_B.stat")["Fluid2"]["VelocityError%1"]["l2norm"][-1]
38
b_error_y = stat("MMS_B.stat")["Fluid2"]["VelocityError%2"]["l2norm"][-1]
45
ab_ratio_x = a_error_x / b_error_x
46
ab_ratio_y = a_error_y / b_error_y
47
ab_ratio_f2 = [log(ab_ratio_x, 2), log(ab_ratio_y, 2)]
49
ab_convergence_vel = [ab_ratio_f1, ab_ratio_f2]
52
<variable name="ab_convergence_p" language="python">
53
from fluidity_tools import stat_parser as stat
56
print "Calculating errors for common Pressure in A-B convergence test"
57
a_error = stat("MMS_A.stat")["Fluid1"]["PressureError"]["l2norm"][-1]
58
b_error = stat("MMS_B.stat")["Fluid1"]["PressureError"]["l2norm"][-1]
63
ab_ratio = a_error / b_error
64
ab_convergence_p = log(ab_ratio, 2)
67
<variable name="bc_convergence_vel" language="python">
68
from fluidity_tools import stat_parser as stat
71
print "Calculating errors for Fluid1 Velocity in B-C convergence test"
72
b_error_x = stat("MMS_B.stat")["Fluid1"]["VelocityError%1"]["l2norm"][-1]
73
b_error_y = stat("MMS_B.stat")["Fluid1"]["VelocityError%2"]["l2norm"][-1]
74
c_error_x = stat("MMS_C.stat")["Fluid1"]["VelocityError%1"]["l2norm"][-1]
75
c_error_y = stat("MMS_C.stat")["Fluid1"]["VelocityError%2"]["l2norm"][-1]
82
bc_ratio_x = b_error_x / c_error_x
83
bc_ratio_y = b_error_y / c_error_y
84
bc_ratio_f1 = [log(bc_ratio_x, 2), log(bc_ratio_y, 2)]
86
print "Calculating errors for Fluid2 Velocity in B-C convergence test"
87
b_error_x = stat("MMS_B.stat")["Fluid2"]["VelocityError%1"]["l2norm"][-1]
88
b_error_y = stat("MMS_B.stat")["Fluid2"]["VelocityError%2"]["l2norm"][-1]
89
c_error_x = stat("MMS_C.stat")["Fluid2"]["VelocityError%1"]["l2norm"][-1]
90
c_error_y = stat("MMS_C.stat")["Fluid2"]["VelocityError%2"]["l2norm"][-1]
97
bc_ratio_x = b_error_x / c_error_x
98
bc_ratio_y = b_error_y / c_error_y
99
bc_ratio_f2 = [log(bc_ratio_x, 2), log(bc_ratio_y, 2)]
101
bc_convergence_vel = [bc_ratio_f1, bc_ratio_f2]
104
<variable name="bc_convergence_p" language="python">
105
from fluidity_tools import stat_parser as stat
108
print "Calculating errors for common Pressure in B-C convergence test"
109
b_error = stat("MMS_B.stat")["Fluid1"]["PressureError"]["l2norm"][-1]
110
c_error = stat("MMS_C.stat")["Fluid1"]["PressureError"]["l2norm"][-1]
115
bc_ratio = b_error / c_error
116
bc_convergence_p = log(bc_ratio, 2)
119
<variable name="solvers_converged" language="python">
121
files = os.listdir("./")
122
solvers_converged = not "matrixdump" in files and not "matrixdump.info" in files
127
<test name="ab_convergence_vel_x for Fluid1: L2 order > 2.8" language="python">
128
assert(ab_convergence_vel[0][0] > 2.8)
130
<test name="ab_convergence_vel_y for Fluid1: L2 order > 2.8" language="python">
131
assert(ab_convergence_vel[0][1] > 2.8)
134
<test name="ab_convergence_vel_x for Fluid2: L2 order > 2.8" language="python">
135
assert(ab_convergence_vel[1][0] > 2.8)
137
<test name="ab_convergence_vel_y for Fluid2: L2 order > 2.8" language="python">
138
assert(ab_convergence_vel[1][1] > 2.8)
141
<test name="ab_convergence_p: L2 order > 2.0" language="python">
142
assert(ab_convergence_p > 2.0)
145
<test name="bc_convergence_vel_x for Fluid1: L2 order > 2.8" language="python">
146
assert(bc_convergence_vel[0][0] > 2.8)
148
<test name="bc_convergence_vel_y for Fluid1: L2 order > 2.8" language="python">
149
assert(bc_convergence_vel[0][1] > 2.8)
152
<test name="bc_convergence_vel_x for Fluid2: L2 order > 2.8" language="python">
153
assert(bc_convergence_vel[1][0] > 2.8)
155
<test name="bc_convergence_vel_y for Fluid2: L2 order > 2.8" language="python">
156
assert(bc_convergence_vel[1][1] > 2.8)
159
<test name="bc_convergence_p: L2 order > 2.0" language="python">
160
assert(bc_convergence_p > 2.0)
163
<test name="Solvers converged" language="python">
164
assert(solvers_converged)