Data Structures¶
This page documents the internal data structures used in turbigen. It is intended as a reference for users extending the program using custom plugins or developers modifying the source code.
Working fluids¶
Both perfect and real working fluids are represented by a State
class, which has a common interface for setting and reading thermodynamic
properties. The interface allows the same mean-line design code to work
with any working fluid. State
does not store velocity information
and hence makes no distinction between static and stagnation states, the
handling of which is left to the calling code.
Setter methods¶
The following methods are used to set the thermodynamic state of the fluid
to a new value. The object is updated in-place; a copy can be explicitly
created using State.copy()
. By the two-property rule, the setters all
take two arguments to uniquely specify the thermodynamic state. The
following methods are available:
Method |
Arguments |
|
---|---|---|
|
Enthalpy |
Entropy |
|
Pressure |
Enthalpy |
|
Pressure |
Density |
|
Pressure |
Entropy |
|
Pressure |
Temperature |
|
Density |
Internal energy |
Property attributes¶
Thermodynamic and transport properties of the fluid are accessed as attributes of the
State
object. The following properties are available:
Property |
Description |
Units |
---|---|---|
|
Acoustic speed |
m/s |
|
Specific heat at constant pressure |
J/kg/K |
|
Specific heat at constant volume |
J/kg/K |
|
Ratio of specific heats |
– |
|
Specific enthalpy |
J/kg |
|
Kinematic viscosity |
m^2/s |
|
Pressure |
Pa |
|
Prandtl number |
– |
|
Specific gas constant |
J/kg/K |
|
Density |
kg/m^3 |
|
Specific entropy |
J/kg/K |
|
Temperature |
K |
|
Specific internal energy |
J/kg |
Flow fields¶
Augmenting a thermodynamic state with velocity and coordinate data
allows the FlowField
class to represent a flow field.
Composite properties such as stagnation pressure and Mach number
can then be computed from the thermodynamic state and velocity vector.
Setting an angular velocity allows evaluation of quantities in a rotating
frame. Circumferential periodicity is represented by a number of blades.
Setter methods¶
The FlowField
class has the same thermodynamic setter methods as
the State
class. Velocity and coordinate data are set directly
by assigning to the corresponding attributes.
Property attributes¶
In addition to all the pure thermodynamic properties defined in
State
, incorporating velocity and coordinate data allow the
FlowField
to provide the following other properties:
Property |
Description |
Units |
---|---|---|
|
Yaw angle |
deg |
|
Relative frame yaw angle |
deg |
|
Stagnation acoustic speed |
m/s |
|
Pitch angle |
deg |
|
Specific total energy |
J/kg |
|
Specific kinetic energy |
J/kg |
|
Relative frame specific kinetic energy |
J/kg |
|
Stagnation specific enthalpy |
J/kg |
|
Relative frame stagnation specific enthalpy |
J/kg |
|
Rothalpy |
J/kg |
|
Mach number |
– |
|
Relative frame Mach number |
– |
|
Reference frame angular velocity |
rad/s |
|
Stagnation pressure |
Pa |
|
Relative frame stagnation pressure |
Pa |
|
Radial coordinate |
m |
|
Volumetric total energy |
J/m^3 |
|
Volumetric angular momentum |
kg/m^2/s |
|
Volumetric radial momentum |
kg/m^2/s |
|
Volumetric angular momentum |
kg/m^2/s |
|
Volumetric axial momentum |
kg/m^2/s |
|
Reference frame revolutions per minute |
rpm |
|
Circumferential coordinate |
rad |
|
Tangent of yaw angle |
– |
|
Tangent of relative frame yaw angle |
– |
|
Tangent of pitch angle |
– |
|
Stagnation temperature |
K |
|
Relative frame stagnation temperature |
K |
|
Blade speed |
m/s |
|
Absolute velocity magnitude |
m/s |
|
Relative frame velocity magnitude |
m/s |
|
Meridional velocity magnitude |
m/s |
|
Radial velocity |
m/s |
|
Circumferential velocity |
m/s |
|
Relative frame circumferential velocity |
m/s |
|
Axial velocity |
m/s |
|
Axial coordinate |
m |
Mean line¶
The MeanLine
class encapsulates the quasi-one-dimensional geometry
and flow field of a turbomachine. In addition to thermodynamic states and
velocity vectors, it also contains a root-mean-square radii and annulus
areas. Assuming the span is perpendicular to the mean-line pitch angle,
These data are sufficient to determine hub and tip radii, and
the midspan blade angles.
Property attributes¶
In addition to the properties defined in
State
and
FlowField
, the MeanLine
class provides the following
Property |
Description |
Units |
---|---|---|
|
Annulus area |
m^2 |
|
Total-to-total polytropic efficiency |
– |
|
Total-to-static isentropic efficiency |
– |
|
Total-to-total isentropic efficiency |
– |
|
Hub-to-tip radius ratio |
– |
|
Mass flow rate |
kg/s |
|
Number of blades |
– |
|
Total-to-static pressure ratio |
– |
|
Total-to-total pressure ratio |
– |
|
Hub radius |
m |
|
Midspan radius |
m |
|
Root-mean-square radius |
m |
|
Tip radius |
m |
|
Span |
m |