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

DOC: Include Draw Method in Docs #468

Merged
merged 1 commit into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions docs/user/first_simulation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/user/motors/hybridmotor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions docs/user/motors/liquidmotor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand All @@ -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`

Expand Down
30 changes: 29 additions & 1 deletion docs/user/motors/tanks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions docs/user/rocket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Loading