jf1uids.fluid_equations.fluid#
Module Contents#
Functions#
Convert the conserved state to the primitive state. |
|
Convert the primitive state to the conserved state. |
|
Get the absolute velocity of the fluid. |
|
Calculate the pressure from the internal energy. |
|
Calculate the internal energy from the total energy. |
|
Calculate the pressure from the total energy. |
|
Calculate the total energy from the primitive variables. |
|
Calculate the speed of sound. |
API#
- jf1uids.fluid_equations.fluid.primitive_state_from_conserved(conserved_state: jf1uids.option_classes.simulation_config.STATE_TYPE, gamma: Union[float, jaxtyping.Float[jaxtyping.Array]], config: jf1uids.option_classes.simulation_config.SimulationConfig, registered_variables: jf1uids.fluid_equations.registered_variables.RegisteredVariables) jf1uids.option_classes.simulation_config.STATE_TYPE[source]#
Convert the conserved state to the primitive state.
- Args:
conserved_state: The conserved state. gamma: The adiabatic index of the fluid.
- Returns:
The primitive state.
- jf1uids.fluid_equations.fluid.conserved_state_from_primitive(primitive_state: jf1uids.option_classes.simulation_config.STATE_TYPE, gamma: Union[float, jaxtyping.Float[jaxtyping.Array]], config: jf1uids.option_classes.simulation_config.SimulationConfig, registered_variables: jf1uids.fluid_equations.registered_variables.RegisteredVariables) jf1uids.option_classes.simulation_config.STATE_TYPE[source]#
Convert the primitive state to the conserved state.
- Args:
primitive_state: The primitive state. gamma: The adiabatic index of the fluid.
- Returns:
The conserved state.
- jf1uids.fluid_equations.fluid.get_absolute_velocity(primitive_state: jf1uids.option_classes.simulation_config.STATE_TYPE, config: jf1uids.option_classes.simulation_config.SimulationConfig, registered_variables: jf1uids.fluid_equations.registered_variables.RegisteredVariables) Union[jaxtyping.Float[jaxtyping.Array, num_cells], jaxtyping.Float[jaxtyping.Array, num_cells_x num_cells_y], jaxtyping.Float[jaxtyping.Array, num_cells_x num_cells_y num_cells_z]][source]#
Get the absolute velocity of the fluid.
- Args:
primitive_state: The primitive state of the fluid. config: The simulation configuration. registered_variables: The registered variables.
- Returns:
The absolute velocity.
- jf1uids.fluid_equations.fluid.pressure_from_internal_energy(e, rho, gamma)[source]#
Calculate the pressure from the internal energy.
- Args:
e: The internal energy. rho: The density. gamma: The adiabatic index.
- Returns:
The pressure.
- jf1uids.fluid_equations.fluid.internal_energy_from_energy(E, rho, u)[source]#
Calculate the internal energy from the total energy.
- Args:
E: The total energy. rho: The density. u: The velocity.
- Returns:
The internal energy.
- jf1uids.fluid_equations.fluid.pressure_from_energy(E, rho, u, gamma)[source]#
Calculate the pressure from the total energy.
- Args:
E: The total energy. rho: The density. u: The velocity. gamma: The adiabatic index.
- Returns:
The pressure.