pyrc.postprocessing.calculations#

class SimpleHeatFlux(time_filtered_temp_matrix: ndarray, time_filtered_input_matrix: ndarray)#

Bases: object

Do not filter the columns! Otherwise, the algorithms won’t work anymore.

Parameters:
  • time_filtered_temp_matrix

  • time_filtered_input_matrix

__init__(time_filtered_temp_matrix: ndarray, time_filtered_input_matrix: ndarray)#

Do not filter the columns! Otherwise, the algorithms won’t work anymore.

Parameters:
  • time_filtered_temp_matrix

  • time_filtered_input_matrix

boundary(boundary: BoundaryCondition) ndarray#
calculate_heat_flux(node, resistors: list | Resistor, raise_error_instead_of_warning=False) ndarray | float#

Returns the heat flux going into the node by the passed resistors.

Attention: It uses the equivalent resistance for both serial and parallel resistors. To prevent double calculation do only pass one Resistor to a Node

Parameters:
  • node (NoteTemplate) – The Node of which the heat flux is being calculated.

  • resistors (list | Resistor) – The resistors used to calculate the heat flow. They should be connected to node.

  • raise_error_instead_of_warning (bool, optional) – If True, an error is raised instead of a warning when a heat flux is calculated to a Node that was already considered.

Returns:

The heat fluxes for every time step.

Return type:

float | np.ndarray

channel_heat_flux(distributor: MassFlowNode, collector: MassFlowNode)#

Returns the heat flux between distributor and collector.

Parameters:
Returns:

The heat flux between distributor and collector.

Return type:

np.ndarray

heat_flux_directions(nodes: list[Capacitor], directions: list | ndarray = array([0, 0, -1]), except_resistor_types=None) tuple | 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[Capacitor]) – 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

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) ndarray#

Returns the values for the internal heat sources out of the input matrix.

Parameters:

ihc (list | InternalHeatSource) – The InternalHeatSource s to get the values from.

Returns:

The values. Vector if one IHS is passed, matrix otherwise (time steps x IHS).

Return type:

np.ndarray

preheat(distributor: MassFlowNode, collector: MassFlowNode)#

Returns the preheat in Kelvin.

Return type:

np.ndarray