Fanno Flow Relations¶
High-level API¶
minuteman.cpg.fanno.lookup_table_by_density ¶
lookup_table_by_density(
density_ratio: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat = 1.4
) -> FannoFlowTable
Look up a Fanno flow table result from the density ratio, \(\rho / \rho^*\)
Parameters:
-
density_ratio(ArraylikeFloat) –density ratio, \(\rho / \rho^*\). Bounds: \(\left(\sqrt{\frac{\gamma-1}{\gamma+1}}, \infty \right)\)
-
specific_heat_ratio(ArraylikeFloat, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \([1.0, 1.67]\)
Returns:
-
FannoFlowTable–Fanno flow output table
Raises:
-
OutOfBoundsError–invalid inputs
minuteman.cpg.fanno.lookup_table_by_entropy ¶
lookup_table_by_entropy(
entropy_ratio: ArraylikeFloat,
specific_heat_ratio: ArraylikeFloat = 1.4,
flow_regime: ArraylikeFlowSpeedRegime = FlowSpeedRegime.supersonic,
) -> FannoFlowTable
Look up a Fanno flow table result from the entropy ratio, \((s* - s) / R\)
Parameters:
-
entropy_ratio(ArraylikeFloat) –entropy ratio, \((s* - s) / R\). Bounds: \([0, \infty)\)
-
specific_heat_ratio(ArraylikeFloat, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \([1.0, 1.67]\)
-
flow_regime(ArraylikeFlowSpeedRegime, default:supersonic) –flow speed regime (either supersonic or subsonic).
Returns:
-
FannoFlowTable–Fanno flow output table
Raises:
-
OutOfBoundsError–invalid inputs
minuteman.cpg.fanno.lookup_table_by_fanno_parameter ¶
lookup_table_by_fanno_parameter(
fanno_parameter: ArraylikeFloat,
specific_heat_ratio: ArraylikeFloat = 1.4,
flow_regime: ArraylikeFlowSpeedRegime = FlowSpeedRegime.supersonic,
) -> FannoFlowTable
Look up a Fanno flow table result from the Fanno parameter, \(4 f L^* / D\)
Parameters:
-
fanno_parameter(ArraylikeFloat) –Fanno parameter, \(4 f L^* / D\). Subsonic Bounds: \([0, \infty)\), Supersonic Bounds: \(\left[0, -\frac{1}{\gamma} + \frac{\gamma+1}{2\gamma} \ln\left(\frac{\gamma+1}{\gamma-1}\right) \right)\)
-
specific_heat_ratio(ArraylikeFloat, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \([1.0, 1.67]\)
-
flow_regime(ArraylikeFlowSpeedRegime, default:supersonic) –flow speed regime (either supersonic or subsonic).
Returns:
-
FannoFlowTable–Fanno flow output table
Raises:
-
OutOfBoundsError–invalid inputs
-
InvalidArrayShapeError–input array shapes are incompatible
minuteman.cpg.fanno.lookup_table_by_mach ¶
lookup_table_by_mach(
mach: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat = 1.4
) -> FannoFlowTable
Look up a Fanno flow table result from the Mach number, \(M\)
Parameters:
-
mach(ArraylikeFloat) –Mach number, \(M\). Bounds: \((0, \infty)\)
-
specific_heat_ratio(ArraylikeFloat, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \([1.0, 1.67]\)
Returns:
-
FannoFlowTable–Fanno flow output table
Raises:
-
OutOfBoundsError–invalid inputs
minuteman.cpg.fanno.lookup_table_by_pressure ¶
lookup_table_by_pressure(
pressure_ratio: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat = 1.4
) -> FannoFlowTable
Look up a Fanno flow table result from the static pressure ratio, \(p / p^*\)
Parameters:
-
pressure_ratio(ArraylikeFloat) –static pressure ratio, \(p / p^*\). Bounds: \((0, \infty)\)
-
specific_heat_ratio(ArraylikeFloat, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \([1.0, 1.67]\)
Returns:
-
FannoFlowTable–Fanno flow output table
Raises:
-
OutOfBoundsError–invalid inputs
minuteman.cpg.fanno.lookup_table_by_temperature ¶
lookup_table_by_temperature(
temperature_ratio: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat = 1.4
) -> FannoFlowTable
Look up a Fanno flow table result from the static temperature ratio, \(T / T^*\)
Parameters:
-
temperature_ratio(ArraylikeFloat) –static temperature ratio, \(T / T^*\). Bounds: \(\left(0, \frac{\gamma+1}{2} \right)\)
-
specific_heat_ratio(ArraylikeFloat, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \([1.0, 1.67]\)
Returns:
-
FannoFlowTable–Fanno flow output table
Raises:
-
OutOfBoundsError–invalid inputs
minuteman.cpg.fanno.lookup_table_by_total_pressure ¶
lookup_table_by_total_pressure(
total_pressure_ratio: ArraylikeFloat,
specific_heat_ratio: ArraylikeFloat = 1.4,
flow_regime: ArraylikeFlowSpeedRegime = FlowSpeedRegime.supersonic,
) -> FannoFlowTable
Look up a Fanno flow table result from the total pressure ratio, \(p_0 / p_0^*\)
Parameters:
-
total_pressure_ratio(ArraylikeFloat) –total pressure ratio, \(p_0 / p_0^*\). Bounds: \([1, \infty)\)
-
specific_heat_ratio(ArraylikeFloat, default:1.4) –ratio of specific heats, \(\gamma\). Bounds: \([1.0, 1.67]\)
-
flow_regime(ArraylikeFlowSpeedRegime, default:supersonic) –flow speed regime (either supersonic or subsonic).
Returns:
-
FannoFlowTable–Fanno flow output table
Raises:
-
OutOfBoundsError–invalid inputs
Low-level API¶
minuteman.cpg.fanno.density_ratio_by_mach ¶
density_ratio_by_mach(
mach_initial: ArraylikeFloat, mach_final: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute the density ratio \(\rho_2 / \rho_1\) from the Mach number for Fanno flow.
This is equivalent to velocity ratio \(u_1 / u_2\)
Parameters:
-
mach_initial(ArraylikeFloat) –Initial Mach number, \(M_1\). This is the reference Mach number, \(M^*\), when equal to unity.
-
mach_final(ArraylikeFloat) –Final Mach number, \(M_2\). This is simply the Mach number, \(M\), when
mach_initial==1.0 -
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Density ratio, \(\rho_2 / \rho_1\) (\(\rho / \rho^*\) if \(M_2=1.0\))
minuteman.cpg.fanno.duct_length ¶
duct_length(
fanno_parameter: ArraylikeFloat,
diameter: ArraylikeFloat,
friction_coeff: ArraylikeFloat = 0.005,
) -> NDArrayFloat
Compute duct length \(L\) for a given Fanno parameter \(4 f L / D\).
Parameters:
-
fanno_parameter(ArraylikeFloat) –Fanno flow parameter, \(4 f L / D\)
-
diameter(ArraylikeFloat) –duct diameter, \(D\)
-
friction_coeff(ArraylikeFloat, default:0.005) –average friction coefficient \(f\). Defaults to 0.005. The default holds for \(Re > 1e5\) and surface roughness of \(0.001 D\)
Returns:
-
NDArrayFloat–Duct length \(L\) or \(L^*\)
minuteman.cpg.fanno.entropy_ratio_by_mach ¶
entropy_ratio_by_mach(
mach_initial: ArraylikeFloat, mach_final: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute specific entropy ratio \((s_2 - s_1) / R\) for Fanno flow.
Parameters:
-
mach_initial(ArraylikeFloat) –Mach number at station 1, \(M_1\) (initial or upstream Mach)
-
mach_final(ArraylikeFloat) –Mach number at station 2, \(M_2\) (final or downstream Mach)
-
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Specific entropy ratio, \((s_2 - s_1) / R\)
-
NDArrayFloat–(\((s - s^*) / R\) if
mach_initial==1.0)
minuteman.cpg.fanno.fanno_parameter_by_mach ¶
fanno_parameter_by_mach(
mach_initial: ArraylikeFloat, mach_final: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute Fanno parameter, \(4L f / D\) where \(L=x_2 - x_1\)
Parameters:
-
mach_initial(ArraylikeFloat) –Initial Mach number, \(M_1\). This is simply the Mach number, \(M\), when
mach_final==1.0 -
mach_final(ArraylikeFloat) –Final Mach number, \(M_2\). This is the reference Mach number, \(M^*\), when equal to unity.
-
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Fanno parameter, \(4L f / D\) (\(4 L^* f / D\) if \(M_2=1.0\))
minuteman.cpg.fanno.pressure_ratio_by_mach ¶
pressure_ratio_by_mach(
mach_initial: ArraylikeFloat, mach_final: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute the static pressure ratio \(p_2 / p_1\) from the Mach number \(M\) for Fanno flow.
Parameters:
-
mach_initial(ArraylikeFloat) –Initial Mach number, \(M_1\). This is the reference Mach number, \(M^*\), when equal to unity.
-
mach_final(ArraylikeFloat) –Final Mach number, \(M_2\). This is simply the Mach number, \(M\), when
mach_initial==1.0 -
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Static pressure ratio, \(p_2 / p_1\) (\(p / p^*\) if \(M_2=1.0\))
minuteman.cpg.fanno.temperature_ratio_by_mach ¶
temperature_ratio_by_mach(
mach_initial: ArraylikeFloat, mach_final: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute the static temperature ratio \(T_2 / T_1\) from the Mach number for Fanno flow.
Parameters:
-
mach_initial(ArraylikeFloat) –Initial Mach number, \(M_1\). This is the reference Mach number, \(M^*\), when equal to unity.
-
mach_final(ArraylikeFloat) –Final Mach number, \(M_2\). This is simply the Mach number, \(M\), when
mach_initial==1.0 -
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Static temperature ratio, \(T_2 / T_1\) (\(T / T^*\) if \(M_2=1.0\))
minuteman.cpg.fanno.total_pressure_ratio_by_mach ¶
total_pressure_ratio_by_mach(
mach_initial: ArraylikeFloat, mach_final: ArraylikeFloat, specific_heat_ratio: ArraylikeFloat
) -> NDArrayFloat
Compute total pressure ratio \(p_{02} / p_{01}\) for Fanno flow.
Parameters:
-
mach_initial(ArraylikeFloat) –Initial Mach number, \(M_1\). This is the reference Mach number, \(M^*\), when equal to unity.
-
mach_final(ArraylikeFloat) –Final Mach number, \(M_2\). This is simply the Mach number, \(M\), when
mach_initial==1.0 -
specific_heat_ratio(ArraylikeFloat) –ratio of specific heats, \(\gamma\)
Returns:
-
NDArrayFloat–Total pressure ratio, \(p_{02} / p_{01}\) (\(p_0 / p_0^*\) if \(M_2=1.0\))
Data Structures¶
minuteman.cpg.fanno.FannoFlowTable
dataclass
¶
Fanno flow table where the initial Mach number \(M_1=M^*=1.0\)
mach: NDArrayFloat
instance-attribute
¶
Mach number, \(M\)
temperature_ratio: NDArrayFloat
instance-attribute
¶
Temperature ratio, \(T / T^*\)
pressure_ratio: NDArrayFloat
instance-attribute
¶
Static pressure ratio, \(p / p^*\)
density_ratio: NDArrayFloat
instance-attribute
¶
Density ratio, \(\rho / \rho^*\)
velocity_ratio: NDArrayFloat
property
¶
Velocity ratio, \(u / u^*\)
total_pressure_ratio: NDArrayFloat
instance-attribute
¶
Total pressure ratio, \(p_0 / p_0^*\)
fanno_parameter: NDArrayFloat
instance-attribute
¶
Fanno parameter, \(4 f L^* / D\)
entropy_ratio: NDArrayFloat
instance-attribute
¶
Specific entropy ratio, \((s^* - s) / R\)
specific_heat_ratio: NDArrayFloat
instance-attribute
¶
Ratio of specific heats, \(\gamma\)