ntrfc.fluid package¶
Submodules¶
ntrfc.fluid.fluid module¶
- ntrfc.fluid.fluid.mach_number(speed, specific_heat_ratio, specific_gas_constant, temperature)¶
Calculates the Mach number at a point in a gas.
Parameters: - speed: the speed of the gas - specific_heat_ratio: the ratio of specific heats for the gas - specific_gas_constant: the specific gas constant for the gas - temperature: the temperature of the gas
Returns: - the Mach number at the point
- ntrfc.fluid.fluid.sutherland_viscosity(temperature, sutherland_constant=1.458e-06, reference_temperature=110.4)¶
Calculate the dynamic viscosity of a gas using Sutherland’s Law.
Parameters: - temperature (float): the temperature of the gas in degrees Kelvin - sutherland_constant (float): the Sutherland’s constant for the gas (default value is for air) - reference_temperature (float): the reference temperature for the gas, in degrees Kelvin (default value is for air)
Returns: - dynamic_viscosity (float): the dynamic viscosity of the gas, in units of square meters per second
- ntrfc.fluid.fluid.total_pressure(kappa, mach_number, pressure)¶
Calculates the total pressure at a point in a gas using the isentropic flow equations. https://www.grc.nasa.gov/www/BGH/isentrop.html
Parameters: - kappa: the ratio of specific heats for the gas at the point - mach_number: the Mach number at the point - pressure: the pressure at the point
Returns: - the total pressure at the point
ntrfc.fluid.isentropic module¶
- ntrfc.fluid.isentropic.isentropic_mach_number(isentropic_pressure, kappa, static_pressure, mach, gas_constant, static_temperature)¶
Calculates the isentropic Mach number.
- Parameters:
isentropic_pressure (float) – Isentropic pressure of the flow.
kappa (float) – Specific heat ratio of the gas.
static_pressure (float) – Static pressure of the flow.
mach (float) – Mach number of the flow.
gas_constant (float) – Gas constant of the gas.
static_temperature (float) – Static temperature of the flow.
- Returns:
Isentropic Mach number.
- Return type:
float
- ntrfc.fluid.isentropic.isentropic_reynolds_number(kappa, specific_gas_constant, chord_length, sutherland_reference_viscosity, mach_number, pressure, temperature, sutherland_reference_temperature)¶
Calculates the isentropic Reynolds number at a point in a gas flow.
Parameters: - kappa: the ratio of specific heats for the gas - specific_gas_constant: the specific gas constant for the gas - chord_length: the chord length of the body or structure - sutherland_reference_viscosity: the Sutherland reference viscosity - mach_number: the Mach number at the point - pressure: the pressure at the reference point - temperature: the temperature at the reference point - velocity_magnitude: the velocity magnitude at the reference point - isobaric_heat_constant: the isobaric heat constant - sutherland_reference_temperature: the Sutherland reference temperature
Returns: - the isentropic Reynolds number at the point
- ntrfc.fluid.isentropic.isentropic_total_temperature(kappa, mach_number, temperature)¶
Calculates the isentropic total temperature at a point in a gas.
https://www.grc.nasa.gov/www/BGH/isentrop.html Eq #7
Parameters: - kappa: the ratio of specific heats for the gas - mach_number: the Mach number at the point - temperature: the temperature at the point
Returns: - the isentropic total temperature at the point
- ntrfc.fluid.isentropic.ma_is(outflow_static_pressure, isentropic_exponent, pressure, velocity, gas_constant, temperature)¶
Calculate the isentropic Mach number at the outflow of a system.
- Parameters:
outflow_static_pressure (float) – static pressure at the outflow (Pa)
isentropic_exponent (float) – isentropic exponent of the gas
pressure (float) – pressure at a reference point in the flow (Pa)
density (float) – density at the reference point (kg/m^3)
velocity (float) – velocity at the reference point (m/s)
gas_constant (float) – gas constant of the gas (J/kg*K)
temperature (float) – temperature at the reference point (K)
- Returns:
isentropic Mach number at the outflow
- Return type:
float
- ntrfc.fluid.isentropic.mach_is_x(kappa, p_blade, p_frestream)¶
- ntrfc.fluid.isentropic.p_is_from_mach(kappa, ma, p_t_is)¶
- ntrfc.fluid.isentropic.p_t_is_from_mach(kappa, mach_number, static_pressure)¶
- ntrfc.fluid.isentropic.temp_is(kappa, ma, Tt)¶
- ntrfc.fluid.isentropic.temp_t_is(kappa, ma, T)¶
ntrfc.fluid.turbulence module¶
- ntrfc.fluid.turbulence.calcFluc(velo)¶
- ntrfc.fluid.turbulence.calcRey(u, v, w)¶
- ntrfc.fluid.turbulence.calcTke(u_2, v_2, w_2)¶
- ntrfc.fluid.turbulence.calcTkeByTu(Tu, Uabs)¶
- ntrfc.fluid.turbulence.calcTu(tke, Uabs)¶