File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed
src/Hydraulic/IsothermalCompressible Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 369369 end
370370
371371 @parameters begin
372- area = area
373- dead_volume = dead_volume
372+ area
373+ dead_volume
374+ end
375+
376+ @components begin
377+ port = HydraulicPort ()
374378 end
375379
376380 @variables begin
@@ -381,18 +385,12 @@ end
381385 vol (t)
382386 end
383387
384- @components begin
385- port = HydraulicPort ()
386- end
387-
388388 @equations begin
389- dm = port. dm
390- p = port. p
391389 vol ~ dead_volume + area * x
392390 D (x) ~ dx
393391 D (rho) ~ drho
394- rho ~ full_density (port, p)
395- dm ~ drho * vol * Χ1 + rho * area * dx * Χ2
392+ rho ~ full_density (port, port . p)
393+ port . dm ~ drho * vol * Χ1 + rho * area * dx * Χ2
396394 end
397395
398396end
@@ -414,15 +412,15 @@ Fixed fluid volume.
414412 vol
415413 end
416414
415+ @components begin
416+ port = HydraulicPort (;)
417+ end
418+
417419 @variables begin
418420 rho (t), [guess = liquid_density (port)]
419421 drho (t), [guess = 0 ]
420422 end
421423
422- @components begin
423- port = HydraulicPort ()
424- end
425-
426424 @equations begin
427425 D (rho) ~ drho
428426 rho ~ full_density (port, port. p)
You can’t perform that action at this time.
0 commit comments