Fanno Flow

gas_dynamics.fanno.fanno.stagnation_enthalpy(enthalpy: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the stagnation enthalpy

Notes

Given the fluid state and a given enthalpy, return its stagnation enthalpy

Parameters
  • enthalpy (float) – The enthalpy of the fluid

  • gas (fluid) – A user defined fluid object

Returns

Stagnation enthalpy

Return type

float

Examples

gas_dynamics.fanno.fanno.fanno_temperature_ratio(mach_initial: float, mach_final: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the temperature ratio for a fanno flow given two Mach numbers

Notes

Given the two Mach numbers of a constant area adiabatic duct under the influence of friction alone, return the temperature ratio of region two over region one. Default fluid is air.

Parameters
  • mach_initial (flaot) – The mach number at region 1

  • mach_final (float) – The mach number at region 2

  • gas (fluid) – A user defined fluid object. Default is air

Returns

the fanno Temperature ratio T2 / T1

Return type

float

Examples

>>> import gas_dynamics as gd
>>> mach_initial, mach_final = 1.2, 1
>>> T2_T1 = gd.fanno_temperature_ratio(mach_final,mach_initial)
>>> T2_T1
0.9316770186335405
>>>
gas_dynamics.fanno.fanno.fanno_pressure_ratio(mach_initial: float, mach_final: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the pressure ratio for a fanno flow given two Mach numbers

Notes

Given the two Mach numbers of a constant area adiabatic duct under the influence of friction alone, return the pressure ratio of region two over region one. Default fluid is air.

Parameters
  • mach_initial (flaot) – The mach number at region 1

  • mach_final (float) – The mach number at region 2

  • gas (fluid) – A user defined fluid object. Default is air

Returns

the fanno pressure ratio p2 / p1

Return type

float

Examples

>>> import gas_dynamics as gd
>>> mach_initial, mach_final = 1.2, 1
>>> p2_p1 = gd.fanno_pressure_ratio(mach_initial,mach_final)
>>> p2_p1
1.243221621433604
>>>
gas_dynamics.fanno.fanno.fanno_density_ratio(mach_initial: float, mach_final: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the density ratio for a fanno flow given two Mach numbers

Notes

Given the two Mach numbers of a constant area adiabatic duct under the influence of friction alone, return the density ratio of region two over region one. Default fluid is air.

Parameters
  • mach_initial (flaot) – The mach number at region 1

  • mach_final (float) – The mach number at region 2

  • gas (fluid) – A user defined fluid object. Default is air

Returns

The fanno density ratio rho2 / rho1

Return type

float

Examples

>>> import gas_dynamics as gd
>>> mach_initial, mach_final = 1.2, 1
>>> rho2_rho1 = gd.fanno_density_ratio(mach_final,mach_initial)
>>> rho2_rho1
0.8633483482177806
>>>
gas_dynamics.fanno.fanno.fanno_stagnation_pressure_ratio(mach_initial: float, mach_final: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the stagnation pressure ratio pt2/pt1 for a fanno flow given two mach numbers

Notes

Given the two Mach numbers of a constant area adiabatic duct under the influence of friction alone, return the stagnation pressure ratio of region two over region one. Default fluid is air.

Parameters
  • mach_initial (flaot) – The mach number at region 1

  • mach_final (float) – The mach number at region 2

  • gas (fluid) – A user defined fluid object. Default is air

Returns

The fanno stagnation pressure ratio pt2 / pt1

Return type

float

Examples

>>> import gas_dynamics as gd
>>> mach_initial, mach_final = 1.2, 1
>>> pt2_pt1 = gd.fanno_stagnation_pressure_ratio(mach_final,mach_initial)
>>> pt2_pt1
1.0304397530864196
>>>
gas_dynamics.fanno.fanno.fanno_temperature_star_ratio(mach: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the ratio of temperature over temperature where Mach equals one

Notes

Given a Mach number of a constant area adiabatic duct under the influence of friction alone, return the temperature ratio of region two over region one where Mach in region one equals one. Default fluid is air.

Parameters
  • mach (float) – The mach number

  • gas (fluid) – The user defined fluid object

Returns

The fanno temperature ratio T / T*

Return type

float

Examples

>>> import gas_dynamics as gd
>>> M = 1.2
>>> gd.fanno_temperature_star_ratio(M)
0.9316770186335405
>>>
gas_dynamics.fanno.fanno.fanno_pressure_star_ratio(mach: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the ratio of pressure over pressure where Mach equals one

Notes

Given a Mach number of a constant area adiabatic duct under the influence of friction alone, return the pressure ratio of region two over region one where Mach in region one equals one. Default fluid is air.

Parameters
  • mach (float) – The mach number

  • gas (fluid) – The user defined fluid object

Returns

The fanno pressure ratio p / p*

Return type

float

Examples

>>> import gas_dynamics as gd
>>> M = 1.2
>>> gd.fanno_pressure_star_ratio(M)
0.8043618151097336
>>>
gas_dynamics.fanno.fanno.fanno_density_star_ratio(mach: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the ratio of density over density where Mach equals one

Notes

Given a Mach number of a constant area adiabatic duct under the influence of friction alone, return the density ratio of region two over region one where Mach in region one equals one. Default fluid is air.

Parameters
  • mach (float) – The mach number

  • gas (fluid) – The user defined fluid object

Returns

The fanno density ratio rho / rho*

Return type

float

Examples

>>> import gas_dynamics as gd
>>> M = 1.2
>>> gd.fanno_density_star_ratio(M)
0.8633483482177806
>>>
gas_dynamics.fanno.fanno.fanno_velocity_star_ratio(mach: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the ratio of velocity over velocity where Mach equals one

Notes

Given a Mach number of a constant area adiabatic duct under the influence of friction alone, return the velocity ratio of region two over region one where Mach in region two equals one. Default fluid is air.

Parameters
  • mach (float) – The mach number

  • gas (fluid) – The user defined fluid object

Returns

The fanno velocity ratio V / V*

Return type

float

Examples

>>> import gas_dynamics as gd
>>> M = 1.2
>>> v_vstar = gd.fanno_velocity_star_ratio(M)
>>> v_vstar
1.1582810137580164
>>>
gas_dynamics.fanno.fanno.fanno_parameter(mach_initial: float, mach_final: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the product of friction factor and length divided by diameter for two Mach numbers

Notes

Given the two Mach numbers of a constant area adiabatic duct under the influence of friction alone, return the fanno parameter that describes that system where fanno parameter is the product of friction factor and length over diameter. Default fluid is air.

Parameters
  • mach_initial (flaot) – The mach number at region 1

  • mach_final (float) – The mach number at region 2

  • gas (fluid) – The user defined fluid object

Returns

The fanno parameter f(x2-x1)/D

Return type

float

Examples

>>> import gas_dynamics as gd
>>> mach_initial, mach_final = 3, 2
>>> fanno = gd.fanno_parameter(mach_initial, mach_final)
>>> fanno
0.21716290559704166
>>>
gas_dynamics.fanno.fanno.fanno_parameter_max(mach: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the maximum product of friction factor and length divided by diameter

Notes

Given a Mach number of a constant area adiabatic duct under the influence of friction alone, determine the maximum length to diameter ratio for a fluid to reach a Mach number of 1. Default fluid is air.

Parameters
  • M (float) – The starting Mach number

  • gas (fluid) – The user defined fluid object

Returns

The maximum fanno parameter f(x*-x)/D

Return type

float

Examples

>>> import gas_dynamics as gd
>>> M = 2
>>> fanno_max = gd.fanno_parameter_max(M)
>>> fanno_max
0.3049965025814798
>>>
gas_dynamics.fanno.fanno.mach_from_fanno(fanno: float, mach_initial: float, gas=<gas_dynamics.fluids.fluid object>) float

Return the Mach number that would result from the fanno parameter and initial mach number

Notes

Given the Mach number and fanno parameter that describes that system, return the resulting mach number. Default fluid is air.

Parameters
  • fanno (float) – The fanno parameter for the system

  • mach_initial (float) – The starting Mach number

  • gas (fluid) – The user defined fluid object

Returns

The resulting Mach number

Return type

Float

Examples

>>> import gas_dynamics as gd
>>> fanno, mach_initial = .3, 2.64
>>> mach_final = gd.mach_from_fanno(fanno=fanno, mach_initial=mach_initial)
>>> mach_final
1.567008305615555
>>>