FLOWVLM icon indicating copy to clipboard operation
FLOWVLM copied to clipboard

Error while running the flappingwing function

Open M4H1-K opened this issue 11 months ago • 3 comments

While running the flappingwing function, it gives the following error:

julia> flappingwing()
*******************************************************************
START ****************	2024-02-26T15:01:37.883
*******************************************************************
ERROR: UndefVarError: PP not defined
Stacktrace:
 [1] generate_eagle(; gamma2::Float64, gamma3::Float64, n::Int64, fdom_n::Int64, Vinf::Vector{Float64}, num::Int64, save_path::Nothing, save_fdom::Bool, openParaview::Bool, generate_fdom::Bool, solve::Bool)
   @ Main ./REPL[149]:174
 [2] flappingwing(; verbose::Bool, save_fdom::Bool, num_strikes::Int64, nsteps::Int64, plot_local_flap_vel::Bool, prompt::Bool, flaps_per_sec::Float64, save_path::String)
   @ Main ./REPL[146]:81
 [3] flappingwing()
   @ Main ./REPL[146]:1
 [4] top-level scope
   @ REPL[155]:1

PP is used in the following code snippet:

  # ---------------- FLUID DOMAIN --------------------------
  P_min = [0, -fdom_y_len/2, 0]
  P_max = [fdom_x_len, fdom_y_len/2, fdom_z_len]
  fdom = vlm.PP.FluidDomain(P_min, P_max, fdom_NDIVS)
  fdom_O = vlm.countertransform(b_O , inv(sys_Oaxis), sys_O)
  fdom_O += -[1, 0, 0]*fdom_x_len/14  - [0, 0, 1]*fdom_z_len*1/2
  # fdom_Oaxis = sys_Oaxis
  fdom_Oaxis = [1.0 0 0; 0 1 0; 0 0 1]
  vlm.PP.setcoordsystem(fdom, fdom_O, fdom_Oaxis)
  # --------------------------------------------------------

However, I could not find any function called "PP" in the VLM src files. Can you please guide me on how to resovle this issue?

M4H1-K avatar Feb 26 '24 10:02 M4H1-K

The examples in this repo are outdated and not supported. FLOWVLM now works just as a dependency of FLOWUnsteady, which provides the same capabilities that were first prototyped in the flappingwing example. I'd recommend trying to set up a your flapping wing simulation with FLOWUnsteady instead (use the tutorials in the docs as a starting point).

EdoAlvarezR avatar Feb 27 '24 16:02 EdoAlvarezR

Thank you so much!

M4H1-K avatar Mar 14 '24 09:03 M4H1-K

I was able to simulate the flapping bird using FLOWUnsteady, but the values obtained for cl and cd are incorrect (image is attached below).
Can you please guide me on how to calculate lift for this case?

https://github.com/byuflowlab/FLOWVLM/assets/139356773/6127c314-bb35-4169-82d4-07e32b13ffe3

output

M4H1-K avatar May 16 '24 09:05 M4H1-K