Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supress wake shedding for multi rotors #173

Open
NM1293 opened this issue May 10, 2024 · 0 comments
Open

Supress wake shedding for multi rotors #173

NM1293 opened this issue May 10, 2024 · 0 comments

Comments

@NM1293
Copy link

NM1293 commented May 10, 2024

Hello Everyone,

I am simulating the rotor in hover tutorial case (https://flow.byu.edu/FLOWUnsteady/examples/rotorhover-aero/), suitably modified to incorporate a second rotor. The simulation completes successfully. However, I am encountering an issue regarding wake shedding, which currently occurs only for one rotor.

If I understand correctly, the code executes wake shedding by reading data within the array named omit_shedding, which is populated by the function wake_treatment_suppress(sim, args...; optargs...), detailed below:

function wake_treatment_supress(sim, args...; optargs...)

        # Case: start of simulation -> suppress shedding
        if sim.nt == 1
            # Identify blade elements on which to suppress shedding
            for i in 1:vlm.get_m(rotors[1])
                HS = vlm.getHorseshoe(rotors[1], i)
                CP = HS[5]

                if uns.vlm.norm(CP - vlm._get_O(rotors[1])) <= no_shedding_Rthreshold*R
                    push!(omit_shedding, i)
                end
            end
        end

        # Case: sufficient time steps -> enable shedding
        if sim.nt == no_shedding_nstepsthreshold
            # Flag to stop suppressing
            omit_shedding .= -1
        end

    return false
end

Given that I have two rotors, how should I modify this function to enable wake shedding for both?

"rotors[1]", which appearing in the function, is an element of the array "rotors". This array contains the two rotors and is created as shown below:

# ----------------- 1) VEHICLE DEFINITION --------------------------------------
println("Generating geometry...")

position = [-1, 1]

# Generate rotor
rotors = vlm.Rotor[]
for ri in 1:nrotors
    rotor = uns.generate_rotor(rotor_file; pitch=pitch,
                                            n=n, CW=CW, blade_r=r,
                                            altReD=[RPM, J, mu/rho],
                                            xfoil=xfoil,
                                            read_polar=read_polar,
                                            data_path=data_path,
                                            verbose=true,
                                            plot_disc=true
                                            );


    O = [0.0, position[ri], 0.0]
    Oaxis = uns.gt.rotation_matrix2(0, 0, 0)
    vlm.setcoordsystem(rotor, O, Oaxis)

    push!(rotors, rotor)
end

println("Generating vehicle...")

# Generate vehicle
system = vlm.WingSystem()                   # System of all FLOWVLM objects
for (ri, rotor) in enumerate(rotors)
    vlm.addwing(system, "Rotor$(ri)", rotor)
end

#rotors = [rotor];                           # Defining this rotor as its own system
rotor_systems = (rotors, );                 # All systems of rotors

wake_system = vlm.WingSystem()              # System that will shed a VPM wake
                                            # NOTE: Do NOT include rotor when using the quasi-steady solver
if VehicleType != uns.QVLMVehicle
    for (ri, rotor) in enumerate(rotors)
        vlm.addwing(wake_system, "Rotor$(ri)", rotor)
    end
end

vehicle = VehicleType(   system;
                            rotor_systems=rotor_systems,
                            wake_system=wake_system
                         );

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant