Skip to content

Commit

Permalink
added projects structure to readme, updated quickstart guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mlietzow committed Jan 16, 2024
1 parent 0a7c051 commit ed2b1a2
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 10 deletions.
21 changes: 13 additions & 8 deletions QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ To start the temperature simulation (`temp`), move into the POLARIS directory an
cd /YOUR/POLARIS/PATH/
polaris projects/disk/example/temp/POLARIS.cmd
```
The results are stored at `projects/disk/example/temp/data/` as `.fits.gz` files. These files can be opened with, for example, [SAOImageDS9](https://sites.google.com/cfa.harvard.edu/saoimageds9/home), or a python script using [astropy](https://docs.astropy.org/en/stable/generated/examples/io/plot_fits-image.html).
The results are stored at `projects/disk/example/temp/data/` as `.fits.gz` files.
These files can be opened with, for example, [SAOImageDS9](https://sites.google.com/cfa.harvard.edu/saoimageds9/home), or a python script using [astropy](https://docs.astropy.org/en/stable/generated/examples/io/plot_fits-image.html).

Simulations are performed similarly for thermal emission (`dust`) and stellar scattered radiation (`dust_mc`).
Please refer to the [command list](projects/CommandList.cmd) in the `projects` folder or the [manual](manual.pdf) for available options of the command file.
Expand All @@ -78,11 +79,15 @@ Please refer to the [command list](projects/CommandList.cmd) in the `projects` f

**HINT**: If users write their own command file, before starting the simulation, please check `<dust_component>`, `<path_grid>`, and `<path_out>` in the command file for the correct (absolute) paths.


## Create a grid

POLARIS includes PolarisTools, a Python package to create custom grid files for POLARIS.
The (binary) grid file can be created with the command `polaris-gen`.


### Predefined models

The (binary) grid file can be created with the command `polaris-gen`.
There are already two models available:

**Circumstellar disk** with a [Shakura & Sunyaev](https://ui.adsabs.harvard.edu/abs/1973A&A....24..337S) density distribution
Expand All @@ -96,26 +101,26 @@ $$
h(r) = h_0 \left( \frac{r}{r_0} \right)^\beta
$$

Default values: $r_0 = 100\ \mathrm{AU}$, $h_0 = 10\ \mathrm{AU}$, $\beta = 1.1$, $\alpha = 3 (\beta - 0.5)$, inner disk radius $r_\mathrm{in} = 0.1\ \mathrm{AU}$, outer disk radius $r_\mathrm{out} = 100\ \mathrm{AU}$, and total gas mass $M_\mathrm{gas} = 10^{-3}\ \mathrm{M_\odot}$ with a dust to gas mass ratio of $0.01$.
Default values: $r_0 = 100\ \mathrm{au}$, $h_0 = 10\ \mathrm{au}$, $\beta = 1.1$, $\alpha = 3 (\beta - 0.5)$, inner disk radius $r_\mathrm{in} = 0.1\ \mathrm{au}$, outer disk radius $r_\mathrm{out} = 100\ \mathrm{au}$, and total gas mass $M_\mathrm{gas} = 10^{-3}\ \mathrm{M_\odot}$ with a dust to gas mass ratio of $0.01$.

**Sphere** with a constant density distribution

$$
\rho(r) = \rho_0
$$

Default values: inner radius $r_\mathrm{in} = 0.1\ \mathrm{AU}$, outer radius $r_\mathrm{out} = 100\ \mathrm{AU}$, and total gas mass $M_\mathrm{gas} = 10^{-4}\ \mathrm{M_\odot}$ with a dust to gas mass ratio of $0.01$.
Default values: inner radius $r_\mathrm{in} = 0.1\ \mathrm{au}$, outer radius $r_\mathrm{out} = 100\ \mathrm{au}$, and total gas mass $M_\mathrm{gas} = 10^{-4}\ \mathrm{M_\odot}$ with a dust to gas mass ratio of $0.01$.
In addition, the sphere model has a magnetic field with a toroidal geometry and a strength of $10^{-10}\ \mathrm{T}$.

By default, the density distribution is normalized to the given total mass, so the value of $\rho_0$ is calculated accordingly.

To create a grid file, use
```bash
polaris-gen model_name grid_filename.dat
```
where `model_name` is either `disk`, or `sphere`.
The (binary) grid file will be stored at `projects/model_name/`.
By default, the density distribution is normalized to the given total mass.
It is also possible to modify some parameters of the model.
For example, to create a grid with a total gas mass of $10^{-5}\ \mathrm{M_\odot}$ and an inner radius of $1\ \mathrm{AU}$, type:
To modify specific parameters of the model, for instance a total gas mass of $10^{-5}\ \mathrm{M_\odot}$ and an inner radius of $1\ \mathrm{au}$, type:
```bash
polaris-gen model_name grid_filename.dat --gas_mass 1e-5M_sun --inner_radius 1AU
```
Expand All @@ -132,7 +137,7 @@ By default, the user can parse

- 4 values for the `disk` model: reference radius `ref_radius` ($r_0$ in meter), reference scale height `ref_scale_height` ($h_0$ in meter), `alpha` ($\alpha$), and `beta` ($\beta$),

- 2 values for the `sphere` model: the geometry of the magnetic field `mag_field_geometry` (toroidal, vertical, or radial) and the magnetic field strength `mag_field_strength` (in Tesla).
- 2 values for the `sphere` model: the geometry of the magnetic field `mag_field_geometry` (toroidal, vertical, or radial) and the magnetic field strength `mag_field_strength` (in tesla).

For example, the disk density profile can be modified to $r_0 = 50\ \mathrm{au}$ and $\beta = 1.25$ with
```bash
Expand Down
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![bibcode](https://img.shields.io/badge/bibcode-2016A%26A...593A..87R-1c459b)](https://ui.adsabs.harvard.edu/abs/2016A&A...593A..87R)
[![doi](https://img.shields.io/badge/doi-10.1051%2F0004--6361%2F201424930-fab70c)](https://doi.org/10.1051/0004-6361/201424930)
[![License](https://img.shields.io/badge/License-GPLv3-blue)](https://www.gnu.org/licenses/gpl-3.0)
![Version](https://img.shields.io/badge/Version-4.11.01-bf0040)
[![Version](https://img.shields.io/badge/Version-4.11.01-bf0040)](https://img.shields.io/badge/Version-4.11.01-bf0040)

is a 3D Monte Carlo radiative transfer code that

Expand Down Expand Up @@ -64,11 +64,42 @@ If you use results from POLARIS in a publication, please cite [Reissl et al. (20
If line radiative transfer and/or Zeeman simulations are used, please cite [Brauer et al. (2017)](https://ui.adsabs.harvard.edu/abs/2017A%26A...601A..90B) as well.


## Project structure

.
├── bin # Directory to store POLARIS executable
├── ci # CI test script (only for testing purposes)
├── ext # Catch2 test framework for unit-tests (only for testing purposes)
├── input # Input data used by POLARIS
│ ├── dust # Dust database files in the default POLARIS format
│ ├── gas # Gas database files in the LAMDA format (including Zeeman files)
│ └── interstellar_radiation_field.dat # Spectral energy distribution of the ISRF
├── lib # CCfits and cfitsio libraries
├── projects # Output directory to store simulation results and examples
│ ├── disk # Exemplary disk model
│ ├── test # Models for testing purposes
│ └── CommandList.cmd # List of avaiable POLARIS commands
├── src # Source files of the POLARIS code
├── tools # PolarisTools directory
│ ├── polaris_tools_custom # User-definable modules for PolarisTools
│ ├── polaris_tools_modules # Modules for PolarisTools
│ ├── polaris-gen.in # Source file for the polaris-gen tool
│ └── setup.py # Setup script for PolarisTools
├── AUTHORS.md
├── LICENSE.md
├── QUICKSTART.md
├── compile.sh # Compile script to install POLARIS (Linux)
├── README.md
├── manual.pdf
└── quickstart.pdf



## Copyright

POLARIS is licensed under [GPLv3](LICENSE.md).

Copyright (C) 2018 Stefan Reissl
Copyright &copy; 2018 Stefan Reissl

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
Binary file modified quickstart.pdf
Binary file not shown.

0 comments on commit ed2b1a2

Please sign in to comment.