pub struct Stream {
pub capacitance_rate: CapacitanceRate,
pub inlet_temperature: ThermodynamicTemperature,
pub outlet_temperature: ThermodynamicTemperature,
pub heat_flow: HeatFlow,
}Expand description
A fully-resolved heat exchanger stream.
Fields§
§capacitance_rate: CapacitanceRateEffective capacitance rate for the stream.
inlet_temperature: ThermodynamicTemperatureTemperature at the exchanger inlet.
outlet_temperature: ThermodynamicTemperatureTemperature after the stream leaves the exchanger.
When the capacitance rate tends to infinity this matches the inlet temperature.
heat_flow: HeatFlowNet heat flow direction and magnitude for the stream.
Implementations§
Source§impl Stream
impl Stream
Sourcepub fn new_from_heat_flow(
capacitance_rate: CapacitanceRate,
inlet_temperature: ThermodynamicTemperature,
heat_flow: HeatFlow,
) -> Self
pub fn new_from_heat_flow( capacitance_rate: CapacitanceRate, inlet_temperature: ThermodynamicTemperature, heat_flow: HeatFlow, ) -> Self
Construct a fully-resolved stream from a known heat flow.
Given the stream’s inlet temperature, capacitance rate, and heat flow,
this calculates the outlet temperature using the energy balance:
Q = C * (T_out - T_in).
This constructor is useful when you know the heat transfer rate for a stream (for example, from measurements or system specifications) and need to determine the resulting outlet temperature.
Sourcepub fn new_from_outlet_temperature(
capacitance_rate: CapacitanceRate,
inlet_temperature: ThermodynamicTemperature,
outlet_temperature: ThermodynamicTemperature,
) -> Self
pub fn new_from_outlet_temperature( capacitance_rate: CapacitanceRate, inlet_temperature: ThermodynamicTemperature, outlet_temperature: ThermodynamicTemperature, ) -> Self
Construct a fully-resolved stream from known inlet and outlet temperatures.
Given the stream’s inlet and outlet temperatures along with its capacitance rate,
this calculates the heat flow using the energy balance: Q = C * (T_out - T_in).
The heat flow direction is automatically determined from the temperature change:
- If outlet > inlet, the heat flow is
HeatFlow::In - If outlet < inlet, the heat flow is
HeatFlow::Out - If outlet = inlet, the heat flow is
HeatFlow::None
This constructor is useful when you know both inlet and outlet temperatures for a stream (for example, from measurements) and need to determine the heat transfer rate.
§Panics
Panics if the temperatures cannot be compared (e.g., contain NaN values) or if the calculated heat rate magnitude is invalid (which should not occur in normal use).