Solve and plot the temperature using steady-state heat equation using the
data and functions from day_7 and day_8:
The boundary conditions should be
Using RK4 to solve the below question for 24 hours:
Start with a 5 min time step. Treat the energy deposition for
- Calculate the scale heights.
- Calculate the hydrostatic densities using the latest temperature profile.
- Calculate the solar zenith angle.
- Calculate the Taus for
$O$ ,$O_2$ , and$N_2$ given the densities, scale heights, solar zenith angles, and cross sections. Limit the calculation to +/- 75 degrees, and set Tau equal to a large number outside of this range. - Calculate
$Q_{EUV}$ for each species and the total$Q_{EUV}$ . - Calculate
$\frac{\partial T}{\partial t}$ . - Update the temperature. Make appropriate functions to make your code clean and beautiful. If you have time, make an animation and explain what is seen.
Solve the chemistry equation using an implicit method
Where
You can get the ionization rates from the euv_37.csv file. The chemical reactions and the reaction rates are specified in the Chemistry lecture towards the end. Note that this includes
This project is hard. Some recommendations:
- Solve the equation using time spiltting - solve just the chemistry in one step, then the advection in another step. This is significantly easier than solving the whole problem in one step.
- Don't try to tackle all of the chemistry at once. Get something like the EUV ionization for
$O^+$ working first (no loss term - only once source term and one species). Then, take one loss term for$O^+$ and get that working. You will then have a single source term and loss term for$O^+$ . Then try to do the same thing for$O_2^+$ . Then, once those two species work, add more chemical equations. - Treat the neutrals as static - take the initial temperature and hydrostatic solutions and just keep those. Don't implement chemistry or advection for the neutrals.
- There are lines in the EUV file that include things like
$O_2$ ionizing to$O^+$ . You can ignore these lines. Just implement the three lines of$O_2$ going to$O_2^+$ ,$N_2$ going to$N_2^+$ and$O$ going to$O^+$ .