Creating the Model
Create the model in CADFEKO. Define any ports and sources required for the model. Specify the operating frequency or frequency range for the model.
Note: Assume the focal point of the lens is located at the global origin.

Define the following variables.
 freq = 30e9 (The operating frequency.)
 epsr = 6 (relative permittivity.)
 tand = 0.005 (dielectric loss tangent.)
 lambda_0 = c0/freq (The wavelength in free space.)
 D = lambda_0*10 (lens diameter.)
 F = 1.5*D (focal length.)

Define the following derived variables for the model construction.
 alpha = arcsin(D/(2*F)) (The included angle to the edge of the lens.)
 arclength = alpha* F (The arc length to the edge of the lens.)
 n = sqrt(epsr) (The refraction index of the lens.)
 T = (2*F  sqrt(4*F^2  D^2))/(2*(n1)) (The thickness of the length.)
 v0 = (F + T) / (n + 1) (The ellipse offset distance.)
 u0 = sqrt(n^2  1) * v0 (The diameter of the lens.)
 w0 = n*v0 (The major axis length of the ellipse.)

Define a dielectric medium, glass.
 Relative permittivity: epsr
 Dielectric Loss tangent: tand
 Label: Glass
Construct the lens by subtracting a sphere from an elliptical
spheroid.

Create a sphere.
 Definition method: Centre, radius
 Centre: (0, 0, 0)
 Radius: F

Create the elliptical spheroid.

Subtract the sphere from the elliptical spheroid.
 Rename Subtract1 to Lens.
A closed region is by default set to perfect electric conductor (PEC).
 Set the region of Lens to Glass.

Set the solver method for the dielectric lens antenna to use RLGO.
Tip: Open the Modify Face dialog and click the Solution tab. From the Solve with special solution method list, select Ray launching  geometrical optics (RLGO).
 Set the frequency to freq.
The dielectric lens is illuminated by a far field pattern source. The
Efield pattern is described by the following equation.
$${E}_{x}={\mathrm{cos}}^{4}(\theta )\text{where}0\le \theta \le \frac{\pi}{2}\text{isthepolaranglefromtheZaxis}\text{.}$$

Define the far field data.
 Load field data from a Feko Solver (*.ffe) file
 File name: Ideal_CosineQ4_Xpol.ffe
 Select Use all data blocks
 Label: FarFieldData1

Create a far field equivalent source using the far field definition,
FarFieldData1.
 Magnitude scale factor: 1
 Phase offset (degrees): 0
 Field data: FarFieldData1.
Note: The far field source is positioned at the origin which coincides with the focal point of the lens.