Ordinary Differential Equations: Problems
- The current code given in the explicit Euler method assumes that is chosen such that is a natural number. Modify the code so that if this is not the case, the solution for the dependent variable at is available.
- Consider the following IVP:
with the initial condition .- Use the built-in DSolve function to find the exact solution and plot for .
- Use the explicit Euler method with to find the values of . Plot the exact solution overlapping the obtained numerical solution.
- Use the implicit Euler method with to find the values of . Plot the exact solution overlapping the obtained numerical solution.
- Use Heun’s method with to find the values of . Plot the exact solution overlapping the obtained numerical solution.
- Use the midpoint method with to find the values of . Plot the exact solution overlapping the obtained numerical solution.
- Use the classical Runge-Kutta method with to find the values of . Plot the exact solution overlapping the obtained numerical solution.
- Consider a mass-spring system with units, units with the initial conditions .
- Use the built-in DSolve function to find the exact solution and plot the position and velocity for .
- Use the explicit Euler method with to find the values of and . Plot the exact solutions overlapping the obtained numerical solutions.
- Use the classical Runge-Kutta method with to find the values of and . Plot the exact solution overlapping the obtained numerical solution.
- Consider the following IVP:
with the initial conditions and . Use the implicit Euler method to find a numerical solution to the given IVP for with . Compare with the exact solution. - Consider the following IVP:
with the initial conditions and . Use the classical 4th-order Runge-Kutta method to find a numerical solution to the given IVP for with . Compare with the exact solution. - Consider the following nonlinear system of IVPs:
with the initial conditions , , and . Use the classical 4th-order Runge-Kutta method to find a numerical solution to the given IVP for with . Then, using list plots, plot the three curves showing versus , versus , and versus .
Note: The above system is an example of a Lorenz system of equations which can have chaotic solutions depending on the parameters used and the initial conditions. - Use the finite difference method to find a numerical solution to the following BVP:
with the boundary conditions and . Use intervals, and compare with the exact solution. - The deflection as a function of the position along the length of a simply supported Euler-Bernoulli beam uniformly loaded is given by:
Where MPa is the Young’s modulus, is the moment of inertia, is the uniformly distributed load, and m is the length of the beam. The boundary conditions are given by . Use the finite difference method to find a numerical solution to the deflection using intervals. Compare with the exact solution. - A disgruntled golfer hits a small stone with all his strength. The stone’s acceleration, affected by the drag of the air and by the gravity force, can be modelled using the following pair of differential equations:
(1)
(2)
where is the drag coefficient, in the gravitational acceleration.
When the stone (assumed to be spherical) leaves the club face, it has an initial speed of and an initial angle of with respect to the horizontal plane.
1. Calculate precisely the horizontal distance traveled before the rock first strikes the ground (L), for an initial speed of and for an initial angle of . Use the Euler Explicit Method and select the time step to obtain a solution with a Relative Error Tolerance of . Describe in detail in your Main Report the procedure used to find L.2. Use the same function (or similar) to find accurately and efficiently, the angle corresponding to the maximum horizontal distance that the rock will travel (). Report it together with the corresponding distance (). Describe the procedure used to find .
3. Explain why the angle for the maximum distance is not , You will find the plotting of your results useful to obtain the explanation.
- Your company manufactures coil springs of high quality steel and you are asked to program a process controller based on estimated heat treatment times, because actual temperatures cannot be measured. First, the straight steel wires need to be heated until they become ductile, a process called “annealing”. Then they are wound around a cylinder into their coil shape and, finally, they are tempered to give them strength by immersing them in oil (“quenching”) for rapid cooling. You need to estimate the times of annealing, of quenching and total process time.
In summary, the process is as follows:1. Annealing: Steel wires are heated starting from by radiant heaters at that fully surround the wires, while gaining/loosing some heat by free convection to the air at , until is reached.
2. Forming: When is reached, the wires are removed from the oven and automatically wound around a calibrated cylinder. The forming takes 50 s, during which the wires are cooling by radiation to the surroundings and by free convection to the air at .
3. Tempering: Finally, the springs are quenched in oil at , an intense free convection process (no radiation), until is reached.The equation governing the wire temperature (assumed constant through the cross-section) is
where is the mass of the wire, is the surface area of the wire (lateral surface only, neglect ends), the convective heat gain/loss is:
and the radiative heat gain/loss is:
The values for the convection heat transfer coefficient are:
The values for temperatures are:
The dimensions and properties for the spring wires are: length , diameter , density , , emissivity , and the Boltzmann constant is .1. Calculate precisely the time required to complete the annealing () and to finish the entire process () for the conditions described above. Use the Euler Explicit Method and select the time step to obtain a solution with a Relative Error of below the Tolerance of . Plot the temperature history for the final curve.
Important: Use and the precisely calculated time of the end of the annealing process () as Initial Condition and initial time for the forming process. Use the temperature and time at the end of the forming process as Initial Condition and initial time for the tempering process.2. To minimize the energy consumption of the process, you need to reduce the temperature of the radiant heaters as low as possible, while ensuring the process still completes in a reasonable time. Use the same function above (or similar) to find accurately and efficiently, the minimum temperature for the radiant heaters that ensures a total time for completion of less than (). Describe the procedure used to find .
3. Explain (give physical reason) why does the process fail if ?
(Hint: compare intermediate values)