From a190557f80d717e7ce13af2852c732fc3779648e Mon Sep 17 00:00:00 2001 From: Brad Carman Date: Wed, 17 Jan 2024 05:48:10 -0500 Subject: [PATCH] format --- src/Hydraulic/IsothermalCompressible/components.jl | 11 +++++------ test/Hydraulic/isothermal_compressible.jl | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Hydraulic/IsothermalCompressible/components.jl b/src/Hydraulic/IsothermalCompressible/components.jl index b653ce090..90ee81943 100644 --- a/src/Hydraulic/IsothermalCompressible/components.jl +++ b/src/Hydraulic/IsothermalCompressible/components.jl @@ -673,17 +673,16 @@ dm ────► │ │ area push!(eqs, connect(moving_volume.port, volumes[end].port, pipe_bases[end].port_a)) push!(eqs, connect(pipe_bases[1].port_b, damper.port_a)) - for i in 1:N-1 + for i in 1:(N - 1) push!(eqs, connect(volumes[i].port, pipe_bases[i + 1].port_b, pipe_bases[i].port_a)) end for i in 1:N - - push!(eqs, - volumes[i].dx ~ ifelse((vol >= (i - 1) * (x_max / N) * area) & - (vol < (i) * (x_max / N) * area), - direction*flange.v, 0)) + push!(eqs, + volumes[i].dx ~ ifelse((vol >= (i - 1) * (x_max / N) * area) & + (vol < (i) * (x_max / N) * area), + direction * flange.v, 0)) push!(eqs, pipe_bases[i].x ~ volumes[i].vol / volumes[i].area) end diff --git a/test/Hydraulic/isothermal_compressible.jl b/test/Hydraulic/isothermal_compressible.jl index ffd48dc92..2e2e0c836 100644 --- a/test/Hydraulic/isothermal_compressible.jl +++ b/test/Hydraulic/isothermal_compressible.jl @@ -139,7 +139,6 @@ end for N in [1, 2] for damping_volume in [0.01 * 0.1 * 0.25] - @named system = System(N; damping_volume) s = complete(system) sys = structural_simplify(system)