Skip to content

Commit

Permalink
prototype for setting custom functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke committed May 2, 2024
1 parent fa5c731 commit b0ae44c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Examples/example_python.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
import numpy as np

from parastell.source_mesh import set_plasma_conditions, set_rxn_rate
import parastell.parastell as ps

def my_plasma_conditions(s):

if s >= 1:
n_i = 0
T_i = 0
else:
n_i = 5e18 * (1 - s)**4
T_i = 1e6/s

return n_i, T_i

def my_rxn_rate(n_i, T_i):

return 1e18 * n_i * n_i * T_i**4

set_plasma_conditions(my_plasma_conditions)
set_rxn_rate(my_rxn_rate)

# Define directory to export all output files to
export_dir = ''
Expand Down

0 comments on commit b0ae44c

Please sign in to comment.