Reputation: 11
I am unsure how to correct this issue. I have tried to compare number of methods and I believe this should work, but I am unsure where my issue is. I am using Julia 1.0.5
Upvotes: 1
Views: 5576
Reputation: 1365
The error message is telling you that you are calling a function that takes 8 arguments, but you are only giving it 7 arguments. It can be translated as:
"I cannot find a method for this function that takes 7 arguments. As a suggestion, this other method takes 8 arguments."
To fix this, check again what arguments you need to pass to the function PitchHeave
.
If you are looking at the package ViscousFlow.jl
, I think there may be an error on the example you are trying to use.
According to the source code found in here, you need to add the phase of the have as well. You can try something like this.
a = 0.25 # location of pitch axis, a = 0.5 is leading edge
ϕ = -π/2 # phase lag of pitch to heave
A = 0.25 # amplitude/chord
fstar = 1/π # fc/U
α₀ = 0 # mean angle of attack
Δα = 0.0 #10π/180 # amplitude of pitching
U₀ = 0.0 # translational motion (set to zero in place of free stream)
ϕh = -π/2 # phase lag of the heave # **This is the new part**
K = π*fstar # reduced frequency, K = πfc/U
oscil = RigidBodyMotions.PitchHeave(U₀,a,K,ϕ,α₀,Δα,A,ϕh);
Note that I added a second phase, which I added when calling the function.
Additionally, if you have a github account, I suggest you submit an issue on their github reporting the faulty example.
P.S, please remove the images and write test in your answer.
Upvotes: 2