Skip to content

Commit

Permalink
Adding nlte_rate_equation_solver.py (#2140)
Browse files Browse the repository at this point in the history
* added nlte_rate_equation_matrix

* adding the rate_equation_matrix

* moved rate_matrix into a class NLTERateEquationSolver

* fixed a bug in rate_matrix_index, added an example for checking if rate matrix works properly

* changed the initial electron density for now

* added tests, fixed a small bug

* added some doctrings

* fixed a typo

* added some doctrings

* added some doctrings part 2

* added some docstrings part 3

* removed unnecessary import

* Update tardis/plasma/properties/nlte_rate_equation_solver.py

Co-authored-by: Christian Vogl <[email protected]>

* changed how atomic number is created from rate_matrix_index

* changed call of a function

* got rid of unnecessary if statement in set_nlte_ion_rate

* renamed last_row to charge_conservation_row

* switched 0, 1 to atomic_number and ion_number to make it more readable

* swtihed from rates to coefficients

* changed the matrix set up to only keep necessary row for nlte_ion

* ran black

* fixing some doctrings

* swtiched from using numbers to index names

* switched the return statement to NotImplementedError

* changed groupby from 0, 1 to atomic number, ion number

* fixed an issue in the test

* ran black

Co-authored-by: Christian Vogl <[email protected]>
  • Loading branch information
sonachitchyan and chvogl authored Nov 16, 2022
1 parent fcdb1cf commit ef15f1b
Show file tree
Hide file tree
Showing 5 changed files with 521 additions and 5 deletions.
1 change: 1 addition & 0 deletions tardis/plasma/properties/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
from tardis.plasma.properties.transition_probabilities import *
from tardis.plasma.properties.helium_nlte import *
from tardis.plasma.properties.rate_matrix_index import *
from tardis.plasma.properties.nlte_rate_equation_solver import *
Loading

0 comments on commit ef15f1b

Please sign in to comment.