You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When one forget to add the fixed variable one gets a MethodError. However does should be an AssertationError.
@variables ω1, ω2, ωₘ, t, ω, F, γ, λ, x(t), y(t);
eqs = [d(x, t, 2) + (ω1^2- λ *cos(ωₘ * t)) * x + γ *d(x, t) - λ *cos(ωₘ * t) * y,
d(y, t, 2) + (ω2^2- λ *cos(ωₘ * t))y + γ *d(y, t) - λ *cos(ωₘ * t) * x] - [F *cos(ω * t), 0.0]
diff_eq =DifferentialEquation(eqs, [x, y])
add_harmonic!(diff_eq, x, ω) # drive frequency, close to ω1add_harmonic!(diff_eq, y, ω) # ωₘ will be close ω2 - ω1 to response at the upper sidebandadd_harmonic!(diff_eq, x, ω + ωₘ) # ωₘ will be close ω2 - ω1 to response at the upper sidebandadd_harmonic!(diff_eq, x, ω - ωₘ)
add_harmonic!(diff_eq, y, ω + ωₘ)
add_harmonic!(diff_eq, y, ω - ωₘ)
add_harmonic!(diff_eq, x, ω +2* ωₘ)
add_harmonic!(diff_eq, x, ω -2* ωₘ)
add_harmonic!(diff_eq, y, ω +2* ωₘ)
add_harmonic!(diff_eq, y, ω -2* ωₘ)
add_harmonic!(diff_eq, x, ω +3* ωₘ)
add_harmonic!(diff_eq, x, ω -3* ωₘ)
add_harmonic!(diff_eq, y, ω +3* ωₘ)
add_harmonic!(diff_eq, y, ω -3* ωₘ)
add_harmonic!(diff_eq, x, ω +4* ωₘ)
add_harmonic!(diff_eq, x, ω -4* ωₘ)
add_harmonic!(diff_eq, y, ω +4* ωₘ)
add_harmonic!(diff_eq, y, ω -4* ωₘ)
fixed = (ω1 =>0.95, ω2 =>1.05, ωₘ =>0.1, γ =>0.005, λ =>0.0, F =>1e-4) # fixed parameters
varied = ω =>range(0.7, 1.3, 100) # range of parameter values
result =get_steady_states(harmonic_eq, varied, threading=true)
MethodError: no method matching filter(::HarmonicBalance.var"#91#93", ::Pair{Symbolics.Num, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}})
The function`filter` exists, but no method is defined for this combination of argument types.
Closest candidates are:filter(::Function, ::DataStructures.LinkedList{T}) where T
@ DataStructures ~/.julia/packages/DataStructures/95DJa/src/list.jl:81filter(::Function, ::DataStructures.MutableLinkedList{T}) where T
@ DataStructures ~/.julia/packages/DataStructures/95DJa/src/mutable_list.jl:92filter(::Any, ::AbstractSet)
@ Base abstractset.jl:624...
Stacktrace:
[1] get_steady_states(p::HarmonicEquation, pairs::Pair{Symbolics.Num, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}; kwargs::@Kwargs{threading::Bool})
@ HarmonicBalance ~/.julia/packages/HarmonicBalance/0J1i1/src/solve_homotopy.jl:180
[2] top-level scope
@ In[20]:3
The text was updated successfully, but these errors were encountered:
When one forget to add the fixed variable one gets a MethodError. However does should be an AssertationError.
The text was updated successfully, but these errors were encountered: