Fluid Class#

class rocketpy.Fluid[source]#

Class that represents a fluid.

Variables:
  • name (str) – Name of the fluid.

  • density (float) – Density of the fluid in kg/m³.

__post_init__()[source]#

Post initialization method.

Raises:
  • ValueError – If the name is not a string.

  • ValueError – If the density is not a positive number.

__repr__()[source]#

Representation method.

Returns:

String representation of the class.

Return type:

str

__str__()[source]#

String method.

Returns:

String representation of the class.

Return type:

str

__init__(name, density)#
Parameters:
  • name (str) –

  • density (float) –

Return type:

None