junction
Modules
return_flow_junction_system module
- class ReturnFlowJunctionSystem(airFlowRateBias=None, **kwargs)[source]
Bases:
SystemA return flow junction system model for combining air flow rates and temperatures.
This model represents a junction that combines multiple return air flows and their temperatures into a single output flow and temperature. The total output flow is the sum of all input flows (plus an optional bias), and the output temperature is the flow-weighted average of the input temperatures.
- Parameters:
airFlowRateBias – Bias to be added to the total flow rate [kg/s].
Mathematical Formulation
The total output flow rate is:
\[\dot{m}_{out} = \sum_{i=1}^{n} \dot{m}_i + b\]- where:
\(\dot{m}_{out}\) is the total output flow rate [kg/s]
\(\dot{m}_i\) are the individual input flow rates [kg/s]
\(n\) is the number of input flows
\(b\) is the optional flow rate bias [kg/s]
The output temperature is the flow-weighted average:
\[T_{out} = \frac{\sum_{i=1}^{n} T_i \dot{m}_i}{\dot{m}_{out}}\]- where:
\(T_{out}\) is the output temperature [°C]
\(T_i\) are the input temperatures [°C]
\(\dot{m}_i\) are the input flow rates [kg/s]
\(\dot{m}_{out}\) is the total output flow rate [kg/s]
- do_step(secondTime, dateTime, step_size, stepIndex)[source]
Do a single step of the system.
- Parameters:
secondTime (float) – The current time in seconds.
dateTime (datetime.datetime) – The current date and time.
step_size (int) – The step size of the simulation in seconds.
stepIndex (int) – The current step index.
- Return type:
None
- initialize(start_time, end_time, step_size, simulator)[source]
Initialize the system.
- Parameters:
start_time (datetime.datetime) – The start time of the simulation.
end_time (datetime.datetime) – The end time of the simulation.
step_size (int) – The step size of the simulation in seconds.
simulator (core.Simulator) – The simulator.
- Return type:
None
- property config
- sp = [<twin4build.translator.translator.SignaturePattern object>]
supply_flow_junction_system module
- class SupplyFlowJunctionSystem(airFlowRateBias=None, **kwargs)[source]
Bases:
SystemA supply flow junction system model for combining air flow rates.
This model represents a junction that combines multiple air flow rates into a single flow rate. It sums all input flow rates and can apply an optional bias to the total flow rate. This is typically used in air handling units to combine flows from different branches.
- Parameters:
airFlowRateBias – Bias to be added to the total flow rate [kg/s].
Mathematical Formulation
The total flow rate is calculated as the sum of all input flow rates plus an optional bias:
\[\dot{m}_{total} = \sum_{i=1}^{n} \dot{m}_i + b\]- where:
\(\dot{m}_{total}\) is the total flow rate [kg/s]
\(\dot{m}_i\) are the individual input flow rates [kg/s]
\(n\) is the number of input flows
\(b\) is the optional flow rate bias [kg/s]
- The bias term can be used to account for:
Measurement errors
Leakage
System losses
Calibration offsets
- do_step(secondTime, dateTime, step_size, stepIndex)[source]
Perform one simulation step.
This method sums all input flow rates and adds the bias to calculate the total flow rate. The input flow rates are provided as a vector, and the output is a scalar representing the total flow rate.
- Parameters:
secondTime (float, optional) – Current simulation time in seconds.
dateTime (datetime, optional) – Current simulation date and time.
step_size (float, optional) – Time step size in seconds.
stepIndex (int, optional) – Current simulation step index.
- Return type:
None
- initialize(start_time, end_time, step_size, simulator)[source]
Initialize the supply flow junction system.
This method is a no-op as the supply flow junction system does not require initialization. The system has no internal state to initialize and performs a simple summation of input flow rates with an optional bias.
- Parameters:
start_time (datetime.datetime) – Start time of the simulation period.
end_time (datetime.datetime) – End time of the simulation period.
step_size (int) – Time step size in seconds.
simulator (core.Simulator) – Simulation model object.
- Return type:
None
- property config
Get the configuration parameters.
- Returns:
Dictionary containing configuration parameters.
- Return type:
dict
- sp = [<twin4build.translator.translator.SignaturePattern object>]