From 83a1f30af85e39eb6f9d0ab60c50f7cf377b1db6 Mon Sep 17 00:00:00 2001 From: Brad Carman Date: Mon, 13 Jan 2025 10:24:46 -0500 Subject: [PATCH] fixed Actuator test --- src/Hydraulic/IsothermalCompressible/components.jl | 2 +- test/Hydraulic/isothermal_compressible.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Hydraulic/IsothermalCompressible/components.jl b/src/Hydraulic/IsothermalCompressible/components.jl index ebcef658..20c0e6d6 100644 --- a/src/Hydraulic/IsothermalCompressible/components.jl +++ b/src/Hydraulic/IsothermalCompressible/components.jl @@ -508,7 +508,7 @@ See also [`FixedVolume`](@ref), [`DynamicVolume`](@ref) end """ - DynamicVolume(; p_int, area, x_int = 0, x_max, x_min = 0, x_damp = x_min, direction = +1, perimeter = 2 * sqrt(area * pi), shape_factor = 64, head_factor = 1, Cd = 1e2, Cd_reverse = Cd, name) + DynamicVolume(reversible = false; p_int, area, x_int = 0, x_max, x_min = 0, x_damp = x_min, direction = +1, perimeter = 2 * sqrt(area * pi), shape_factor = 64, head_factor = 1, Cd = 1e2, Cd_reverse = Cd, name) Volume with moving wall with `flange` connector for converting hydraulic energy to 1D mechanical. The `direction` argument aligns the mechanical port with the hydraulic port, useful when connecting two dynamic volumes together in oppsing directions to create an actuator. diff --git a/test/Hydraulic/isothermal_compressible.jl b/test/Hydraulic/isothermal_compressible.jl index 06c92725..a9829d68 100644 --- a/test/Hydraulic/isothermal_compressible.jl +++ b/test/Hydraulic/isothermal_compressible.jl @@ -219,7 +219,7 @@ end systems = @named begin src = IC.FixedPressure(; p = p_s) - valve = IC.SpoolValve2Way(; g, m = m_f, d, Cd, x_int = 0, dx_int = 0) + valve = IC.SpoolValve2Way(; g, m = m_f, d, Cd, x_int = 0) piston = IC.Actuator(; length_a_int = l_1, length_b_int = l_2, @@ -345,7 +345,7 @@ end prob2 = ODEProblem(sys, [], (0, 0.05), [sys.let_gas => 0]) # @time sol1 = solve(prob1, Rodas5P(); abstol=1e-9, reltol=1e-9) #BUG: Using BigFloat gives... ERROR: MethodError: no method matching getindex(::Missing, ::Int64) - @time sol1 = solve(prob1, Rodas5P(); adaptive = false, dt = 1e-6) #TODO: fix BigFloat to implment abstol=1e-9, reltol=1e-9 + @time sol1 = solve(prob1, Rodas5P(); adaptive = false, dt = 1e-6) #TODO: fix BigFloat to implement abstol=1e-9, reltol=1e-9 @time sol2 = solve(prob2, Rodas5P()) # case 1: no negative pressure will only have gravity pulling mass back down