# 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. Define the following variables:
• lambda = 0.1 (The spacing for periodic boundary condition.)
• freq = c0/lambda (The operating frequency.)
• epsr = 2.55 (Relative permittivity of the substrate.)
• base_width = 0.5*lambda (Width of the substrate.)
• base_length = 0.5*lambda (Length of the substrate.)
• base_height = 0.02*lambda (Height of the substrate.)
• patch_width = 0.3*lambda (Width of the patch antenna.)
• patch_length = 0.3*lambda (Length of the patch antenna.)
• pin_pos = patch_length/4 (Distance of feed pin from patch centre.)
2. Create a new dielectric called substrate with relative permittivity set to epsr and the dielectric loss tangent to 0.
3. Create the substrate.
1. Create a cuboid.
• Definition method: Base centre, width, depth, height
• Base corner: (0, 0, 0)
• Width: base_width
• Depth: base_length
• Height: base_height
4. Create the patch.
1. Create a rectangle.
• Definition method: Base centre, width, depth, height
• Base centre: (0,0, base_height)
• Width: patch_length
• Depth: patch_width
5. Create the feed pin.
1. Create a wire between the patch and the bottom of the substrate.
• Start point: (-pin_pos, 0, 0)
• End point: (-pin_pos, 0, base_height)
6. Union all elements and label the union antenna.
7. Set the region of the cuboid to substrate.
8. Set the face of the patch and the bottom face of the substrate to PEC.
9. Add a wire port (segment) to the middle of the line.
10. Add a voltage source to the port. (1 V, 0°, 50 Ω).
11. Set the frequency to freq.
12. Set the periodic boundary condition of the model to end exactly on the edge of the substrate to expand in both the X direction and Y direction.
13. Specify the phase shift in both directions to be u1=0° and u2=0°.