Cococubed.com Abundance variable second derivatives

Home

Astronomy research
Software instruments
Presentations
Illustrations
Videos

AAS Journals
2019 JINA R-process Workshop
2019 MESA Marketplace
2019 MESA Summer School
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.

One may ask why second derivatives are needed. If the equations being evolved contains derivative quantities, for example the $\partial e / \partial Y_i$ chemical potential'' term from the first law of thermodynamics, and if an implicit time integration is desirable, for example the system is stiff, then the Jacobian matrix will contain terms such as $\partial^2 e / \partial Y_i^2$.

Its been previously shown that the average of any quantity $\overline{\beta}$ by the number density $n_i$ weighted average $$\overline{\beta} = \frac{\sum \beta_i Y_i}{\sum Y_i} \ , \label{eq:betabar}$$ whose first partial derivative with respect to abundance $Y_i$ is $$\frac{ \partial \overline{\beta}}{\partial Y_i} = \frac{\beta_i}{\sum Y_i} - \frac{\sum \beta_i Y_i}{\left ( \sum Y_i \right )^2} = \frac{\beta_i}{\sum Y_i} - \frac{\overline{\beta}}{\sum Y_i} = \frac{\beta_i - \overline{\beta}}{\sum Y_i} = \overline{\rm{A}} \ ( \beta_i - \overline{\beta} ) \ .$$ The second partial derivative with respect to abundance $Y_i$ is then \begin{align} \ppartf{\overline{\beta}}{Y_i} & = \partop{Y_i} \left [ \frac{\beta_i}{\sum Y_i} - \frac{\sum \beta_i Y_i}{\left ( \sum Y_i \right )^2} \right ] \notag \\[8pt] & = -\frac{\beta_i}{(\sum Y_i)^2} - \frac{\beta_i}{(\sum Y_i)^2} + 2 \frac{\sum \beta_i Y_i}{\left ( \sum Y_i \right )^3} \notag \\[8pt] & = 2 \left ( \frac{\overline{\beta}}{(\sum Y_i)^2} - \frac{\beta_i}{(\sum Y_i)^2} \right ) \notag \\[8pt] & = 2 \overline{\rm{A}}^2 \ ( \overline{\beta} - \beta_i ) \notag \\[8pt] & = 2 \overline{\rm{A}} \ \frac{ \partial \overline{\beta}}{\partial Y_i} \ , \label{eq:azbar2nd} \end{align} which is a handy expression. Explicitly, \begin{align} \ppartf{\overline{{\rm A}}}{Y_i} & = 2 \overline{\rm{A}} \ \frac{ \partial \overline{{\rm A}}}{\partial Y_i} = - 2 \overline{\rm{A}}^3 \notag \\[8pt] \ppartf{\overline{{\rm Z}}}{Y_i} & = 2 \overline{\rm{A}} \ \frac{ \partial \overline{{\rm Z}}}{\partial Y_i} \end{align}

It's worth considering the general case for second full derivative as its not common. The differential operator $$d = dx \partop{x} + dy \partop{y}$$ applied to $f$ gives $$df = dx \partf{f}{x} + dy \partf{f}{y}$$ The second differential operator $$d^2 = \left ( dx \partop{x} + dy \partop{y}\right ) \left ( dx \partop{x} + dy \partop{y}\right )$$ applied to $f$ gives \begin{align} d^2f & = \left ( dx \partop{x} + dy \partop{y}\right ) \left ( dx \partop{x} + dy \partop{y}\right ) f \notag \\[8pt] & = \left ( d^2x \ppartop{x} + d^2y \ppartop{y} + dx \ dy \partop{x} \ \partop{y} + dy \ dx \partop{y} \ \partop{x} \right ) f \end{align} If the partial derivatives commute such that $$\mpartf{f}{x}{y} = \mpartf{f}{y}{x} \ ,$$ then $$d^2f = d^2x \ \ppartf{f}{x} + d^2y \ \ppartf{f}{y} + 2 \ dx \ dy \mpartf{f}{x}{y} \ ,$$ and for an arbitrary quantity $z$ $$\ddrvf{f}{z} = \ddrvf{x}{z} \ \ppartf{f}{x} + \ddrvf{y}{z} \ \ppartf{f}{y} + 2 \ \drvf{x}{z} \ \drvf{y}{z} \mpartf{f}{x}{y} \ . \label{eq:2ndfull}$$

For the case of composition variables, for an arbitray quantity $\alpha$, applying equation ($\ref{eq:2ndfull}$) yields $$\ddrvf{\alpha}{Y_i} = \ddrvf{\overline{\rm{Z}}}{Y_i} \ \ppartf{\alpha}{\overline{\rm{Z}}} + \ddrvf{\overline{\rm{A}}}{Y_i} \ \ppartf{\alpha}{\overline{\rm{A}}} + 2 \ \drvf{\overline{\rm{Z}}}{Y_i} \ \drvf{\overline{\rm{A}}}{Y_i} \ \mpartf{\alpha}{\overline{\rm{Z}}}{\overline{\rm{A}}} \ .$$ One assumes all partials of $\alpha$ with respect to $\overline{\rm{A}}$ and $\overline{\rm{Z}}$ are available from the physics is at hand (e.g., from an eos). The second partials of $\overline{\rm{A}}$ and $\overline{\rm{Z}}$ are given by equation ($\ref{eq:azbar2nd}$), and the first partials have been given previously.