pyrc.core.resistors#
- class CombinedResistor(resistance: float | int | number | Basic = nan, htc: float | int | number | Basic = 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.Basic, optional) – The resistance of self. If set, no algorithm is used (and it would be preferable to use Resistor class instead).
htc (float | int | np.number | sympy.Basic, optional) – 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, optional) – Switch on/off heat conductivity.
heat_transfer (bool, optional) – Switch on/off heat transfer.
- __init__(resistance: float | int | number | Basic = nan, htc: float | int | number | Basic = 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.Basic, optional) – The resistance of self. If set, no algorithm is used (and it would be preferable to use Resistor class instead).
htc (float | int | np.number | sympy.Basic, optional) – 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, optional) – Switch on/off heat conductivity.
heat_transfer (bool, optional) – Switch on/off heat transfer.
- property heat_transfer_coefficient#
- property htc#
- property resistance: float | int#
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, optional) – 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, optional) – The resistance. If set, it will not be calculated.
- property htc#
- class HeatTransfer(resistance=nan, htc=nan)#
Bases:
CombinedResistorRepresents the resistance caused by heat transfer between a solid and a fluid.
- Parameters:
resistance (float, optional) – 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, optional) – 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)#