The Open FUSION Toolkit 1.0.0-6f445ef
An open-source framework for fusion and plasma science and engineering
Loading...
Searching...
No Matches
ThinCurr Python Example: Compute frequency-response in a torus

In this example we demonstrate how to compute frequency response for a model from both coils and the plasma mode computed in ThinCurr Python Example: Compute current potential from B-norm.

Note
Running this example requires the h5py and pyvista python packages, which are installable using pip or other standard methods.
import sys
import os
import h5py
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
try:
import pyvista
pyvista.set_jupyter_backend('static') # Comment to enable interactive PyVista plots
have_pyvista = True
except ImportError:
have_pyvista = False
plt.rcParams['figure.figsize']=(6,6)
plt.rcParams['font.weight']='bold'
plt.rcParams['axes.labelweight']='bold'
plt.rcParams['lines.linewidth']=2
plt.rcParams['lines.markeredgewidth']=2
%matplotlib inline
%config InlineBackend.figure_format = "retina"

Load ThinCurr library

To load the ThinCurr python module we need to tell python where to the module is located. This can be done either through the PYTHONPATH environment variable or within a script using sys.path.append() as below, where we look for the environement variable OFT_ROOTPATH to provide the path to where the OpenFUSIONToolkit is installed (/Applications/OFT for binaries on macOS).

thincurr_python_path = os.getenv('OFT_ROOTPATH')
if thincurr_python_path is not None:
sys.path.append(os.path.join(thincurr_python_path,'python'))
from OpenFUSIONToolkit import OFT_env
from OpenFUSIONToolkit.ThinCurr import ThinCurr
from OpenFUSIONToolkit.ThinCurr.sensor import Mirnov, save_sensors
ThinCurr sensor definition and manipulation functionality.
Definition sensor.py:1
Python interface for ThinCurr thin-wall E-M functionality.
Definition __init__.py:1

Compute frequency response

Setup ThinCurr model

We now create a OFT_env instance for execution using four threads and a ThinCurr instance that utilizes that execution environment. Once created, we setup the model from an existing HDF5 and XML mesh definition using setup_model().

We also initialize I/O for this model using setup_io() to enable output of plotting files for 3D visualization in VisIt, Paraview, or using pyvista below.

myOFT = OFT_env(nthreads=4)
tw_torus = ThinCurr(myOFT)
tw_torus.setup_model(mesh_file='thincurr_ex-torus.h5',xml_filename='oft_in.xml')
tw_torus.setup_io()
#----------------------------------------------
Open FUSION Toolkit Initialized
Development branch:    tMaker_eq_split
Revision id:           6b5d2f29
Parallelization Info:
  # of MPI tasks      =    1
  # of NUMA nodes     =    1
  # of OpenMP threads =    4
Integer Precisions    =    4   8
Float Precisions      =    4   8  16
Complex Precisions    =    4   8
LA backend            = native
#----------------------------------------------


Creating thin-wall model
  No V(t) driver coils found
  Loading I(t) driver coils
    Masked      0 coils from sensors
  Building holes

  Loading region resistivity:
     1  1.2570E-05

  Setup complete:
    # of points    =         2394
    # of edges     =         7182
    # of cells     =         4788
    # of holes     =            2
    # of closures  =            0
    # of Vcoils    =            0
    # of Icoils    =            1

Create sensor file

Before running the main calculations we will also define some sensors to measure the magnetic field. In ThinCurr all sensors measure the flux passing through a 3D path of points, but there are several helper classes to define common sensors (eg. Poloidal flux and Mirnovs). Here we define two Mirnov sensors to measure the Z-component of the magnetic field 5 cm on either side of the torus. save_sensors() is then used to save the resulting sensor for later use.

sensors = [
Mirnov([1.45,0.0,0.0], [0.0,0.0,1.0], 'Bz_inner'),
Mirnov([1.55,0.0,0.0], [0.0,0.0,1.0], 'Bz_outer'),
]
save_sensors(sensors)

Compute self-inductance and resistivity matrices

With the model setup, we can now compute the self-inductance and resistivity matrices. A numpy version of the self-inductance matrix will be stored at tw_plate.Lmat. By default the resistivity matrix is not moved to python as it is sparse and converting to dense representation would require an increase in memory. These matrices correspond to the \(\textrm{L}\) and \(\textrm{R}\) matrices for the physical system

\(\textrm{L} \frac{\partial I}{\partial t} + \textrm{R} I = V\)

Note
For larger models calculating the self-inductance may take some time due to the \(N^2\) interaction of the elements (see ThinCurr Example: Using HODLR approximation for more information).
tw_torus.compute_Lmat()
tw_torus.compute_Rmat()
Building element<->element self inductance matrix
  Time =  3s          
Building resistivity matrix

Compute frequency response from coils

For the first case we will compute the frequency response on the model to current driven in the coil set specified in oft_in.xml at 1 kHz. To do this we first compute the coil to model mutual inductance matrix using tw_plate.compute_Mcoil(). Then we compute a purely real driver voltage by using the first row of this matrix (equivalent to multiplying by 1). Finally we use tw_plate.compute_freq_response() to compute the frequency response to this input.

coil_current = 1.E4
Mcoil = tw_torus.compute_Mcoil()
driver = np.zeros((2,tw_torus.nelems))
driver[0,:] = Mcoil[0,:]*coil_current
result = tw_torus.compute_freq_response(fdriver=driver,freq=1.E3)
Building coil<->element inductance matrices
  Time =  0s          

Starting frequency-domain run
  Frequency [Hz] =   1.00000E+03
  Starting complex GMRES solver
         0  0.000000E+00  1.133720E+01
         1                6.361443E+00
         2                3.043293E+00
         3                2.548610E+00
         4                1.414304E+00
         5                7.091233E-01
         6                3.568591E-01
         7                1.401280E-01
         8                8.187974E-02
         9                6.821360E-02
        10                6.535723E-02
        11                6.196449E-02
        12                4.684791E-02
        13                4.554808E-02
        14                3.249582E-02
        15                3.176619E-02
        16                2.835578E-02
        17                2.702281E-02
        18                2.556674E-02
        19                2.428017E-02
        20                2.316560E-02
        21                2.232681E-02
        22                2.148619E-02
        23                2.097776E-02
        24                2.059959E-02
        25                2.033502E-02
        26                1.999214E-02
        27                1.970446E-02
        28                1.954535E-02
        29                1.942117E-02
        30                1.930082E-02
        31                1.915314E-02
        32                1.899206E-02
        33                1.889307E-02
        34                1.879785E-02
        35                1.871871E-02
        36                1.860217E-02
        37                1.837916E-02
        38                1.818528E-02
        39                1.797928E-02
        40                1.781565E-02
        41                1.766273E-02
        42                1.751544E-02
        43                1.727815E-02
        44                1.694255E-02
        45                1.652836E-02
        46                1.561365E-02
        47                1.444366E-02
        48                1.322331E-02
        49                1.144057E-02
        50                9.537696E-03
        51                7.858352E-03
        52                6.457814E-03
        53                5.338199E-03
        54                4.295388E-03
        55                3.182877E-03
        56                2.733069E-03
        57                2.341214E-03
        58                1.861867E-03
        59                1.435584E-03
        60  2.097016E-01  1.077125E-03  5.136466E-03
        61                1.063746E-03
        62                9.427853E-04
        63                8.505541E-04
        64                8.353258E-04
        65                8.047516E-04
        66                7.724182E-04
        67                7.150750E-04
        68                6.694745E-04
        69                5.729630E-04
        70                4.387715E-04
        71                4.212803E-04
        72                3.855457E-04
        73                3.713219E-04
        74                3.494009E-04
        75                3.400814E-04
        76                3.086956E-04
        77                2.973514E-04
        78                2.749248E-04
        79                2.687598E-04
        80                2.607900E-04
        81                2.575348E-04
        82                2.533340E-04
        83                2.501205E-04
        84                2.479021E-04
        85                2.455230E-04
        86                2.427133E-04
        87                2.405284E-04
        88                2.390289E-04
        89                2.375186E-04
        90                2.359244E-04
        91                2.343140E-04
        92                2.334188E-04
        93                2.325685E-04
        94                2.314972E-04
        95                2.302529E-04
        96                2.291000E-04
        97                2.271692E-04
        98                2.233233E-04
        99                2.184365E-04
       100                2.130894E-04
       101                2.073864E-04
       102                2.030197E-04
       103                1.966233E-04
       104                1.876042E-04
       105                1.794986E-04
       106                1.719932E-04
       107                1.559747E-04
       108                1.285299E-04
       109                1.049224E-04
       110                9.157738E-05
       111                8.206501E-05
       112                7.053876E-05
       113                5.625970E-05
       114                4.082929E-05
       115                2.925797E-05
       116                2.446758E-05
       117                2.099124E-05
       118                1.916679E-05
       119                1.812661E-05
       120  2.105014E-01  1.787020E-05  8.489348E-05
       121                1.770476E-05
       122                1.730159E-05
       123                1.729363E-05
       124                1.728695E-05
       125                1.713555E-05
       126                1.709848E-05
       127                1.705771E-05
       128                1.696257E-05
       129                1.696124E-05
       130                1.690325E-05
       131                1.682883E-05
       132                1.680193E-05
       133                1.642649E-05
       134                1.626680E-05
       135                1.600319E-05
       136                1.593859E-05
       137                1.565963E-05
       138                1.543334E-05
       139                1.497474E-05
       140                1.408529E-05
       141                1.306096E-05
       142                1.194754E-05
       143                1.089594E-05
       144                9.957490E-06
       145                9.174953E-06
       146                8.317284E-06
       147                7.236062E-06
       148                6.233711E-06
       149                5.392590E-06
       150                4.718667E-06
       151                4.055740E-06
       152                3.685105E-06
       153                3.376327E-06
       154                3.263667E-06
       155                3.102994E-06
       156                2.888878E-06
       157                2.591837E-06
       158                2.212184E-06
       159                1.897751E-06
       160                1.626459E-06
       161                1.379171E-06
       162                1.165506E-06
       163                1.036990E-06
       164                9.623257E-07
       165                9.173395E-07
       166                8.906975E-07
       167                8.739453E-07
       168                8.622998E-07
       169                8.550025E-07
       170                8.470847E-07
       171                8.421507E-07
       172                8.345323E-07
       173                8.262945E-07
       174                8.131854E-07
       175                8.045242E-07
       176                7.964064E-07
       177                7.861783E-07
       178                7.800316E-07
       179                7.730920E-07
       180  2.104196E-01  7.443755E-07  3.537576E-06
       181                7.429977E-07
       182                7.344187E-07
       183                7.231447E-07
       184                7.198199E-07
       185                7.146831E-07
       186                6.936397E-07
       187                6.831498E-07
       188                6.754092E-07
       189                6.672311E-07
       190                6.621124E-07
       191                6.565343E-07
       192                6.480084E-07
       193                6.414702E-07
       194                6.367620E-07
       195                6.298508E-07
       196                6.264528E-07
       197                6.233235E-07
       198                6.201443E-07
       199                6.172521E-07
       200                6.126088E-07
       201                6.085881E-07
       202                6.049502E-07
       203                5.994509E-07
       204                5.936265E-07
       205                5.819052E-07
       206                5.677349E-07
       207                5.470759E-07
       208                5.188072E-07
       209                4.763159E-07
       210                4.111860E-07
       211                3.470847E-07
       212                2.907945E-07
       213                2.629491E-07
       214                2.401745E-07
       215                2.232993E-07
       216                1.843202E-07
       217                1.595641E-07
       218                1.381624E-07
       219                1.161613E-07
       220                7.696194E-08
       221                5.301292E-08
       222                3.165613E-08
       223                1.976375E-08
       224                1.404508E-08
       225                1.089556E-08
       226                8.432231E-09
       227                6.929075E-09
       228                5.766957E-09
       229                4.958958E-09
       230                4.456666E-09
       231                4.054642E-09
       232                3.678141E-09
       233                3.392003E-09
       234                3.137053E-09
       235                2.851272E-09
       236                2.507529E-09
       237                2.115919E-09
       238                1.782318E-09
       239                1.639938E-09
       240  2.104221E-01  1.549768E-09  7.365041E-09
    Time =   7.80307E-01

Save currents to plot files

The resulting currents are saved for plotting using tw_plate.save_current(). Here we save the real (Jr) and Imaginary (Ji) components of the response for visualization. Once all fields have been saved for plotting tw_plate.build_XDMF() to generate the XDMF descriptor files for plotting with VisIt of Paraview.

tw_torus.save_current(result[0,:],'Jr_coil')
tw_torus.save_current(result[1,:],'Ji_coil')
_ = tw_torus.build_XDMF()
Creating output files: oft_xdmf.XXXX.h5
  Removing old Xdmf files
    Removed 24 files
  Found Group: thincurr
    Found Mesh: icoils
      # of blocks: 1
    Found Mesh: smesh
      # of blocks: 1

Compute sensor mutual inductance matrices

We can also compute the pickup of sensors in response to both the coil and the eddy currents. To do this we compute the mutual coupling matrices between the sensors and model and the sensors and the driver coils (icoils).

Msensor, Msc, _ = tw_torus.compute_Msensor('floops.loc')
Loading sensor information
  Loading flux loops from file: floops.loc
    # of floops =
␂   
Building element->sensor inductance matrix
  Time =  0s          
Building coil->sensor inductance matrix
  Time =  0s          

Print probe signals for frequency response

probe_signals = np.dot(result,Msensor)
probe_signals[0,:] += np.dot(np.r_[coil_current],Msc)
for i in range(probe_signals.shape[1]):
print('Real: {0:13.5E}, Imaginary: {1:13.5E}'.format(*probe_signals[:,i]))
Real:  -4.91283E-06, Imaginary:  -1.37366E-08
Real:   3.89380E-06, Imaginary:  -1.95325E-08

Setup plasma mode driver model

We now create a second ThinCurr instance for the plasma mode utilizes the same execution environment as above. For this case we also load the plasma mode current patterns created in ThinCurr Python Example: Compute current potential from B-norm.

tw_mode = ThinCurr(myOFT)
tw_mode.setup_model(mesh_file='thincurr_mode.h5')
with h5py.File('thincurr_mode.h5', 'r+') as h5_file:
mode_drive = np.asarray(h5_file['thincurr/driver'])
Creating thin-wall model
  No V(t) driver coils found
  No I(t) driver coils found
  Building holes

  Setup complete:
    # of points    =         6320
    # of edges     =        18960
    # of cells     =        12640
    # of holes     =            3
    # of closures  =            2
    # of Vcoils    =            0
    # of Icoils    =            0

Compute coupling from plasma mode to torus model

To use this current distribution we need the inductive coupling between the mode currents and the ThinCurr model of the wall (tw_torus). This can be done using cross_eval(), which in this case computes the flux through each element on tw_torus due to the currents specified by weights mode_drive corresponding to the model tw_mode.

mode_driver = tw_mode.cross_eval(tw_torus,mode_drive)
Applying MF element<->element inductance matrix
  Time = 17s          

Compute frequency-response to plasma modes

We node compute the frequency-response as above using our new driver flux.

result = tw_torus.compute_freq_response(fdriver=mode_driver,freq=1.E-3)
Starting frequency-domain run
  Frequency [Hz] =   1.00000E-03
  Starting complex GMRES solver
         0  0.000000E+00  5.096814E-04
         1                3.658730E-04
         2                1.703892E-04
         3                1.084359E-04
         4                8.205521E-05
         5                6.865622E-05
         6                5.993770E-05
         7                4.914546E-05
         8                4.184366E-05
         9                3.445982E-05
        10                2.726525E-05
        11                2.155864E-05
        12                1.642650E-05
        13                1.254608E-05
        14                1.065632E-05
        15                9.146161E-06
        16                8.042828E-06
        17                7.326010E-06
        18                6.754809E-06
        19                6.139702E-06
        20                5.609269E-06
        21                5.363225E-06
        22                4.659498E-06
        23                4.239346E-06
        24                3.958802E-06
        25                3.641633E-06
        26                3.392575E-06
        27                3.245019E-06
        28                3.032400E-06
        29                2.881514E-06
        30                2.772396E-06
        31                2.638970E-06
        32                2.512160E-06
        33                2.398754E-06
        34                2.223389E-06
        35                2.084855E-06
        36                2.000267E-06
        37                1.902716E-06
        38                1.807629E-06
        39                1.749937E-06
        40                1.692552E-06
        41                1.638355E-06
        42                1.600036E-06
        43                1.556587E-06
        44                1.511407E-06
        45                1.472888E-06
        46                1.428734E-06
        47                1.385139E-06
        48                1.353518E-06
        49                1.322420E-06
        50                1.288573E-06
        51                1.255706E-06
        52                1.220621E-06
        53                1.183304E-06
        54                1.148526E-06
        55                1.117186E-06
        56                1.086858E-06
        57                1.058915E-06
        58                1.031573E-06
        59                1.007341E-06
        60  1.688020E-04  9.784296E-07  5.796316E-03
        61                9.774667E-07
        62                9.433920E-07
        63                9.339904E-07
        64                9.278808E-07
        65                9.087590E-07
        66                8.968423E-07
        67                8.870132E-07
        68                8.732203E-07
        69                8.584597E-07
        70                8.477024E-07
        71                8.341029E-07
        72                8.224047E-07
        73                8.123651E-07
        74                8.031058E-07
        75                7.919815E-07
        76                7.823907E-07
        77                7.738244E-07
        78                7.636894E-07
        79                7.542063E-07
        80                7.451934E-07
        81                7.343870E-07
        82                7.246090E-07
        83                7.143563E-07
        84                7.024065E-07
        85                6.901207E-07
        86                6.790210E-07
        87                6.663489E-07
        88                6.532869E-07
        89                6.446003E-07
        90                6.356244E-07
        91                6.253252E-07
        92                6.168966E-07
        93                6.072568E-07
        94                5.965689E-07
        95                5.870435E-07
        96                5.773067E-07
        97                5.670977E-07
        98                5.582529E-07
        99                5.491235E-07
       100                5.399116E-07
       101                5.340371E-07
       102                5.286540E-07
       103                5.223775E-07
       104                5.161372E-07
       105                5.107365E-07
       106                5.048325E-07
       107                4.999185E-07
       108                4.952414E-07
       109                4.906883E-07
       110                4.878797E-07
       111                4.856959E-07
       112                4.841160E-07
       113                4.827687E-07
       114                4.812884E-07
       115                4.796780E-07
       116                4.774917E-07
       117                4.755219E-07
       118                4.735538E-07
       119                4.715701E-07
       120  1.732213E-04  4.697510E-07  2.711855E-03
       121                4.697401E-07
       122                4.669075E-07
       123                4.662151E-07
       124                4.654691E-07
       125                4.640588E-07
       126                4.629983E-07
       127                4.622488E-07
       128                4.615967E-07
       129                4.607027E-07
       130                4.602552E-07
       131                4.596594E-07
       132                4.585647E-07
       133                4.574531E-07
       134                4.560433E-07
       135                4.543052E-07
       136                4.523347E-07
       137                4.502423E-07
       138                4.480490E-07
       139                4.457407E-07
       140                4.437707E-07
       141                4.420414E-07
       142                4.403816E-07
       143                4.385391E-07
       144                4.362389E-07
       145                4.342612E-07
       146                4.323150E-07
       147                4.296061E-07
       148                4.274409E-07
       149                4.253763E-07
       150                4.229276E-07
       151                4.210598E-07
       152                4.193290E-07
       153                4.172124E-07
       154                4.148740E-07
       155                4.125468E-07
       156                4.100566E-07
       157                4.077573E-07
       158                4.060159E-07
       159                4.043013E-07
       160                4.023694E-07
       161                4.005185E-07
       162                3.982753E-07
       163                3.956719E-07
       164                3.937746E-07
       165                3.918465E-07
       166                3.895589E-07
       167                3.874751E-07
       168                3.853233E-07
       169                3.827543E-07
       170                3.804144E-07
       171                3.780222E-07
       172                3.751513E-07
       173                3.720707E-07
       174                3.694219E-07
       175                3.668359E-07
       176                3.642981E-07
       177                3.613587E-07
       178                3.591645E-07
       179                3.565894E-07
       180  1.852839E-04  3.538349E-07  1.909690E-03
       181                3.537856E-07
       182                3.500512E-07
       183                3.482831E-07
       184                3.478026E-07
       185                3.459529E-07
       186                3.431617E-07
       187                3.418233E-07
       188                3.406959E-07
       189                3.382621E-07
       190                3.366068E-07
       191                3.354724E-07
       192                3.341931E-07
       193                3.328302E-07
       194                3.317556E-07
       195                3.305822E-07
       196                3.294248E-07
       197                3.284378E-07
       198                3.275170E-07
       199                3.264763E-07
       200                3.253748E-07
       201                3.240501E-07
       202                3.226209E-07
       203                3.213771E-07
       204                3.200755E-07
       205                3.185309E-07
       206                3.170506E-07
       207                3.153662E-07
       208                3.136717E-07
       209                3.123916E-07
       210                3.108325E-07
       211                3.091989E-07
       212                3.077751E-07
       213                3.059368E-07
       214                3.042218E-07
       215                3.028813E-07
       216                3.012607E-07
       217                2.995378E-07
       218                2.979456E-07
       219                2.959912E-07
       220                2.941971E-07
       221                2.928459E-07
       222                2.913869E-07
       223                2.895411E-07
       224                2.878474E-07
       225                2.864619E-07
       226                2.850007E-07
       227                2.837177E-07
       228                2.826282E-07
       229                2.815227E-07
       230                2.806556E-07
       231                2.799656E-07
       232                2.793760E-07
       233                2.788317E-07
       234                2.782611E-07
       235                2.775939E-07
       236                2.766984E-07
       237                2.758602E-07
       238                2.749035E-07
       239                2.738438E-07
       240  1.927548E-04  2.728285E-07  1.415417E-03
       241                2.728178E-07
       242                2.710476E-07
       243                2.705987E-07
       244                2.704858E-07
       245                2.696865E-07
       246                2.689027E-07
       247                2.684794E-07
       248                2.680546E-07
       249                2.673946E-07
       250                2.669733E-07
       251                2.666009E-07
       252                2.660659E-07
       253                2.654272E-07
       254                2.647873E-07
       255                2.640171E-07
       256                2.629210E-07
       257                2.618660E-07
       258                2.607966E-07
       259                2.595534E-07
       260                2.585882E-07
       261                2.578020E-07
       262                2.568480E-07
       263                2.556991E-07
       264                2.545187E-07
       265                2.532987E-07
       266                2.521151E-07
       267                2.508233E-07
       268                2.494598E-07
       269                2.481572E-07
       270                2.467712E-07
       271                2.455192E-07
       272                2.442293E-07
       273                2.428922E-07
       274                2.415521E-07
       275                2.402424E-07
       276                2.386617E-07
       277                2.373005E-07
       278                2.363280E-07
       279                2.353700E-07
       280                2.342949E-07
       281                2.332229E-07
       282                2.320650E-07
       283                2.307464E-07
       284                2.297830E-07
       285                2.288087E-07
       286                2.276978E-07
       287                2.264686E-07
       288                2.253118E-07
       289                2.240665E-07
       290                2.228522E-07
       291                2.218667E-07
       292                2.207404E-07
       293                2.191579E-07
       294                2.178242E-07
       295                2.165109E-07
       296                2.150646E-07
       297                2.135990E-07
       298                2.126607E-07
       299                2.115731E-07
       300  2.043648E-04  2.103251E-07  1.029165E-03
       301                2.102987E-07
       302                2.082152E-07
       303                2.075436E-07
       304                2.066778E-07
       305                2.058953E-07
       306                2.044761E-07
       307                2.036532E-07
       308                2.027026E-07
       309                2.013282E-07
       310                2.006290E-07
       311                2.000476E-07
       312                1.991555E-07
       313                1.983852E-07
       314                1.977321E-07
       315                1.968598E-07
       316                1.960436E-07
       317                1.954054E-07
       318                1.947795E-07
       319                1.941130E-07
       320                1.933968E-07
       321                1.924687E-07
       322                1.916268E-07
       323                1.909389E-07
       324                1.901888E-07
       325                1.892960E-07
       326                1.883355E-07
       327                1.872679E-07
       328                1.862989E-07
       329                1.854958E-07
       330                1.843815E-07
       331                1.833439E-07
       332                1.826677E-07
       333                1.817328E-07
       334                1.806330E-07
       335                1.798724E-07
       336                1.790535E-07
       337                1.781661E-07
       338                1.773827E-07
       339                1.763765E-07
       340                1.755160E-07
       341                1.749810E-07
       342                1.744300E-07
       343                1.736521E-07
       344                1.729156E-07
       345                1.723124E-07
       346                1.716604E-07
       347                1.711524E-07
       348                1.707035E-07
       349                1.702057E-07
       350                1.698123E-07
       351                1.694570E-07
       352                1.691490E-07
       353                1.688680E-07
       354                1.684849E-07
       355                1.680500E-07
       356                1.676557E-07
       357                1.672767E-07
       358                1.667614E-07
       359                1.660397E-07
       360  2.102327E-04  1.653286E-07  7.864074E-04
       361                1.653180E-07
       362                1.640641E-07
       363                1.637815E-07
       364                1.637210E-07
       365                1.632708E-07
       366                1.628530E-07
       367                1.626228E-07
       368                1.623508E-07
       369                1.619845E-07
       370                1.617296E-07
       371                1.615122E-07
       372                1.612143E-07
       373                1.608734E-07
       374                1.605567E-07
       375                1.601668E-07
       376                1.596448E-07
       377                1.591210E-07
       378                1.585093E-07
       379                1.578710E-07
       380                1.573615E-07
       381                1.568900E-07
       382                1.563698E-07
       383                1.556972E-07
       384                1.548546E-07
       385                1.541303E-07
       386                1.534840E-07
       387                1.526416E-07
       388                1.517422E-07
       389                1.509461E-07
       390                1.500284E-07
       391                1.491597E-07
       392                1.482321E-07
       393                1.472305E-07
       394                1.463410E-07
       395                1.454871E-07
       396                1.442861E-07
       397                1.432409E-07
       398                1.425752E-07
       399                1.419527E-07
       400                1.411953E-07
       401                1.404990E-07
       402                1.397248E-07
       403                1.387727E-07
       404                1.381710E-07
       405                1.375727E-07
       406                1.367980E-07
       407                1.359977E-07
       408                1.352264E-07
       409                1.344212E-07
       410                1.337776E-07
       411                1.332414E-07
       412                1.326080E-07
       413                1.317080E-07
       414                1.309031E-07
       415                1.301141E-07
       416                1.293046E-07
       417                1.285267E-07
       418                1.280124E-07
       419                1.273899E-07
       420  2.190889E-04  1.267897E-07  5.787135E-04
       421                1.267801E-07
       422                1.256560E-07
       423                1.253296E-07
       424                1.250991E-07
       425                1.243828E-07
       426                1.237322E-07
       427                1.231512E-07
       428                1.224912E-07
       429                1.215099E-07
       430                1.210215E-07
       431                1.206405E-07
       432                1.200425E-07
       433                1.195566E-07
       434                1.191330E-07
       435                1.184951E-07
       436                1.179728E-07
       437                1.175612E-07
       438                1.171116E-07
       439                1.165720E-07
       440                1.160915E-07
       441                1.154617E-07
       442                1.148102E-07
       443                1.143327E-07
       444                1.137890E-07
       445                1.131061E-07
       446                1.124363E-07
       447                1.117274E-07
       448                1.110482E-07
       449                1.104433E-07
       450                1.096987E-07
       451                1.090916E-07
       452                1.086624E-07
       453                1.080902E-07
       454                1.074252E-07
       455                1.069388E-07
       456                1.065134E-07
       457                1.060764E-07
       458                1.055851E-07
       459                1.050026E-07
       460                1.045586E-07
       461                1.042912E-07
       462                1.039927E-07
       463                1.035862E-07
       464                1.032243E-07
       465                1.029240E-07
       466                1.026112E-07
       467                1.023694E-07
       468                1.021522E-07
       469                1.019281E-07
       470                1.017112E-07
       471                1.015129E-07
       472                1.013634E-07
       473                1.012004E-07
       474                1.009778E-07
       475                1.007390E-07
       476                1.005061E-07
       477                1.002903E-07
       478                1.000119E-07
       479                9.959022E-08
       480  2.228605E-04  9.916932E-08  4.449839E-04
       481                9.916377E-08
       482                9.837564E-08
       483                9.812094E-08
       484                9.807247E-08
       485                9.782998E-08
       486                9.755560E-08
       487                9.744023E-08
       488                9.732391E-08
       489                9.711154E-08
       490                9.695585E-08
       491                9.682034E-08
       492                9.663826E-08
       493                9.647343E-08
       494                9.632288E-08
       495                9.607526E-08
       496                9.580210E-08
       497                9.555123E-08
       498                9.523649E-08
       499                9.493808E-08
       500                9.470723E-08
       501                9.443697E-08
       502                9.412675E-08
       503                9.377273E-08
       504                9.325968E-08
       505                9.283704E-08
       506                9.250679E-08
       507                9.197731E-08
       508                9.143775E-08
       509                9.098313E-08
       510                9.044411E-08
       511                8.983798E-08
       512                8.921032E-08
       513                8.854791E-08
       514                8.790813E-08
       515                8.730029E-08
       516                8.652895E-08
       517                8.565115E-08
       518                8.509593E-08
       519                8.464992E-08
       520                8.407295E-08
       521                8.353214E-08
       522                8.299695E-08
       523                8.235176E-08
       524                8.186920E-08
       525                8.143854E-08
       526                8.090591E-08
       527                8.033362E-08
       528                7.984083E-08
       529                7.928476E-08
       530                7.880619E-08
       531                7.843897E-08
       532                7.801929E-08
       533                7.738690E-08
       534                7.681841E-08
       535                7.639888E-08
       536                7.593678E-08
       537                7.548936E-08
       538                7.521011E-08
       539                7.488494E-08
       540  2.293144E-04  7.454560E-08  3.250803E-04
       541                7.454151E-08
       542                7.395892E-08
       543                7.377914E-08
       544                7.369469E-08
       545                7.309125E-08
       546                7.266453E-08
       547                7.232130E-08
       548                7.190887E-08
       549                7.126607E-08
       550                7.098532E-08
       551                7.071220E-08
       552                7.022796E-08
       553                6.992614E-08
       554                6.971863E-08
       555                6.918924E-08
       556                6.886022E-08
       557                6.858804E-08
       558                6.821496E-08
       559                6.779923E-08
       560                6.748674E-08
       561                6.700070E-08
       562                6.653026E-08
       563                6.621602E-08
       564                6.583997E-08
       565                6.531139E-08
       566                6.484354E-08
       567                6.436607E-08
       568                6.389115E-08
       569                6.351086E-08
       570                6.306762E-08
       571                6.266305E-08
       572                6.236515E-08
       573                6.202272E-08
       574                6.165175E-08
       575                6.137339E-08
       576                6.113833E-08
       577                6.091556E-08
       578                6.063620E-08
       579                6.036928E-08
       580                6.012873E-08
       581                5.997412E-08
       582                5.980759E-08
       583                5.962953E-08
       584                5.948305E-08
       585                5.933756E-08
       586                5.917407E-08
       587                5.903563E-08
       588                5.891708E-08
       589                5.881768E-08
       590                5.869454E-08
       591                5.858421E-08
       592                5.849671E-08
       593                5.840819E-08
       594                5.830564E-08
       595                5.820482E-08
       596                5.807011E-08
       597                5.793235E-08
       598                5.777485E-08
       599                5.755857E-08
       600  2.314995E-04  5.727873E-08  2.474249E-04
       601                5.727252E-08
       602                5.684756E-08
       603                5.670499E-08
       604                5.667935E-08
       605                5.651882E-08
       606                5.636151E-08
       607                5.630152E-08
       608                5.623977E-08
       609                5.613678E-08
       610                5.604846E-08
       611                5.596810E-08
       612                5.586354E-08
       613                5.576762E-08
       614                5.570092E-08
       615                5.557414E-08
       616                5.543509E-08
       617                5.529663E-08
       618                5.514522E-08
       619                5.499548E-08
       620                5.486287E-08
       621                5.472509E-08
       622                5.455462E-08
       623                5.432688E-08
       624                5.408034E-08
       625                5.383278E-08
       626                5.364675E-08
       627                5.339984E-08
       628                5.311157E-08
       629                5.280588E-08
       630                5.246708E-08
       631                5.212099E-08
       632                5.177058E-08
       633                5.133153E-08
       634                5.093806E-08
       635                5.052797E-08
       636                4.994825E-08
       637                4.939098E-08
       638                4.898761E-08
       639                4.859128E-08
       640                4.819436E-08
       641                4.779562E-08
       642                4.740475E-08
       643                4.695324E-08
       644                4.657479E-08
       645                4.625950E-08
       646                4.591585E-08
       647                4.555594E-08
       648                4.519556E-08
       649                4.478736E-08
       650                4.447761E-08
       651                4.421997E-08
       652                4.386483E-08
       653                4.344371E-08
       654                4.308313E-08
       655                4.275489E-08
       656                4.253927E-08
       657                4.230726E-08
       658                4.212638E-08
       659                4.196251E-08
       660  2.359685E-04  4.181621E-08  1.772110E-04
       661                4.181539E-08
       662                4.151137E-08
       663                4.139662E-08
       664                4.133733E-08
       665                4.094249E-08
       666                4.070022E-08
       667                4.039255E-08
       668                4.014163E-08
       669                3.981766E-08
       670                3.961804E-08
       671                3.935094E-08
       672                3.911843E-08
       673                3.887527E-08
       674                3.865397E-08
       675                3.837922E-08
       676                3.814424E-08
       677                3.788005E-08
       678                3.762605E-08
       679                3.730432E-08
       680                3.707266E-08
       681                3.674903E-08
       682                3.644034E-08
       683                3.620988E-08
       684                3.595158E-08
       685                3.559506E-08
       686                3.527624E-08
       687                3.497864E-08
       688                3.468566E-08
       689                3.440818E-08
       690                3.417734E-08
       691                3.396514E-08
       692                3.375201E-08
       693                3.356539E-08
       694                3.338850E-08
       695                3.324061E-08
       696                3.311299E-08
       697                3.299988E-08
       698                3.285759E-08
       699                3.272900E-08
       700                3.260672E-08
       701                3.253539E-08
       702                3.245681E-08
       703                3.237623E-08
       704                3.231161E-08
       705                3.223759E-08
       706                3.214253E-08
       707                3.206776E-08
       708                3.201386E-08
       709                3.196687E-08
       710                3.190816E-08
       711                3.186736E-08
       712                3.182295E-08
       713                3.176296E-08
       714                3.171026E-08
       715                3.166381E-08
       716                3.159329E-08
       717                3.151471E-08
       718                3.144157E-08
       719                3.134271E-08
       720  2.371472E-04  3.116136E-08  1.314009E-04
       721                3.115447E-08
       722                3.091320E-08
       723                3.083136E-08
       724                3.081197E-08
       725                3.073155E-08
       726                3.064745E-08
       727                3.061868E-08
       728                3.059715E-08
       729                3.054162E-08
       730                3.048677E-08
       731                3.045230E-08
       732                3.040466E-08
       733                3.034997E-08
       734                3.031297E-08
       735                3.024929E-08
       736                3.017506E-08
       737                3.009907E-08
       738                3.003427E-08
       739                2.996512E-08
       740                2.989767E-08
       741                2.981857E-08
       742                2.972494E-08
       743                2.961418E-08
       744                2.948661E-08
       745                2.936769E-08
       746                2.927746E-08
       747                2.914257E-08
       748                2.899741E-08
       749                2.884075E-08
       750                2.865371E-08
       751                2.843720E-08
       752                2.824379E-08
       753                2.797985E-08
       754                2.771692E-08
       755                2.748569E-08
       756                2.714900E-08
       757                2.674212E-08
       758                2.647787E-08
       759                2.619753E-08
       760                2.590308E-08
       761                2.564672E-08
       762                2.540362E-08
       763                2.509760E-08
       764                2.480941E-08
       765                2.454267E-08
       766                2.430552E-08
       767                2.408478E-08
       768                2.383922E-08
       769                2.358165E-08
       770                2.335741E-08
       771                2.313233E-08
       772                2.287881E-08
       773                2.266023E-08
       774                2.246542E-08
       775                2.228919E-08
       776                2.212503E-08
       777                2.198610E-08
       778                2.187814E-08
       779                2.176965E-08
       780  2.400631E-04  2.169509E-08  9.037242E-05
       781                2.169473E-08
       782                2.154054E-08
       783                2.148949E-08
       784                2.146404E-08
       785                2.125427E-08
       786                2.112110E-08
       787                2.090794E-08
       788                2.074782E-08
       789                2.056612E-08
       790                2.041021E-08
       791                2.020255E-08
       792                2.006362E-08
       793                1.990997E-08
       794                1.974525E-08
       795                1.961719E-08
       796                1.945947E-08
       797                1.929069E-08
       798                1.910605E-08
       799                1.891529E-08
       800                1.869174E-08
       801                1.850865E-08
       802                1.830692E-08
       803                1.812656E-08
       804                1.795177E-08
       805                1.775456E-08
       806                1.752732E-08
       807                1.734346E-08
       808                1.716854E-08
       809                1.702706E-08
       810                1.690774E-08
       811                1.679566E-08
       812                1.667736E-08
       813                1.657630E-08
       814                1.649206E-08
       815                1.643002E-08
       816                1.636950E-08
       817                1.631412E-08
       818                1.624672E-08
       819                1.619652E-08
       820                1.613980E-08
       821                1.609638E-08
       822                1.606058E-08
       823                1.602818E-08
       824                1.599582E-08
       825                1.596126E-08
       826                1.592119E-08
       827                1.588624E-08
       828                1.586172E-08
       829                1.584019E-08
       830                1.581507E-08
       831                1.579778E-08
       832                1.577351E-08
       833                1.574106E-08
       834                1.571919E-08
       835                1.569798E-08
       836                1.566873E-08
       837                1.562979E-08
       838                1.559093E-08
       839                1.554094E-08
       840  2.406268E-04  1.547133E-08  6.429593E-05
       841                1.546812E-08
       842                1.535857E-08
       843                1.532415E-08
       844                1.531566E-08
       845                1.526719E-08
       846                1.523211E-08
       847                1.522079E-08
       848                1.520863E-08
       849                1.518113E-08
       850                1.515870E-08
       851                1.514313E-08
       852                1.512020E-08
       853                1.509738E-08
       854                1.507707E-08
       855                1.504386E-08
       856                1.500919E-08
       857                1.497533E-08
       858                1.494414E-08
       859                1.491456E-08
       860                1.488319E-08
       861                1.483924E-08
       862                1.478930E-08
       863                1.473874E-08
       864                1.468431E-08
       865                1.463351E-08
       866                1.458398E-08
       867                1.452376E-08
       868                1.445659E-08
       869                1.437273E-08
       870                1.425207E-08
       871                1.413281E-08
       872                1.404304E-08
       873                1.391490E-08
       874                1.376040E-08
       875                1.359443E-08
       876                1.340109E-08
       877                1.319400E-08
       878                1.303777E-08
       879                1.284672E-08
       880                1.266594E-08
       881                1.251926E-08
       882                1.234972E-08
       883                1.214604E-08
       884                1.194411E-08
       885                1.178690E-08
       886                1.162033E-08
       887                1.148055E-08
       888                1.135006E-08
       889                1.118138E-08
       890                1.103660E-08
       891                1.085905E-08
       892                1.069227E-08
       893                1.057143E-08
       894                1.045809E-08
       895                1.035099E-08
       896                1.026844E-08
       897                1.020824E-08
       898                1.015564E-08
       899                1.009072E-08
       900  2.423754E-04  1.004465E-08  4.144253E-05
       901                1.004454E-08
       902                9.965947E-09
       903                9.943547E-09
       904                9.931046E-09
       905                9.842436E-09
       906                9.762435E-09
       907                9.641595E-09
       908                9.551139E-09
       909                9.452179E-09
       910                9.343340E-09
       911                9.226870E-09
       912                9.124088E-09
       913                9.031253E-09
       914                8.935078E-09
       915                8.855052E-09
       916                8.759700E-09
       917                8.659048E-09
       918                8.546198E-09
       919                8.425238E-09
       920                8.281282E-09
       921                8.165378E-09
       922                8.060688E-09
       923                7.944339E-09
       924                7.840998E-09
       925                7.733377E-09
       926                7.637529E-09
       927                7.529169E-09
       928                7.421150E-09
       929                7.354804E-09
       930                7.304737E-09
       931                7.255383E-09
       932                7.196097E-09
       933                7.149418E-09
       934                7.112821E-09
       935                7.086798E-09
       936                7.062169E-09
       937                7.039714E-09
       938                7.013087E-09
       939                6.991977E-09
       940                6.967930E-09
       941                6.948232E-09
       942                6.933831E-09
       943                6.920486E-09
       944                6.906474E-09
       945                6.892560E-09
       946                6.878475E-09
       947                6.863556E-09
       948                6.850943E-09
       949                6.841723E-09
       950                6.831242E-09
       951                6.824084E-09
       952                6.814621E-09
       953                6.802794E-09
       954                6.794246E-09
       955                6.784613E-09
       956                6.772318E-09
       957                6.756914E-09
       958                6.741868E-09
       959                6.721280E-09
       960  2.426093E-04  6.695185E-09  2.759657E-05
       961                6.694260E-09
       962                6.651781E-09
       963                6.637826E-09
       964                6.633872E-09
       965                6.616678E-09
       966                6.599673E-09
       967                6.595016E-09
       968                6.590077E-09
       969                6.577353E-09
       970                6.571549E-09
       971                6.566063E-09
       972                6.554774E-09
       973                6.546382E-09
       974                6.536954E-09
       975                6.522228E-09
       976                6.510088E-09
       977                6.497145E-09
       978                6.482062E-09
       979                6.469353E-09
       980                6.456761E-09
       981                6.438256E-09
       982                6.417872E-09
       983                6.399001E-09
       984                6.375703E-09
       985                6.353606E-09
       986                6.332757E-09
       987                6.307972E-09
       988                6.279767E-09
       989                6.241617E-09
       990                6.182591E-09
       991                6.129940E-09
       992                6.089962E-09
       993                6.036503E-09
       994                5.951314E-09
       995                5.864921E-09
       996                5.771868E-09
       997                5.668442E-09
       998                5.582984E-09
       999                5.472182E-09
      1000                5.370417E-09
      1001                5.284745E-09
      1002                5.196753E-09
      1003                5.069219E-09
      1004                4.941531E-09
      1005                4.853587E-09
      1006                4.754480E-09
      1007                4.660846E-09
      1008                4.591000E-09
      1009                4.515558E-09
      1010                4.419255E-09
      1011                4.297139E-09
      1012                4.198067E-09
      1013                4.130756E-09
      1014                4.073803E-09
      1015                4.024323E-09
      1016                3.983730E-09
      1017                3.953000E-09
      1018                3.932821E-09
      1019                3.906166E-09
      1020  2.435300E-04  3.884133E-09  1.594930E-05
      1021                3.884092E-09
      1022                3.849782E-09
      1023                3.841250E-09
      1024                3.836676E-09
      1025                3.805197E-09
      1026                3.765446E-09
      1027                3.711935E-09
      1028                3.673272E-09
      1029                3.615922E-09
      1030                3.558208E-09
      1031                3.490145E-09
      1032                3.412946E-09
      1033                3.372458E-09
      1034                3.324945E-09
      1035                3.273391E-09
      1036                3.226631E-09
      1037                3.180333E-09
      1038                3.124881E-09
      1039                3.058011E-09
      1040                2.981343E-09
      1041                2.915964E-09
      1042                2.863224E-09
      1043                2.807151E-09
      1044                2.758994E-09
      1045                2.718300E-09
      1046                2.676340E-09
      1047                2.625579E-09
      1048                2.581403E-09
      1049                2.555161E-09
      1050                2.536050E-09
      1051                2.518374E-09
      1052                2.499179E-09
      1053                2.480367E-09
      1054                2.464984E-09
      1055                2.455726E-09
      1056                2.447419E-09
      1057                2.439209E-09
      1058                2.431235E-09
      1059                2.424336E-09
      1060                2.415895E-09
      1061                2.409607E-09
      1062                2.404188E-09
      1063                2.398696E-09
      1064                2.394063E-09
      1065                2.390032E-09
      1066                2.385604E-09
      1067                2.380755E-09
      1068                2.376541E-09
      1069                2.372351E-09
      1070                2.369081E-09
      1071                2.366457E-09
      1072                2.363685E-09
      1073                2.360360E-09
      1074                2.357008E-09
      1075                2.354106E-09
      1076                2.349755E-09
      1077                2.344604E-09
      1078                2.339299E-09
      1079                2.332790E-09
      1080  2.436085E-04  2.325438E-09  9.545798E-06
      1081                2.325163E-09
      1082                2.312472E-09
      1083                2.307863E-09
      1084                2.306519E-09
      1085                2.300537E-09
      1086                2.295341E-09
      1087                2.293607E-09
      1088                2.291573E-09
      1089                2.288087E-09
      1090                2.285925E-09
      1091                2.284157E-09
      1092                2.281575E-09
      1093                2.277825E-09
      1094                2.274026E-09
      1095                2.269898E-09
      1096                2.265365E-09
      1097                2.261026E-09
      1098                2.256314E-09
      1099                2.251360E-09
      1100                2.246519E-09
      1101                2.240633E-09
      1102                2.233853E-09
      1103                2.227177E-09
      1104                2.219281E-09
      1105                2.212429E-09
      1106                2.205261E-09
      1107                2.196193E-09
      1108                2.186408E-09
      1109                2.172877E-09
      1110                2.150740E-09
      1111                2.132691E-09
      1112                2.118049E-09
      1113                2.097038E-09
      1114                2.065766E-09
      1115                2.029390E-09
      1116                1.990280E-09
      1117                1.948526E-09
      1118                1.912768E-09
      1119                1.867413E-09
      1120                1.815623E-09
      1121                1.776532E-09
      1122                1.731617E-09
      1123                1.666774E-09
      1124                1.613393E-09
      1125                1.570189E-09
      1126                1.521959E-09
      1127                1.479038E-09
      1128                1.445707E-09
      1129                1.411985E-09
      1130                1.367017E-09
      1131                1.311827E-09
      1132                1.261920E-09
      1133                1.223118E-09
      1134                1.197696E-09
      1135                1.177030E-09
      1136                1.161479E-09
      1137                1.149790E-09
      1138                1.142785E-09
      1139                1.134040E-09
      1140  2.439946E-04  1.128253E-09  4.624091E-06
      1141                1.128248E-09
      1142                1.118277E-09
      1143                1.115308E-09
      1144                1.112859E-09
      1145                1.102898E-09
      1146                1.089687E-09
      1147                1.071673E-09
      1148                1.058069E-09
      1149                1.030503E-09
      1150                1.004796E-09
      1151                9.773446E-10
      1152                9.406890E-10
      1153                9.232930E-10
      1154                9.035115E-10
      1155                8.841477E-10
      1156                8.653353E-10
      1157                8.457153E-10
      1158                8.235072E-10
      1159                7.948835E-10
      1160                7.652732E-10
      1161                7.386581E-10
      1162                7.175083E-10
      1163                6.994915E-10
      1164                6.852354E-10
      1165                6.719086E-10
      1166                6.588096E-10
      1167                6.443444E-10
      1168                6.318688E-10
      1169                6.249724E-10
      1170                6.199058E-10
      1171                6.152037E-10
      1172                6.095455E-10
      1173                6.053938E-10
      1174                6.018876E-10
      1175                5.994173E-10
      1176                5.975521E-10
      1177                5.957404E-10
      1178                5.937344E-10
      1179                5.917070E-10
      1180                5.895290E-10
      1181                5.881436E-10
      1182                5.869672E-10
      1183                5.855873E-10
      1184                5.842856E-10
      1185                5.833754E-10
      1186                5.823962E-10
      1187                5.813061E-10
      1188                5.800243E-10
      1189                5.790345E-10
      1190                5.782520E-10
      1191                5.776077E-10
      1192                5.770111E-10
      1193                5.762849E-10
      1194                5.756187E-10
      1195                5.746926E-10
      1196                5.736278E-10
      1197                5.725298E-10
      1198                5.711262E-10
      1199                5.694011E-10
      1200  2.440139E-04  5.674469E-10  2.325470E-06
      1201                5.673479E-10
      1202                5.639526E-10
      1203                5.628152E-10
      1204                5.619747E-10
      1205                5.609928E-10
      1206                5.598708E-10
      1207                5.594168E-10
      1208                5.589611E-10
      1209                5.580011E-10
      1210                5.577036E-10
      1211                5.573621E-10
      1212                5.564515E-10
      1213                5.557109E-10
      1214                5.547904E-10
      1215                5.537243E-10
      1216                5.527440E-10
      1217                5.517615E-10
      1218                5.505458E-10
      1219                5.492629E-10
      1220                5.481813E-10
      1221                5.468663E-10
      1222                5.455027E-10
      1223                5.438400E-10
      1224                5.418096E-10
      1225                5.401075E-10
      1226                5.384866E-10
      1227                5.362498E-10
      1228                5.337294E-10
      1229                5.307729E-10
      1230                5.257703E-10
      1231                5.209546E-10
      1232                5.170650E-10
      1233                5.113223E-10
      1234                5.029363E-10
      1235                4.934853E-10
      1236                4.827777E-10
      1237                4.718339E-10
      1238                4.619665E-10
      1239                4.490481E-10
      1240                4.337862E-10
      1241                4.169303E-10
      1242                3.993510E-10
      1243                3.788327E-10
      1244                3.636621E-10
      1245                3.491450E-10
      1246                3.331607E-10
      1247                3.192237E-10
      1248                3.067149E-10
      1249                2.935923E-10
      1250                2.794527E-10
      1251                2.646858E-10
      1252                2.479362E-10
      1253                2.347190E-10
      1254                2.240243E-10
      1255                2.148771E-10
      1256                2.092236E-10
      1257                2.047304E-10
      1258                2.028054E-10
      1259                2.015490E-10
      1260  2.441252E-04  2.004905E-10  8.212610E-07
      1261                2.004905E-10
      1262                1.986806E-10
      1263                1.982301E-10
      1264                1.967605E-10
      1265                1.948214E-10
      1266                1.916065E-10
      1267                1.840799E-10
      1268                1.767742E-10
      1269                1.718816E-10
      1270                1.634927E-10
      1271                1.574101E-10
      1272                1.524828E-10
      1273                1.472407E-10
      1274                1.434102E-10
      1275                1.373947E-10
      1276                1.307671E-10
      1277                1.257198E-10
      1278                1.218111E-10
      1279                1.168687E-10
      1280                1.097656E-10
      1281                1.033981E-10
      1282                9.824553E-11
      1283                9.449033E-11
      1284                9.170047E-11
      1285                8.942612E-11
      1286                8.735743E-11
      1287                8.566308E-11
      1288                8.396231E-11
      1289                8.267322E-11
      1290                8.179763E-11
      1291                8.096958E-11
      1292                8.028945E-11
      1293                7.984124E-11
      1294                7.938303E-11
      1295                7.902145E-11
      1296                7.871307E-11
      1297                7.842309E-11
      1298                7.822047E-11
      1299                7.800680E-11
      1300                7.767778E-11
      1301                7.742182E-11
      1302                7.727270E-11
      1303                7.709557E-11
      1304                7.687594E-11
      1305                7.672518E-11
      1306                7.653791E-11
      1307                7.639221E-11
      1308                7.626620E-11
      1309                7.616467E-11
      1310                7.605818E-11
      1311                7.595329E-11
      1312                7.587487E-11
      1313                7.580633E-11
      1314                7.570471E-11
      1315                7.559666E-11
      1316                7.546987E-11
      1317                7.533126E-11
      1318                7.516800E-11
      1319                7.498322E-11
      1320  2.441277E-04  7.475196E-11  3.062002E-07
      1321                7.474189E-11
      1322                7.435119E-11
      1323                7.423785E-11
      1324                7.418486E-11
      1325                7.404805E-11
      1326                7.389747E-11
      1327                7.383969E-11
      1328                7.379331E-11
      1329                7.367873E-11
      1330                7.362736E-11
      1331                7.355963E-11
      1332                7.347111E-11
      1333                7.337145E-11
      1334                7.327146E-11
      1335                7.315183E-11
      1336                7.302025E-11
      1337                7.285638E-11
      1338                7.266751E-11
      1339                7.248527E-11
      1340                7.234294E-11
      1341                7.216381E-11
      1342                7.194322E-11
      1343                7.170724E-11
      1344                7.146806E-11
      1345                7.127295E-11
      1346                7.099715E-11
      1347                7.063353E-11
      1348                7.023564E-11
      1349                6.987296E-11
      1350                6.930589E-11
      1351                6.860574E-11
      1352                6.795981E-11
      1353                6.708354E-11
      1354                6.594293E-11
      1355                6.444982E-11
      1356                6.318227E-11
      1357                6.159285E-11
      1358                5.958165E-11
      1359                5.742797E-11
      1360                5.450511E-11
      1361                5.103054E-11
      1362                4.788318E-11
      1363                4.481492E-11
      1364                4.235506E-11
      1365                4.033064E-11
      1366                3.792731E-11
      1367                3.510893E-11
      1368                3.299427E-11
      1369                3.088599E-11
      1370                2.848885E-11
      1371                2.617399E-11
      1372                2.361204E-11
      1373                2.099245E-11
      1374                1.937479E-11
      1375                1.794088E-11
      1376                1.660862E-11
      1377                1.603638E-11
      1378                1.580525E-11
      1379                1.568494E-11
      1380  2.441441E-04  1.559556E-11  6.387849E-08
    Time =   4.70894E+00

Save currents to plot files

The resulting currents are saved for plotting using tw_torus.save_current(). Here we save the real (Jr) and Imaginary (Ji) components of the response for visualization. Once all fields have been saved for plotting tw_torus.build_XDMF() to generate the XDMF descriptor files for plotting with VisIt of Paraview. This method also returns a XDMF_plot_file object, which can be used to read and interact with plot data in Python (see below).

tw_torus.save_current(result[0,:],'Jr_mode')
tw_torus.save_current(result[1,:],'Ji_mode')
plot_data = tw_torus.build_XDMF()
Creating output files: oft_xdmf.XXXX.h5
  Removing old Xdmf files
    Removed 2 files
  Found Group: thincurr
    Found Mesh: icoils
      # of blocks: 1
    Found Mesh: smesh
      # of blocks: 1
Msensor_plasma, _, _ = tw_mode.compute_Msensor('floops.loc')
Loading sensor information
  Loading flux loops from file: floops.loc
    # of floops =
␂   
Building element->sensor inductance matrix
  Time =  0s          
Building coil->sensor inductance matrix
  No magnetic sensors or coils, skipping...

Print probe signals for frequency response

probe_signals = np.dot(result,Msensor) + np.dot(mode_drive,Msensor_plasma)
for i in range(probe_signals.shape[1]):
print('Real: {0:13.5E}, Imaginary: {1:13.5E}'.format(*probe_signals[:,i]))
Real:  -2.86249E-01, Imaginary:  -8.96706E-06
Real:  -1.22518E-01, Imaginary:   6.46086E-06

Plot current fields

Finally we plot the current vectors on the torus showing the imaginary eddy current structure for the plasma mode. The XDMF_plot_file class provides functionality to work with the data stored in OFT plot files, including methods to generate information for 3D plotting in Python using pyvista.

Plotting data is always associated with a specific mesh, which is itself associated with a physics group. In this case ThinCurr is the physics group and the data we are interested in is stored on the surface mesh smesh. The ‘plot_data['ThinCurr’]['smesh']` is a XDMF_plot_mesh object with further functionality for accessing data.

To plot the first eigenvector we first get the pyvista plotting grid using get_pyvista_grid() and then retrieve the vertex-centered field (Ji_mode_v) using get_field()

if have_pyvista:
grid = plot_data['ThinCurr']['smesh'].get_pyvista_grid()
Ji = plot_data['ThinCurr']['smesh'].get_field('Ji_mode_v')
grid["vectors"] = Ji
grid.set_active_vectors("vectors")
p = pyvista.Plotter()
scale = 0.2/(np.linalg.norm(Ji,axis=1)).max()
arrows = grid.glyph(scale="vectors", orient="vectors", factor=scale)
p.add_mesh(arrows, cmap="turbo", scalar_bar_args={'title': "Imag(J)", "vertical": True, "position_y":0.25, "position_x": 0.05})
p.add_mesh(grid, color="white", opacity=1.0, show_edges=False)
p.show(jupyter_backend='static')