pyrc.core.resistors#
- class CombinedResistor(resistance: float | int | number | Expr = nan, htc: float | int | number | Expr = nan, heat_conduction=True, heat_transfer=True)#
Bases:
ResistorAutomated version of
Resistor, calculating its resistance based on connected objects.The algorithms of this class rely on geometric representations and assume a thermal problem. For most of the algorithms the connected capacities and boundary conditions must inherit from
Cellor at leastGeometric. Using the geometric information let the algorithm figure out which areas/lengths influence the heat transfer and thermal conduction. If you connect aBoundaryCondition(not inheriting from Cell/Geometric) you still can use this class but must define the direction to this BoundaryCondition manually usingmanual_directionsandset_direction()ofTemperatureNode( Capacitor/BoundaryCondition).- Parameters:
resistance (float | int | np.number | sympy.Expr, default=np.nan) – The resistance of self. If set, no algorithm is used (and it would be preferable to use
Resistorclass instead).htc (float | int | np.number | sympy.Expr, default=np.nan) – Heat transfer coefficient that is used, if no other HTC was found (in boundary conditions). If not set, an initial value of 5 is used (raising a warning).
heat_conduction (bool, default=True) – Switch on/off heat conductivity.
heat_transfer (bool, default=True) – Switch on/off heat transfer.
See also
ResistorThe basic Resistor class without the automatics.
- __init__(resistance: float | int | number | Expr = nan, htc: float | int | number | Expr = nan, heat_conduction=True, heat_transfer=True)#
Automated version of
Resistor, calculating its resistance based on connected objects.The algorithms of this class rely on geometric representations and assume a thermal problem. For most of the algorithms the connected capacities and boundary conditions must inherit from
Cellor at leastGeometric. Using the geometric information let the algorithm figure out which areas/lengths influence the heat transfer and thermal conduction. If you connect aBoundaryCondition(not inheriting from Cell/Geometric) you still can use this class but must define the direction to this BoundaryCondition manually usingmanual_directionsandset_direction()ofTemperatureNode( Capacitor/BoundaryCondition).- Parameters:
resistance (float | int | np.number | sympy.Expr, default=np.nan) – The resistance of self. If set, no algorithm is used (and it would be preferable to use
Resistorclass instead).htc (float | int | np.number | sympy.Expr, default=np.nan) – Heat transfer coefficient that is used, if no other HTC was found (in boundary conditions). If not set, an initial value of 5 is used (raising a warning).
heat_conduction (bool, default=True) – Switch on/off heat conductivity.
heat_transfer (bool, default=True) – Switch on/off heat transfer.
See also
ResistorThe basic Resistor class without the automatics.
- property heat_transfer_coefficient#
- property htc#
- property resistance: float | int | Expr#
Determines the resistance accordingly to the nodes the resistor is connected to.
To get this, look at the pictures of Joel Kimmich from 13.8.2025
- class HeatConduction(resistance=nan)#
Bases:
CombinedResistorRepresents the resistance caused by heat conduction.
If the nodes, where the heat conduction takes place, differ in their material (Solid and Fluid) the heat conduction is set to 0 (the resistance is set to np.inf), because the heat conduction is included in HeatTransfer. So calculating it also in HeatConduction it would be taken into account twice. So: Do not forget to create a
HeatTransferResistorbetween such nodes!- Parameters:
resistance (float, default=np.nan) – The resistance. If set, it will not be calculated.
- __init__(resistance=nan)#
Represents the resistance caused by heat conduction.
If the nodes, where the heat conduction takes place, differ in their material (Solid and Fluid) the heat conduction is set to 0 (the resistance is set to np.inf), because the heat conduction is included in HeatTransfer. So calculating it also in HeatConduction it would be taken into account twice. So: Do not forget to create a
HeatTransferResistorbetween such nodes!- Parameters:
resistance (float, default=np.nan) – The resistance. If set, it will not be calculated.
- property htc#
- class HeatRadiation(capacitor_1: TemperatureNode, capacitor_2: TemperatureNode, view_factor_12, view_factor_21, emission_coefficient_1=1, emission_coefficient_2=1, area_1=None, area_2=None)#
Bases:
ResistorCalculates the resistance caused by radiative heat transfer between two capacitors.
This Resistor connects itself to the passed Capacitors. You don’t need to use connect()
In numeric terms, this is redundant work because we first calculate the heat flux to determine the resistance, which we then use in the solver to calculate the heat flux again. However, when analyzing the system from a control engineering perspective, radiative heat transfer should be included in the system matrix (A-matrix) rather than the input matrix (B-matrix). This is different from what would happen if we input the heat flux directly to the capacitor as an internal heat source.
The used equation can be found as equation (17b) in Stephan et al.: ‘VDI-Wärmeatlas’, 2019, Springer Vieweg. Chapter ‘K1 Wärmestrahlung technischer Oberflächen - 2.2 Sichtfaktoren/Einstrahlzahlen’ DOI: https://doi.org/10.1007/978-3-662-52989-8
- Parameters:
capacitor_1 (TemperatureNode) – The first capacitor or BoundaryCondition.
capacitor_2 (TemperatureNode) – The second capacitor or BoundaryCondition.
view_factor_12 (float) – View factor from area of capacitor 1 to area of capacitor 2.
view_factor_21 (float) – View factor from area of capacitor 2 to area of capacitor 1.
emission_coefficient_1 (float, default=1) – Emission coefficient from area of capacitor 1. The same proportion is absorbed (Kirchhoff’s law of thermal radiation)
emission_coefficient_2 (float, default=1) – Emission coefficient from area of capacitor 2. The same proportion is absorbed (Kirchhoff’s law of thermal radiation)
area_1 (float, optional) – The area of the first capacitor that participates in the heat exchange (in m^2).
area_2 (float, optional) – The area of the second capacitor that participates in the heat exchange (in m^2).
- __init__(capacitor_1: TemperatureNode, capacitor_2: TemperatureNode, view_factor_12, view_factor_21, emission_coefficient_1=1, emission_coefficient_2=1, area_1=None, area_2=None)#
Calculates the resistance caused by radiative heat transfer between two capacitors.
This Resistor connects itself to the passed Capacitors. You don’t need to use connect()
In numeric terms, this is redundant work because we first calculate the heat flux to determine the resistance, which we then use in the solver to calculate the heat flux again. However, when analyzing the system from a control engineering perspective, radiative heat transfer should be included in the system matrix (A-matrix) rather than the input matrix (B-matrix). This is different from what would happen if we input the heat flux directly to the capacitor as an internal heat source.
The used equation can be found as equation (17b) in Stephan et al.: ‘VDI-Wärmeatlas’, 2019, Springer Vieweg. Chapter ‘K1 Wärmestrahlung technischer Oberflächen - 2.2 Sichtfaktoren/Einstrahlzahlen’ DOI: https://doi.org/10.1007/978-3-662-52989-8
- Parameters:
capacitor_1 (TemperatureNode) – The first capacitor or BoundaryCondition.
capacitor_2 (TemperatureNode) – The second capacitor or BoundaryCondition.
view_factor_12 (float) – View factor from area of capacitor 1 to area of capacitor 2.
view_factor_21 (float) – View factor from area of capacitor 2 to area of capacitor 1.
emission_coefficient_1 (float, default=1) – Emission coefficient from area of capacitor 1. The same proportion is absorbed (Kirchhoff’s law of thermal radiation)
emission_coefficient_2 (float, default=1) – Emission coefficient from area of capacitor 2. The same proportion is absorbed (Kirchhoff’s law of thermal radiation)
area_1 (float, optional) – The area of the first capacitor that participates in the heat exchange (in m^2).
area_2 (float, optional) – The area of the second capacitor that participates in the heat exchange (in m^2).
- class HeatTransfer(resistance=nan, htc=nan)#
Bases:
CombinedResistorRepresents the resistance caused by heat transfer between a solid and a fluid.
- Parameters:
resistance (float, default=np.nan) – The resistance. If set, it will not be calculated.
- __init__(resistance=nan, htc=nan)#
Represents the resistance caused by heat transfer between a solid and a fluid.
- Parameters:
resistance (float, default=np.nan) – The resistance. If set, it will not be calculated.
- class MassTransport#
Bases:
ResistorRepresents the resistance caused by mass transfer between two
MassFlowNodes.The resistance is calculated automatically.
Be aware that this
Resistordoesn’t care about Courant number at all. This has to be checked in the Handler that starts the simulation.- __init__()#
Represents the resistance caused by mass transfer between two
MassFlowNodes.The resistance is calculated automatically.
Be aware that this
Resistordoesn’t care about Courant number at all. This has to be checked in the Handler that starts the simulation.
- property guess_volume_flow#
- property resistance: float | int#
- property sink: MassFlowNode#
- property source: MassFlowNode#
- property volume_flow#
- resistance_bc_heat_transfer(bc: BoundaryCondition, node: Node)#
Returns the resistance of a heat transfer between FluidBC-Solid Node or SolidBC-Fluid Node.
- Parameters:
bc (BoundaryCondition)
node (Node)
- Return type:
np.float64
- resistance_channel_heat_transfer(channel_node: ChannelNode, node: Node)#