Skip to content

Commit

Permalink
TST: fix test of MassBasedTank overfill.
Browse files Browse the repository at this point in the history
  • Loading branch information
phmbressan committed Nov 21, 2023
1 parent 09260e4 commit 9f69c74
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/test_tank.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_mass_based_tank():
) # density value may be estimate

top_endcap = lambda y: np.sqrt(
0.0775**2 - (y - 0.6924) ** 2
0.0775**2 - (y - 0.7924) ** 2
) # Hemisphere equation creating top endcap
bottom_endcap = lambda y: np.sqrt(
0.0775**2 - (0.0775 - y) ** 2
Expand All @@ -150,8 +150,8 @@ def test_mass_based_tank():
real_geometry = TankGeometry(
{
(0, 0.0559): bottom_endcap,
(0.0559, 0.7139): lambda y: 0.0744,
(0.7139, 0.7698): top_endcap,
(0.0559, 0.8039): lambda y: 0.0744,
(0.8039, 0.8698): top_endcap,
}
)

Expand All @@ -172,7 +172,6 @@ def test_mass_based_tank():
gas_mass=gas_masses,
liquid=lox,
gas=n2,
discretize=None,
)

# Generate tank geometry {radius: height, ...}
Expand All @@ -190,6 +189,10 @@ def test_mass_based_tank():
discretize=None,
)

# Assert volume bounds
assert (real_tank_lox.gas_height <= real_tank_lox.geometry.total_volume).all
assert (example_tank_lox.gas_height <= example_tank_lox.geometry.total_volume).all

initial_liquid_mass = 5
initial_gas_mass = 0
liquid_mass_flow_rate_in = 0.1
Expand Down

0 comments on commit 9f69c74

Please sign in to comment.