126
126
eqns = [connect (n1m1. port_a, pipe. port_a)
127
127
connect (pipe. port_b, sink. port)]
128
128
129
- @named sys = System (eqns, t)
129
+ @named sys = System (eqns, t; systems = [n1m1, pipe, sink] )
130
130
131
131
eqns = [domain_connect (fluid, n1m1. port_a)
132
132
connect (n1m1. port_a, pipe. port_a)
@@ -141,7 +141,7 @@ ssort(eqs) = sort(eqs, by = string)
141
141
0 ~ source. port1. m_flow - port_a. m_flow
142
142
source. port1. P ~ port_a. P
143
143
source. port1. P ~ source. P
144
- source . port1 . h_outflow ~ port_a . h_outflow
144
+ port_a . h_outflow ~ source . port1 . h_outflow
145
145
source. port1. h_outflow ~ source. h])
146
146
@unpack port_a, port_b = pipe
147
147
@test ssort (equations (expand_connections (pipe))) ==
@@ -151,11 +151,11 @@ ssort(eqs) = sort(eqs, by = string)
151
151
port_a. P ~ port_b. P
152
152
port_a. h_outflow ~ instream (port_b. h_outflow)
153
153
port_b. h_outflow ~ instream (port_a. h_outflow)])
154
- @test ssort ( equations (expand_connections (sys))) ==
155
- ssort ( [0 ~ n1m1. port_a. m_flow + pipe. port_a. m_flow
156
- 0 ~ pipe. port_b. m_flow + sink. port. m_flow
157
- n1m1. port_a. P ~ pipe. port_a. P
158
- pipe. port_b. P ~ sink. port. P])
154
+ @test equations (expand_connections (sys)) ⊇
155
+ [0 ~ n1m1. port_a. m_flow + pipe. port_a. m_flow
156
+ 0 ~ pipe. port_b. m_flow + sink. port. m_flow
157
+ n1m1. port_a. P ~ pipe. port_a. P
158
+ pipe. port_b. P ~ sink. port. P]
159
159
@test ssort (equations (expand_connections (n1m1Test))) ==
160
160
ssort ([0 ~ - pipe. port_a. m_flow - pipe. port_b. m_flow
161
161
0 ~ n1m1. source. port1. m_flow - n1m1. port_a. m_flow
@@ -165,7 +165,7 @@ ssort(eqs) = sort(eqs, by = string)
165
165
n1m1. port_a. P ~ pipe. port_a. P
166
166
n1m1. source. port1. P ~ n1m1. port_a. P
167
167
n1m1. source. port1. P ~ n1m1. source. P
168
- n1m1. source . port1 . h_outflow ~ n1m1. port_a . h_outflow
168
+ n1m1. port_a . h_outflow ~ n1m1. source . port1 . h_outflow
169
169
n1m1. source. port1. h_outflow ~ n1m1. source. h
170
170
pipe. port_a. P ~ pipe. port_b. P
171
171
pipe. port_a. h_outflow ~ sink. port. h_outflow
@@ -278,10 +278,8 @@ sys = expand_connections(compose(simple, [vp1, vp2, vp3]))
278
278
@test ssort (equations (sys)) == ssort ([0 .~ collect (vp1. i)
279
279
0 .~ collect (vp2. i)
280
280
0 .~ collect (vp3. i)
281
- vp1. v[1 ] ~ vp2. v[1 ]
282
- vp1. v[2 ] ~ vp2. v[2 ]
283
- vp1. v[1 ] ~ vp3. v[1 ]
284
- vp1. v[2 ] ~ vp3. v[2 ]
281
+ vp1. v ~ vp2. v
282
+ vp1. v ~ vp3. v
285
283
0 ~ - vp1. i[1 ] - vp2. i[1 ] - vp3. i[1 ]
286
284
0 ~ - vp1. i[2 ] - vp2. i[2 ] - vp3. i[2 ]])
287
285
0 commit comments