turboflow.axial_turbine.flow_model module

turboflow.axial_turbine.flow_model.compute_blockage_boundary_layer(blockage_model, Re, chord, opening)[source]

Calculate the blockage factor due to boundary layer displacement thickness.

This function computes the blockage factor caused by the boundary layer displacement thickness at a given flow station. The blockage factor affects mass flow rate calculations effectively reducing the flow area.

The blockage factor can be determined through various methods, including:

  1. Calculation based on a correlation for the displacement thickness of turbulent boundary layer over a flat plate with zero pressure gradient.

  2. Using a numerical value specified directly by the user.

The correlation for turbulent boundary layer displacement thickness over a flat plate is given by [Çengel, 2014]:

\[\delta^* = \frac{0.048}{Re^{1/5}} \times 0.9 \times \text{chord}\]

From this the blockage factor is calculated as

\[\text{blockage_factor} = 2 \times \frac{\delta^*}{\text{opening}}\]
Parameters:
blockage_modelstr or float or None

The method or value for determining the blockage factor. It can be a string specifying a model name (flat_plate_turbulent), a numeric value between 0 and 1 representing the blockage factor directly, or None to use a default calculation method.

Refloat

Reynolds number, used if blockage_model is flat_plate_turbulent.

chordfloat

Chord length, used if blockage_model is flat_plate_turbulent.

openingfloat

Throat opening, used if blockage_model is flat_plate_turbulent.

Returns:
float

The calculated blockage factor, a value between 0 and 1, where 1 indicates full blockage and 0 indicates no blockage.

Raises:
ValueError

If blockage_model is an invalid option, or required parameters for the chosen method are missing.

turboflow.axial_turbine.flow_model.compute_efficiency_breakdown(results)[source]

Compute the loss of total-to-static efficiency due to each various loss component in cascades.

This function calculates the fraction of total-to-static efficiency drop attributed to each loss component in a turbine cascade. A correction factor for the re-heating effect is applied to align the sum of individual cascade losses with the total observed change in enthalpy and ensure consistency with the overall total-to-static efficiency.

Parameters:
resultsdict

The data for the cascades, including plane and cascade specific parameters.

Returns:
pd.DataFrame

A DataFrame containing efficiency drop fractions for each loss type in each cascade. Columns are named as efficiency_drop_{loss_type}, where loss_type includes:

  • profile

  • incidence

  • secondary

  • clearance

  • trailing

turboflow.axial_turbine.flow_model.compute_overall_performance(results, geometry)[source]

Calculate the overall performance metrics of the turbine.

This function extracts necessary values from the results dictionary, performs calculations to determine overall performance metrics, and returns these in a dictionary.

Parameters:
resultsdict

A dictionary containing all necessary information, such as geometry and flow characteristics.

Returns:
dict

An dictionary containing the calculated performance metrics.

turboflow.axial_turbine.flow_model.compute_stage_performance(results)[source]

Calculate the stage performance metrics of the turbine.

This function extracts necessary values from the results dictionary, performs calculations to determine stage performance metrics, and returns these in a dictionary.

Parameters:
resultsdict

A dictionary containing all necessary information, such as geometry and flow characteristics.

Returns:
dict

A dictionary with calculated stage parameters.

turboflow.axial_turbine.flow_model.evaluate_axial_turbine(variables, boundary_conditions, geometry, fluid, model_options, reference_values)[source]

Compute the performance of an axial turbine by evaluating a series of cascades.

The function iterates through each cascade, accumulating data on both performance and residuals used to evaluate the physicality of the flow. Between each cascade, the space between the cascades is modelled to give the input to the next cascade.

The results are organized into a dictionary that includes:

  • cascade: Contains data specific to each cascade in the series, including loss coefficients and critical conditions.

  • plane: Contains data specific to each flow station, including thermodynamic properties and velocity triangles.

  • stage: Contains data specific to each turbine stage, including degree of reaction.

  • geometry: Contains data on the turbine geometry.

  • overall: Summarizes the overall performance of the turbine, including mass flow rate, efficiency and power output.

  • reference_values: Contain supplementary information.

  • residuals: Summarizes the mismatch in the nonlinear system of equations used to model the turbine.

Note

The output of this function can only be regarded as a physically meaningful solution when the equations are fully closed (i.e., all residuals are close to zero). Therefore, this function is intended to be used within a root-finding or optimization algorithm that systematically adjusts the input variables to drive the residuals to zero and close the system of equations.

Parameters:
variablesdict

Dictionary containing flow variable for the cascades.

boundary_conditionsdict

Dictionary containing boundary conditions for the series of cascades.

geometrydict

Dictionary containing geometric parameters of the series of cascades.

fluidobject

A fluid object with methods for thermodynamic property calculations.

model_optionsdict

Dictionary containing various model options.

reference_valuesdict

Dictionary containing reference values for scaling.

Returns:
resultsdict

Dictionary containing the evaluated results, including planes, cascades, stage, overall, and geometry information.

turboflow.axial_turbine.flow_model.evaluate_cascade(cascade_inlet_input, cascade_exit_input, choking_input, fluid, geometry, angular_speed, results, model_options, reference_values)[source]

Evaluate the performance of a cascade configuration.

This function evaluates the cascade performance by considering inlet, throat, and exit planes. It also determines the condition for choking according to the selected choking model, and evaluates if the cascade is choked or not. The results are stored in a dictionary. The function returns a dictionary of residuals that includes the mass balance error at both the inlet and exit, loss coefficient errors, and the residuals related to the critical state and choking condition.

Parameters:
cascade_inlet_inputdict

Input conditions at the cascade inlet.

cascade_throat_inputdict

Input conditions at the cascade throat.

cascade_exit_inputdict

Input conditions at the cascade exit.

critical_cascade_inputdict

Input conditions for critical state evaluation.

fluidobject

A fluid object with methods for thermodynamic property calculations.

geometrydict

Dictionary containing geometric parameters of the cascade.

angular_speedfloat

Angular speed of the cascade.

resultsdict

Dictionary to store the evaluation results.

model_optionsdict

Dictionary containing various model options.

reference_valuesdict

Dictionary containing reference values for normalization.

Returns:
residualsdict

A dictionary containing the residuals of the cascade evaluation.

turboflow.axial_turbine.flow_model.evaluate_cascade_exit(cascade_exit_input, fluid, geometry, inlet_plane, angular_speed, blockage, loss_model)[source]

Evaluate the exit plane of a cascade including velocity triangles, thermodynamic properties, flow characteristics and loss coefficients.

This function calculates performance data at the exit of a cascade based on the cascade geometry, fluid, and flow conditions. It computes velocity triangles, static and stagnation properties, Reynolds and Mach numbers, the mass flow rate and loss coefficients at the exit.

Parameters:
cascade_exit_inputdict

Input parameters specific to the cascade exit, including relative velocity (w), relative flow angle (beta), entropy (s), and rothalpy.

fluidobject

A fluid object with methods for thermodynamic property calculations.

geometrydict

Geometric parameters of the cascade such as chord length, opening, and area.

inlet_planedict

performance data at the inlet plane of the cascade.

angular_speedfloat

Angular speed of the cascade.

blockagestr or float or None

The method or value for determining the throat blockage. It can be a string specifying a model name (flat_plate_turbulent), a numeric value between 0 and 1 representing the blockage factor directly, or None to use a default calculation method.

loss_modelstr

The loss model used for calculating loss coefficients.

Returns:
dict

A dictionary of calculated parameters at the cascade exit.

dict

A dictionary of loss coefficients as calculated by the loss model.

turboflow.axial_turbine.flow_model.evaluate_cascade_inlet(cascade_inlet_input, fluid, geometry, angular_speed)[source]

Evaluate the inlet plane of a cascade including velocity triangles, thermodynamic properties, and flow characteristics.

This function calculates performance data at the inlet of a cascade based on the cascade geometry, fluid, and flow conditions. It computes velocity triangles, static and stagnation properties, Reynolds and Mach numbers, and the mass flow rate at the inlet.

Parameters:
cascade_inlet_inputdict

Input parameters specific to the cascade inlet, including stagnation enthalpy (h0), entropy (s), absolute velocity (v), and flow angle (alpha).

fluidobject

A fluid object with methods for thermodynamic property calculations.

geometrydict

Geometric parameters of the cascade such as radius at the mean inlet (radius_mean_in), chord length, and inlet area (A_in).

angular_speedfloat

Angular speed of the cascade.

Returns:
dict

A dictionary of calculated parameters at the cascade inlet.

turboflow.axial_turbine.flow_model.evaluate_cascade_interspace(h0_exit, v_m_exit, v_t_exit, rho_exit, radius_exit, area_exit, blockage_exit, radius_inlet, area_inlet, fluid)[source]

Calculate the inlet conditions for the next cascade based on the exit conditions of the previous cascade.

This function computes the inlet thermodynamic and velocity conditions for the next cascade using the exit conditions from the previous cascade and the flow equations for the interspace between cascades.

Assumptions:

  • Conservation of stagnation enthalpy

  • Conservation of angular momentum

  • Negligible change in density

Parameters:
h0_exitfloat

Stagnation enthalpy at the exit of the previous cascade.

v_m_exitfloat

Meridional component of velocity at the exit of the previous cascade.

v_t_exitfloat

Tangential component of velocity at the exit of the previous cascade.

rho_exitfloat

Fluid density at the exit of the previous cascade.

radius_exitfloat

Radius at the exit of the previous cascade.

area_exitfloat

Flow area at the exit of the previous cascade.

radius_inletfloat

Radius at the inlet of the next cascade.

area_inletfloat

Flow area at the inlet of the next cascade.

fluidobject

A fluid object with methods for thermodynamic property calculations.

Returns:
float

Stagnation enthalpy at the inlet of the next cascade.

float

Entropy at the inlet of the next cascade.

float

Flow angle at the inlet of the next cascade (in degrees).

float

Velocity at the inlet of the next cascade.

Warning

The assumption of constant density leads to a small inconsistency in the thermodynamic state, manifesting as a slight variation in entropy across the interspace. In future versions of the code, it is recommended to evaluate the interspace with a 1D model for the flow in annular ducts to improve accuracy and consistency in the analysis.

turboflow.axial_turbine.flow_model.evaluate_cascade_throat(cascade_throat_input, fluid, geometry, inlet_plane, angular_speed, blockage, loss_model)[source]

Evaluate the throat plane of a cascade including velocity triangles, thermodynamic properties, flow characteristics and loss coefficients.

This function calculates performance data at the throat of a cascade based on the cascade geometry, fluid, and flow conditions. It computes velocity triangles, static and stagnation properties, Reynolds and Mach numbers, the mass flow rate and loss coefficients at the throat.

Parameters:
cascade_throat_inputdict

Input parameters specific to the cascade throat, including relative velocity (w), relative flow angle (beta), entropy (s), and rothalpy.

fluidobject

A fluid object with methods for thermodynamic property calculations.

geometrydict

Geometric parameters of the cascade such as chord length, opening, and area.

inlet_planedict

performance data at the inlet plane of the cascade.

angular_speedfloat

Angular speed of the cascade.

blockagestr or float or None

The method or value for determining the throat blockage. It can be a string specifying a model name (flat_plate_turbulent), a numeric value between 0 and 1 representing the blockage factor directly, or None to use a default calculation method.

loss_modelstr

The loss model used for calculating loss coefficients.

Returns:
dict

A dictionary of calculated parameters at the cascade throat.

dict

A dictionary of loss coefficients as calculated by the loss model.

turboflow.axial_turbine.flow_model.evaluate_velocity_triangle_in(blade_speed, v, alpha)[source]

Compute the velocity triangle at the inlet of the cascade.

This function calculates the components of the velocity triangle at the inlet of a cascade, based on the blade speed, absolute velocity, and absolute flow angle. It computes both the absolute and relative velocity components in the meridional and tangential directions, as well as the relative flow angle.

Parameters:
blade_speedfloat

Blade speed.

vfloat

Absolute velocity.

alphafloat

Absolute flow angle in radians.

Returns:
dict

A dictionary containing the following properties:

  • blade_speed (float): Blade velocity.

  • v (float): Absolute velocity.

  • v_m (float): Meridional component of absolute velocity.

  • v_t (float): Tangential component of absolute velocity.

  • alpha (float): Absolute flow angle in radians.

  • w (float): Relative velocity magnitude.

  • w_m (float): Meridional component of relative velocity.

  • w_t (float): Tangential component of relative velocity.

  • beta (float): Relative flow angle in radians.

turboflow.axial_turbine.flow_model.evaluate_velocity_triangle_out(blade_speed, w, beta)[source]

Compute the velocity triangle at the outlet of the cascade.

This function calculates the components of the velocity triangle at the outlet of a cascade, based on the blade speed, relative velocity, and relative flow angle. It computes both the absolute and relative velocity components in the meridional and tangential directions, as well as the absolute flow angle.

Parameters:
blade_speedfloat

Blade speed.

wfloat

Relative velocity.

betafloat

Relative flow angle in radians.

Returns:
dict

A dictionary containing the following properties:

  • blade_speed (float): Blade velocity.

  • v (float): Absolute velocity.

  • v_m (float): Meridional component of absolute velocity.

  • v_t (float): Tangential component of absolute velocity.

  • alpha (float): Absolute flow angle in radians.

  • w (float): Relative velocity magnitude.

  • w_m (float): Meridional component of relative velocity.

  • w_t (float): Tangential component of relative velocity.

  • beta (float): Relative flow angle in radians.