Skip to content

Commit

Permalink
fixed Actuator test
Browse files Browse the repository at this point in the history
  • Loading branch information
Brad Carman committed Jan 13, 2025
1 parent 640d801 commit 83a1f30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Hydraulic/IsothermalCompressible/components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions test/Hydraulic/isothermal_compressible.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 83a1f30

Please sign in to comment.