The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
|
Helper functions for Open FUSION Toolkit (OFT) Python interfaces.
Functions | |
read_fortran_namelist (file0, silent=True, b_arr=False) | |
run_shell_command (command, timeout=10, env_vars={}) | |
Run a shell command. | |
write_native_mesh (filename, r, lc, reg, nodesets=[], sidesets=[], ho_info=None, periodic_info=None) | |
Variables | |
float | eC = 1.60217663e-19 |
Electron charge. | |
int | mu0 = numpy.pi*4.E-7 |
Vacuum magnetic permeability. | |
read_fortran_namelist | ( | file0, | |
silent = True , |
|||
b_arr = False |
|||
) |
Return a dictionary with the parameters in the namelist file (file0) @param file0 File to read from @param silent If false, print dictionary entries after reading @param b_arr Refers to an array at the bottom of the file, if one exists @result Dictionary containing data from file0.
run_shell_command | ( | command, | |
timeout = 10 , |
|||
env_vars = {} |
|||
) |
Run a shell command.
command | Command and arguments to run |
timeout | Timeout for command to complete [seconds] |
env_vars | Modifications to runtime environment |
result
STDOUT, errcode
Error code from command write_native_mesh | ( | filename, | |
r, | |||
lc, | |||
reg, | |||
nodesets = [] , |
|||
sidesets = [] , |
|||
ho_info = None , |
|||
periodic_info = None |
|||
) |
Create a native HDF5 mesh file for OFT from the given mesh information @param filename Filename for mesh file @param r Points list [np,3] @param lc Cell list [nc,3] (1-based) @param reg Region list [nc] @param nodesets List of node sets @param sidesets List of side sets @param ho_info High-order grid information @param periodic_info Information for mesh periodicity
float eC = 1.60217663e-19 |
Electron charge.
int mu0 = numpy.pi*4.E-7 |
Vacuum magnetic permeability.