/exopy

Python module for modeling the growth of planetesimals in a disk over time built using C++ and pybind11

Primary LanguageC++Mozilla Public License 2.0MPL-2.0

exopy

Language License Build Version Python Pypi

exopy is a Python module for modeling the growth of planetesimals in a disk over time. It is built as a .pyd from a C++ project using pybind11.

The Smoluchowski coagulation equation, as shown below, is used to compute the number of planetesimals.

coagulation_equation.svg

Requirements

Example

Input

import exopy
import numpy as np

t = np.linspace(start=0.0, stop=3.0, num=4)
nk = exopy.compute_nk_approx(steps=t, k_max=8, initial=200.0, A=0.001)
with np.printoptions(precision=5, suppress=True, linewidth=100):
  print(nk)

Output

[[200.        0.        0.        0.        0.        0.        0.        0.     ]
 [160.       20.        0.        0.        0.        0.        0.        0.     ]
 [131.2      29.2       3.2       0.2       0.        0.        0.        0.     ]
 [109.70944  33.02376   6.50688   1.0134    0.11968   0.01096   0.00064   0.00002]]

License

Copyright © 2020 Jared Duffey - All Rights Reserved

exopy is distributed under the Mozilla Public License, v. 2.0. A copy of this license is included in LICENSE.txt.