Example_Phase_Modulator

This is an example of how to set your CST simulation to create Phase Modulator

 1import numpy as np 
 2import matplotlib.pyplot as plt
 3import pandas as pandas
 4import sys
 5import os
 6# Add the directory containing the project to sys.path
 7current_path = os.path.dirname(os.path.abspath('__file__'))
 8sys.path.append(current_path)
 9from CST_Constructor import CST_Commands, Curves
10
11
12
13# =============================================================================
14# Open new MWS CST 
15# =============================================================================
16
17
18obj = CST_Commands()
19obj.New_Project("MWS")
20
21
22# =============================================================================
23# Create the Phase modulator
24# =============================================================================
25
26
27# Set Optical or Electrical Temptlates for the project 
28# Units Properties
29Parameters = {}
30Parameters['Length'] = "um"
31Parameters['Frequency']  = "THz"
32Parameters['Time'] = "ns"
33Parameters['Temperature'] = "degC"
34
35# Set FreqeueWavelength Range 
36Parameters["Min Wavelength"] = 1.5
37Parameters["Max Wavelength"] = 1.6
38
39
40# Set Background
41Parameters["Type Background"] = "Normal"
42Parameters["Xmin Background"] = 0
43Parameters["Xmax Background"] = 0
44Parameters["Ymin Background"] = 0
45Parameters["Ymax Background"] = 0
46Parameters["Zmin Background"] = 0
47Parameters["Zmax Background"] = 0
48
49
50# Set Boundary
51Parameters["Xmin Boundary"] = 'open'
52Parameters["Xmax Boundary"] = 'open'
53Parameters["Ymin Boundary"] = 'open'
54Parameters["Ymax Boundary"] = 'open'
55Parameters["Zmin Boundary"] = 'open'
56Parameters["Zmax Boundary"] = 'open'
57Parameters["Xsymmetry Boundary"] = 'none'
58Parameters["Ysymmetry Boundary"] = 'none'
59Parameters["Zsymmetry Boundary"] = 'none'
60
61# Mesh Settings
62Parameters["Mesh Type"] = "PBA"
63Parameters["Mesh Cells Near Object"] = 30
64Parameters["Mesh Cells far Object"] = 30
65
66obj.setOpticalSimulationProperties(Parameters)
67
68
69
70# Create Phase Modulator
71Parameters = {}
72Parameters["Electrodes Lenght"] = 50
73Parameters["Width GND"] = 40    
74Parameters["Width Signal"] = 10 
75Parameters["Width WG"] = 0.8
76Parameters["Gap"] = 1.565
77Parameters["Angle"] = 35
78Parameters["Height Electrodes"] = 0.8
79Parameters["Height WG"] = 0.4
80Parameters["Height Slab"] = 0.2 
81Parameters["Height Substrate"] = 2
82Parameters["Angle X"] = 0
83Parameters["Angle Y"] = 90
84Parameters["Angle Z"] = 0 
85
86obj.PhaseModulator(Parameters)