Plasma Coupling Using COMSOL Results

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.

Importing the S-parameters in the electric model

[1]:
import numpy as np
import skrf as rf

# WEST ICRH Antenna package
import sys; sys.path.append('..')
from west_ic_antenna import WestIcrhAntenna
[2]:
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
4-Port Network: 'ORNL_front_face_conventional',  55000000.0-55000000.0 Hz, 1 pts, z0=[50.+0.j 50.+0.j 50.+0.j 50.+0.j]

The ports have been defined as: ba95ce0aff1647ef9c7d667455531751

So before to use the S-parameters directly to feed the electrical model, we need to:

  • deembed the ports by 0.3m.

  • renomalize port reference impedance to the front-face coax characteristic impedances.

  • reverse ports 2 and 3 to match the expected definition by the electrical model.

[3]:
# 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')
# deembed all the 4 ports
for port_idx in range(4):
    front_face_conventional = rf.connect(front_face_conventional, port_idx, extra_line.inv, 0)
/home/docs/checkouts/readthedocs.org/user_builds/west-ic-antenna/checkouts/latest/.venv/lib/python3.12/site-packages/skrf/__init__.py:75: FutureWarning: skrf.io.DefinedGammaZ0 is deprecated. Please import DefinedGammaZ0 from skrf.io.touchstone instead.
  result = getattr(module, name, None)
/tmp/ipykernel_2271/753255592.py:2: FutureWarning: skrf.DefinedGammaZ0 is deprecated. Please import DefinedGammaZ0 from skrf.io instead.
  media_coax = rf.DefinedGammaZ0(frequency=front_face_conventional.frequency) # 50 Ohm TEM media
/tmp/ipykernel_2271/753255592.py:6: FutureWarning: skrf.connect is deprecated. Please import connect from skrf.network instead.
  front_face_conventional = rf.connect(front_face_conventional, port_idx, extra_line.inv, 0)

The COMSOL S-parameters have been exported using a 50 Ohm reference impedance. However, we expect the port reference impedance equals to the characteristic impedance, that is, about 46.64 ohm, so we renormalize the Network to fit this need:

[4]:
front_face_conventional.renormalize(46.64)  # done inplace

And finally, for historical reasons (may change one day…), the S-matrix port ordering should be adjusted:

[5]:
front_face_conventional.renumber([1, 2], [2, 1]) # done inplace

OK, so now we can create the WEST antenna object:

[6]:
ant = WestIcrhAntenna(front_face=front_face_conventional,
                     frequency=front_face_conventional.frequency) # restrict to single frequ

Let’s match the antenna for this coupling:

[7]:
Cs = ant.match_both_sides(f_match=55e6)
Looking for individual solutions separately for 1st guess...
Wrong solution found ! Re-doing...
False solution #1: [150. 150.]
True solution #1: [52.57984943 45.88699497]
True solution #1: [52.30895896 46.07010099]
Searching for the active match point solution...
Reducing search range to +/- 5pF around individual solutions
True solution #1: [53.67806914 46.1220747  53.6280104  46.30935775]

The coupling resistance of the antenna for this coupling in a nominal dipole excitation is:

[8]:
power = [1, 1]
phase = [0, np.pi]

# Coupling resistance
ant.Rc(power, phase)
[8]:
array([0.70081638, 0.6878438 ])

The total voltages and currents at the capacitors are:

[9]:
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
[9]:
array([[19.82163699, 21.24743731, 18.39749471, 22.55050911]])
[10]:
abs(ant.currents(power, phase))  # results in kA
[10]:
array([[0.62832336, 0.67579437, 0.58405009, 0.71916798]])

Exporting voltage excitations

Now that the electrical model has been created and the antenna matched, one can export the voltage values at the front-face port into COMSOL to visualize the electric field and currents in the antenna front face and in the plasma.

Depending of the needs, the total voltages at the front-face port can be splitted into forward and reflected voltages:

\[V = V_{fwd} + V_{ref}\]
[11]:
V_fwd, V_ref = ant.front_face_voltage_waves(power, phase, Cs=Cs)
print(V_fwd)
[[ -6.69323604-28.99523523j   5.99361056+27.60111087j
   22.771903  +16.48938591j -22.07810345-14.78473427j]]

Of course, we find the same total voltage:

[12]:
Vtot = V_fwd + V_ref
V = ant.voltages(power, phase, Cs=Cs)
# pay attention that the voltage index differ from the front-face port indexes...
np.allclose(Vtot[:,[0,2,1,3]], V, rtol=1e-5)
[12]:
True

It is also possible to deduce the forward powers and phases to setup on the four ports (assuming the reference impedance is real):

[13]:
powers, phases = ant.front_face_powers_phases(power, phase, Cs=Cs)
print(powers) # in Watt
print(phases) # in degrees
[[9.4931719  8.55215146 8.47405032 7.56894318]]
[[-102.99842136   77.74837059   35.90871159 -146.19152051]]
[ ]: