From b0fe0a6c43a26e1134e028a29488109060aa0251 Mon Sep 17 00:00:00 2001 From: Andreas Wingen Date: Tue, 5 Mar 2024 13:56:34 -0800 Subject: [PATCH] Update to comments and variable descriptions for readthedocs --- docs/source/inputFile.rst | 3 +- source/plasma3DClass.py | 67 +++++++++++++++++-- .../D3DTestCase/batchFile.dat | 40 ++++++----- 3 files changed, 90 insertions(+), 20 deletions(-) diff --git a/docs/source/inputFile.rst b/docs/source/inputFile.rst index ee07fd8..755a14b 100644 --- a/docs/source/inputFile.rst +++ b/docs/source/inputFile.rst @@ -22,7 +22,8 @@ where X is the machine name. .. autofunction:: gyroClass.GYRO.allowed_class_vars .. autofunction:: radClass.RAD.allowed_class_vars .. autofunction:: openFOAMclass.OpenFOAM.allowed_class_vars -.. autofunction:: plasma3DClass.plasma3D.allowed_class_vars +.. autofunction:: plasma3DClass.plasma3D.allowed_class_vars +.. autofunction:: plasma3DClass.heatflux3D.allowed_class_vars References: diff --git a/source/plasma3DClass.py b/source/plasma3DClass.py index b1852d0..a25b8a1 100644 --- a/source/plasma3DClass.py +++ b/source/plasma3DClass.py @@ -56,7 +56,35 @@ def __init__(self): def allowed_class_vars(self): """ - These variables are read in from the input file. The call is in engine_class.loadInputs + .. Writes a list of recognized class variables to HEAT object + .. Used for error checking input files and for initialization + .. These variables are read in from the input file. + .. The call is in engine_class.loadInputs + + plasma3D Variables: + ---------------------------- + + :plasma3Dmask: boolean that determines if 3D plasmas should be turned on + If True, uses M3DC1 equilibrium + :itt: integer number of toroidal iterations for the MAFOT 'heatlaminar_mpi' run + :response: integer to select the M3D-C1 time_xxx.h5 file to use. + For linear M3D-C1, time_001.h5 includes the plasma response and + time_000.h5 is the vacuum field only + :selectField: integer to switch between g-file (-1) or M3D-C1 (2) in MAFOT run + :useIcoil: integer to turn on vacuum field perturbation coils, default is 0 + :sigma: integer to switch between tracing field lines (0), co-passing (+1) or + counter-passing (-1) particles in MAFOT + :charge: integer, charge of particles, -1 for electrons, >0 for ions + ignored for sigma = 0 + :Ekin: float, inetic energy of particles in keV; ignored for sigma = 0 + :Lambda: float, ratio of perpendicular to parallel particle velocity + ignored for sigma = 0 + :Mass: integer, mass number of particles, 1 for electrons and H, 2 for D, 4 for He + ignored for sigma = 0 + :loadHF: boolean, True means load previous heat flux results instead of + running MAFOT, False means run MAFOT + :loadBasePath: string, Path for find previous results if loadHF is True + :NCPUs: integer, number of CPUs to use in MAFOT, default is 10 """ self.allowed_vars = ['plasma3Dmask','itt','response', 'selectField','useIcoil','sigma','charge','Ekin','Lambda','Mass','loadHF', @@ -86,8 +114,10 @@ def initializePlasma3D(self, shot, time, gFile = None, inputDir = None): Set up basic input vars gfile should include the full path and file name inputFile is the main .csv file with input variables - cwd is the HEAT data folder on the host machine for this shot and pfc, typically ~/HEAT/data/__/