*
Cococubed.com

Abundance variable
first derivative examples

Home

Astronomy research
Software instruments
Presentations
Illustrations
Videos
Bicycle adventures

AAS Journals
2017 MESA Marketplace
2017 MESA Summer School
2017 ASU+EdX AST111x
Teaching materials
  Current
     Solar Systems Astronomy
     Energy in Everyday Life
     Customizing pgstar
     MESA-Web
  Archives
     AST 111
     AST 113
     AST 112
     AST 114
     Geometry of Art and Nature
     Calculus
     Numerical Techniques
Education and Public Outreach


Contact: F.X.Timmes
my one page vitae,
full vitae,
research statement, and
teaching statement.

$ \def\drvop#1{{\frac{d}{d{#1}}}} \def\drvf#1#2{{\frac{d{#1}}{d{#2}}}} \def\ddrvf#1#2{{\frac{d^2{#1}}{d{#2}^2}}} \def\partop#1{{\frac{\partial}{\partial {#1}}}} \def\ppartop#1{{\frac{\partial^2}{\partial {#1}^2}}} \def\partf#1#2{{\frac{\partial{#1}}{\partial{#2}}}} \def\ppartf#1#2{{\frac{\partial^2{#1}}{\partial{#2}^2}}} \def\mpartf#1#2#3{{\frac{\partial^2{#1}}{\partial{#2} \ {\partial{#3}}}}} $ A pdf of this note is avaliable.

We've previously shown the mean atomic number \begin{equation} \overline{\rm{A}} = \frac{\sum n_i {\rm A}_i}{\sum n_i} = \frac{\sum Y_i {\rm A}_i}{\sum Y_i} = \frac{1}{\sum Y_i} \label{eq:abar} \end{equation} and mean charge \begin{equation} \overline{\rm{Z}} = \frac{\sum n_i {\rm Z}_i}{\sum n_i} = \frac{\sum Y_i {\rm Z}_i}{\sum Y_i} = \overline{\rm{A}} \sum Y_i {\rm Z}_i \label{eq:zbar} \end{equation} have derivatives \begin{equation} \drvf{\overline{{\rm A}}}{Y_i} = - \overline{{\rm A}}^2 \end{equation} and \begin{equation} \partf{\overline{\rm Z}}{Y_i} = \overline{\rm{A}} \ ( Z_i - {\overline{\rm Z}} ) \end{equation} respectively. For an arbitrary quantity $\beta$ that is written in terms of $\overline{\rm{A}}$ and $\overline{\rm{Z}}$, the derivative with respect to $Y_i$ is \begin{equation} \drvf{\beta}{Y_i} \ = \ \partf{\beta}{\overline{\rm Z}} \ \partf{\overline{\rm Z}}{Y_i} + \partf{\beta}{\overline{\rm A}} \ \partf{\overline{\rm A}}{Y_i} \ = \ \partf{\beta}{\overline{\rm Z}} \ \overline{\rm{A}} \ (Z_i - {\overline{\rm Z}}) - \partf{\beta}{\overline{\rm A}} \ \overline{\rm{A}}^2 \ . \label{eq:dbdy} \end{equation} One assumes all partials of $\beta$ with respect to $\overline{\rm{A}}$ and $\overline{\rm{Z}}$ are available from the physics is at hand (e.g., from an eos).



One simple but relevant example is the specific energy of an ideal gas \begin{equation} e = \frac{3}{2} \frac{P}{\rho} = \frac{3}{2} \frac{N_A kT}{\overline{{\rm A}}} \hskip 0.2 in {\rm erg \ g}^{-1} \label{eq:egas} \end{equation} has the partial derivative of with respect to ${\overline{\rm Z}}$ \begin{equation} \partf{e}{\overline{\rm Z}} = 0 \end{equation} and the partial derivative of with respect to ${\overline{\rm A}}$ \begin{equation} \partf{e}{\overline{\rm A}} = - \frac{3}{2} \frac{N_A kT}{\overline{{\rm A}}^2} \ . \end{equation} Hence by equation ($\ref{eq:dbdy}$) the derivative with respect to $Y_i$ is \begin{equation} \drvf{e}{Y_i} = \partf{e}{\overline{\rm Z}} \ \partf{\overline{\rm Z}}{Y_i} + \partf{e}{\overline{\rm A}} \ \partf{\overline{\rm A}}{Y_i} = \left [ - \frac{3}{2} \frac{N_A kT}{\overline{{\rm A}}^2} \right ] \left [ - \overline{\rm A}^2 \right] = \frac{3}{2} N_A kT \hskip 0.2 in {\rm erg \ g}^{-1} \end{equation} as expected when recasting equation ($\ref{eq:egas}$) as \begin{equation} e = \frac{3}{2} \frac{P}{\rho_B} = \frac{3}{2} \ N_A kT \ \sum Y_i \hskip 0.2 in {\rm erg \ g}^{-1} \ . \end{equation} Note $\partial e / \partial Y_i$ is usually known as the chemical potential in the first law of thermodynamics when composition changes are taken into account.



Another example is the mean molecular weight \begin{equation} \mu = \left [ \frac{1}{\mu_{ion}} + \frac{1}{\mu_{ele}} \right ]^{-1} = \left [ \frac{1}{\overline{\rm A}} + Y_e \right ]^{-1} = \left [ \frac{1}{\overline{\rm A}} + \frac{\overline{\rm Z}}{\overline{\rm A}} \right ]^{-1} = \frac{\overline{\rm A}}{\overline{\rm Z} + 1} = \frac{ n_B}{\sum n_i + n_e} \ . \end{equation} The partial derivative of $\mu$ with respect to ${\overline{\rm Z}}$ is \begin{equation} \partf{\mu}{\overline{\rm Z}} = \partf{}{\overline{\rm Z}} \left ( \frac{\overline{\rm{A}}}{\overline{\rm{Z}} + 1 } \right ) = - \frac{\overline{\rm A}}{\left ( \overline{\rm Z} + 1 \right )^2} = - \frac{\mu}{\overline{\rm Z} + 1} = - \frac{\mu^2}{\overline{\rm A} } \ . \end{equation} The partial derivative of $\mu$ with respect to ${\overline{\rm A}}$ is \begin{equation} \partf{\mu}{\overline{\rm A}} = \partf{}{\overline{\rm A}} \left ( \frac{ \overline{\rm{A}}}{\overline{\rm{Z}} + 1 } \right ) = \frac{1}{\left ( \overline{\rm Z} + 1 \right )} = \frac{\mu}{\overline{\rm A}} \end{equation} Applying equation ($\ref{eq:dbdy}$), the derivative of $\mu$ with respect to $Y_i$ is \begin{align} \drvf{\mu}{Y_i} & = \partf{\mu}{\overline{\rm Z}} \ \partf{\overline{\rm Z}}{Y_i} + \partf{\mu}{\overline{\rm A}} \ \partf{\overline{\rm A}}{Y_i} = \left [ -\frac{\mu^2}{\overline{\rm A} } \right ] \left [ \overline{\rm{A}} (Z_i - {\overline{\rm Z}}) \right] + \left [ \frac{\mu}{\overline{\rm A} } \right ] \left [ - \overline{\rm A}^2 \right] \notag \\[8pt] & = \mu^2 ({\overline{\rm Z}} - Z_i) - \mu {\overline{\rm A}} \end{align}


Sometimes the composition is defined in terms of the hydrogen baryon (mass) fraction $\mathcal{X}$, helium baryon (mass) $\mathcal{Y}$, and metal baryon (mass) $\mathcal{Z}$. Bayron number conservation is then expressed as \begin{equation} \mathcal{X}+ \mathcal{Y} + \mathcal{Z} = 1 \ . \label{eq:xyz} \end{equation} These abundance variables are related to the usual $Y_i = X_i \ A_i$ abundance variables by \begin{equation} \mathcal{X} = Y_{\rm H} \hskip 0.5in \mathcal{Y} = 4Y_{\rm He} \hskip 0.5in \mathcal{Z} = A_{\rm z} Y_{\rm Z} \ , \end{equation} which mostly explains the use of calligraphic font to avoid the same symbols for different quantities. Applying equation ($\ref{eq:abar}$) \begin{equation} \overline{\rm{A}} = \frac{1}{\mathcal{X} + \mathcal{Y}/4 + \mathcal{Z}/A_{\rm z}} = \frac{4 A_{\rm z}}{A_{\rm z} \mathcal{X} + A_{\rm z} \mathcal{Y} + 4 \mathcal{Z} } = \frac{4 A_{\rm z}}{A_{\rm z} + 3 A_{\rm z} \mathcal{X} + 4 \mathcal{Z} - A_{\rm z} \mathcal{Z}} \ , \label{eq:fabar} \end{equation} where the last expression eliminated $\mathcal{Y}$ using equation ($\ref{eq:xyz}$). Applying equation ($\ref{eq:zbar}$) \begin{align} \overline{\rm{Z}} & = \frac{\mathcal{X} + 1/2 \mathcal{Y} + Z_{\rm z}/A_{\rm z} \mathcal{Z}}{\mathcal{X} + \mathcal{Y}/4 + \mathcal{Z}/A_{\rm z}} \notag \\[8pt] & = (\mathcal{X} + 1/2 \mathcal{Y} + Z_{\rm z}/A_{\rm z} \mathcal{Z}) \cdot \overline{\rm{A}} \notag \\[8pt] & = \frac{2 A_{\rm z}(1 + \mathcal{X} - \mathcal{Z}) + 4 Z_{\rm z} \mathcal{Z}}{A_{\rm z} + 3 A_{\rm z} \mathcal{X} + 4 \mathcal{Z} - A_{\rm z} \mathcal{Z}} \ , \label{eq:fzbar} \end{align} where again $\mathcal{Y}$ was eliminated using equation ($\ref{eq:xyz}$). Then the first derivatives of $\overline{\rm{A}}$ are \begin{align} \partf{\overline{\rm{A}}}{\mathcal{X}} & = - \frac{12 A_{\rm z}^2}{(A_{\rm z} + 3 A_{\rm z} \mathcal{X} + 4 \mathcal{Z} - A_{\rm z} \mathcal{Z})^2} \notag \\[8pt] \partf{\overline{\rm{A}}}{\mathcal{Z}} & = \frac{4 A_{\rm z}^2 - 16 A_{\rm z}}{(A_{\rm z} + 3 A_{\rm z} \mathcal{X} + 4 \mathcal{Z} - A_{\rm z} \mathcal{Z})^2} \label{eq:fdabar} \end{align} The first derivatives of $\overline{\rm{Z}}$ are \begin{align} \partf{\overline{\rm{Z}}}{\mathcal{X}} & = \frac{4 A_{\rm z} [ A_{\rm z}(\mathcal{Z} - 1) + \mathcal{Z}(2 - 3 Z_{\rm z}) ] }{(A_{\rm z} + 3 A_{\rm z} \mathcal{X} + 4 \mathcal{Z} - A_{\rm z} \mathcal{Z})^2} \notag \\[8pt] \partf{\overline{\rm{Z}}}{\mathcal{Z}} & = - \frac{4 A_{\rm z} [ 2 + \mathcal{X}(2 (A_{\rm z} - 3 Z_{\rm z}) - Z_{\rm z}] }{(A_{\rm z} + 3 A_{\rm z} \mathcal{X} + 4 \mathcal{Z} - A_{\rm z} \mathcal{Z})^2} \label{eq:fdzbar} \end{align} For an arbitrary quantity $\beta$ that is written in terms of $\overline{\rm{A}}$ and $\overline{\rm{Z}}$, the derivatives with respect to $\mathcal{X}$ and $\mathcal{Z}$ are \begin{align} \drvf{\beta}{\mathcal{X}} & = \partf{\beta}{\overline{\rm Z}} \ \partf{\overline{\rm Z}}{\mathcal{X}} + \partf{\beta}{\overline{\rm A}} \ \partf{\overline{\rm A}}{\mathcal{X}} \notag \\[8pt] \drvf{\beta}{\mathcal{Z}} & = \partf{\beta}{\overline{\rm Z}} \ \partf{\overline{\rm Z}}{\mathcal{Z}} + \partf{\beta}{\overline{\rm A}} \ \partf{\overline{\rm A}}{\mathcal{Z}} \label{eq:chain} \end{align}


Note that equations ($\ref{eq:fabar}$) and ($\ref{eq:fzbar}$) can be solved for the either unknown or inconvenient variables $A_{\rm z}$ and $Z_{\rm z}$: \begin{align} A_{\rm z} & = \frac{4 \overline{\rm A}\mathcal{Z}}{4 - \overline{\rm A} - 3 \overline{\rm A} \mathcal{X} - \overline{\rm A} \mathcal{Z}} \notag \\[8pt] Z_{\rm z} & = \frac{4 \overline{\rm Z} - 2\overline{\rm A}(1 + \mathcal{X} - \mathcal{Z})}{4 - \overline{\rm A} - 3 \overline{\rm A} \mathcal{X} - \overline{\rm A} \mathcal{Z}} \ . \end{align} Eliminating $A_{\rm z}$ and $Z_{\rm z}$ from equation (\ref{eq:fdabar}) gives \begin{align} \partf{\overline{\rm A}}{X} & = - \frac{3 \overline{\rm A}^2}{4} \notag \\[8pt] \partf{\overline{\rm A}}{Z} & = \frac{\overline{\rm A} \ (\overline{\rm A} + 3 \overline{\rm A} \mathcal{X} -4)}{4 \mathcal{Z}} \ . \end{align} Eliminating $A_{\rm z}$ and $Z_{\rm z}$ from equation (\ref{eq:fdzbar}) gives \begin{align} \partf{\overline{\rm Z}}{X} & = \frac{\overline{\rm A}\ (2 - 3 \overline{\rm Z})}{4} \notag \\[8pt] \partf{\overline{\rm Z}}{Z} & = \frac{\overline{\rm A} \ [\overline{\rm Z} + (3 \overline{\rm Z} - 2) \mathcal{X} - 2]}{4 \mathcal{Z}} \ . \end{align} Equation ($\ref{eq:chain}$) still holds.