Interface to interpolate and convert 2D (r, theta) datasets from simulation outputs to ProDiMo
Project description
toprodimo
Interface to interpolate and convert 2D (r, theta) datasets from simulation outputs (readable with nonos) to ProDiMo models. Based on the ProDiMo 2D interface notebook by Christian Rab
Development status
Word of caution: toprodimo has still to be tested, in particular to be sure that everything works smoothly when the ProDiMo model created by toprodimo is used in a ProDiMo computation.
To be implemented :
- For now,
toprodimotakes only the upper half of a 2D (r,theta) disk, ifthetais symmetric compared to the midplane. Could add some flexibility if the user wants to focus on the lower half of the disk, or to average azimuthally a 3D (r,theta,phi) disk, or even add a prescription to extend vertically a 2D (r,phi) disk (e.g., with vertical hydrostatic equilibrium).
Installation
We recommend to install toprodimo using the package and project manager uv. See the documentation to install uv on your system. After creating an environment (uv venv), run the following:
uv tool install toprodimo
Use the interface
You can use the interface inside the project's virtual environment using a parameter .toml file:
toprodimo toprodimo.toml
See the TOML documentation to know more about this config file format.
Configuration file
Example
You can find an example for the parameter file in toprodimo/toprodimo.toml.
1. Section [simulation]
Mandatory parameters:
on: simulation output number (int)input_dir: directory of the simulated output (str)unit_length_au: code unit of length [au] (float)unit_mass_msun: code unit of mass [solMass] (float)component: which component is included ("dust"and/or"gas") (str|list[str])internal_rho: if the"dust"component is included, the internal density used in the simulation [g/cm3] (float)
Optional parameters:
mask_inside: removes the contribution of the radial and vertical velocities close to the grid's inner edger_inner, atmask_inside*r_inner, to avoid some spurious effects in ProDiMo (float). By default we do not cancel these velocity components (mask_inside=0.0).tgas: compute the gas temperature from the simulations. Implemented:tgas = {eos="ideal", mu_star=1.37}, using an ideal equation of state (tgas = pressure/density) and a user-defined mean molecular weight. For the moment, we recommand to let ProDiMo handle the gas temperature, by not providing any tgas.
2. Section [prodimo]
Mandatory parameters:
from: directory of the initialized ProDiMo model from which to extract ProDiMo.out and *.in files (str)to: directory of the ProDiMo model on which the simulation grid and fields are interpolated (str)
Optional parameters:
plot: creates 3 .pdf files in the ProDiMo model directory (given by thetoparameter), with plots of the fields (bool).simulation.pdf: from the simulation output file, with some post-processing (e.g., removing for all the fields the region inside the cylindrical radius corresponding to the inner edge).prodimo.pdf: from the ProDiMo model, ready to be run with ProDiMo.compare_simulation_prodimo.pdf: look at the 1D density in the midplane and vertically at R=unit_length_au.
Remarks
In order for the procedure to work, you need to keep in mind that:
toprodimoneeds the typicalunit_length_auandunit_mass_msunof the simulated model.toprodimoworks on top of an initialized ProDiMo model that has to be run beforehand with the typical parameters of the simulated model (disk, star, ...). The corresponding (ProDiMo.out, *.in) files are then copied to a new prodimo directory to perform the interpolation of the simulated data to this new ProDiMo model.
See also the ProDiMo documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toprodimo-0.1.0.tar.gz.
File metadata
- Download URL: toprodimo-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd41dc18f21afc32fb59c5a1c0d6ed01762136cb927337daec25960b9518e2b5
|
|
| MD5 |
ba876c144a60fb1878fd4a531c4adfe6
|
|
| BLAKE2b-256 |
c04aec645330a862aea3a24d46f08b762cfd82d98046af13fffa9357b735e454
|
File details
Details for the file toprodimo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: toprodimo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f598d0fbd38a5358a478c85fd504f559a89a6ca4ed65a5e0c02d27221360f461
|
|
| MD5 |
3fec4439aa722bb3f87b6076b8b54007
|
|
| BLAKE2b-256 |
d45ba65f213191b456d49f163cd6a3b59dd8188e14735547e423b1361c140f55
|