|
| 1 | +#include <pybind11/pybind11.h> |
| 2 | +#include "plasma_source.hpp" |
| 3 | + |
| 4 | +namespace py = pybind11; |
| 5 | +namespace ps = plasma_source; |
| 6 | + |
| 7 | +PYBIND11_MODULE(plasma_source, m) { |
| 8 | + m.doc() = "A parametric plasma source"; |
| 9 | + |
| 10 | + py::class_<ps::PlasmaSource>(m, "PlasmaSource") |
| 11 | + .def(py::init<const double &, const double &, const double &, const double &, |
| 12 | + const double &, const double &, const double &, const double &, |
| 13 | + const double &, const double &, const double &, const double &, |
| 14 | + const double &, const double &, const std::string &, const int &, |
| 15 | + const int &, const double &, const double &>(), |
| 16 | + py::arg("ion_density_pedistal")=1.09e20, |
| 17 | + py::arg("ion_density_seperatrix")=3e19, |
| 18 | + py::arg("ion_density_origin")=1.09e20, |
| 19 | + py::arg("ion_temperature_pedistal")=6.09, |
| 20 | + py::arg("ion_temperature_seperatrix")=0.1, |
| 21 | + py::arg("ion_temperature_origin")=45.9, |
| 22 | + py::arg("pedistal_radius")=0.8, |
| 23 | + py::arg("ion_density_peaking_factor")=1.0, |
| 24 | + py::arg("ion_temperature_peaking_factor")=8.06, |
| 25 | + py::arg("minor_radius")=1.5, |
| 26 | + py::arg("major_radius")=4.5, |
| 27 | + py::arg("elongation")=2.0, |
| 28 | + py::arg("triangularity")=0.55, |
| 29 | + py::arg("shafranov_shift")=0.0, |
| 30 | + py::arg("plasma_type")="plasma", |
| 31 | + py::arg("plasma_id")=1, |
| 32 | + py::arg("number_of_bins")=100, |
| 33 | + py::arg("min_toroidal_angle") = 0.0, |
| 34 | + py::arg("max_toridal_angle") = 360.0) |
| 35 | + .def("ion_density", |
| 36 | + &ps::PlasmaSource::ion_density, |
| 37 | + "Calculate the ion density at a specific minor radius", |
| 38 | + py::arg("minor_radius")) |
| 39 | + .def("ion_temperature", |
| 40 | + &ps::PlasmaSource::ion_temperature, |
| 41 | + "calculate the ion temperature at a specific minor radius", |
| 42 | + py::arg("minor_radius")) |
| 43 | + .def("dt_xs", |
| 44 | + &ps::PlasmaSource::dt_xs, |
| 45 | + "determine the value of the dt xs cross sections at a specific ion temperature", |
| 46 | + py::arg("ion_temperature")); |
| 47 | +} |
0 commit comments