FLOWUnsteady Documentation

repository·master·Indexed 18 days ago

https://github.com/byuflowlab/flowunsteady

An open-source, variable-fidelity, meshless CFD framework based on the Reformulated Vortex Particle Method (rVPM). It is optimized for the interactional aerodynamics of multirotor aircraft and wind energy systems, supporting methods such as VLM, strip theory, blade elements, and 3D panel methods. The framework includes an FW-H solver and BPM code for aeroacoustic noise prediction, and supports geometry imports from OpenVSP.

Tokens
45.4K
Snippets
104
Records
153
Agent score
61%

What's inside FLOWUnsteady

  1. Overview of FLOWUnsteady

    master

    FLOWUnsteady is an open-source, variable-fidelity framework for unsteady aerodynamics and aeroacoustics. It is based on the Reformulated Vortex Particle Method (rVPM) and is designed for interactional aerodynamics of multirotor aircraft and wind energy systems.

    The framework integrates several aerodynamic methods, including:

    • Vortex lattice method (VLM)
    • Strip theory
    • Blade elements
    • 3D panel method
    • rVPM (Reformulated Vortex Particle Method)

    It also includes an FW-H solver and a BPM code for predicting tonal and broadband aeroacoustic noise. The solver can range from low-fidelity (similar to free-wake methods) to high-fidelity (meshless Large Eddy Simulations).

  2. What is a Kinematic Maneuver and how to define one?

    master

    An uns.KinematicManeuver defines the prescribed motion and control inputs of a vehicle over the course of a simulation.

    It uses time-dependent functions that accept a non-dimensional time t (ranging from 0 to 1, where 0 is the start and 1 is the end of the simulation). These functions return non-dimensional values which are then scaled by reference values (Vref for velocity and RPMref for rotation).

    Required function inputs for KinematicManeuver(angles, RPMs, Vvehicle, anglevehicle):

    • angles: A tuple of functions defining the tilting angle of each tilting system over time.
    • RPMs: A tuple of functions defining the RPM of each rotor system over time.
    • Vvehicle(t): Returns a 3D velocity vector.
    • anglevehicle(t): Returns a 3D attitude (Euler angles) vector.

    Example: To simulate a constant RPM and zero velocity:

    RPMcontrol(t) = 1.0
    Vvehicle(t) = zeros(3)
    anglevehicle(t) = zeros(3)
    maneuver = uns.KinematicManeuver((), (RPMcontrol,), Vvehicle, anglevehicle)
  3. What is the Reformulated VPM (rVPM)?

    master

    The Reformulated Vortex Particle Method (rVPM) is a generalization of the classic Vortex Particle Method (VPM) designed to improve numerical stability and enforce conservation laws (momentum and mass).

    Unlike the classic VPM, which assumes a constant particle size ($\frac{\mathrm{d} \sigma_p }{\mathrm{d}t} = 0$), rVPM treats the particle size $\sigma_p$ as an extra degree of freedom. This allows the method to better handle the transfer of enstrophy between scales. In the specific 'reformulated' configuration used for conservation, the parameters are set to $f = 0$ and $g = \frac{1}{5}$.

    Key advantages include:

    • Improved Stability: Avoids the numerical instabilities of classic VPM caused by violating conservation laws.
    • Conservation: Enforces momentum and mass conservation.
    • Efficiency: Does not require significantly more computation than classic VPM, as particle size and strength evolution are calculated directly from vortex stretching.
  4. What is the Reformulated VPM (rVPM)?

    master

    The Reformulated Vortex Particle Method (rVPM) is a meshless Large Eddy Simulation (LES) approach derived from the LES-filtered Navier-Stokes equations. It uses a Lagrangian scheme to solve the vorticity form of the equations, making it numerically stable and capable of resolving both mean and fluctuating large-scale turbulent flow features with minimal computational effort.

    Key characteristics include:

    • Meshless: Does not require a fixed grid.
    • Pressure-independent: By using the vorticity form, the method eliminates dependence on pressure.
    • Velocity via Biot-Savart: The velocity field $\overline{\mathbf{u}}$ is calculated directly from the vorticity field $\boldsymbol{\omega}$ using the Biot-Savart law.
  5. What is a monitor in FLOWUnsteady

    master

    A monitor is a runtime function passed to FLOWUnsteady.run_simulation via the extra_runtime_function keyword argument. It is executed at every time step of the simulation.

    Monitors are expected to return a Boolean. If a monitor returns true, the simulation will immediately terminate. This is useful for stopping simulations based on specific physical criteria (e.g., reaching a certain enstrophy level or state variable threshold).

  6. Governing Equations of the Reformulated VPM

    master

    The rVPM discretizes the LES-filtered vorticity equation using singular particles. The evolution of the system is governed by four primary equations:

    1. Particle Position ($\mathbf{x}_p$): Resolved by advecting particles with the filtered velocity $\overline{\mathbf{u}}({\bf x}_p)$.
    2. Vortex Strength ($\boldsymbol{\Gamma}_p$): Governs the evolution of strength, accounting for stretching and subfilter-scale (SFS) effects.
    3. Particle Size ($\sigma_p$): Governs the evolution of the particle's characteristic size.
    4. Viscous Term: Resolves the viscous part of the vorticity equation (e.g., via vortex redistribution or particle strength exchange).

    In the optimized 'reformulated' state (where $f=0$ and $g=1/5$), the equations for strength and size simplify to:

    • $\frac{\mathrm{d} }{\mathrm{d} t} \boldsymbol{\Gamma}_p = \left( \boldsymbol{\Gamma}_p \cdot \nabla \right) \overline{ \mathbf{u} } (\mathbf{x}_p) - \frac{3}{5} \left{ \left[ \left( \boldsymbol{\Gamma}_p \cdot \nabla \right) \overline{ \mathbf{u} } (\mathbf{x}_p) \right] \cdot \hat{\boldsymbol{\Gamma}}p \right} \hat{\boldsymbol{\Gamma}}p - \frac{C_d}{\zeta{\sigma_p} (\mathbf{0})} \mathbf{E}\mathrm{str} (\mathbf{x}_p)$
    • $\frac{\mathrm{d} }{\mathrm{d} t} \sigma_p = - \frac{1}{5} \frac{\sigma_p}{| \boldsymbol{\Gamma}_p |} \left[ \left( \boldsymbol{\Gamma}_p \cdot \nabla \right) \overline{ \mathbf{u} } (\mathbf{x}_p) \right] \cdot \hat{\boldsymbol{\Gamma}}_p$
  7. Suppress the hub fountain effect to accelerate convergence

    master

    Rotor simulations with impulsive RPM starts often suffer from a 'hub fountain effect' where the root wake reverses flow near the hub, delaying convergence. To accelerate convergence, you can define a wake treatment procedure to suppress shedding on inboard blade elements for a set number of revolutions.

    In the provided example, this is implemented by defining a function wake_treatment_supress that identifies blade elements within a radial threshold (no_shedding_Rthreshold) and suppresses their shedding for a specific number of time steps (no_shedding_nstepsthreshold). This function is then passed to uns.run_simulation via the extra_runtime_function argument.

  8. Particle Discretization in rVPM

    master

    rVPM discretizes the unfiltered vorticity field $\boldsymbol{\omega}$ using singular vortex particles. Each particle is defined by:

    • Position: $\mathbf{x}_p$
    • Vortex Strength: $\boldsymbol{\Gamma}_p$

    The filtered vorticity field $\overline{\boldsymbol\omega}$ is approximated by applying a filter operator (kernel) to these particles, which regularizes the Dirac delta singularity into a continuous field using radial basis functions: $$\overline{\boldsymbol\omega}(\mathbf{x}, t) \approx \sum_p \boldsymbol{\Gamma}p(t) \zeta{\sigma_p}(\mathbf{x} - \mathbf{x}_p(t))$$

    In this model, the filter width $\sigma$ (referred to as the smoothing radius or core size) can evolve in both time and space according to the individual particle's evolution.

  9. Simulate specific fragments of a maneuver

    master

    To avoid the impracticality of resolving an entire long maneuver at high resolution, simulate only a specific time window using tstart and tquit.

    For example, to simulate only the transition from hover to cruise, set tstart to the beginning of that phase (e.g., 0.20*ttot) and tquit to the end of that phase (e.g., 0.30*ttot).

    Note: If start_kinmaneuver is set to true, the simulation starts with the velocity and angles corresponding to tstart. If false, it starts with velocity=0 and angles as defined by the geometry.

    # Example: Simulating a fragment
    tstart = 0.20 * ttot
    tquit = 0.30 * ttot
    start_kinmaneuver = true
    
    # The simulation object will then use these bounds
    simulation = uns.Simulation(vehicle, maneuver, Vref, RPMref, ttot; Vinit=Vinit, Winit=Winit, t=tstart);
  10. Define a maneuver using KinematicManeuver or DynamicManeuver

    master

    In FLOWUnsteady, maneuvers are defined using two primary classes depending on whether the motion is prescribed or driven by forces:

    • FLOWUnsteady.KinematicManeuver: Used for prescribed motion where the trajectory (position, velocity, or acceleration) is explicitly defined as a function of time.
    • FLOWUnsteady.DynamicManeuver: Used for motion driven by applied forces or moments, where the resulting motion is a consequence of the physics and the applied loads.
  11. Standard Simulation Workflow in FLOWUnsteady

    master

    Regardless of complexity, all simulations in FLOWUnsteady follow a consistent six-step structure:

    1. Vehicle Definition: Generate geometry and declare subsystems (e.g., VLM, rotors) using a FLOWUnsteady.VLMVehicle object.
    2. Maneuver Definition: Define kinematics (velocity, attitude) and control inputs (tilting, RPM) using a FLOWUnsteady.KinematicManeuver object.
    3. Simulation Definition: Create a FLOWUnsteady.Simulation object specifying the vehicle, maneuver, total time, and reference speeds.
    4. Monitors Definitions: Create functions to calculate, monitor, and output metrics (e.g., aerodynamic forces) at every time step.
    5. Run Simulation: Execute the simulation using FLOWUnsteady.run_simulation.
    6. Viz and Postprocessing: Visualize results in tools like Paraview and process the output data.
  12. Use the Quasi-Steady (QVLM) solver for low-fidelity simulations

    master

    For faster, low-fidelity simulations, you can replace the unsteady particle-based wake with rigid semi-infinite wakes using the quasi-steady solver. This is achieved by switching from uns.VLMVehicle to uns.QVLMVehicle.

    When running the simulation with the quasi-steady solver, use the keyword argument save_horseshoes = false in uns.run_simulation to visualize the semi-infinite rigid wake.

    # Switch from unsteady to quasi-steady
    vehicle = uns.QVLMVehicle(system; 
                              tilting_systems=tilting_systems, 
                              vlm_system=vlm_system, 
                              wake_system=wake_system)
    
    # Run with horseshoe visualization disabled
    uns.run_simulation(simulation, nsteps; save_horseshoes=false, ...)