# 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.

1. Set the model unit to centimeters.
2. Define the following variables.
• epsr_a = 10.2 (The relative permittivity of the bottom layer.)
• epsr_b = 2.54 (The relative permittivity of the top layer.)
• f_min = 2.1e9 (The minimum frequency.)
• f_max = 2.3e9 (The maximum frequency.)
• lambda_a = c0/f_max/sqrt(epsr_a)*100 (The wavelength in the bottom layer.)
• lambda_b = c0/f_max/sqrt(epsr_b)*100 (The wavelength in the top layer.)
• d_a = 0.16 (The height of the bottom layer.)
• d_b = 0.16 (The height of the top layer.)
• patch_l = 4.0 (The length of the patch antenna.)
• patch_w = 3.0 (The width of the patch antenna.)
• grnd_l = 2*patch_l (The length of the substrate.)
• grnd_w = 2.5*patch_w (The width of the substrate.)
• feed_l = lambda_a (The length of the microstrip feed line.)
• feed_w = 0.173 (The width of the microstrip feed line.)
• stub_l = 1.108 (Length of the matching stub on the microstrip feed line.)
• ap_l = 1.0 (The length of the aperture.)
• ap_w = 0.11 (The width of the aperture.)
3. Create a dielectric medium for the bottom layer.
• Relative permittivity: epsr_a
• Dielectric loss tangent: 0
• Label: bottom_layer
4. Create a dielectric medium for the top layer.
• Relative permittivity: epsr_b
• Dielectric loss tangent: 0
• Label: top_layer
5. Create the aperture.
1. Create a rectangle.
• Definition method: Base centre, width, depth.
• Base centre (C): (0, 0, 0)
• Width (W): ap_l
• Depth (D): ap_w
• Label: aperture
6. Create the finite ground plane.
1. Create a rectangle.
• Definition method: Base centre, width, depth
• Base centre (C): (0, 0, 0)
• Width (W): grnd_w
• Depth (D): grnd_l
• Label: ground
7. Create the aperture in the ground.
1. Subtract aperture from ground.
2. Rename Subtract1 to slotted_ground.
The finite ground plane now has a hole at the centre where the aperture plate was defined.
8. Create the patch.
1. Create a rectangle.
• Definition method: Base centre, width, depth.
• Base centre (C): (0, 0, d_b)
• Width (W): patch_w
• Depth (D): patch_l
• Label: patch
9. Create the microstrip feed line.
1. Create a rectangle.
• Definition method: Base corner, width, depth
• Base corner (C): (-feed_w/2, -feed_l/2 + stub_l, -d_a)
• Width (W): feed_w
• Depth (D): feed_l
• Label: feed

The source will be a voltage source placed on an edge port.

1. Create a plate (via) that connects the ground plane and feed line.
1. Create a rectangle at the end of the feed line in the XZ plane.
1. Definition method: Base corner, width, depth
2. Choose Custom workplane and change the workplane origin to (-feed_w/2, feed_l/2 + stub_l, -d_a).
3. Rotate the workplane by 90° around the U axis to create the rectangle in the XZ plane.
4. Base corner (C): (0, 0, 0)
5. Width (W): feed_w
6. Depth (D): d_a
7. Label: feedVia
Tip: Rotate the workplane by selecting Custom workplane and the right-click context menu.

A positive terminal and a negative terminal are required for the edge port.

1. Split feedVia in the UV plane at (0, 0, -d_a/2).
1. Rename the two resulting parts to port_bottom and port_top respectively.
2. Union port_bottom and port_top and rename the resulting part to conducting_elements.
3. Set the properties of all the faces to PEC.
Note: This step ensures that the faces will remain PEC after future union operations.
4. Create the bottom dielectric layer.
1. Create a cuboid.
• Definition methods: Base centre, width, depth
• Base centre (C): (0, 0, -d_a)
• Width (W): grnd_w
• Depth (D): grnd_l
• Height (H): d_a
• Label: bottom_layer
5. Create the top dielectric layer.
1. Create a cuboid.
• Base centre (C): (0, 0, 0)
• Width (W): grnd_w
• Depth (D): grnd_l
• Height: d_b
• Label: top_layer
6. Union all parts.
7. Set the bottom region to bottom_layer.
8. Set the top region to top_layer.
9. Add an edge port to the edge that splits the via connection in half.
• The negative face corresponds to the face attached to the ground plane.
• The positive face is the opposite face.
Tip: The polarity of the port is not relevant for single port models.
10. Add a voltage source to the port. (1 V, 0°, 50 Ω).
11. Set a continuous frequency range from f_min to f_max.
12. Specify the symmetry about the X=0 plane as Magnetic symmetry.
Tip: Exploit model symmetries (if it exists) in a large or complex model to reduce computational costs.