In this example, we use a COMSOL front-face coupling calculation provided by ORNL, exported as a standard Touchstone file.
The Touchstone file is first import as a scikit-rf Network, which is then modified to fit the WEST ICRH antenna electrical model requirements.
import numpy as np
import skrf as rf
# WEST ICRH Antenna package
import sys; sys.path.append('..')
from west_ic_antenna import WestIcrhAntenna
front_face_conventional = rf.Network(
'../west_ic_antenna/data/Sparameters/front_faces/COMSOL/ORNL_front_face_conventional.s4p')
print(front_face_conventional) # 50 Ohm S-param component at a single frequency of 55 MHz
The ports have been defined as:
So before to use the S-parameters directly to feed the electrical model, we need to:
# creating a 50 Ohm dummy coax line to be removed from the front face
media_coax = rf.DefinedGammaZ0(frequency=front_face_conventional.frequency) # 50 Ohm TEM media
extra_line = media_coax.line(d=0.3, unit='m')
# deembedding all the 4 pourts
for port_idx in range(4):
front_face_conventional = rf.connect(front_face_conventional, port_idx, extra_line.inv, 0)
We expect the port to have a characteristic impedance of about 46.64 ohm, so we renormalize the Network to fit this need:
front_face_conventional.renormalize(46.64) # done inplace
And finally, for historical reasons (may change in a near future ;), the S-matrix port ordering should be ajusted:
front_face_conventional.renumber([1, 2], [2, 1]) # done inplace
OK, so now we can create the WEST antenna object:
ant = WestIcrhAntenna(front_face=front_face_conventional,
frequency=front_face_conventional.frequency) # restrict to single frequ
Let's match the antenna for this coupling:
Cs = ant.match_both_sides(f_match=55e6)
The coupling resistance of the antenna for this coupling in a nominal dipole excitation is:
power = [1, 1]
phase = [0, np.pi]
# Coupling resistance
ant.Rc(power, phase)
The voltage and currents are:
power = [1.6/2, 1.6/2] # MW, to adjust to fit with experiment
phase = [0, np.pi] # rad
abs(ant.voltages(power, phase)) # results in kV
abs(ant.currents(power, phase)) # results in kA