DSOPT Dynamic Soaring simulation and optimization program Summary Description ------------------- DSOPT uses the "Inverse Dynamics" approach to simulating a Dynamic Soaring orbit. The code is two nested loops, with an inverse-dynamics integrator on the inside, as summarized below. INPUT set all fixed parameters initialize parameters to be optimized as chosen by user END INPUT OPTIMIZER loop set orbit path in xyz space set shear wind field in xyz space ORBIT loop sets initial velocity Vi ORBIT1 integrates inverse equations of motion for specified path final velocity Vf is an output END ORBIT1 if (Vf=Vi) then exit to OPTIMIZER else adjust Vi to make Vf -> Vi next time, and call ORBIT1 again endif END ORBIT if (Vmeasured is maximum) then exit to OUTPUT else adjust optimizable parameters to increase Vmeasured repeat OPTIMIZER loop endif END OPTIMIZER OUTPUT STOP The bulk of the calculations are performed in SUBROUTINE ORBIT1, which assumes that the path shape in xyz space is assumed known, and is prescribed to be an ellipse of specified size, oriented at some tip and lean angles within the atmospheric wind shear layer. SUBROUTINE ORBIT1 is also provided with an initial velocity Vi at the first point in the orbit, and then integrates the equations of motion along the known trajectory, using simple representations of the airplane's CL and CD. One output is the final velocity Vf at the last point in the orbit (which is at the same spatial location as the first point). In general Vi and Vf will not match, in which case Vi is modified and the orbit is recalculated again. When Vf matches Vi to within some small tolerance the orbit is "converged". This means that it is periodic, and hence represents sustained DS. The outputs are the following quantities along the converged orbit: t time xyz position V ground speed Vair air speed CL lift coefficient and a number of others. The code is heavily commented, and it's fairly easy to locate the formulas used for the various models for CL, CDi, CDp, CDw, wind shear field, etc. The dynamic equations which are integrated are simply F=ma, with three separate components in the xyz directions. The outermost OPTIMIZER loop is optional. This adjusts the selected parameters of the formulation via gradient-descent steps, so as to maximize the speed Vmeasured at a chosen point in the DS orbit.