• Nenhum resultado encontrado

Implementation

5.4 Integration Process

The integration process is the core of the program and performs the integration of the angle of attack, flight path angle and trajectory equations (3.19, 3.20, 3.21a, 3.21b).

The integration process occurs as a cycle. It starts att0 = 0seconds and increases according to the specified time step. When the current time reaches the total duration of the simulation, the integration process stops and the program moves on to the data treatment phase. In every point of time considered during the simulation the program calculates...

α,γ,˙ x˙ andz˙for that point in time and uses these deriva- tives to obtain the values ofα,α˙ ,α,¨ γ,xandzat the next point in time.

Analyzing the steps for this phase presented in the flowchart (5.2), most of the steps are solved in the

1Some aerodynamic data was given a usual rocket value due to lack of reliable information

same as the ones presented in the numerical model section in the previous sections. Associating the correct equation to each step:

1. Calculateα¨0- Use equation 5.1c;

2. Calculate all aerodynamic coefficients - Equations 3.2, 3.5 and 3.8 for the lift, pitching moment and drag coefficients respectively;

3. Calculate V andρ- Equation 3.10 for the velocity. The models to calculate the density are shown later on in this chapter.

4. Calculate...

α,γ,˙ x˙ andz˙- Use equations 5.3, 5.5, 5.7a, 5.7b respectively

5. Integrate to obtainα,α˙ ,α,¨ γ,xandz- Equations 5.4b, 5.4c, 5.4d, 5.6, 5.8a, 5.8b could be used but a more accurate method is used as is shown later on in this chapter.

Only the density model step (3) and integration method step (5) are new or different from what was presented in the numerical method section. In addition to these differences, it’s worth noting that during step 4, when solving equation 5.3 to obtain...

α, the solution will depend on the inputs of the user because there are two possible solutions: the positive root solution and the negative root solution. The solution with the positive root of equation 5.3 is chosen by default. If the user wants to use the negative root as the solution, then the ”alternate solution” checkbox must be filled out during the first phase of the program.

5.4.1 Density Model

To calculate the density, one of two methods can be used, depending on the user choices when filling out the ”additional options” checkboxes.

If no air density model is specified the default model assumes a international standard atmosphere (ISA) model throughout the entire simulation, i.e.ρ= 1.225kg/m3.

The second option is to calculate the air density through the USSA76 density model.

The USSA76 density model proposes that the atmosphere is a spherically symmetric 1000 km thick gaseous shell surrounding the Earth. The properties of the atmosphere are considered to be steady state and are consistent with a period of moderate solar activity [41].

The function used to model the atmospheric density compares the current altitude with 28 possible values ranging between 0 and 1000 km [41]. These altitude values (zi) have associated to them 28 values for density (ρi) and scale height factors (Hi).

By interpolating between points using the exponential function (equation 5.10), the corresponding value of density is obtained.

ρ=ρie

z−zi

Hi , (5.9)

Hi= zi+1−zi

ln(ρi+1)−ln(ρi). (5.10)

For heights above 1000 km, the density is set to 3.561×10−15kg/m3. This value corresponds to the value obtained for 1000 km and it’s used as an approximation for the density of space.

5.4.2 Integrator Choice

The numeric integration step is responsible for obtainingα,α˙ ,α,¨ γ,xandzat the next point in time.

MATLAB already comes equipped with a large pool of fast and accurate integrator functions to chose from, being the most common choice the ordinary differential equation (ODE) family solvers. For this reason it’s not required to develop a custom made integration function. The choice of the integration function itself is, however, an important step. Two factors were taken into account during this choice:

capability of integrating the function with small errors and increase in program running time.

The following 4 integrating functions were considered for the part:

1. ODE45 solver - ODE45 is is a versatile non-stiff (a problem is said to be stiff if the solution being sought varies slowly, but there are nearby solutions that vary rapidly) ODE solver based on an ex- plicit Runge-Kutta (4,5), the Dormand-Prince pair. It is a one-step solver(it needs only the solution at the immediately preceding time point) and is usually the ”first try” solver [42].

2. ODE 113 solver - ODE113 is a non stiff variable order Adams-Bashforth-Moulton PECE solver.

It may be more efficient than ODE45 at stringent tolerances and when the ODE file function is particularly expensive to evaluate [43].

3. ODE15s solver - ODE15s is a stiff variable order solver based on the numerical differentiation formulas, NDFs. Optionally, it uses the backward differentiation formulas, BDFs (also known as Gear’s method) [44].

4. ODE 23s solver - ODE23s is a stiff single step solver based on a modified Rosenbrock formula of order 2 [44].

To discover the most suitable integration function from the group, the program was ran for each of the ODE solvers, using the Ariane 5 rocket data (presented in table 5.1) the set of initial conditions from table 5.2 and using the USSA76 density model.

α0 α˙0 V0 γ0 x0 z0 tstep Duration 85o 1o/s 150 m/s 80o 0 m 2000 m 1 s 200 s

Table 5.2: Initial Conditions for Integrator Choice

As can be seen in figure 5.3, the choice of the integrator has a significant impact on the trajectory of the rocket. There are three different results. ODE45 has the trajectory with the shortest range of all the solvers, ODE113 has the second shortest range and both stiff solvers (ODE15s and ODE23s) have the largest range (results are very similar for the pair).

To understand which integrating function is the closest to the correct solution it’s worth looking into the velocity graph.

Figure 5.3: Trajectory of the rocket using different ODE functions

Figure 5.4: Velocity of the rocket using different ODE functions

As can be seen in figure 5.4, both ODE45 and ODE113 have large sudden variations in the velocity over time. The origin of these sudden variations is explained by an indetermination of the type 0/0 that appears in both the velocity equation 2.6 and the angle of attack third order differential equation 5.3, whenever the angle of attack tends to 0, π2, π, 2 or any of their multiples. This indetermination is enough to make both ODE45 and ODE113 solvers unusable.

On the other hand, looking at the velocity graph when ODE15s or ODE23s solvers are used, the variation is much smoother with less and smaller sudden peaks. The reason why both ODE15s and ODE23s solvers are nearly unfazed by the indetermination present on the angle of attack diferential equation (5.3) is because both are stiff solvers and the indetermination makes this a stiff problem.

Between ODE15s and ODE23s, the integrator selected was ODE23s because out of the two stiff solvers its the one that has the least amount of sudden variations in the velocity indicating that it is the most accurate of the group and also did not increase significantly the run time of the program. The detailed description on the methodology behind ODE23s is presented in appendix B.

The final steps of the integration process phase are an update to the initial conditions (replaced with the values obtained through the current integration), and a check to see if the entire phase has to be repeated for a different rocket (only occurs if a text file similar to the one presented in appendix A is used).

Documentos relacionados