Skip to content

Commit c1b579e

Browse files
committed
IfElse.ifelse statement added to thermal FixedHeatFlow
1 parent c6387ad commit c1b579e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Thermal/HeatTransfer/sources.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ the component FixedHeatFlow is connected, if parameter `Q_flow` is positive.
2828
end
2929

3030
@equations begin
31-
port.Q_flow ~ -Q_flow * (1 + alpha * (port.T - T_ref))
31+
port.Q_flow ~ IfElse.ifelse(alpha == 0.0,
32+
-Q_flow, # Simplified equation when alpha is 0
33+
-Q_flow * (1 + alpha * (port.T - T_ref))) # Temperature-dependent equation
3234
end
3335
end
3436

0 commit comments

Comments
 (0)