jf1uids._physics_modules._cosmic_rays.cr_fluid_equations#

Module Contents#

Functions#

total_energy_from_primitives_with_crs

Calculates the total energy density from primitive variables in a system with cosmic rays.

gas_pressure_from_primitives_with_crs

Calculates the gas pressure from the primitive state when cosmic rays are considered in the simulation.

total_pressure_from_conserved_with_crs

Calculates the total pressure from the conserved state when cosmic rays are considered in the simulation.

speed_of_sound_crs

Calculates the speed of sound from the primitive state when cosmic rays are considered in the simulation, where c_s = sqrt((gamma_gas * P_gas + gamma_cr * P_CR) / rho)

Data#

API#

jf1uids._physics_modules._cosmic_rays.cr_fluid_equations.gamma_gas = None#
jf1uids._physics_modules._cosmic_rays.cr_fluid_equations.gamma_cr = None#
jf1uids._physics_modules._cosmic_rays.cr_fluid_equations.total_energy_from_primitives_with_crs(primitive_state: jaxtyping.Float[jaxtyping.Array, num_vars num_cells], registered_variables: jf1uids.fluid_equations.registered_variables.RegisteredVariables) jaxtyping.Float[jaxtyping.Array, num_cells][source]#

Calculates the total energy density from primitive variables in a system with cosmic rays.

Args:

primitive_state: Array of primitive variables registered_variables: Object containing indices for accessing different physical quantities

Returns:

Total energy density array

jf1uids._physics_modules._cosmic_rays.cr_fluid_equations.gas_pressure_from_primitives_with_crs(primitive_state: jaxtyping.Float[jaxtyping.Array, num_vars num_cells], registered_variables: jf1uids.fluid_equations.registered_variables.RegisteredVariables) jaxtyping.Float[jaxtyping.Array, num_cells][source]#

Calculates the gas pressure from the primitive state when cosmic rays are considered in the simulation.

Args:

primitive_state: Array of primitive variables registered_variables: Object containing indices for accessing different physical quantities

Returns:

gas pressure

jf1uids._physics_modules._cosmic_rays.cr_fluid_equations.total_pressure_from_conserved_with_crs(conserved_state: jaxtyping.Float[jaxtyping.Array, num_vars num_cells], registered_variables: jf1uids.fluid_equations.registered_variables.RegisteredVariables) jaxtyping.Float[jaxtyping.Array, num_cells][source]#

Calculates the total pressure from the conserved state when cosmic rays are considered in the simulation.

Args:

primitive_state: Array of primitive variables registered_variables: Object containing indices for accessing different physical quantities

Returns:

total pressure

jf1uids._physics_modules._cosmic_rays.cr_fluid_equations.speed_of_sound_crs(primitive_state: jaxtyping.Float[jaxtyping.Array, num_vars num_cells], registered_variables: jf1uids.fluid_equations.registered_variables.RegisteredVariables) jaxtyping.Float[jaxtyping.Array, num_cells][source]#

Calculates the speed of sound from the primitive state when cosmic rays are considered in the simulation, where c_s = sqrt((gamma_gas * P_gas + gamma_cr * P_CR) / rho)

Args:

primitive_state: Array of primitive variables registered_variables: Object containing indices for accessing different physical quantities

Returns:

sound speed