Skip to content

Commit

Permalink
updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sigrimm committed May 14, 2020
1 parent 7ec96aa commit 3f9e55a
Show file tree
Hide file tree
Showing 41 changed files with 1,210,581 additions and 79 deletions.
10 changes: 5 additions & 5 deletions define.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ struct Line{
long long int *iiLimitsC0_h, *iiLimitsC0_d; //limits for Line blocks, min
long long int *iiLimitsC1_h, *iiLimitsC1_d; //limits for Line blocks, max

long long int *iiLimitsAT_m, *iiLimitsAT_d; //limits for all blocks, mapped memory
long long int *iiLimitsALT_m, *iiLimitsALT_d; //limits for all blocks, mapped memory
long long int *iiLimitsART_m, *iiLimitsART_d; //limits for all blocks, mapped memory
long long int *iiLimitsBT_m, *iiLimitsBT_d; //limits for all blocks, mapped memory
long long int *iiLimitsCT_m, *iiLimitsCT_d; //limits for all blocks, mapped memory
unsigned long long int *iiLimitsAT_m, *iiLimitsAT_d; //limits for all blocks, mapped memory
unsigned long long int *iiLimitsALT_m, *iiLimitsALT_d; //limits for all blocks, mapped memory
unsigned long long int *iiLimitsART_m, *iiLimitsART_d; //limits for all blocks, mapped memory
unsigned long long int *iiLimitsBT_m, *iiLimitsBT_d; //limits for all blocks, mapped memory
unsigned long long int *iiLimitsCT_m, *iiLimitsCT_d; //limits for all blocks, mapped memory

};
11 changes: 6 additions & 5 deletions docs/helios_k/bins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ from small to large, and mapped to a new parameter y, rangin from 0 to 1.
When the opcity function has empty parts inside or is not ranging to the full
bin width, then the sorted opacity function is zero (or kmin, if used) on the
lower part.
| relevant parameters for this example:
| Relevant parameters for this example:
- doResampling = 0
- doStoreFullK = 1
Expand All @@ -30,7 +30,7 @@ lower part.


Using a binsfile
================
----------------

When a ``binsFile`` name is given in the ``param.dat`` file, then this
file is used to generate the boundaries of the bins. The bins do not have
Expand All @@ -52,7 +52,7 @@ An example of a ``binsFile`` is given below, and the result is shown in :numref:
25000
30000

| relevant parameters for this example:
| Relevant parameters for this example:
- doResampling = 0
- doStoreFullK = 1
Expand All @@ -69,7 +69,7 @@ An example of a ``binsFile`` is given below, and the result is shown in :numref:


The output edges option
=======================
-----------------------

Instead of writing the -per bin sorted- opacity function with the full resolution in
wavenumbers, it is possible to print only averaged positions within the bins.
Expand All @@ -84,6 +84,7 @@ An example of a ``outputedgesFile`` is given below, and the result is shown in
the averaged points can appear to have too high values.

::

edges.dat
---------
0.0
Expand All @@ -92,7 +93,7 @@ the averaged points can appear to have too high values.
0.78
1.0

| relevant parameters for this example:
| Relevant parameters for this example:
- doResampling = 0
- doStoreFullK = 1
Expand Down
11 changes: 7 additions & 4 deletions docs/helios_k/compilation.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Requirements
============

| The opacity calculation from HELIOS-K is running on GPUs and require a Nvidia GPU with compute capability of 2.0 or higher. It and can run on Nvidia Tesla, GeForce and Quadro GPUs.
| The code needs the CUDA toolkit to be installed. This can be downloaded from https://developer.nvidia.com/cuda-downloads.
| Helper code for downloading the files and preprocessing are written in C++ and Python3. They require the following libraries:
| The opacity calculation from HELIOS-K is running on GPUs and require a Nvidia GPUi
with compute capability of 3.0 or higher. It can run on Nvidia Tesla, GeForce and Quadro GPUs.
| The code needs the CUDA toolkit to be installed. This can be downloaded from
https://developer.nvidia.com/cuda-downloads.
| Helper code for downloading the files and preprocessing are written in C++ and Python3.
They require the following libraries:
- exomol.py and exomol2.py

Expand Down Expand Up @@ -49,7 +52,7 @@ Requirements
- argparse


Note, when using a computing clusteri, all these libraries can be installed locally in the home directory with:
Note, when using a computing cluster, all these libraries can be installed locally in the home directory with:

::

Expand Down
31 changes: 21 additions & 10 deletions docs/helios_k/heliosk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ followed by optional console arguments, which are listed later.


HELIOS-K Input parameters
=========================
-------------------------

The input parameters can be specified in the ``param.dat`` file. The
used parameters are listed here, the order can not be changed.
Expand Down Expand Up @@ -58,14 +58,22 @@ used parameters are listed here, the order can not be changed.
- doResampling:

- 0: no resampling is done.
- 1: all the sorted opacity functions per bin are resampled with a Chebyshev polynomial, and the coefficients from all bins are written to the file ``Out_<name>_cbin.dat``.
- 2: all the sorted opacity functions per bin are resampled with a Chebyshev polynomial, and the coefficients from each bin are written to a sepparate file ``Out_<name>_cbin<bin_number>.dat``.
- 1: all the sorted opacity functions per bin are resampled with a Chebyshev
polynomial, and the coefficients from all bins are written to the file ``Out_<name>_cbin.dat``.
- 2: all the sorted opacity functions per bin are resampled with a Chebyshev

polynomial, and the coefficients from each bin are written to a sepparate file
``Out_<name>_cbin<bin_number>.dat``.


- nC: Number of Chebyshev coefficients use for the resampling.
- doTransmission:
- 1: the transmission function per bin is computed for various numbers of m, and written to the file ``Out_<name>_tr.dat``.
- doTransmission: Compute the transmission function tau for a set of column masses m.

- 0: no transmission function is calculated.
- 1: the transmission function per bin is calculated,
and all bins are written to the file ``Out_<name>_tr.dat``.
- 2: the transmission function per bin is calculated,
and each bin is written to a sepparate file ``Out_<name>_tr<bin_number>.dat``.

- nTr: nummber of points used for the transmission function.
- dTr: spacing of the points used for the transmission function in exp
Expand All @@ -83,9 +91,12 @@ used parameters are listed here, the order can not be changed.
- pathToK: path and filename to read in an opacity function. When left blank, then no file is read in.

- doStoreSK:

- 0: the resampled opacity function is not written to a file.
- 1: all bins from the resampled opacity function are written to the same file ``Out_<name>_bin.dat``.
- 2: all bins from the resampled opacity function are written to a sepparate file with names ``Out_<name>_bin<bin_number>.dat``.
- 1: all bins from the resampled opacity function are written to the same
file ``Out_<name>_bin.dat``.
- 2: all bins from the resampled opacity function are written to a sepparate
file with names ``Out_<name>_bin<bin_number>.dat``.

- nbins: number of bins
- binsfile: A '-' ignores this option, otherwise this option specifies
Expand Down Expand Up @@ -128,7 +139,7 @@ used parameters are listed here, the order can not be changed.


Console Arguments
=================
-----------------

Instead of using the parameter file, some arguments can also be set
by console arguments. The console arguments have the highest priority
Expand Down Expand Up @@ -166,10 +177,10 @@ where ``<c>``\ is a string, ``<double>`` a floating point number, and


Code parameters
===============
---------------

The file define.h contains the physical parameters and some code
parameters. After changing some entry, the code needs to be recompiled.
parameters. After changing some entry here, the code needs to be recompiled.
The code parameters are:

- def_TOL: Tolerance parameter in the Voigt function. See Algorithm 916
Expand Down
1 change: 1 addition & 0 deletions docs/helios_k/hitemp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ Step 4, data path
Include the path of the directory, which contains the obtained binary
files, the ``*.txt`` partition function files and the ``*.param`` file to
the HELIOS-K ``param.dat`` file under ``pathToData``.

73 changes: 73 additions & 0 deletions docs/helios_k/mean.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
Planck and Rosseland Means
==========================

.. _mean:

With the ``doMean`` option in the ``param.dat`` file, the Plank and Rosseland means,
:math:`\kappa_P` and :math:`\kappa_R` respectively:

.. math::
:label: eq_a
\kappa_P = \frac{\int_0^\infty \kappa B_{\nu}(T) d\nu}{\int_0^\infty B_{\nu}(T) d\nu},
and

.. math::
:label: eq_b
\kappa_R = \left( \frac{\int_0^\infty \kappa^{-1} \frac{\partial B_{\nu}(T)}{\partial T} d\nu} {\int_0^\infty \frac{\partial B_{\nu}(T)}{\partial T} d\nu} \right)^{-1}
can be calculated, where the infinity integral is truncated to the specified wavenumber limits, and :math:`d\nu` is
equal to ``dnu`` set in the ``param.dat`` file.

Note that the denominators in :math:`\kappa_P` and :math:`\kappa_R` can be computed analytically as

.. math::
:label: eq_0
\int_0^\infty B_{\nu}(T) d\nu = \frac{\sigma T^4} {\pi}
and

.. math::
:label: eq_1
\int_0^\infty \frac{\partial(B_{\nu}(T))}{ \partial (T)} d\nu = \frac{4 \sigma T^3} {\pi}.
Therefor, it is usefull to compare those analytic results to the numerical integration

.. math::
:label: eq_2
\int_0^\infty B_{\nu}(T) d\nu = \sum_i B_{\nu}(T) dnu
and

.. math::
:label: eq_3
\int_0^\infty \frac{\partial(B_{\nu}(T))}{ \partial (T)} d\nu = \sum_i \frac{\partial(B_{\nu}(T))}{ \partial (T)} dnu
The results of the Planck and Resseland means are stored in the file ``Out<name>_mean.dat``, together with
the analytic and numerical expressions :eq:`eq_0` to :eq:`eq_3`. If the numerical expressions deviate strongly
from the analytical expression, then it is a hint that the wavenumber resolution is not set fine enough.


An example of the Planck and Rosseland means is shown in :numref:`figmean`.


| Relevant parameters for this example:
- doStoreFullK = 1
- doMean = 1


.. figure:: ../plots/p007/plot001.png
:name: figmean

Planck and Rosseland means


14 changes: 7 additions & 7 deletions docs/helios_k/output.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Output Files
============

Different Output files are written, depending to the values in the
Different Output files are written, depending on the values in the
``param.dat`` file

.. _info_<name>.dat:

``Info_<name>.dat``
===================
-------------------

Contains all used parameters, and timing information

.. _out_<name>.dat:

``Out_<name>.dat``
==================
------------------

It contains nu and K(nu), where nu are the wavenumbers and K(nu) is the
full opacity function. When the ``PFile`` option is used, then the files
Expand All @@ -23,7 +23,7 @@ contain also the values of T and P.
.. _out_<name>_bin.dat:

``Out_<name>_bin.dat``
======================
----------------------

It contains the values of y and K(y) per bin. y goes from 0 to 1. K(y)
is the per bin sorted opacity function. The bins are separated by two
Expand All @@ -45,7 +45,7 @@ files with names ``Out_<name>_bin< bin index>.dat`` .
.. _out_<name>_cbin.dat:

``Out_<name>_cbin.dat``
=======================
-----------------------

It contains the Chebyshev coefficients of the per bins sorted natural
logarithm of the opacity functions in the format
Expand Down Expand Up @@ -103,7 +103,7 @@ sorted opacity function from the Chebyshev coefficients:
.. _out_<name>_tr.dat:

``Out_<name>_tr.dat``
=====================
---------------------

It contains m and T. m is the column mass, m_i = exp((i - nTr/2) \* dTr)
T is the Transmission function Int_0^1 exp(-K(y)m) dy When the PFile is
Expand All @@ -114,7 +114,7 @@ files with names ``Out_<name>_tr< bin index>.dat``
.. _out_<name>_mean.dat:

``Out_<name>_mean.dat``
=======================
-----------------------

| When the argument doMean is set to one, this file contains the Planck
and Rosseland means. They are computed over the entire range in
Expand Down
5 changes: 3 additions & 2 deletions docs/helios_k/param.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ The next section explains the structure of these files and shows how to generate


The ``<species_name>.param`` file
=================================
---------------------------------

Each molecular or atomic species, which will be processed by HELIOS-K,
needs a ``<species_name>.param`` file, which contains all necessary
information about the line list database and other parameters.
This files can be generated automatically by the tools in HELIOS-K. However, when using a different database, they must be created manually.
This files can be generated automatically by the tools in HELIOS-K. However, when using
a different database, they must be created manually.


Example
Expand Down
2 changes: 1 addition & 1 deletion docs/helios_k/resampling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ files.
An example of a resampled bin is shown in :numref:`figresample`.


| relevant parameters for this example:
| Relevant parameters for this example:
- doResampling = 1
- nC = 20
Expand Down
41 changes: 41 additions & 0 deletions docs/helios_k/transmission.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
The transmission function
=========================

.. _transmission:

With the ``doTransmission`` option in the ``param.dat`` file, the transmissions function
:math:`\tau`

.. math::
\tau = \int_0^\infty e^{-\kappa \tilde{m}} d\nu = \int_0^1 e^{-\kappa \tilde{m}} dy
can be calculated for a set of column masses :math:`\tilde{m}`, where :math:`\tilde{m}`
is set according to:

.. math::
\tilde{m}_i = e^{((i - nTr/2) \cdot dTr)}.
The parameters ``nTr`` and ``dTr`` can be set in the ``param.dat`` file.
The transmission function is stored in the file ``Out<name>_tr.dat``,


An example of the transmission function for fife bins is shown in :numref:`figtransmission`.


| Relevant parameters for this example:
- doStoreFullK = 1
- doTransmission = 2
- nbins = 5
- nTr = 1000
- dTr = 0.05


.. figure:: ../plots/p006/plot001.png
:name: figtransmission

Transmission function


0 comments on commit 3f9e55a

Please sign in to comment.