1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE testproblem SYSTEM "regressiontest.dtd">
6
<name>mphase_inlet_velocity_bc_incompressible</name>
7
<owner userid="ctj10"/>
10
<problem_definition length="short" nprocs="1">
11
<command_line>make run</command_line>
12
<!-- Check that we can do velocity inlet boundary conditions for incompressible multiphase flow. -->
13
<!-- A velocity of 0.1 is prescribed on the left for the Gas phase. The velocity is zero for both -->
14
<!-- phases on the right, and the left boundary is left open for the Particle phase. -->
15
<!-- By continuity, the velocity should be equal and opposite at the left boundary for the Particle phase -->
16
<!-- since we have a prescribed PhaseVolumeFraction of 0.5 for both phases. -->
20
<variable name="gas_velocity_max" language="python">
21
from fluidity_tools import stat_parser
22
s = stat_parser("mphase_inlet_velocity_bc_incompressible.stat")
23
gas_velocity_max = s["Gas"]["Velocity%1"]["max"]
26
<variable name="particle_velocity_max" language="python">
27
from fluidity_tools import stat_parser
28
s = stat_parser("mphase_inlet_velocity_bc_incompressible.stat")
29
particle_velocity_max = s["Particle"]["Velocity%1"]["max"]
32
<variable name="particle_velocity_min" language="python">
33
from fluidity_tools import stat_parser
34
s = stat_parser("mphase_inlet_velocity_bc_incompressible.stat")
35
particle_velocity_min = s["Particle"]["Velocity%1"]["min"]
38
<variable name="sum_velocity_divergence" language="python">
39
from fluidity_tools import stat_parser
40
s = stat_parser("mphase_inlet_velocity_bc_incompressible.stat")
41
sum_velocity_divergence = s["Gas"]["SumVelocityDivergence"]["max"]
44
<variable name="solvers_converged" language="python">
46
files = os.listdir("./")
47
solvers_converged = not "matrixdump" in files and not "matrixdump.info" in files
52
<test name="Maximum Gas::Velocity is always 0.1" language="python">
53
assert(abs(gas_velocity_max - 0.1).all() < 1e-15)
56
<test name="Maximum Particle::Velocity (in magnitude) is 0.1 at the end of the simulation, and is opposite in direction" language="python">
57
assert(abs(particle_velocity_min[-1] + 0.1) < 1e-15)
58
assert(abs(particle_velocity_max[-1]) < 1e-15)
61
<test name="SumVelocityDivergence is approximately zero" language="python">
62
assert(abs(sum_velocity_divergence[-1]) < 1e-11)
65
<test name="Solvers converged" language="python">
66
assert(solvers_converged)