Advertisement

Physx 4 Aerodynamic simulation stability (diverging)

Started by January 04, 2021 02:19 PM
0 comments, last by gianlucagg 4 years ago

I’m developing a simulation software for flight simulation.
I have problems with solver stability.

I have a rigidbody subject to gravity and aerodynamic forces. My timestep is fixed to 0.01s and lift and drag forces are computed at timestep n using body linear and angular velocity. (I compute AoA and relative speed body/fluid in wing coordinate system) and apply to the actor with simply functions: AddForceAtLocalPosition for example.
after few timesteps (200/300) the simulation diverge and velocities goes to infinite. If I lower the timestep obviously the instability come up at a later moment.

my code is quite simple, i use local velocity in airfoil coordinate system in order to calculate angle of attack so interpolate Cl,Cd coeffiecients and calculate lift and drag as:
Lift = 0.5*Area*Cl*Vxz^2

I understood that Physx solver use semi implicit integrator method but i don’t if i can modify some parameters about the solver.

v(n+1) = v(n) + F(n)/inertia*deltaT
x(n+1) = x(n) + v(n+1)*deltaT

Any method to improve solver stability without reducing the timestep too much in this case? There a lot of simulator and i can’t figure out how they deal such stability problems for realtime simulations?



This topic is closed to new replies.

Advertisement