Open ShaunD137 opened 4 hours ago
This is definitely an interesting issue that I think could be beneficial although I worry about some of the overhead it might cause by trying to parse everything. I think we should consider it being a function that either gets called exclusively by the user to convert the data or a parameter that is turned off by default and can be called during import deck.load(f, parse_maths=true)
.
In terms of libraries to use I'm thinking that the scipy
library for constants (these could also be coded by hand as there aren't that many according to the docs) and to parse the functions we use the sympy
library.
It would be helpful if in-line calculations in the input.deck were processed into the result. For example the input.deck might define.
But epydeck will read that as a string instead of calculating the value of 1.88 * 10^15. Also support for variables that reference previous sections would help.
and
Which sets the number density of one species to be 1/6 the number density of the electron species.
Additional Request: It would also be useful if this functionality would include EPOCH defined functions such as the
critical()
function:$$\text{critical}(\omega) = \frac{\omega^2 m_e \epsilon_0}{e^2}$$