Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enh/liquid motors tank inertia #299

Merged
merged 20 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c3ba134
MAINT: refactor supplement file into TankGeometry.
phmbressan Nov 9, 2022
a8c16e1
MAINT: expand unit testing for TankGeometry and minor fixes
phmbressan Nov 10, 2022
6ee19e5
ENH: add inertia evaluation and docstrings to TankGeometry
phmbressan Nov 16, 2022
a2550ee
MAINT: fix code style issues with black.
phmbressan Nov 16, 2022
8032006
MAINT: fix code doctring issues.
phmbressan Nov 16, 2022
48448ba
FIX: remove Funcify incorrect implementation.
phmbressan Nov 16, 2022
8433953
ENH: update tank inertia evaluation for non flat caps and gaseous por…
phmbressan Nov 16, 2022
8dff245
FIX: incorrect usage of parallel axis theorem.
phmbressan Nov 17, 2022
136a06c
Update rocketpy/motors/Tank.py
phmbressan Nov 19, 2022
fef3992
MAINT: correct docstring typos and remove unnecessary lines.
phmbressan Nov 19, 2022
87716c3
FIX: improve Tank and TankGeometry error handling.
phmbressan Nov 19, 2022
944ae33
MAINT: update Tank class docstrings.
phmbressan Nov 19, 2022
4c84cce
MAINT: fetch changes and lint with black.
phmbressan Nov 19, 2022
2b7bd35
Fix code style issues with Black
lint-action Nov 19, 2022
6efbe53
FIX: correct indentation error.
phmbressan Nov 19, 2022
67a2870
FIX: allow zero density fluids.
phmbressan Nov 19, 2022
bd80f0d
Merge branch 'enh/liquid-motors-tank-inertia' of https://github.com/R…
phmbressan Nov 19, 2022
e369fe5
FIX: correct spherical inertia formulae.
phmbressan Nov 20, 2022
db251ee
FIX: align child tank classes default arguments with parent.
phmbressan Nov 20, 2022
e12fcb6
ENH: update testing.
phmbressan Nov 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions docs/notebooks/tank_class_usage.ipynb

Large diffs are not rendered by default.

27 changes: 0 additions & 27 deletions rocketpy/Function.py
Original file line number Diff line number Diff line change
Expand Up @@ -2030,30 +2030,3 @@ def differentiate(self, x, dx=1e-6):
# h = (10)**-300
# z = x + h*1j
# return self(z).imag/h


def Funcify(*args, **kwargs):
"""Decorator factory to wrap callables as Function objects.
See rocketpy.Function for parameters information.

Returns
-------
decorator : function
Decorator function to wrap callables as Function objects.

Examples
--------
>>> @Funcify(inputs=['x'], outputs=['y'])
... def f(x):
... return x**2
>>> f
Function object with inputs ['x'] and outputs ['y'].
>>> g = 2*f + 3
>>> g(2)
11
"""

def decorator(func):
return Function(func, *args, **kwargs)

return decorator
2 changes: 1 addition & 1 deletion rocketpy/motors/Fluid.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __post_init__(self):

if not isinstance(self.name, str):
raise ValueError("The name must be a string.")
if self.density <= 0:
if self.density < 0:
raise ValueError("The density must be a positive number.")
if self.quality < 0 or self.quality > 1:
raise ValueError("The quality must be a number between 0 and 1.")
Expand Down
Loading