Comsol Exercise : 2D disk
1. Run comsol
~id@photon:~$ comsol
→ show up comsol window
2. Setting
>> ‘Model’ >> ‘2D’ >> ‘Radio Frequency’ >> ‘Electomagnetic Waves’ >> (in study type) ‘Custom Studies’ >> ‘Eigenvalue’
3. Adding geometry
>> (in ‘Model builder’) ‘Geometry 1’ >> (Right click) >> (Select ‘Square’) >> (set size 10)
>> (in ‘Model builder’) ‘Geometry 1’ >> (Right click) >> (Select ‘circle’) >> (set radius 1)
>> (in ‘Model builder’) ‘Geometry 1’ >> (Right click) >> (‘Build All’)
>> (in ‘Graphics’ window at the right side) (Click line) >> make for line for defining the edge of PML
>> (in ‘Model builder’) ‘Geometry 1’ >> (Right click) >> (‘Build All’)
4. Set Material properties
>> (in “Model builder”) “Materials” >> (Right click) >> (Select ‘material’) >> (set “Material contents” at the bottom of ‘Settings’ window)
‘Electric conductivity’ : 0 (no absorption)
‘Relative permittivity’ : 1 (er =1 for vacuum)
‘Relative permeability’ : 1 (mur =1 for vacuum)
>> (in Model builder) Materials >> (Right click) >> (Select ‘material’) >> (go to ‘Graphics’ window) >> Left Click at “circle” then the gray color changes to the red color
>> Right Click at “circle” then the red color turns to the blue color
>> (in ‘Settings’) >> (set “Material contents” at the bottom)
‘Electric conductivity’ : 0 (no absorption)
‘Relative permittivity’ : 4 (er =4 for vacuum)
‘Relative permeability’ : 1 (mur =1 for vacuum)
5. Setting PML layer
>> (in ‘Model builder’) ‘Electromagnetic Waves >> Click >> change Electric field components solved for’ ‘out-of plane vector’ for TM pol
if the structure is 3D then choose ‘Three component vector’
>> (in ‘Model builder’) ‘Electromagnetic Waves >> (Right Click) >> (Select ‘Perfect Matched Layers’)
>> (in ‘Graphics’) select the PML area as before (Left click & right click at the area)
>> set PML scaling factor (If the area is InP(n=3.4), then PML scaling factor = 3.4)
(set the connected PML region with same n at once . If n is different in PML, you should define PML separately.)
6. Create mesh
>> (in ‘Model builder’) ‘Mesh 1 >> (Right Click) >> (Select ‘Free Triangular’)
>> (in ‘Graphics’) select ‘disk’ as left click & right click
>> (in ‘Free Triangular 1’) >> (Right Click) >> (Select ‘Size’)
>> (in ‘settings’) >> select ‘custom’ in Element Size >> change ‘Max...’ as 1/10/2 ( if n=4 then 1/10/4)
>> (in ‘settings’) >> select ‘custom’ in Element Size >> change ‘Min..’ as 1/100/2 ( if n=4 then 1/100/4)
Doing at a other areas
>> (in ‘Model builder’) ‘Mesh 1 >> (Right Click) >> (Select ‘Free Triangular’)
>> (in ‘Graphics’) select another geometry as left click & right click
>> (in ‘Free Triangular 1’) >> (Right Click) >> (Select ‘Size’)
>> (in ‘settings’) >> select ‘custom’ in Element Size >> change ‘Max...’ as 1/10/n’ ( if n=4 then 1/10/4)
>> (in ‘settings’) >> select ‘custom’ in Element Size >> change ‘Min..’ as 1/100/n’ ( if n=4 then 1/100/4)1
If there are only disk then doing ...
>> (in ‘Model builder’) ‘Mesh 1 >> (Right Click) >> (Select ‘Free Triangular’)
>> (in ‘Free Triangular 1’) >> (Right Click) >> (Select ‘Size’)
>> (in ‘settings’) >> select ‘custom’ in Element Size >> change ‘Max...’ as 1/10 ( if n=4 then 1/10/4)
>> (in ‘settings’) >> select ‘custom’ in Element Size >> change ‘Min..’ as 1/100/2 ( if n=4 then 1/100/4)
>> (in ‘Model builder’) ‘Mesh 1’ >> (Right click) >> (‘Build All’)
then show up mesh structure.
7. Study 1
>> (in ‘Model builder’) ‘Study 1’ >> (Click ‘triangle’ in front of ‘Study 1’)
then show up ‘Step 1:Eigenvalue’ >> Click >> change ‘Desired number of eigenvalues’ as many as you want >> change ‘Search for eigenvalues around’ -i*pi*3e8/1e-6-i
>> (in ‘Model bulider’) ‘Study 1’ >> (Click ‘triangle’ in front of ‘Study 1’)
then show up ‘Step 1:Solve Configurations’ >> Click >> ‘Solver 1’ >> Click >> ‘Eigenvalue Solver 1’ >> Click >> change ‘Transform point >> Point : Zero’ to ‘Point : 1.5E9’
: For example : eigenvalue = -i*2*pi*3e8/0.5*0.4 >> point ~ 1.5E9.
8. Run comsol
>> (in ‘Model builder’) ‘Study 1’ >> (Right Click) >> click ‘Compute’
Q =real(emw.freq)/imag(emw.freq) /2
9. Kill the comsol, intensionally.
>> open new terminal >> connect photon via graphic-supprt terminal
~id@QAUD6:~$ ssh -X jinkyu@photon (passwd : nanolaser)
>> type ‘htop’ >> double click comsol process >> click ‘F9’ >> type ‘9’ >> Enter
10. Export data
>> open saved mph file >> ‘Result’ >> ‘Export‘ >> ‘Data 1’ >> Label ‘Data1’ / Data ‘Data set’ ‘ Solution 1’ > select proper eigenvalues : / select Expression ‘ (Click (+) Model > Electromagnetic Waves > Magnetic > Magnetic field > emw.Hz )
>> Points to evaluate in “Grid”
>> Data format : Spreadsheet
set x,y range : Entry method > Step , Start : -0.5*Nx, Step : 0.1 ??, Stop : 0.5*Nx
set z surface : Entry method > Number of values, Start : 0.5*Nz, Stop : 0.5*Nz, Number of values : 1
1DiRS setting : a=0.5, w=0.65, t=0.27, Nx=34a, Ny= 2.8a, Nz=1.5a, r=0.26a, rm=0.10a~0.24a