Coder Social home page Coder Social logo

polaris-mcrt / polaris Goto Github PK

View Code? Open in Web Editor NEW
21.0 5.0 10.0 244.57 MB

3D Monte Carlo radiative transfer code

Home Page: https://portia.astrophysik.uni-kiel.de/polaris/

License: GNU General Public License v3.0

Shell 0.74% CMake 0.52% C++ 93.01% Python 5.19% Batchfile 0.54%
astronomy astrophysics monte-carlo polaris polarization radiative-transfer simulation

polaris's Introduction

POLARIS: POLArized RadIation Simulator

arXiv ascl bibcode doi License Version

is a 3D Monte Carlo radiative transfer code that

  • allows to simulate intensity and polarization of light emerging from analytical astrophysical models as well as complex magneto-hydrodynamic simulations on various grids

  • is capable to perform dust heating, -emission, -scattering, -grain alignment, line radiative transfer, and synchrotron simulations

  • calculates synthetic intensity and polarization maps

  • makes use of a full set of physical quantities (density, temperature, velocity, magnetic field distribution, and dust grain properties as well as different sources of radiation) as input

Requirements

The following packages are required for the installation:

  • gcc (preferred), icc, or clang++

  • cmake (preferred), or ninja

  • Python version >= 3.6 (packages: numpy, setuptools)

Installation (Linux)

Open a terminal/console and move into the POLARIS directory:

cd /YOUR/POLARIS/PATH/

To install POLARIS, run the installation script:

./compile.sh -f

For the first installation, the option -f is required to install the CCfits and cfitsio libraries. Alternatively, these libraries can be installed with a package manager (root permissions are required):

sudo apt update
sudo apt install libccfits-dev libcfitsio-dev

If these packages are installed on the system, simply install POLARIS via

./compile.sh

For more information, type:

./compile.sh -h

POLARIS can now be executed from any newly opened terminal/console. To use it in already open terminals/consoles, execute the following command to update the environmental paths:

source ~/.bashrc

HINT: Please refer to the manual for installation on macOS. An installer to use POLARIS with Windows is not available yet.

Use POLARIS

For a guide how to run first simulations, please take a look in our quickstart.

For more information about POLARIS and its capabilities, please take a look in our manual.

If you use results from POLARIS in a publication, please cite Reissl et al. (2016) or Reissl et al. (2018). If line radiative transfer and/or Zeeman simulations are used, please cite Brauer et al. (2017) 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_cs                              # Dust cross sections files in the default POLARIS format
│   ├── dust_nk                              # Dust refractive index 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 available 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-convert.in                   # Source file for the polaris-convert tool
│   ├── 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.

Copyright © 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 the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

For a list of corresponding authors, please see AUTHORS.

contact: [email protected]

polaris's People

Contributors

abensberg avatar danielseifried avatar jammartin avatar lkeegan avatar martinalvarezsergio avatar mlietzow avatar polaris-mcrt avatar rbrunngraeber avatar robertbrauer1988 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

polaris's Issues

Too many killed photons

Hello, I recently switched from Polaris Version 4.0.4 to 4.0.6. I am using an OctTree grid which I created from FLASH input data (but also a self-written test cube with the same result). With 4.0.4 the TEMP and RAT calculations work fine, but with 4.0.6 I get permanently the message "ERROR: Wrong cell border!" using the standard ISRF source. In the end about 80% of all the photons are "killed". This reduces to about 50% when I decrease the starting radius from "2" to "1". In contrast, with Version 4.0.4 the number of killed photons was marginal.
The read-in of the OctTree seems to work fine, all the data (length, mass, density etc) it reports in the POLARIS output are correct.
Do you have any idea what to look for or to check, as this seems to be relatively deeply embedded in the code? If needed I could provide a small example. Thanks.

Position of stars in output

Dear developers,
would it be possible to include the position of stars/point sources used for the TEMP/RAT calculation in the screen output of POLARIS for later cross-checking? If I am not mistaken, so far it is only contained in the command file and if that file is changed at a later point, this information is lost.
Best,
Daniel Seifried

Polaris hangs at TEMP calculation

Hi all,
recently me and independently also Michael Küffmeier encountered a problem with the latest Polaris version when trying to calculate the dust temperature. It seems to hang at the line
return phIDs[0];
in the routine getPhaseFunctionID in Parameters.h .

Michael gets the error shown in the image below (which I think is identical):

To my understanding this comes from the fact that phIDs is not an array but a scalar. We both downloaded the clean version and just tried to ran a simple TEMP calculation

image
.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.