waterloo-rocketry / or-airbrake-plugin

Rocket airbrakes simulation using OpenRocket and Ansys CFD
1 stars 0 forks source link

Streamline linear interpolation #3

Closed Joe-Joe-Joe-Joe closed 2 months ago

Joe-Joe-Joe-Joe commented 4 months ago

Currently using my MTE201 linear interpolation code method for both drag and Cd calculation. What I would ideally like is the ability to pass an arbitrary number of curves (specified by polynomials), and interpolate between them based on the input reference area. As an example, the current code looks like this, for 3 curves at 0%, 50%, and 100%:

Calculate and correct drag from curves ` /**@return drag force value based on curves produced by Ansys at fixed extensions

patrick-gu commented 4 months ago

See #7. It should implement the functionality here. However, I'm wondering - if all of the curves are quadratics, is it the most accurate to evaluate the quadratics first and then use linear interpolation? Finding some method to somehow interpolate between polynomials themselves may be useful, although I'm not sure if that is necessary.