Skip to content

Commit 4dcf38a

Browse files
committed
refactor: change defaults to guesses in Thermal
1 parent 364ad58 commit 4dcf38a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Thermal/HeatTransfer/ideal_components.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Lumped thermal element storing heat
2424
C, [description = "Heat capacity of element"]
2525
end
2626
@variables begin
27-
T(t) = 273.15 + 20
28-
der_T(t)
27+
T(t), [guess = 273.15 + 20]
28+
der_T(t), [guess = 0.0]
2929
end
3030

3131
@equations begin

src/Thermal/utils.jl

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@connector HeatPort begin
2-
T(t) = 273.15 + 20.0
3-
Q_flow(t), [connect = Flow]
2+
T(t), [guess = 273.15 + 20.0]
3+
Q_flow(t), [guess = 0.0, connect = Flow]
44
end
55
Base.@doc """
66
HeatPort(; name, T = 273.15 + 20.0, Q_flow = 0.0)
@@ -35,8 +35,8 @@ flow rate through the element from `port_a` to `port_b`, `Q_flow`.
3535
port_b = HeatPort()
3636
end
3737
@variables begin
38-
dT(t)
39-
Q_flow(t)
38+
dT(t), [guess = 0.0]
39+
Q_flow(t), [guess = 0.0]
4040
end
4141
@equations begin
4242
dT ~ port_a.T - port_b.T
@@ -69,8 +69,8 @@ flow rate through the element from `solid` to `fluid`, `Q_flow`.
6969
fluid = HeatPort()
7070
end
7171
@variables begin
72-
dT(t)
73-
Q_flow(t)
72+
dT(t), [guess = 0.0]
73+
Q_flow(t), [guess = 0.0]
7474
end
7575
@equations begin
7676
dT ~ solid.T - fluid.T

0 commit comments

Comments
 (0)