Skip to content

Commit

Permalink
refactor: change defaults to guesses in Thermal
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianM-C committed Sep 24, 2024
1 parent 364ad58 commit 4dcf38a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Thermal/HeatTransfer/ideal_components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Lumped thermal element storing heat
C, [description = "Heat capacity of element"]
end
@variables begin
T(t) = 273.15 + 20
der_T(t)
T(t), [guess = 273.15 + 20]
der_T(t), [guess = 0.0]
end

@equations begin
Expand Down
12 changes: 6 additions & 6 deletions src/Thermal/utils.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@connector HeatPort begin
T(t) = 273.15 + 20.0
Q_flow(t), [connect = Flow]
T(t), [guess = 273.15 + 20.0]
Q_flow(t), [guess = 0.0, connect = Flow]
end
Base.@doc """
HeatPort(; name, T = 273.15 + 20.0, Q_flow = 0.0)
Expand Down Expand Up @@ -35,8 +35,8 @@ flow rate through the element from `port_a` to `port_b`, `Q_flow`.
port_b = HeatPort()
end
@variables begin
dT(t)
Q_flow(t)
dT(t), [guess = 0.0]
Q_flow(t), [guess = 0.0]
end
@equations begin
dT ~ port_a.T - port_b.T
Expand Down Expand Up @@ -69,8 +69,8 @@ flow rate through the element from `solid` to `fluid`, `Q_flow`.
fluid = HeatPort()
end
@variables begin
dT(t)
Q_flow(t)
dT(t), [guess = 0.0]
Q_flow(t), [guess = 0.0]
end
@equations begin
dT ~ solid.T - fluid.T
Expand Down

0 comments on commit 4dcf38a

Please sign in to comment.