Skip to content

Commit 6445796

Browse files
committed
MNT: post rebase fixes.
1 parent 0021a1f commit 6445796

File tree

6 files changed

+20
-1687
lines changed

6 files changed

+20
-1687
lines changed

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ To install this version, run `pip install rocketpy==1.8.0`
205205

206206
### Changed
207207

208-
- DOC: Fix documentation dependencies [#651](https://github.com/RocketPy-Team/RocketPy/pull/651)
209-
- DOC: Fix documentation warnings [#645](https://github.com/RocketPy-Team/RocketPy/pull/645)
210208
- DOC: New Environment class docs pages [#644](https://github.com/RocketPy-Team/RocketPy/pull/644)
211209

212210
### Fixed

docs/examples/SEB_liquid_motor.ipynb

Lines changed: 3 additions & 1595 deletions
Large diffs are not rendered by default.

rocketpy/plots/tank_plots.py

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -35,74 +35,6 @@ def __init__(self, tank):
3535
self.flux_time = tank.flux_time
3636
self.geometry = tank.geometry
3737

38-
def fluid_mass(self, start_time, end_time):
39-
"""Plots the fluid mass of the tank as a function of time.
40-
41-
Parameters
42-
----------
43-
start_time : float
44-
Initial time to plot the fluid mass.
45-
end_time : float
46-
Final time to plot the fluid mass.
47-
48-
Returns
49-
-------
50-
None
51-
"""
52-
_, ax = Function.compare_plots(
53-
[
54-
(self.tank.fluid_mass, "Total fluid mass"),
55-
(self.tank.liquid_mass, "Liquid Mass"),
56-
(self.tank.gas_mass, "Gas Mass"),
57-
],
58-
start_time,
59-
end_time,
60-
title="Tank Fluid Masses",
61-
xlabel="Time (s)",
62-
ylabel="Mass (kg)",
63-
show=False,
64-
return_object=True,
65-
)
66-
ax.get_lines()[1].set_linestyle("--")
67-
ax.get_lines()[2].set_linestyle("-.")
68-
plt.show()
69-
70-
def net_mass_flow_rate(self):
71-
"""Plots the net mass flow rate of the tank as a function of time.
72-
73-
Returns
74-
-------
75-
None
76-
"""
77-
self.tank.net_mass_flow_rate()
78-
79-
def fluid_volume(self):
80-
"""Plots the fluid volume of the tank as a function of time.
81-
82-
Returns
83-
-------
84-
None
85-
"""
86-
self.tank.fluid_volume()
87-
88-
def center_of_mass(self):
89-
"""Plots the center of mass of the tank as a function of time.
90-
91-
Returns
92-
-------
93-
None
94-
"""
95-
self.tank.center_of_mass()
96-
97-
def inertia(self):
98-
"""Plots the inertia of the tank as a function of time.
99-
100-
Returns
101-
-------
102-
None
103-
"""
104-
self.tank.inertia()
105-
10638
def _generate_tank(self, translate=(0, 0), csys=1):
10739
"""Generates a matplotlib patch object that represents the tank.
10840
@@ -263,4 +195,3 @@ def all(self):
263195
self.fluid_volume()
264196
self.fluid_center_of_mass()
265197
self.tank.inertia.plot(*self.flux_time)
266-
self.fluid_mass(*self.tank.flux_time)

tests/fixtures/motor/data/Cesaroni_M1670_shifted.eng

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/fixtures/motor/tanks_fixtures.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,7 @@ def oxidizer_tank(oxidizer_fluid, oxidizer_pressurant, propellant_tank_geometry)
431431

432432

433433
@pytest.fixture
434-
def spherical_oxidizer_tank(
435-
oxidizer_fluid, oxidizer_pressurant, spherical_oxidizer_geometry
436-
):
434+
def spherical_oxidizer_tank(oxidizer_fluid, oxidizer_pressurant):
437435
"""An example of a oxidizer spherical tank.
438436
439437
Parameters

tests/unit/test_tank.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,4 +348,19 @@ def expected_gas_inertia(t):
348348
tank.liquid_inertia.y_array,
349349
atol=1e-3,
350350
rtol=1e-2,
351-
)
351+
)
352+
assert np.allclose(
353+
expected_gas_inertia(times), tank.gas_inertia.y_array, atol=1e-3, rtol=1e-2
354+
)
355+
assert np.allclose(
356+
expected_liquid_inertia(times) + expected_gas_inertia(times),
357+
tank.inertia.y_array,
358+
atol=1e-3,
359+
rtol=1e-2,
360+
)
361+
362+
363+
@patch("matplotlib.pyplot.show")
364+
def test_tank_geometry_plots_info(mock_show): # pylint: disable=unused-argument
365+
assert TankGeometry({(0, 5): 1}).plots.all() is None
366+

0 commit comments

Comments
 (0)