svalinn / parastell

Parametric 3-D CAD modeling toolset for stellarator fusion devices
MIT License
26 stars 12 forks source link

Add ability to provide custom source strength functions #129

Closed Edgar-21 closed 4 months ago

Edgar-21 commented 4 months ago

This PR will allow users to pass custom functions for plasma conditions and reaction rates as keyword arguments to either Stellarator or SourceMesh. The default behavior is to use the same plasma condition/reaction rate that it always has.

The plasma conditions function takes only one input, the plasma parameter s, and must return whatever inputs are required by the reaction rate function. The reaction rate function should return a single value.

Here's an example where the source strengths follow a sine profile: image

Should I extend the parastell_example.py script to include an example of creating a custom source definition as well?

Addresses #51