pyrc.postprocessing.heat#
- class HeatFlux(rc_solution: RCSolution = <pyrc.core.components.templates.RCSolution object>)#
Bases:
object- boundary(boundary: BoundaryCondition, time_step_index=None)#
- calculate_heat_flux(node, resistors: list | Resistor, time_step_index=None) np.ndarray | float#
Returns the heat flux going into the node by the passed resistors.
- Parameters:
node (NoteTemplate) – The Node of which the heat flux is being calculated.
resistors (list | Resistor) – The resistors used to calculate the heat flow.
time_step_index (int | slice | list, optional) – The time steps that should be calculated. If None, all are calculated.
- Returns:
The heat fluxes for every time step.
- Return type:
float | np.ndarray
- heat_flux_directions(nodes: list[Node], directions: list | np.ndarray = array([0, 0, -1]), except_resistor_types=None, time_step_index=None) tuple | np.ndarray#
Returns the heat flux through the layer in the desired direction of all nodes in the given list.
E.g. if the direction is (0,0,1) the heat flux in positive z direction is calculated. The heat flux is positive if going in the same direction as the desired one.
- Parameters:
nodes (list[Node]) – The Nodes of which the heat flux is being calculated.
directions (list | np.ndarray, optional) – The direction(s) in which the heat flux is calculated. Can be a list then each direction is calculated and returned.
except_resistor_types
time_step_index
- Returns:
The result of one direction as np.ndarray or the result of all directions as tuple.
- Return type:
np.ndarray | tuple
- internal_heat_source(ihc: InternalHeatSource | list, time_step_index=None)#
- parse_time_step_index(time_step_index)#
- preheat(distributor: MassFlowNode, collector: MassFlowNode)#
Returns the preheat in Kelvin.
- Return type:
np.ndarray
- fluxes_data(boundaries: list = None, boundaries_sum: list = None, time_step_index=None, balance: bool = False, rc_solution: RCSolution = None)#
- get_accumulated_heat_flux(node: Capacitor)#
Sums up the heat flux of all connected resistors.
Used to get the heat flux that is brought in through
BoundaryConditions.- Parameters:
node (NoteTemplate) – The Node of which the heat flux is being calculated. For this, all connected resistors are summed up.
- Returns:
The heat flux of all connected resistors.
- Return type:
float
- plot_channel_balance(channel_nodes: list[Node] | ChannelNode, distributor: MassFlowNode, collector: MassFlowNode, time_step_index=None, start_date=datetime.datetime(2023, 1, 1, 0, 0), y_scale=1)#
Plots the balance of the given channel nodes.
- Parameters:
channel_nodes (list[ChannelNode] | ChannelNode) – The channel nodes to plot the sum of.
distributor (MassFlowNode) – The distributor before the channel nodes. Used to calculate the heat flux that goes into the mass flow within the channel nodes.
collector (MassFlowNode) – The collector after the channel nodes. Used to calculate the heat flux that goes into the mass flow within the channel nodes.
time_step_index (int | slice | list, optional) – The time steps that should be calculated.
- plot_fluxes_accumulated(boundaries: list = None, boundaries_sum: list = None, time_step_index=None, plot_balance: bool = False)#