Skip to content

Commit

Permalink
Merge branch 'development' into reorg_he_nets
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 authored Jan 6, 2025
2 parents 9934b87 + 5aa5c4c commit a7daf58
Show file tree
Hide file tree
Showing 53 changed files with 1,744 additions and 2,758 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:

- name: Build docs
run: |
cd sphinx_docs/
cd Docs/
make SPHINXOPTS='-v -W --keep-going' html
- name: Link check
run: |
cd sphinx_docs/
cd Docs/
make SPHINXOPTS=-v linkcheck
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ extern.f90
# sphinx
build/
doxy_files
sphinx_docs/source/runtime_parameters.rst
Docs/source/runtime_parameters.rst


# C++ parameters
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions sphinx_docs/source/design.rst → Docs/source/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and the generic solvers:

* ``constants``: fundamental constants

* ``Docs``: the sphinx source for this documentation

* ``EOS/``: the various equations of state

* ``integration/``: the ODE integration routines used for the
Expand All @@ -34,8 +36,6 @@ and the generic solvers:
* ``screening/``: common electron screening factors used by some of the
reaction networks.

* ``sphinx_docs``: the sphinx source for this documentation

* ``unit_test/``: self-contained unit tests for Microphysics. These don’t
need any application code to build, but will require AMReX.

Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
18 changes: 17 additions & 1 deletion sphinx_docs/source/refs.bib → Docs/source/refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,21 @@ @misc{autodiff
year = {2018}
}

@ARTICLE{timmes:2000b,
author = {{Timmes}, F.~X.},
title = "{Physical Properties of Laminar Helium Deflagrations}",
journal = {APJ},
keywords = {HYDRODYNAMICS, METHODS: NUMERICAL, NUCLEAR REACTIONS, NUCLEOSYNTHESIS, ABUNDANCES, STARS: INTERIORS, Hydrodynamics, Methods: Numerical, nuclear reactions, nucleosynthesis; abundances, Stars: Interiors},
year = 2000,
month = jan,
volume = {528},
number = {2},
pages = {913-945},
doi = {10.1086/308203},
adsurl = {https://ui.adsabs.harvard.edu/abs/2000ApJ...528..913T},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}


@article{sdc-nse,
doi = {10.3847/1538-4357/ad8a66},
Expand Down Expand Up @@ -671,4 +686,5 @@ @article{langanke:2001
doi = {https://doi.org/10.1006/adnd.2001.0865},
author = {K. LANGANKE and G. MARTÍNEZ-PINEDO},
abstract = {The weak interaction rates in stellar environments are computed for pf-shell nuclei in the mass range A=45–65 using large-scale shell-model calculations. The calculated capture and decay rates take into consideration the latest experimental energy levels and log ft-values. The rates are tabulated at the same grid points of density and temperature as those used by Fuller, Fowler, and Newman for densities ρY e =10–1011 g/cm3 and temperatures T=107–1011 K, and hence are relevant for both types of supernovae (Type Ia and Type II). Effective 〈ft〉 values for capture rates and average neutrino (antineutrino) energies are also given to facilitate the use of interpolated rates in stellar evolution codes.}
}
}

File renamed without changes.
1,580 changes: 1,580 additions & 0 deletions Docs/source/runtime_parameters.rst

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
134 changes: 134 additions & 0 deletions Docs/source/transport.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
**********************
Transport Coefficients
**********************

Thermal Conductivity
====================

The thermal conductivities, $k_\mathrm{th}$, are provided to allow for
modeling of thermal diffusion, for instance in an energy equation:

.. math::
\frac{\partial (\rho e)}{\partial t} = \nabla \cdot k_\mathrm{th} \nabla T
Thermal conductivities are provided by the ``conductivity/``
directory. The main interface has the form:

.. code:: c++

template <typename T>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
void conductivity (T& state)

where currently, the input type needs to be the full EOS type, ``eos_t``. The conductivity
is then available as ``eos_t eos_state.conductivity``.

.. important::

It is assumed that the state is thermodynamically consistent
before calling the conductivity routine.
It may be necessary to do an EOS
call first, to enforce the consistency.

There are several implementations of the conductivity currently:

* ``constant`` :

This simply sets the conductivity to a constant value set via
``conductivity.const_conductivity``.

* ``constant_opacity`` :

This is intended for creating a conductivity from an opacity, for
instance, electron scattering. The opacity is taken as constant
and set via ``conductivity.const_opacity``, and then the conductivity
is set as:

.. math::
k_\mathrm{th} = \frac{16 \sigma_\mathrm{SB} T^3}{3 \kappa \rho}
where $\sigma_\mathrm{SB}$ is the Stefan-Boltzmann constant.

* ``powerlaw`` :

This models a temperature-dependent conductivity of the form:

.. math::
k_\mathrm{th} = k_0 T^\nu
where $k_0$ is set via ``conductivity.cond_coeff`` and $\nu$ is set via
``conductivity.cond_exponent``.

* ``stellar`` :

This is a general stellar conductivity based on :cite:`timmes:2000b`.
It combines radiative opacities and thermal conductivities into a
single expression. This conductivity is suitable for modeling
laminar flames.

.. index:: CONDUCTIVITY_DIR

These can be set via the ``CONDUCTIVITY_DIR`` make variable.


Radiation Opacities
===================

For radiation transport, we provide simple opacity routines that return
the Planck and Rosseland mean opacities.

The interface for these opacities is:

.. code:: c++

AMREX_GPU_HOST_DEVICE AMREX_INLINE
void actual_opacity (Real& kp, Real& kr, Real rho, Real temp, Real rhoYe, Real nu,
bool get_Planck_mean, bool get_Rosseland_mean)

where the boolean ``get_Planck_mean`` and ``get_Rosseland_mean`` specify where those
opacity terms are filled upon return.

There are 2 interfaces, which are selected via the make variable ``OPACITY_DIR``.

* ``breakout`` :

This returns a simple electron scattering opacity with a crude approximation
connecting the Planck and Rosseland means.

* ``rad_power_law`` :

This constructs a power-law opacity. For the Planck mean, it is:

.. math::
\kappa_p = \kappa_{p,0} \rho^{m_p} T^{-{n_p}} \nu^{p_p}
where $\kappa_{p,0}$ is set via ``opacity.const_kappa_p``, $m_p$ is set via ``opacity.kappa_p_exp_m``,
$n_p$ is set via ``opacity.kappa_p_exp_n``, and $p_p$ is set via ``opacity.kappa_p_exp_p``.

The Rosseland mean has a scattering component, $\kappa_s$, which is computed as:

.. math::
\kappa_s = \kappa_{s,0} \rho^{m_s} T^{-{n_s}} \nu^{p_s}
where $\kappa_{s,0}$ is set via ``opacity.const_scatter``, $m_s$ is set via ``opacity.scatter_exp_m``,
$n_s$ is set via ``opacity.scatter_n``, and $p_s$ is set via ``opacity.scatter_p``. The Rosseland
mean is then computed as:

.. math::
\kappa'_r = \kappa_{r,0} \rho^{m_r} T^{-{n_r}} \nu^{p_r}
where $\kappa_{r,0}$ is set via ``opacity.const_kappa_r``, $m_r$ is set via ``opacity.kappa_r_exp_m``,
$n_r$ is set via ``opacity.kappa_r_exp_n``, and $p_r$ is set via ``opacity.kappa_r_exp_p``, and then
combined with scattering as:

.. math::
\kappa_r = \max \{ \kappa'_r + \kappa_s, \kappa_\mathrm{floor} \}
where $\kappa_\mathrm{floor}$ is set via ``opacity.kappa_floor``,
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

# Microphysics

*A collection of astrophysical microphysics routines for stellar explosions and interstellar medium chemistry (including primordial chemistry)*
*A collection of astrophysical microphysics routines for stellar
explosions and interstellar medium chemistry (including primordial
chemistry)*

There are several core types of microphysics routines hosted here:

Expand Down Expand Up @@ -87,7 +89,7 @@ system to ensure the interfaces are tested.
A user's guide for Microphysics is available at:
http://amrex-astro.github.io/Microphysics/docs/

The sphinx source for the documentation is in `Microphysics/sphinx_docs/`
The Sphinx source for the documentation is in `Microphysics/Docs/`

## Development Model:

Expand Down
8 changes: 4 additions & 4 deletions deploy_docs_action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ mkdir out
# if on the dev branch, use the dev_layout.html template to get the
# links correct
if [ "$GITHUB_BRANCH" = "$DEV_BRANCH" ]; then
mv sphinx_docs/source/_templates/dev_layout.html sphinx_docs/source/_templates/layout.html
mv Docs/source/_templates/dev_layout.html Docs/source/_templates/layout.html
fi

# Build the Sphinx documentation
cd sphinx_docs
cd Docs
make html
cd ../

mkdir -p out/docs/
if [ "$GITHUB_BRANCH" = "$MAIN_BRANCH" ]; then
mkdir -p out/docs
mv sphinx_docs/build/html/* out/docs
mv Docs/build/html/* out/docs
else
mkdir -p out/docs/dev/
mv sphinx_docs/build/html/* out/docs/dev
mv Docs/build/html/* out/docs/dev
fi
19 changes: 0 additions & 19 deletions sphinx_docs/source/transport.rst

This file was deleted.

Loading

0 comments on commit a7daf58

Please sign in to comment.