Skip to content

Commit d88ec11

Browse files
author
Brad Carman
committed
adding equation in Fluid domain to show correct number of equations and states
1 parent 91427ef commit d88ec11

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/stream_connectors.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ end
2828
vars = @variables begin m_flow(t), [connect = Flow] end
2929

3030
# equations ---------------------------
31-
eqs = Equation[]
31+
eqs = Equation[
32+
m_flow ~ 0
33+
]
3234

3335
ODESystem(eqs, t, vars, pars; name)
3436
end
@@ -156,6 +158,7 @@ eqns = [connect(fluid, n1m1.port_a)
156158
0 ~ n1m1.port_a.m_flow + pipe.port_a.m_flow
157159
0 ~ n1m1.source.port1.m_flow - n1m1.port_a.m_flow
158160
0 ~ pipe.port_b.m_flow + sink.port.m_flow
161+
fluid.m_flow ~ 0
159162
n1m1.port_a.P ~ pipe.port_a.P
160163
n1m1.source.port1.P ~ n1m1.port_a.P
161164
n1m1.source.port1.P ~ n1m1.source.P
@@ -328,7 +331,9 @@ end
328331
vars = @variables begin dm(t), [connect = Flow] end
329332

330333
# equations ---------------------------
331-
eqs = Equation[]
334+
eqs = [
335+
dm ~ 0
336+
]
332337

333338
ODESystem(eqs, t, vars, pars; name)
334339
end

0 commit comments

Comments
 (0)