# Equation of State Notes

## EOS Calls

### Initialization

Step 1.

Define the average expansion at time $$t^\nph$$ and the new $$w_0.$$ * if dpdt_factor* $$>$$ 0 then

• In makePfromRhoH, we compute a thermodynamic $$p^n$$ for the volume discrepancy term using $$(\rho,h,X)^n$$.

end if

Step 2.

Construct the provisional edge-based advective velocity, $$\uadvone.$$

Step 3.

React the full state and base state through the first time interval of $$\dt/2.$$

• In react_state $$\rightarrow$$ burner, we compute $$c_p$$ and $$\xi_k$$ for inputs to VODE using $$(\rho,T,X)^n$$.

• In react_state, we compute $$T^{(1)}$$ using $$(\rho,h,X)^{(1)}$$ (if use_tfromp = F) or $$(\rho,X)^{(1)}$$ and $$p_0^n$$ (if use_tfromp = T)

if evolve_base_state = T then

• In make_gamma, we compute $$\Gamma_1$$ using $$(\rho,X)^{(1)}$$ and $$p_0^n$$.

end if

Step 4.
Advect the base state, then the full state, through a time interval of $$\dt.$$
if use_thermal_diffusion = T then
• In advance before make_explicit_thermal, we compute the coefficients for $$\nabla\cdot(\kth/c_p)\nabla h + \cdots$$ using $$(\rho,T,X)^{(1)}$$.

• In enthalpy_advance $$\rightarrow$$ update_scal, we compute $$h$$ above the base_cutoff_density using $$(\rho,X)^{(2),*}$$ and $$p_0^{n+1,*}$$.

• In thermal_conduct, we compute $$T^{(2),*}$$ using $$(\rho,h,X)^{(2),*}$$ (if use_tfromp = F) or $$(\rho,X)^{(2),*}$$ and $$p_0^{n+1,*}$$ (if use_tfromp = T).

else

• In enthalpy_advance $$\rightarrow$$ update_scal, we compute $$h$$ above the base_cutoff_density using $$(\rho,X)^{(2),*}$$ and $$p_0^{n+1,*}$$.

• In enthalpy_advance, we compute $$T^{(2),*}$$ using $$(\rho,h,X)^{(2),*}$$ (if use_tfromp = F) or $$(\rho,X)^{(2),*}$$ and $$p_0^{n+1,*}$$ (if use_tfromp = T).

end if

Step 5.

React the full state through a second time interval of $$\dt/2.$$

• In react_state $$\rightarrow$$ burner, we compute $$c_p$$ and $$\xi_k$$ for inputs to VODE using $$(\rho,T,X)^{(2),*}$$.

• In react_state, we compute $$T^{n+1,*}$$ using $$(\rho,h,X)^{n+1,*}$$ (if use_tfromp = F) or $$(\rho,X)^{n+1,*}$$ and $$p_0^{n+1,*}$$ (if use_tfromp = T).

if evolve_base_state then

• In make_gamma, we compute $$\Gamma_1$$ using $$(\rho,X)^{n+1,*}$$ and $$p_0^{n+1,*}$$.

end if

Step 6.
Define a new average expansion rate at time $$t^\nph.$$
if use_thermal_diffusion then
• In advance before make_explicit_thermal, we compute the coefficients for $$\nabla\cdot(\kth/c_p)\nabla h + \cdots$$ using $$(\rho,T,X)^{n+1,*}$$.

end if

• In make_S, we compute thermodynamic variables using $$(\rho,T,X)^{n+1,*}$$.

if dpdt_factor $$>$$ 0 then

• In makePfromRhoH, we compute a thermodynamic $$p^{n+1,*}$$ for the volume discrepancy term using $$(\rho,h,X)^{n+1,*}$$.

end if

Step 7.

Construct the final edge-based advective velocity, $$\uadvtwo.$$

Step 8.
Advect the base state, then the full state, through a time interval of $$\dt.$$
if use_thermal_diffusion = T then
• In enthalpy_advance $$\rightarrow$$ update_scal, we compute $$h$$ above the base_cutoff_density using $$(\rho,X)^{(2)}$$ and $$p_0^{n+1}$$.

• In advance before thermal_conduct, we compute the coefficients for $$\nabla\cdot(\kth/c_p)\nabla h + \cdots$$ using $$(\rho,T,X)^{(2),*}$$.

• In thermal_conduct, we compute $$T^{(2)}$$ using $$(\rho,h,X)^{(2)}$$ (if use_tfromp = F) or $$(\rho,X)^{(2)}$$ and $$p_0^{n+1}$$ (if use_tfromp = T).

else

• In enthalpy_advance $$\rightarrow$$ update_scal, we compute $$h$$ above the base_cutoff_density using $$(\rho,X)^{(2)}$$ and $$p_0^{n+1}$$.

• In enthalpy_advance, we compute $$T^{(2)}$$ using $$(\rho,h,X)^{(2)}$$ (if use_tfromp = F) or $$(\rho,X)^{(2)}$$ and $$p_0^{n+1}$$ (if use_tfromp = T).

end if

Step 9.

React the full state and base state through a second time interval of $$\dt/2.$$

• In react_state $$\rightarrow$$ burner, we compute $$c_p$$ and $$\xi_k$$ for inputs to VODE using $$(\rho,T,X)^{(2)}$$.

• In react_state, we compute $$T^{n+1}$$ using $$(\rho,h,X)^{n+1}$$ (if use_tfromp = F) or $$(\rho,X)^{n+1}$$ and $$p_0^{n+1}$$ (if use_tfromp = T).

if evolve_base_state = T then

• In make_gamma, we compute $$\Gamma_1$$ using $$(\rho,X)^{n+1}$$ and $$p_0^{n+1}$$.

end if

Step 10.
Compute $$S^{n+1}$$ for the final projection.
if make_explicit_thermal then
• In advance before make_explicit_thermal, we compute the coefficients for $$\nabla\cdot(\kth/c_p)\nabla h + \cdots$$ using $$(\rho,T,X)^{n+1}$$.

end if

• In make_S, we compute thermodynamic variables using $$(\rho,T,X)^{n+1}$$.

Step 11.
Update the velocity.
if dpdt_factor $$>$$ 0 then
• In makePfromRhoH, we compute a thermodynamic $$p^{n+1}$$ for the volume discrepancy term using $$(\rho,h,X)^{n+1}$$.

end if

Step 12.

Compute a new $$\dt.$$

## Temperature Usage

Step 1.

Define the average expansion at time $$t^\nph$$ and the new $$w_0.$$

Step 2.

Construct the provisional edge-based advective velocity, $$\uadvone.$$

Step 3.

React the full state and base state through the first time interval of $$\dt/2.$$

• In react_state $$\rightarrow$$ burner, we compute $$c_p$$ and $$\xi_k$$ for inputs to VODE using $$(\rho,T,X)^n$$.

• In react_state, we compute $$T^{(1)}$$ using $$(\rho,h,X)^{(1)}$$ (if use_tfromp = F) or $$(\rho,X)^{(1)}$$ and $$p_0^n$$ (if use_tfromp = T).

Step 4.
Advect the base state, then the full state, through a time interval of $$\dt.$$
if use_thermal_diffusion = T then
• In advance before make_explicit_thermal, we compute the coefficients for $$\nabla\cdot(\kth/c_p)\nabla h + \cdots$$ using $$(\rho,T,X)^{(1)}$$.

• In thermal_conduct, we compute $$T^{(2),*}$$ using $$(\rho,h,X)^{(2),*}$$ (if use_tfromp = F) or $$(\rho,X)^{(2),*}$$ and $$p_0^{n+1,*}$$ (if use_tfromp = T).

else

• In enthalpy_advance, we compute $$T^{(2),*}$$ using $$(\rho,h,X)^{(2),*}$$ (if use_tfromp = F) or $$(\rho,X)^{(2),*}$$ and $$p_0^{n+1,*}$$ (if use_tfromp = T).

end if

Step 5.

React the full state through a second time interval of $$\dt/2.$$

• In react_state $$\rightarrow$$ burner, we compute $$c_p$$ and $$\xi_k$$ for inputs to VODE using $$(\rho,T,X)^{(2),*}$$.

• In react_state, we compute $$T^{n+1,*}$$ using $$(\rho,h,X)^{n+1,*}$$ (if use_tfromp = F) or $$(\rho,X)^{n+1,*}$$ and $$p_0^{n+1,*}$$ (if use_tfromp = T).

Step 6.
Define a new average expansion rate at time $$t^\nph.$$
if use_thermal_diffusion = T then
• In advance before make_explicit_thermal, we compute the coefficients for $$\nabla\cdot(\kth/c_p)\nabla h + \cdots$$ using $$(\rho,T,X)^{n+1,*}$$.

end if

• In make_S, we compute thermodynamic variables using $$(\rho,T,X)^{n+1,*}$$.

Step 7.

Construct the final edge-based advective velocity, $$\uadvtwo.$$

Step 8.
Advect the base state, then the full state, through a time interval of $$\dt.$$
if use_thermal_diffusion = T then
• In advance before thermal_conduct, we compute the coefficients for $$\nabla\cdot(\kth/c_p)\nabla h + \cdots$$ using $$(\rho,T,X)^{(2),*}$$.

• In thermal_conduct, we compute $$T^{(2)}$$ using $$(\rho,h,X)^{(2)}$$ (if use_tfromp = F) or $$(\rho,X)^{(2)}$$ and $$p_0^{n+1}$$ (if use_tfromp = T).

else

• In enthalpy_advance, we compute $$T^{(2)}$$ using $$(\rho,h,X)^{(2)}$$ (if use_tfromp = F) or $$(\rho,X)^{(2)}$$ and $$p_0^{n+1}$$ (if use_tfromp = T).

end if

Step 9.

React the full state and base state through a second time interval of $$\dt/2.$$

• In react_state $$\rightarrow$$ burner, we compute $$c_p$$ and $$\xi_k$$ for inputs to VODE using $$(\rho,T,X)^{(2)}$$.

• In react_state, we compute $$T^{n+1}$$ using $$(\rho,h,X)^{n+1}$$ (if use_tfromp = F) or $$(\rho,X)^{n+1}$$ and $$p_0^{n+1}$$ (if use_tfromp = T).

Step 10.
Compute $$S^{n+1}$$ for the final projection.
if make_explicit_thermal then
• In advance before make_explicit_thermal, we compute the coefficients for $$\nabla\cdot(\kth/c_p)\nabla h + \cdots$$ using $$(\rho,T,X)^{n+1}$$.

end if

• In make_S, we compute thermodynamic variables using $$(\rho,T,X)^{n+1}$$.

Step 11.

Update the velocity.

Step 12.

Compute a new $$\dt.$$