pyskyfire.network.blocks.TurbineBlock

class pyskyfire.network.blocks.TurbineBlock(name: str, st_in: str, st_out: str, P_req_key: str, eta: float, medium: str)

Bases: FluidBlock

digraph inheritance7494bab22f { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [URL="https://docs.python.org/3/library/abc.html#abc.ABC",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Helper class that provides a standard way to create an ABC using"]; "FluidBlock" [URL="FluidBlock.html#pyskyfire.network.blocks.FluidBlock",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base for blocks that transform **fluid** states."]; "ABC" -> "FluidBlock" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TurbineBlock" [URL="TurbineBlock.html#pyskyfire.network.blocks.TurbineBlock",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Single-stage turbine model."]; "FluidBlock" -> "TurbineBlock" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

Single-stage turbine model.

Consumes a required shaft-power signal and computes an outlet state that provides that work at given efficiency.

Parameters:
namestr

Block name.

st_instr

Inlet station key.

st_outstr

Outlet station key.

P_req_keystr

Name of the required power signal [W].

etafloat

Turbine isentropic efficiency (0..1).

mediumstr

CoolProp fluid string.

Attributes:
dp_keystr

Name of the emitted pressure-drop signal.

station_inputs, station_outputs, signal_inputs, signal_outputslist[str]

Network I/O metadata.

See also

TransmissionBlock

Aggregates power demands into the required shaft power.

compute(stations: Dict[str, Station], signals: Dict[str, float]) → tuple[Dict[str, Station], Dict[str, float]]

Compute outlet state delivering the requested shaft power.

Parameters:
stationsdict[str, Station]

Network stations (must contain st_in).

signalsdict[str, float]

Scalar signals (must contain P_req_key).

Returns:
stations_outdict[str, Station]

{st_out: Station} with updated pressure and temperature.

signals_outdict[str, float]

{dp_key: float} pressure drop across the turbine [Pa].

Raises:
ValueError

If inlet mass flow is non-positive, or if no physical expansion can supply the requested power.

Notes

Total-to-total expansion evaluated on enthalpy and entropy rather than on temperature and pressure, so no ideal-gas or constant-c_p assumption is made. The isentropic enthalpy drop w_req / η sets the exit pressure at constant inlet entropy; the actual drop w_req then sets the exit temperature at that pressure.