Physics Modelling
Dynamics (Physics) Modelling and Flight Simulation
There are many great tools available to help engineers design and develop new aircraft and flight control systems. One such tool is the flight simulator. More specifically: an open source flight simulation such as FlightGear. Being open-source FlightGear is flexible and adaptable and can be used to solve or explore new scenarios that a proprietary software applications may never have anticipated.
FlightGear + YASim
Here I describe the process of modelling a flying wing in FlightGear using the built in “YASim” physics engine.
A brief word on yasim (wiki documentation): YASim is a physics engine that inputs a physical description of the airframe, the wing and tail surfaces, engines, landing gear, weight and balance, etc. In addition you input cruise performance numbers and approach performance numbers. YASim has a built in solver that computes approximate lift/drag curves for your model and then physically models the individual components in real time to produce the overall dynamic behavior of the vehicle.
For this example we are modelling a flying wing. To do this in yasim, I defined the inboard 3/4 of the flying wing as the main wings, and the outboard 1/4″ of the flying wing as the tail. Yasim allows you to define any number of surfaces in any arrangement, but this approach works out pretty well.
Visualization (Blender)
Notice that yasim “mirrors” the wing and hstab automatically so you only define one side in the configuration file. Visualizing your yasim configuration can be very helpful and can help eliminate math mistakes and typos. Here is a link to a Blender YASim import plugin. The image above shows the result of importing the flying wing configuration into blender.
Tuning
Once the basic model has been crafted, it can be flown inside FlightGear. If you have provided correct geometry, correct weight and balance information, correct propulsion information, and correct cruise and approach performance values, YASim will create a model that flies very much like the real thing. However, YASim makes many internal assumptions and isn’t perfect, and most of the time we don’t have perfect data for our aircraft. So once the initial model is created it is worth flight testing and adjusting various parameters to tune the model towards real world performance.
For instance, control surface effectiveness can be tuned to get the correct rotational rates. Engine power can be tuned to get the correct rate of climb. Because YASim is designed around a solver that computes lift and drag for your design, if you increase the power of your engine, yasim will reduce lift and increase drag so that your specified cruise speed will still be met. Essentially this gives you an aircraft that is draggier but has better climb performance. In my case, our wing has an incredibly efficient glide ratio, so I ended up reducing power substantially from my initial guess. This created a wing with much less drag and much more lift. Climb performance was reduced, acceleration is slowed, but now it will glide forever just like in real life.
Design Testing
Because YASim uses the physical geometry of the design to compute forces and moments at each surface and then sums all of these up to produce the overall flight dynamics of the aircraft, it is possible to make changes to the airframe in simulation and observe the effects in the simulator. For instance, the flying wing design in this example has twin vertical stabilizers. If I want to test the effect on lateral (yaw) stability of moving these surfaces fore or aft, I can do that in YASim. A quick tweak to the config file is all that it takes to adjust the location of a surface. I leveraged the FlightGear autopilot + a simple nasal script to fly a scripted flight pattern. Basically I stabilize in straight and level flight. Then I input 1 second of full right aileron deflection, followed by 2 seconds of full left aileron deflection, followed by leveling the wings. Through this maneuver I plot the “side slip” angle (beta). This gives me an indication how straight the aircraft tracks through the maneuver with different vertical stab locations.
In the above graph the line number (0.48, 0.58, etc.) corresponds to the distance of the vstab behind the nose in meters (this design has a wing span of about 2.3m.) As you can see the further rearward the vstabs are placed, the more stable the design becomes (the straighter it tracks and the more quickly it recovers.) You may also see that as the vstabs are pushed towards the CG (about 0.37m behind the nose) the stability starts to diverge rapidly. But as the vstabs are pushed back to about 0.68m behind the nose, the stability increases, but we are starting to hit diminishing returns. According to yasim, we could push the vstab further back and get more stability, but perhaps not a lot more.
Other Uses for Simulation Modelling
Besides basic flight dynamics modelling and validation, a simulator can be very useful in many other areas of aircraft development. Flight control systems can be prototyped and tested. Higher level flight control systems (route following, circle holds, autonomous landings, etc.) can be effectively prototyped and developed within a simulator. Even payload systems can be modeled and prototyped inside a simulator. Any work that can be done at an engineer’s desk in the comfort of their office will be far more productive than in the field under harsh conditions when the pressure is on. And when something developed in simulation works exactly right in the real world on the first try it is just very very cool!
Conclusion
This is just a simple example, but it shows some of the power that a flight simulator can bring to the arena of aircraft design. Simulators are never perfect so you have to keep in mind how far you can push them and what data you can trust to pull out of them. As a design evolves and as you gain real world flight experience with the actual design, you can validate the simulator against real flight data and adjust and improve the simulation model. This design cycle leads to a positive feedback loop which creates a more and more realistic simulation model that yields more and more useful simulation results.