Skip to content

Commit

Permalink
Merge pull request #468 from RocketPy-Team/doc/include-draw-method
Browse files Browse the repository at this point in the history
DOC: Include Draw Method in Docs
Gui-FernandesBR authored Nov 18, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 0c28f2a + 51439fc commit 4d17e4a
Showing 5 changed files with 50 additions and 7 deletions.
8 changes: 8 additions & 0 deletions docs/user/first_simulation.rst
Original file line number Diff line number Diff line change
@@ -301,6 +301,14 @@ We can then see if the rocket is stable by plotting the static margin:
If it is unreasonably **high**, your rocket is **super stable** and the
simulation will most likely **fail**.


To guarantee that the rocket is stable, the positions of all added components
must be correct. The ``Rocket`` class can help you with the ``draw`` method:

.. jupyter-execute::

calisto.draw()

Running the Simulation
----------------------

2 changes: 1 addition & 1 deletion docs/user/motors/hybridmotor.rst
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ Finally we can add the oxidizer tank to the hybrid motor. This is done using the
.. jupyter-execute::

example_hybrid.add_tank(
tank = oxidizer_tank, position = 1.0115
tank = oxidizer_tank, position = 1.0615
)

And we can see all the results with:
10 changes: 5 additions & 5 deletions docs/user/motors/liquidmotor.rst
Original file line number Diff line number Diff line change
@@ -91,14 +91,14 @@ curve, but keep in mind that you can use
thrust_source=lambda t: 4000 - 100 * t**2,
dry_mass=2,
dry_inertia=(0.125, 0.125, 0.002),
nozzle_radius=0.15,
center_of_dry_mass_position=0.584,
nozzle_radius=0.075,
center_of_dry_mass_position=1.75,
nozzle_position=0,
burn_time=5,
coordinate_system_orientation="nozzle_to_combustion_chamber",
)
example_liquid.add_tank(tank=oxidizer_tank, position=0.6)
example_liquid.add_tank(tank=fuel_tank, position=1.8)
example_liquid.add_tank(tank=oxidizer_tank, position=1.0)
example_liquid.add_tank(tank=fuel_tank, position=2.5)


.. caution::
@@ -120,7 +120,7 @@ curve, but keep in mind that you can use
.. seealso::

You can find details on each of the initialization parameters in
:class:`rocketpy.SolidMotor.__init__`
:class:`rocketpy.LiquidMotor.__init__`

And you can find details on adding tanks in :ref:`Adding Tanks`

30 changes: 29 additions & 1 deletion docs/user/motors/tanks.rst
Original file line number Diff line number Diff line change
@@ -174,7 +174,14 @@ and gas masses through time and is defined as such:

More details can be found in :class:`rocketpy.MassFlowRateBasedTank.__init__`.

We can some useful with:
We can see some useful plots with:

.. jupyter-execute::

# Draw the tank
N2O_flow_tank.draw()

|
.. jupyter-execute::

@@ -222,6 +229,13 @@ Then we can define the ``MassBasedTank`` as such:

We can see some outputs with:

.. jupyter-execute::

# Draw the tank
N2O_mass_tank.draw()

|
.. jupyter-execute::

# Evolution of the Propellant Mass and the Mass flow rate
@@ -270,6 +284,13 @@ Then we can define the ``UllageBasedTank`` as such:

We can see some outputs with:

.. jupyter-execute::

# Draw the tank
N2O_ullage_tank.draw()

|
.. jupyter-execute::

# Evolution of the Propellant Mass and the Mass flow rate
@@ -317,6 +338,13 @@ Then we can define the ``LevelBasedTank`` as such:

We can see some outputs with:

.. jupyter-execute::

# Draw the tank
N20_level_tank.draw()

|
.. jupyter-execute::

# Evolution of the Propellant Mass and the Mass flow rate
7 changes: 7 additions & 0 deletions docs/user/rocket.rst
Original file line number Diff line number Diff line change
@@ -224,6 +224,13 @@ to the rocket in one step:
- :class:`rocketpy.Rocket.add_elliptical_fins`
- :class:`rocketpy.Rocket.add_tail`

Now we can see a representation of the rocket, this will guarantee that the
rocket has been constructed correctly:

.. jupyter-execute::

calisto.draw()


Adding Airfoil Profile to Fins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 comments on commit 4d17e4a

Please sign in to comment.