GithubHelp home page GithubHelp logo

parfenovs / lvg_lrt Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 825 KB

The code for radiative transfer calculations in LVG approximation and maser pumping cycles analysis

License: GNU General Public License v3.0

C++ 58.75% C 16.99% Makefile 1.21% Python 23.05%

lvg_lrt's Introduction

LVG_LRT

The code for radiative transfer calculations in LVG (large velocity gradient) approximation and analysis of the maser pumping cycles. The details of the radiative transfer modelling can be found in Sobolev & Deguchi (1994), Sobolev et al. (1997), and Cragg et al. (2002). The procedure of the maser pumping analysis is described by Sobolev (1986) and Sobolev & Deguchi (1994).

The code can be compiled with a compiler supporting C++17 under Linux (see Makefile) and Windows (LVG_LRT.sln is a Visual Studio solution file).

To run the LVG code type in a terminal:

./LVG_LRT.exe

The code reads input model parameters from files in Parameters directory. The input parameters given in this repository are in the range considered by van der Walt (2014) (see their Figure 6) so one can compare the results obtained with two different independent codes. Please check also src/hiddenParameters.h file containing additional parameters for calculations. The output will be stored in files in Results directory.

To run the code for the maser pumping analysis type in a terminal:

./pupmpit.exe 2 1 2

where the first command argument denotes the index of a molecular species; the second and third arguments denote the indexes of, respectively, starting and final energy levels between which one wants to search for pumping cycles (these are usually the lower and upper levels of a maser transition). The molecular species and level indexes begin from 1 and correspond to level indexes given in the input file with spectroscopic data in LAMDA format. The code will read the input parameters from Parameters directory and the output files produced by LVG_LRT.exe. The output will be into a terminal and will contain the information on found cycles. For each cycle in the output, there will be the number of levels in the cycle, the number of times the code found the cycle (the code searches for cycles with Monte-Carlo method and can encounter the same cycle many times), the relative efficiency and power of the cycle, the list of 1-based level indexes within the cycle.

The repository also contains examples of python scripts which can be used to calculate grids of models for a range of input parameters (see Scripts directory). There is also the python script Scripts/plot_pops_vs_time.py to plot the dependence of level populations on time from the binary file that is produced by LVG_LRT.exe when it is configured to integrate kinetic equations for level populations (by default LVG_LRT.exe solves statistical equilibrium equations).

File kabs_1e6_no_ice.dat contains dust opacities from column 3 of Table 1 in Ossenkopf & Henning (1994).

An example of results produced with the code can be found in Chen et al. (2019).

The source code from LINPACK, GSL, and https://github.com/stevengj/cubature is used.

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.