# 4.3. Test and Validation Cases¶

The test-deck, including the validation test cases, is designed to demonstrate correct functioning of all the commonly used parts of SMITER. Data for the test-deck is in the smiter-aux directory, together with files “_notes.txt” on how to produce geometry for the validation test cases.

The .sgo scripts have extensive internal documentation (q.v.). It is here noted that the .sgo scripts in ./smiter/Extras arrange files in a subdirectory structure within the main run directory for each case. These subdirectories are named M, G, S, H and P and correspond to execution of the code with the corresponding initial letter, thus “G” for geoq, “P” for powcal, etc., except that since geoq has to be run separately for results and shadowing geometry, “S” is used for the latter.

A brief description of each case follows so that the user may determine which is closest to the problem of current interest and therefore might be most easily modified to solve it. Test cases from the SMARDDA development are performed in directories starting “Test-“, whereas SMITER validation cases begin “Val-“. The remaining components of the names in order are an identifier of the equilibrium, the shadowing geometry and the results geometry respectively. An optional 4th component indicates whether a local or global problem was solved. Thus the geometries may be easily identified among the .vtk files in ./smiter-aux/Data/VTK and visualised using ParaView, although note that the .vtk files for the validation cases have to be generated from the .dat files in ./smiter-aux/Data/Geometry.

For the two ITER test cases, the first wall silhouette is used to determine the position of the contact point, hence the value of flux $$\psi$$ of the last closed flux-surface (LCFS) and thence the power normalisation. In the MAST-U test case Test-MNEW8-sha12-res12 , the LCFS is known to correspond to $$\psi=0$$ . In the validation work, the $$\psi$$ of the LCFS is taken from the eqdsk file, except for Val-F11-fw264t-fw4t , the LCFS is determined using the displaced geometry, hence is closer to the centre of the plasma increasing the peak power deposition by a factor of two. In the original VDE validation case, there was an issue regarding mesh resolution, hence the examination of a much finer grid.

Test-deck and validation cases are available in smiter-aux GIT repository and can be run with in command line tests.bash script . The same test and validation cases were created as HDF study files for use with SMITER GUI. In the continuation screenshots from both procedures are shown for comparison. Users are advised to load those study files or build them by themself for checking the environment or have them as a starting point for new cases.

Fig. 4.2 Test-EQ3-inrshad1-inres case computed with tests.bash script.

Fig. 4.3 Test-EQ3-inrshad1-inres case computed with SMITER GUI.

This test-case is taken from the AFWS project, https://idm.f4e.europa.eu/?uid=24NDFU&version=v1.2 which saw the development of SMARDDA primarily for ITER limiter problems. It consists of a typical ITER equilibrium with inner (high-field side HFS) limiting, with contact on the left-hand body of panel 3, and shadowing by the 8 adjacent semi-panels. Flux coordinates are used and this is a local or escape calculation, i.e. if the fieldlines do not hit the shadowing geometry before they leave the volume covered by the HDS, they are assumed to connect with the midplane. Note that since the shadowing geometry is disjoint from the target geometry, the calculation relies on an accurate silhouette of the vessel wall to obtain the limiter flux value.

List of geometry and equilibrium files used in the study:

.ctl files, that need to be included to test case:

ctl.files directory of .ctl files

Note

Before running the cases in SMITER GUI we need to make some changes into the .ctl files. This can be done by right clicking on a case object and choosing the command Edit ctl. For this case, the powcal parameters Decay length is 0.012 and Power loss is 7.5 MW:

beqparameters beqparameters
beq_rmove=-6 beq_rmove=-6

In this case we also have wall, therefore we also need to change the wall.ctl file in the beqparameters with beq_rmove=-6.

## 4.3.2. Test-MNEW8-sha12-res12¶

This test-case is taken from the MAST-U project, which saw the development of SMARDDA for divertor modelling in the presence of strong ripple field, here defined in file testov5.txt. The axisymmetric contribution consists of a conventional MAST DN (double-null) discharge. The effect on the planned MAST-U divertor geometry, represented by a 30 degree toroidal sector is examined. The results res12 geometry is tiles T1 and T2 adjacent to the MAST centre-column and the power deposition profile is a simple exponential without Eich’s modification. Cylindrical coordinates allowing for non-axisymmetry are used and this is a global calculation. However to reduce computational cost, fieldlines are only followed up to Z=-1.29, whence it is assumed that they will act as conduits of power from the midplane.

Fig. 4.4 Test-EQX40-shado14r-resf14r-3g case computed with tests.bash script.

Fig. 4.5 Test-EQX40-shado14r-resf14r-3g computed with SMITER GUI.

This test-case is taken from the AFWS project, which saw the development of SMARDDA primarily for ITER limiter problems, but this example demonstrates just how small the deposited power is if the discharge is detached, as in this case. The plot shows the (semi-)panel with maximum power deposition, the right-hand of panel 14, subject to shadowing by 4 adjacent rows each represented by up to 5 panels (there are gaps corresponding to the equatorial ports). This is a global calculation using cylindrical coordinates, but the geometry is not replicated to cover 360 degrees, performed to validate the axisymmetric field solver introduced in the SMITER project.

List of geometry and equilibrium files used in the study:

.ctl files, that need to be included to test case:

ctl.files directory of .ctl files

Note

Before running the cases in SMITER GUI we need to make some changes into the .ctl files. This can be done by right clicking on a case object and choosing the command Edit ctl. For this case, the powcal parameters Decay length is 0.011 and Power loss is 16.64 MW.This case is without wall:

plotselections plotselections

plot_geofldx = .true.

plot_gnu = .true.

plot_gnum = .false.

plot_gnusilm = .false.

plot_geofldx = .true.

plot_gnu = .true.

plot_gnum = .false

plot_gnusilm = .false.

beqparameters beqparameters

beq_bdryopt=4

beq_cenopt=2

beq_deltheta=/

beq_fldspec=3

beq_nzetap=1

beq_psiopt=/

beq_psieref=/

beq_rmove=-11

beq_thetaopt=/

beq_xiopt=2

beq_bdryopt=8

beq_cenopt=2

beq_deltheta=/

beq_fldspec=3

beq_nzetap=1

beq_psiopt=/

beq_psieref=/

beq_rmove=-11

beq_thetaopt=/

beq_xiopt=2

hdsgenparameters
limit_geobj_in_bin=80
btreeparameters
tree_nxyz=1,4,4
powcal resf14r.ctl
powcalparameters

calculation_type=’global’

refine_level=1

termination_planes = .true.

termplaneparameters

termplane_intersection=2

termplane_direction=0

termplane_position=3
odesparameters
max_numsteps=1000

termination_parameters(1)=1.

termination_parameters(2)=0.1

Note that the ‘/’ value means to clear the variable. I.e. If the geoq parameter beq_deltheta has a value by default, we simple delete the value and leave an empty space.

Fig. 4.6 Test-EQX40-shado14r-resf14r case computed with tests.bash script.

Fig. 4.7 Test-EQX40-shado14r-resf14r case computed with SMITER GUI.

This test-case is taken from the AFWS project, which saw the development of SMARDDA primarily for ITER limiter problems, but this example demonstrates just how small the deposited power is if the discharge is detached. The difference between this case and that of Test-EQX40-shado14r-resf14r-3g is that this is a local calculation, using flux coordinates.

List of geometry and equilibrium files used in the study:

.ctl files, that need to be included to test case:

ctl.files directory of .ctl files

Note

Before running the cases in SMITER GUI we need to make some changes into the .ctl files. This can be done by right clicking on a case object and choosing the command Edit ctl. For this case, the powcal parameters Decay length is 0.011 and Power loss is 16.64 MW.This case is without wall:

plotselections plotselections

plot_geofldx = .true.

plot_gnu = .true.

plot_gnum = .false.

plot_gnusilm = .false.

plot_geofldx = .true.

plot_gnu = .true.

plot_gnum = .false

plot_gnusilm = .false.

beqparameters beqparameters

beq_bdryopt=8

beq_cenopt=2

beq_psieref=/

beq_rmove=-11

beq_bdryopt=8

beq_cenopt=2

beq_psieref=/

beq_rmove=-11

Note that the ‘/’ value means to clear the variable. I.e. If the geoq parameter beq_deltheta has a value by default, we simple delete the value and leave an empty space.

## 4.3.5. Val-F11-fw264t-fw4t-1l¶

Fig. 4.8 Val-F11-fw264t-fw4t-1l case computed with tests.bash script.

Fig. 4.9 Val-F11-fw264t-fw4t-1l case computed with SMITER GUI.

This represents the power deposited on slightly misaligned panel 4 geometry by an equilibrium as described in Kocan et al., Nucl. Fusion 55(2015)033019(16pp). http://dx.doi.org/10.1088/0029-5515/55/3/033019 Shadowing is by 11 panels on each of rows 2-6, centred in toroidal angle on the target. This is a local calculation using flux coordinates.

List of geometry and equilibrium files used in the study:

 Target mesh fw4t.dat Shadow mesh fw264t.dat Equilibrium file 16_97s.eqdsk

.ctl files, that need to be included to test case:

ctl.files directory of .ctl files
geoq fw4t.ctl (target geometry) /smiter-aux/Val-F11-fw264t-fw4t-1l/S/
hdsgen fw264.ctl /smiter-aux/Val-F11-fw264t-fw4t-1l/H/
powcal fw4t.ctl /smiter-aux/Val-F11-fw264t-fw4t-1l/P/

Note

Before running the cases in SMITER GUI we need to make some changes into the .ctl files. This can be done by right clicking on a case object and choosing the command Edit ctl. For this case, the powcal parameters Decay length is 0.05 and Power loss is 5 MW.This case is without wall:

geoq fw4t.ctl (target geometry) fw264t.ctl (shadow geometry)
beqparameters beqparameters

beq_bdryopt=1

beq_psieref=-11.184812

beq_bdryopt=7

beq_psieref=/

hdsgen fw264.ctl
hdsgenparameters
limit_geobj_in_bin=160
powcal fw4t.ctl
odesparameters
initial_dt=0.0001

Note that the ‘/’ value means to clear the variable. I.e. If the geoq parameter beq_deltheta has a value by default, we simple delete the value and leave an empty space.

## 4.3.6. Val-F11-fw264t-fw4t¶

Fig. 4.10 Val-F11-fw264t-fw4t case computed with tests.bash script.

Fig. 4.11 Val-F11-fw264t-fw4t case computed with SMITER GUI.

The difference between this case and that of Val-F11-fw264t-fw4t-1l is that this calculation uses cylindrical coordinates and is a global calculation requiring fieldlines to rise to a z=+3 “midplane”. The difference in peak power is explained by the different assumption used to determine the LCFS (by the displaced geometry here).

List of geometry and equilibrium files used in the study:

 Target mesh fw4t.dat Shadow mesh fw264t.dat Equilibrium file 16_97s.eqdsk

.ctl files, that need to be included to test case:

ctl.files directory of .ctl files
geoq fw4t.ctl (target geometry) /smiter-aux/Val-F11-fw264t-fw4t/S/
hdsgen fw264.ctl /smiter-aux/Val-F11-fw264t-fw4t/H/
powcal fw4t.ctl /smiter-aux/Val-F11-fw264t-fw4t/P/

Note

Before running the cases in SMITER GUI we need to make some changes into the .ctl files. This can be done by right clicking on a case object and choosing the command Edit ctl. For this case, the powcal parameters Decay length is 0.05 and Power loss is 5 MW.This case is without wall:

geoq fw4t.ctl (target geometry) fw264t.ctl (shadow geometry)
plotselections plotselections

plot_gnum = .false.

plot_gnusilm = .false.

plot_gnum = .false.

plot_gnusilm = .false.

plot_gnu = .true.

plot_gnusil = .false.

beqparameters beqparameters

beq_bdryopt=2

beq_deltheta=/

beq_fldspec=3

beq_nzetap=1

beq_psiopt=/

beq_psieref=/

beq_thetaopt=/

beq_xiopt=2

beq_bdryopt=2

beq_deltheta=/

beq_fldspec=3

beq_nzetap=1

beq_psiopt=/

beq_psieref=/

beq_thetaopt=/

beq_xiopt=2

hdsgen fw264.ctl
hdsgenparameters
limit_geobj_in_bin=160
powcal fw4t.ctl
powcalparameters

calculation_type=’global’

refine_level=1,

termination_planes = .true.

termplaneparameters

termplane_intersection=2

termplane_direction=0

termplane_position=3
odesparameters

initial_dt=0.0001

max_numsteps=1000

termination_parameters(1)=1.

termination_parameters(2)=0.1

Note that the ‘/’ value means to clear the variable. I.e. If the geoq parameter beq_deltheta has a value by default, we simple delete the value and leave an empty space.

## 4.3.7. Val-vde-bot-baf¶

Fig. 4.12 Val-vde-bot-baf case computed with tests.bash script.

Fig. 4.13 Val-vde-bot-baf case computed with SMITER GUI.

This involves a VDE equilibrium on grid of $$65 \times 129$$ which is limited low down, on the outer baffle, see Carpentier-Chouchana et al. https://user.iter.org/?uid=D43N8F This is a global calculation, using cylindrical coordinates, in a 20 degree toroidal sector, i.e. 18-fold symmetry.

List of geometry and equilibrium files used in the study:

 Target mesh baf.dat Shadow mesh bot.dat Equilibrium file VDE_DW_li0.6_715ms.eqdsk

.ctl files, that need to be included to test case:

ctl.files directory of .ctl files
geoq baf.ctl (target geometry) /smiter-aux/Val-vde-bot-baf/S/
hdsgen bot.ctl /smiter-aux/Val-vde-bot-baf/H/
powcal baf.ctl /smiter-aux/Val-vde-bot-baf/P/

Note

Before running the cases in SMITER GUI we need to make some changes into the .ctl files. This can be done by right clicking on a case object and choosing the command Edit ctl. For this case, the powcal parameters Decay length is 0.03 and Power loss is 159 MW.This case is without wall:

geoq baf.ctl (target geometry) bot.ctl (shadow geometry)
plotselections plotselections

plot_geofldx = .true.

plot_gnu = .true.

plot_gnum = .false.

plot_gnusilm = .false.

plot_geofldx = .true.

plot_gnu = .true.

plot_gnum = .false.

plot_gnusilm = .false.

beqparameters beqparameters

beq_bdryopt=1

beq_cenopt=2

beq_deltheta=/

beq_fldspec=3

beq_nzetap=18

beq_psiopt=/

beq_psieref=-2.8867409

beq_thetaopt=/

beq_xiopt=2

beq_bdryopt=9

beq_cenopt=4

beq_deltheta=/

beq_fldspec=3

beq_nzetap=18

beq_psiopt=/

beq_psieref=-2.88

beq_thetaopt=/

beq_xiopt=2

hdsgen bot.ctl
hdsgenparameters
limit_geobj_in_bin=160
powcal baf.ctl
powcalparameters

calculation_type=’global’

refine_level=1

termination_planes = .true.

termplaneparameters

termplane_intersection=2

termplane_direction=0

termplane_position=3
odesparameters

initial_dt=0.0001

max_numsteps=1000

termination_parameters(1)=1.

termination_parameters(2)=0.1

Note that the ‘/’ value means to clear the variable. I.e. If the geoq parameter beq_deltheta has a value by default, we simple delete the value and leave an empty space.

## 4.3.8. Val-vde-botsy-baf¶

Fig. 4.14 Val-vde-botsy-baf case computed with tests.bash script.

Fig. 4.15 Val-vde-botsy-baf case computed with SMITER GUI.

The difference between this case and that of Val-vde-bot-baf is that this calculation uses a 60 degree toroidal sector, i.e. sixfold symmetry.

List of geometry and equilibrium files used in the study:

 Target mesh baf.dat Shadow mesh botsy.dat Equilibrium file VDE_DW_li0.6_715ms.eqdsk

.ctl files, that need to be included in test case:

ctl.files directory of .ctl files
geoq baf.ctl (target geometry) /smiter-aux/Val-vde-botsy-baf/S/
hdsgen botsy.ctl /smiter-aux/Val-vde-botsy-baf/H/
powcal baf.ctl /smiter-aux/Val-vde-botsy-baf/P/

Note

Before running the cases in SMITER GUI we need to make some changes into the .ctl files. This can be done by right clicking on a case object and choosing the command Edit ctl. For this case, the powcal parameters Decay length is 0.03 and Power loss is 159 MW.This case is without wall:

geoq baf.ctl (target geometry) botsy.ctl (shadow geometry)
plotselections plotselections

plot_geofldx = .true.

plot_gnu = .true.

plot_gnum = .false.

plot_gnusilm = .false.

plot_geofldx = .true.

plot_gnu = .true.

plot_gnum = .false.

plot_gnusilm = .false.

beqparameters beqparameters

beq_bdryopt=1

beq_cenopt=2

beq_deltheta=/

beq_fldspec=3

beq_nzetap=6

beq_psiopt=/

beq_psieref=-2.8968065

beq_thetaopt=/

beq_xiopt=2

beq_bdryopt=9

beq_cenopt=4

beq_deltheta=/

beq_fldspec=3

beq_nzetap=6

beq_psiopt=/

beq_psieref=-2.88

beq_thetaopt=/

beq_xiopt=2

hdsgen botsy.ctl
hdsgenparameters
limit_geobj_in_bin=160
powcal baf.ctl
powcalparameters

calculation_type=’global’

refine_level=1

termination_planes = .true.

termplaneparameters

termplane_intersection=2

termplane_direction=0

termplane_position=3
odesparameters

initial_dt=0.0001

max_numsteps=1000

termination_parameters(1)=1.

termination_parameters(2)=0.1

Note that the ‘/’ value means to clear the variable. I.e. If the geoq parameter beq_deltheta has a value by default, we simple delete the value and leave an empty space.

## 4.3.9. Val-HR-bott-baff¶

Fig. 4.16 Val-HR-bott-baff case computed with tests.bash script.

Fig. 4.17 Val-HR-bott-baff case computed with SMITER GUI.

This uses a VDE equilibrium on a fine grid of $$257 \times 513$$ originally from Y.Gribov https://user.iter.org/?uid=2V2XYR, supplied by Carpentier-Chouchana in January 2016. It is used on a geometry identical to that of Val-vde-bot-baf except without misalignment, in a global calculation, using cylindrical coordinates, in a 20 degree toroidal sector, i.e. 18-fold symmetry.

List of geometry and equilibrium files used in the study:

 Target mesh baff.dat Shadow mesh bott.dat Equilibrium file g900003_00230_ITER_15MA_eqdsk16HR.eqdsk

.ctl files, that need to be included to test case:

ctl.files directory of .ctl files
geoq baff.ctl (target geometry) /smiter-aux/Val-HR-bott-baff/S/