Skip to content

Commit

Permalink
Merge pull request #71 from jake484/main
Browse files Browse the repository at this point in the history
add output prop
  • Loading branch information
jake484 authored Apr 17, 2024
2 parents 9be85fb + 1990d70 commit 8107e44
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
14 changes: 7 additions & 7 deletions src/lib/EconomyGCDModel_A1/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ The port through which money flows.
α = α
end
sts = @variables begin
p(t) = 0.8
w(t) = 1.2
l(t) = 0.8
c(t) = 1.22
𝛌₁(t) = -0.1
𝛌₂(t) = -0.3
𝛌₃(t) = 0.4
(p(t)=0.8, [output = true])
(w(t)=1.2, [output = true])
(l(t)=0.8, [output = true])
(c(t)=1.22, [output = true])
(𝛌₁(t)=-0.1, [output = true])
(𝛌₂(t)=-0.3, [output = true])
(𝛌₃(t)=0.4, [output = true])
end
ODESystem(Equation[], t, sts, ps; name=name)
end
2 changes: 1 addition & 1 deletion src/lib/HVAC/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A pipe port(inlet or outlet) in an pipe network.
sts = @variables begin
p(t) = 1.013e5
(qm(t)=1, [connect = Flow])
T(t)=T0
(T(t)=T0, [output = true])
end
ODESystem(Equation[], t, sts, []; name=name)
end
26 changes: 16 additions & 10 deletions src/lib/ThermodynamicCycle/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ There are five states in a node: pressure, enthalpy, temperature, density, entro
- `s(t)`: [`J/(kg·K)`] The entropy at this node
"""
@connector function StreamNode(; name)
sts = @variables begin
p(t) = 1.0e5
h(t) = 1.0e5
T(t) = 300.0
ρ(t) = 1.0e5
s(t) = 1.0e5
end
ODESystem(Equation[], t, sts, []; name=name)
@connector StreamNode begin
p(t) = 1.0e5, [output = true]
h(t) = 1.0e5, [output = true]
T(t) = 300.0, [output = true]
ρ(t) = 1.0e5, [output = true]
s(t) = 1.0e5, [output = true]
end

# @connector function StreamNode(; name)
# sts = @variables begin
# p(t) = 1.0e5
# h(t) = 1.0e5, [output = true]
# T(t) = 300.0, [output = true]
# ρ(t) = 1.0e5, [output = true]
# s(t) = 1.0e5, [output = true]
# end
# ODESystem(Equation[], t, sts, []; name=name)
# end

"""
$(TYPEDSIGNATURES)
Expand Down

0 comments on commit 8107e44

Please sign in to comment.