Making a Fusing Star
In this lab we are going to create a star in Desmos and add fusion to its core!
Setup
In a new tab, go to Desmos.com and click on the Graphing Calculator button. If you already have a Desmos account, login. If you don't have one yet, make one. Desmos runs entirely in your browser, so it doesn't autosave. Try to click the save button every few minutes to make sure your progress doesn't get lost.
In your new Graphing Calculator page, click the $+$ sign towards the top right of your screen. Add a new folder and call it Star Properties. This is where we will add our first expressions. Click the Save button and name your graph "ICA7 - {your names}".
Creating a Star
We are now going to create our star! Start by defining three constants: the mass $M$ of our star (in solar masses), the density $p$ of our star, and the radius $R$ of our star. You can begin by setting these values to 1.
\(M=1\) \(p=1\) \(R=1\)
Add these expressions to your Star Properties folder.
We can plot our star by writing an equation in polar coordinates:
\[r\leq R\]Add this expression to a new folder called "Plotting". We now have a star with a constant radius! That is great, but we can do better. Change your expression for $R$ to be in terms of the star's mass $M$ and its density $p$.
Now try varying your star's mass and density. Think about how it visually changes. Does it make sense? Does it follow what you expect? Add a new folder called "Responses" and move it all the way at the bottom of your expression list. Add a note ($+$ menu and then "note") and write $1$ sentence in response to the questions.
Estimating Luminosity
It turns out that in addition to mass, density, and radius, we need one more value of our model star: its Luminosity. But how can we possibly know its luminosity? the only equation we have for it depends on $\epsilon(r)$ but that seems even harder to calculate! It turns out that we can make a key assumption here that will make our lives incredibly easy. For main sequence stars, we can approximate luminosity as related to mass by:
\[L\sim M^4\]where $\sim$ is read as "scales as" and implies that $L$ is equal to $M^4$ times some constant (for the purposes of this lab we assume the constant to be 1). Add this equaiton to your Star Properties folder
Adding Fusion
Mass Deficit
Fusion occurs at the core of the star. The simplest level of fusion is the combination of $4$ Hydrogen atoms into one helium nucleus. When that process occurs, it turns out that some of the initial mass of the $4$ Hydrogen atoms is turned into energy through the famous equaiton you all know: $E=mc^2$!
We can verify this is the case by examining the mass of $4$ Hydrogen atoms to a single Helium atom. The difference in mass between these two quantities must be the amount that is turned into energy! Create a new desmos folder called "Constants" and add the values below. (You can add subscripts to variables using an underscore "_").
\(m_p=1.67262\cdot10^{-27}\) \(m_{He}=6.6447\cdot10^{-27}\)
where both of these values are measured in $kg$. This will be important in the future when we have to convert our energy into solar masses. We can then calculate the mass deficit to be:
\[m_{def}=(4m_p-m_{He})\]Add this equation to a new folder called "Fusion".
While we are adding constants, we can input 3 more which will be useful in a bit. To you Constants folder, add:
\(m_{sun}=2\cdot10^{30}\) \(L_{sun}=3.83\cdot10^{26}\) \(c=3\cdot10^{8}\)
where $m_{sun}$ and $L_{sun}$ are the mass and luminosity of the Sun and $c$ is the speed of light. All 3 of these are expressed in SI units. The first two of these will be used as conversion factors soon.
Energy of Fusion
We ultimately want to find how many fusion reactions are occuring per second inside a star like the sun. Begin by making a guess: each person in your group should come up with a number. Why did you make that guess? How surprised would you be if you were wrong?
We can begin our journey towards our star's reaciton rate by calculating the energy generated by a single fusion reaction:
\[E_f=m_{def}\cdot c^2\]where $E_f$ is the energy released by a single fusion reaction and $m_{def}$ is the mass deficit from the fusion reaction. Input this equation under your Fusion folder.
Reaction Rate
We are almost there! Now we know how much energy is being released in a single fusion reaction. If we can relate that energy to the total energy output of the star, we can identify how many reactions are occuring. Thankfully, we know how much energy our star is releasing every second: our Luminosity $L$! If we divide our luminosity by our energy per fusion reaction, we are left with a reaction rate:
\[n_{reactions}=\dfrac{L}{E_{f}}\]Wait! We must be careful here! These values have different units!! $L$ is in multiples of solar luminosity and $E_f$ is in Joules. Thankfully, we can correct our units by multiplying by our conversion factor $L_{sun}$ we added earlier. Finally we have our reaction rate (telling us the number of fusion reacitons per second inside our star):
\[n_{reactions}=\dfrac{L\cdot L_{sun}}{E_{f}}\]Add this equation to your Fusion folder. Play around with the mass and density of your star. How does it change the fusion rate? Why? Which one of your equations causes this change? Add a $1$ sentence note asnwering these questions in your Responses folder.
Modeling
Keeping Track of our Helium
Now that we know how many reactions are happening per second, we can calculate the number of Helium atoms in our star at a given time. If we know the number of Helium atoms, we can calculate the total mass of Helium as well! To start, let us set the number of Helium atoms $n_{He}$ to $0$ and then write the mass of Helium $M_{He}$ in terms of $n_{He}$:
\(n_{He} = 0\) \(M_{He} = \dfrac{n_{He}\cdot m_{He}}{m_{sun}}\)
where we have divided $M_{He}$ by our conversion constant $m_{sun}$ so that it is counted in units of solar masses. Add $n_{He}$ under your Fusion folder and $M_{He}$ under your Stellar Properties folder.
Since all of the fusion is happening at the core of the star, we can determine the radius of the core using $M_{He}$, using an equation similar to how we determined $R$. We can then plot the core using a similar inequality:
\[R_{core} = \left(\frac{3}{4\pi}\frac{M_{He}}{p}\right)^{\frac{1}{3}}\] \[r\leq R_{core}\]Add the first equation to your Stellar Properties folder and add the second to your Plotting folder. If you now change $n_{He}$ you should see the core of your star plotted! One more section and we will have our complete model!
Creating a Simulation
For our simulation of fusion, we will need to keep track of time. We do this in two stages. First, we define a constant $\Delta t$ which measures the number of seconds we simulate in each step of our simulation (a bigger $\Delta t$ means our simulation runs faster). We then have a varibale $N$ which counts how many steps our iteration has run. The product of $\Delta t$ and $N$ gives the number of seconds that our star has lived since the beginning of the simulation.
We will add $\Delta t$ in Desmos as $d_t$. We will initially set our simulation to run in time steps of $10,000$ years, but you may want to increase or decrease this later if you want your simulation to run slower or faster. Since $d_t$ is measured in seconds and $N$ starts at $0$, we can write them as:
\(d_t=10^4\cdot\left(3\cdot10^7\right)\) \(N=0\)
where we have estimated the number of seconds in a year to be $3\cdot 10^7$. Add these equations to a new folder called "Simulation".
Now we can add our actions! Begin by saving your Desmos graph. We now want to enable actions. Click your name, then Account Settings, then the Advanced tab. Check the button next to Actions. We now have access to advanced Desmos features!
We will create two actions. One to run our simulation and one to reset it. To run our simulation, we want to add the number of $He$ atoms to $n_{He}$ that have formed in our last time step. The number of atoms fused is just our reaction rate $n_{reactions}$ times our change in time $d_t$! We also want to keep track that our simulation ran once, so we incredment $N$ by $1$. We will call this action $R_{un}$:
\[R_{un}=n_{He}\to n_{He}+n_{reactions}\cdot d_{t},N\to N+1\]You can write arrows by typing a dash followed by a greater than symbol ($->$). Add this expression to your Simulation folder. Once you have typed this into Desmos, you should see an arrow appear to the left of the expression. Try clicking it. Do you understand what is happening?
We can make this run automatically by adding a ticker. Click the $+$ button and click ticker. It should show up right below the plus sign. Enter $R_{un}$ into the first box and set the time increment to $10~ms$. Now when you click the metronome icon, your simulation should run!!
Note: If your simulation seems to be taking too long to run, increase the value of $d_t$!
One last expression. Similar to our $R_{un}$ definition, we can define $R_{eset}$ to reset our simulation. If we set $n_{he}$ and $N$ back to $0$, our simulation is ready for another run. Add the following equation to your Simulation folder:
\[R_{eset}=n_{He}\to0,N\to0\]If you click the arrow to the left of $R_{eset}$ your simulation should reset. You can make this easier by adding a cell all the way at the top of your expression list, above all of your folders. If you type $R_{eset}$ into that cell, you should be able to reset your simulation without going into your folders.,
Congrats! You have made a simulation of a fusing star! That's pretty cool! Play around a bit, see if everything works like you expect. Then answer a few questions below.
Using our Model
Stellar Lifetimes
Stars fuse about 10% of their H before they move off the Main Sequence. Pause your simulation when $M_{He}$ is about $10\%$ of $M$. How much time has passed? (Use d_t and N to calculate the time. Remember d_t is measured in seconds.) Does that value make sense? We call this value the star's lifetime.
Set the density of your star to $1$. Create a table inside a new folder called "Stellar Lifetimes" and record the initial mass of your star and its lifetime (add a table by clicking the + and then table). Reset your simulation, change your initial mass, and try again. Add five entries to your table. How does the lifetime change for different initial masses? Add a final note to your Responses folder answering these questions in a few sentences.
Your last instruction is to give yourself a pat on the back! This was a long lab but hopefully you had a bit of fun! You made an accurate numerical simulation of nuclear fusion! Maybe it's just me, but I think that's pretty cool :)