COMSOL光学仿真专题

合集下载

基于COMSOL软件的谐振腔仿真与分析

基于COMSOL软件的谐振腔仿真与分析

基于COMSOL软件的谐振腔仿真与分析闵力; 魏勇; 田芃; 王文进【期刊名称】《《电子世界》》【年(卷),期】2019(000)019【总页数】2页(P55-56)【作者】闵力; 魏勇; 田芃; 王文进【作者单位】湖南理工学院物理与电子科学学院【正文语种】中文以矩形谐振腔为例,理论推导了谐振腔内部电磁场分布及品质因子,并利用COMSOL软件进行了仿真验证。

结果表明,该软件仿真结果与理论计算结果高度一致,且能够直观、形象地展现谐振腔内部电磁参数分布。

1 前言电磁谐振腔其工作原理类似于无线LC振荡回路,不仅可用来产生高频率的振荡信号,在微波技术方面还有着广泛的应用(周俊,刘大刚,曾亚文,et al.微波谐振腔本征模求解的算法及应用:材料导报,2007),如:选频元件,波长计和滤波器等。

关于谐振腔的电磁理论,解析法只能对几种特殊结构谐振腔求解;此外,传统教学一般是通过求解麦克斯韦方程来讲解,其过程复杂而又繁琐,多数课堂会弱化这部分知识教学,学生也会望而生畏,失去了学习的兴趣。

这些导致学生对这方面的认识不够,实际工程应用能力普遍较差。

COMSOL软件属于一种多物理场仿真软件,其中包含了专门用于射频和微波建模仿真的RF模块,该模块能够对各种结构光学器件进行仿真(马愈昭,许明妍,范懿,et al.基于COMSOL4.2的波导模式特性仿真:电气电子教学学报,2015);除此外,该软件丰富的后处理功能还可让抽象的电磁现象更加直观具体(陈庆东,王俊平,基于COMSOL软件的静磁场仿真与分析:大学物理实验,2018;周子杰,刘英伟,张洋,et al.实用COMSOL后处理二次开发技术:科技与创新,2018)。

本文通过该软件直观地展现了矩形谐振腔内部电磁场分布,并自动计算了谐振腔的品质因子;另外,还与理论计算结果进行了对比分析。

该方式能够让学生更加形象地理解谐振腔电磁特性,激发学生的学习兴趣。

图1 矩形谐振腔2 谐振腔TE模式下电磁理论推导矩形谐振腔结构如图1所示,沿x轴方向内腔边长为a,沿y轴方向内腔边长为b,沿z轴方向内腔边长为c,谐振腔内部填充空气,谐振腔壁为理想导体。

comsol单模光纤仿真案例

comsol单模光纤仿真案例

comsol单模光纤仿真案例Step-Index FiberIntroductionThe transmission speed of optical waveguides is superior to microwave waveguides because optical devices have a much higher operating frequency than microwaves, enabling a far higher bandwidth.Today the silica glass (SiO 2) fiber is forming the backbone of modern communication systems. Before 1970, optical fibers suffered from large transmission losses, making optical communication technology merely an academic issue. In 1970, researchers showed, for the first time, that low-loss optical fibers really could be manufactured. Earlier losses of 2000 dB/km now went down to 20 dB/km. Today’s fibers have losses near the theoretical limit of 0.16 dB/km at 1.55 μm (infrared light).One of the winning devices has been the single-mode fiber, having a step-index profile with a higher refractive index in the center core and a lower index in the outer cladding. Numerical software plays an important role in the design of single-mode waveguides and fibers. For a fiber cross section, even the most simple shape is difficult and cumbersome to deal with analytically.A circular step-index waveguide is a basic shape where benchmark results are available (see Ref. 1).This example is a model of a single step-index waveguide made of silica glass. The inner core is made of pure silica glass with refractive index n 1 = 1.4457 and the cladding is doped, with a refractive index of n 2 = 1.4378. These values are valid for free-space wavelengths of 1.55 μm. The radius of the cladding is chosen to be large enough so that the field of confined modes iszero at the exterior boundaries.For a confined mode there is no energy flow in the radial direction, thus the wave must be evanescent in the radial direction in the cladding. This is true only ifOn the other hand, the wave cannot be radially evanescent in the core region. ThusThe waves are more confined when n eff is close to the upper limit in this interval.n eff n 2>n 2n eff n 1<<Model DefinitionThe mode analysis is made on a cross-section in the xy -plane of the fiber. The wave propagates in the z direction and has the formwhere ω is the angular frequency and β the propagation constant. An eigenvalue equation for the electric field E is derived from Helmholtz equationwhich is solved for the eigenvalue λ = ?j β.As boundary condition along the outside of the cladding the electric field is set to zero. Because the amplitude of the field decays rapidly as a function of the radius of the cladding this is a valid boundary condition.Results and DiscussionWhen studying the characteristics of optical waveguides, the effective mode index of a confined mode,as a function of the frequency is an important characteristic.A common notion is the normalized frequency for a fiber. This is defined aswhere a is the radius of the core of the fiber. For this simulation, the effective mode index for the fundamental mode,1.4444 corresponds to a normalized frequency of4.895. The electric and magnetic fields for this mode is shown in Figure 1 below.E x y z t ,,,()E x y ,()e j ωt βz –()=??E ×()×k 02n 2E –0=n eff βk 0-----=V 2πa λ0----------n 12n 22–k 0a n 12n 22–==Figure 1: The surface plot visualizes the z component of the electric field. This plot is for the effective mode index 1.4444.Reference1. A. Yariv, Optical Electronics in Modern Communications, 5th ed., Oxford University Press, 1997.Model Library path:RF_Module/Tutorial_Models/step_index_fiberModeling InstructionsFrom the File menu, choose New.N E W1In the New window, click Model Wizard.M O D E L W I Z A R D1In the Model Wizard window, click 2D.2In the Select physics tree, select Radio Frequency>Electromagnetic Waves, Frequency Domain (emw).3Click Add.4Click Study.5In the Select study tree, select Preset Studies>Mode Analysis.6Click Done.G E O M E T R Y11In the Model Builder window, under Component 1 (comp1) click Geometry 1.2In the Settings window for Geometry, locate the Units section.3From the Length unit list, choose μm.Circle 1 (c1)1On the Geometry toolbar, click Primitives and choose Circle.2In the Settings window for Circle, locate the Size and Shape section.3In the Radius text field, type 40.4Click the Build Selected button.Circle 2 (c2)1On the Geometry toolbar, click Primitives and choose Circle.2In the Settings window for Circle, locate the Size and Shape section.3In the Radius text field, type 8.4Click the Build Selected button.M A T E R I A L SMaterial 1 (mat1)1In the Model Builder window, under Component 1 (comp1) right-click Materials and choose Blank Material.2Right-click Material 1 (mat1) and choose Rename.3In the Rename Material dialog box, type Doped Silica Glass in the New label text field.4Click OK.5Select Domain 2 only.6In the Settings window for Material, click to expand the Material properties section. 7Locate the Material Properties section. In the Material properties tree, select Electromagnetic Models>Refractive Index>Refractive index (n).8Click Add to Material.9Locate the Material Contents section. In the table, enter the following settings:Property Name Value Unit Property groupRefractive index n 1.44571Refractive indexMaterial 2 (mat2)1In the Model Builder window, right-click Materials and choose Blank Material.2Right-click Material 2 (mat2) and choose Rename.3In the Rename Material dialog box, type Silica Glass in the New label text field. 4Click OK.5Select Domain 1 only.6In the Settings window for Material, click to expand the Material properties section. 7Locate the Material Properties section. In the Material properties tree, select ElectromagneticModels>Refractive Index>Refractive index (n).8Click Add to Material.9Locate the Material Contents section. In the table, enter the following settings:Property Name Value Unit Property groupRefractive index n 1.43781Refractive indexE L E C T R O M A G N E T I C W A V E S,F R E Q U E N C Y D O M A I N(E M W)Wave Equation, Electric 11In the Model Builder window, expand the Component 1 (comp1)>Electromagnetic Waves, Frequency Domain (emw) node, then click Wave Equation, Electric 1.2In the Settings window for Wave Equation, Electric, locate the Electric Displacement Field section.3From the Electric displacement field model list, choose Refractive index.M E S H11In the Model Builder window, under Component 1 (comp1) click Mesh 1.2In the Settings window for Mesh, locate the Mesh Settings section.3From the Element size list, choose Finer.4Click the Build All button.S T U D Y1Step 1: Mode Analysis1In the Model Builder window, under Study 1 click Step 1: Mode Analysis.2In the Settings window for Mode Analysis, locate the Study Settings section.3In the Search for modes around text field, type 1.446. Themodes of interest have an effective mode index somewhere between the refractive indices of the two materials. The fundamental mode has the highest index. Therefore, setting the mode index to search around to something just above the core index guarantees that the solver will find the fundamental mode.4In the Mode analysis frequency text field, type c_const/1.55[um]. This frequency corresponds to a free space wavelength of 1.55 μm.5On the Model toolbar, click Compute.R E S U L T SElectric Field (emw)1Click the Zoom Extents button on the Graphics toolbar.2Click the Zoom In button on the Graphics toolbar.3The default plot shows the distribution of the norm of the electric field for the highest of the 6 computed modes (the one with the lowest effective mode index).To study the fundamental mode, choose the highest mode index. Because the magnetic field is exactly 90 degrees out of phase with the electric field you can see both the magnetic and the electric field distributions by plotting the solution at a phase angle of 45 degrees.Data Sets1In the Model Builder window, expand the Results>Data Sets node, then click Study 1/ Solution 1.2In the Settings window for Solution, locate the Solution section.3In the Solution at angle (phase) text field, type 45.Electric Field (emw)1In the Model Builder window, under Results click Electric Field (emw).2In the Settings window for 2D Plot Group, locate the Data section.3From the Effective mode index list, choose 1.4444 (2).4In the Model Builder window, expand the Electric Field (emw) node, then click Surface 1.5In the Settings window for Surface, click Replace Expression in the upper-right corner of the Expression section. From the menu, choose Model>Component1>Electromagnetic Waves, Frequency Domain>Electric>Electric field>emw.Ez - Electricfield, z component.6On the 2D plot group toolbar, click Plot.Add a contour plot of the H-field.7In the Model Builder window, right-click Electric Field (emw) and choose Contour.8In the Settings window for Contour, click Replace Expressionin the upper-right corner of the Expression section. From the menu, choose Model>Component1>Electromagnetic Waves, Frequency Domain>Magnetic>Magnetic field>emw.Hz -Magnetic field, z component.9On the 2D plot group toolbar, click Plot. The distribution of the transversal E and H field components confirms that this is the HE11 mode. Compare the resulting plot with that in Figure 1.。

基于COMSOL的HID灯物理模型

基于COMSOL的HID灯物理模型

基于COMSOL的HID灯物理模型【摘要】本文介绍了基于COMSOL的HID灯物理模型。

我们阐述了研究背景和研究意义。

接着,详细解释了HID灯的工作原理以及COMSOL在光学仿真中的应用。

然后,我们描述了如何使用COMSOL建立HID灯的光学模型,并对模型进行了分析和光学参数优化。

结论部分讨论了基于COMSOL的HID灯光学模型的可靠性,对HID灯设计的启示,以及未来的展望。

这篇文章对于研究者和工程师在设计和优化HID灯方面具有重要参考价值。

【关键词】HID灯、COMSOL、光学仿真、光学模型、光学参数、优化、可靠性、设计、未来展望1. 引言1.1 研究背景研究背景:HID灯(高强度气体放电灯)是一种高效、高亮度的照明设备,广泛应用于汽车大灯、室外照明等领域。

随着LED等新光源技术的发展,HID灯的照明效果与能效比逐渐受到挑战。

对HID灯的光学性能进行深入研究和优化已成为当今照明行业的热点问题。

基于COMSOL来建立HID灯的光学模型,对于深入了解其光学性能、提高设计效率、降低成本具有重要意义。

通过模拟分析HID灯的光学参数,能够优化灯具结构,提高其光效和光质,为照明行业的发展带来新的启示。

1.2 研究意义HID灯作为目前常见的一种高效、高亮度照明设备,广泛应用于街道照明、工业照明等领域。

随着人们对照明质量和节能环保要求的不断提高,对HID灯的设计和优化也显得尤为重要。

基于COMSOL的HID灯物理模型可以帮助我们更深入地了解HID灯的光学特性,优化其光学参数,提高照明效果和能效比。

通过建立基于COMSOL的HID 灯光学模型,可以实现对HID灯光束形状、亮度分布等关键参数的精确模拟和优化,为HID灯的设计和制造提供重要参考。

研究基于COMSOL的HID灯光学模型具有重要的实际意义和应用前景,将有助于推动HID灯的发展,提高其在照明领域的竞争力。

2. 正文2.1 HID灯的工作原理HID灯(High Intensity Discharge lamp)是一种高强度放电灯,也称为气体放电灯。

基于comsol的仿真实验

基于comsol的仿真实验

一、实验目的熟悉掌握COMSOL Multiphysics软件,通过3D有限元建模方法,建立铂电极-玻璃体-视网膜的分层电刺激模型。

深入研究电极如何影响电刺激效果,系统的分析了电极尺寸、电极到视网膜表面的距离等参数对视网膜电刺激的影响,为视网膜视觉假体刺激电极的刺激效果提供指导意义,进一步优化电刺激效果,达到提高人工视觉的修复效果。

二、实验仪器设备计算机,COMSOL Multiphysics软件三、实验原理影响视网膜电刺激效果的因素有许多:电极尺寸、电极距视网膜距离、电极形状、电极排列等,这里主要从电极尺寸,电极距视网膜距离来探讨。

视网膜电刺激模型通过参考视网膜解剖结构构建,电刺激的有效响应区域取决于神经节细胞层(GCL)电场强度是否大于1000V/m,当大于该值时认为该区域神经节细胞能够兴奋,进而指导电极尺寸、电极距视网膜距离的参数。

四、实验内容根据视网膜的解剖结构来构建相应的视网膜分层模型,模型总共分为8层:玻璃体层,神经节细胞层,内网状层,内核层,外网状层,外核层,视网膜下区域,色素上皮层,脉络膜及巩膜。

根据视网膜各层的导电特性来设定相应的导电率,模型构建,设置边界条件。

在电极处施加相应电流刺激,规定神经节细胞层(GCL)电场强度(>1000V/m)时认为能够引起视神经细胞兴奋,在确定的电流强度下,神经节细胞层(GCL)层电场强度大于1000V/m的区域认为有效响应区域,进而判断电极刺激的有效响应区域,指导电极尺寸r和电极距视网膜距离h等参数设置。

其具体实验步骤如下所示:1、根据视网膜的解剖特性构建视网膜分层模型。

模型在三维模式下电磁场子目录下的传导介质DC场下建立。

进入建模窗口后,在绘图栏下设置模型为圆柱体,输入各部分的长宽高数值,轴基准点为圆柱体的圆心坐标。

模型分为9层(11个求解域),其示图如下:图1 视网膜分层模型2、模型建好后,在菜单栏下的物理量里面选择求解域设定,对示图的11个求解域进行设定传导率,如图2所示,其中每一层的电导率情况参考于视网膜导电特性。

新工科背景下光通信课程comsol仿真实验设计与实施

新工科背景下光通信课程comsol仿真实验设计与实施

摘 要:“新工科”这一概念提出以来,教育部组织高校进行深入研讨,形成了“复旦共识”,“天大行动”和“北京指南”。
之后便逐步开启了新工科建设的大幕,新工科建设步入了实质性的具体实施阶段。通过新工科研究与实践项目的组织和实
施,来全方位、多角度地深入扎实推进新工科建设。在新工科建设的要求下,本文通过引入多物理场分析软件结合国际研
科技创新导报 2019 NO.29 Science and Technology Innovation Herald
DOI:10.16660/ki.1674-098X.201背景下光通信课程Comsol仿真实验设计 与实施①
赵健 (天津大学精密仪器与光电子工程学院光电信息技术教育部重点实验室 天津 300072 )
随后在拉锥比为04015之间时如图5b所示拉锥的进行使得光子灯笼的直径逐步减小熔融拉锥慢慢损坏了原本光纤结构原本各光纤中的光场无法再被束缚在纤芯之中原本的模式逐渐进入包层之中此时原本的包层变成新的纤芯a值变大纤芯的归一化频率回到的状态包层中支持多种图4三模光子灯笼支持模式的有效折射率曲线科技创新导报2019no29scienceandtechnologyinnovationherald创新教育科技创新导报scienceandtechnologyinnovationherald219模式的存在
1 新工科实施的背景与意义 教育 部曾多 次召开 高等工 程 教育相 关 研 讨会,提 出了
新工 科 建 设 要求,并已达 成“复 旦共识”、“天大 行 动”和 “北 京指南”,旨在 通 过 新工 科 建 设,推动人 才 培 养 模 式 等 方面的改革。新工 科 建 设 是 一项涉及面广、影响面宽、 具有中国特色的复杂的系统工程,对中国高等教育的改革 和发展具有示范和引领作用。未来的竞争是科技的竞争、 人 才的 竞 争,以人 工智能、量 子 信息、区块 链为代 表的新 科 技的迭 代 升 级 越 来 越快。为主动应 对 新 一轮 科 技革命 与产业变革,加快建设发展新工科,探索形成中国特色、 世界水平的工程教育体系,促进我国从工程教育大国走向 工 程 教育 强国,教育 部 牵头 推出了“ 六卓越 一 拔 尖”计 划 2 . 0。天津 大 学作为 新工 科的“领 头雁”,在 全国率先 发布 “天津大学新工科建设方案”,旨在为新工科建设提供新 范式,为世界新工科建设提供“天大经验”、贡献“天大模 式”。为了积 极响 应学 校的号召,本 文 通 过 光 通信 技 术 基 础这门课程的改革,开展了基于Comsol多物理场仿真软件 对国际研 究 热点-光 子 灯笼的仿真实验,为新工科建 设 进

comsol仿真高斯光束

comsol仿真高斯光束

3 |
DEFINING A MAPPED DIELECTRIC DISTRIBUTION OF A METAMATERIAL LENS
Solved with COMSOL Multiphysics 5.2
Figure 3: The norm of the electric field shows the Gaussian beam diffracted by the metamaterial lens.
1 |
DEFINING A MAPPED DIELECTRIC DISTRIBUTION OF A METAMATERIAL LENS
Solved with COMSOL Multiphysics 5.2
Model Definition
Consider a 2D model geometry as shown in Figure 2. A square air domain, bounded by a perfectly matched layer (PML) on all sides, encloses a rectangular region in which the metamaterial lens is defined.
Figure 4: Contour plot of the dielectric distribution.
4 |
DEFINING A MAPPED DIELECTRIC DISTRIBUTION OF A METAMATERIAL LENS
Solved with COMSOL Multiphysics 5.2
2 |
DEFINING A MAPPED DIELECTRIC DISTRIBUTION OF A METAMATERIAL LENS

Comsol经典实例012:高斯波速的二次谐波产生

Comsol经典实例012:高斯波速的二次谐波产生

Comsol经典实例012: 高斯波速的二次谐波产生激光系统是现代电子技术中的一个重要应用领域。

激光束的生成方法有很多种, 这些方法有个共同点: 波长由受激发射决定, 而受激发射取决于材料参数。

通常很难生成具有短波长的激光。

但是, 如果使用非线性材料, 就有可能产生频率为激光频率数倍的谐波。

通过使用二阶非线性材料可生成波长为基频光束波长一半的相干光。

本案例演示了如何设置非线性材料属性, 通过瞬态波仿真产生二次谐波。

模型中一束波长为1.06μm的激光聚焦于非线性晶体, 光束的腰部落于晶体内。

在激光的传播过程中, 大部分能量都集中在传播轴附近, 在求解麦克斯韦方程时可以近轴近似, 由此获得高斯波束。

一、物理场选择及预设研究Step01: 打开comsol软件, 单击“模型向导”选项创建模型, 在模型的“选择空间维度”界面选择“二维”, 在“选择物理场”界面分别选择“光学→波动光学→电磁波, 瞬态(ewt)”, 单击“添加”按钮。

对应变量设置完毕以后, 单击“研究”按钮, 在“选择研究”树中添加“预设研究”中的“瞬态”研究, 单击“完成”按钮进入软件主界面, 如图1所示。

图1 软件主界面二、全局定义1.参数Step02: 参数设置。

在模型开发器窗口的全局定义节点下, 单击“参数”子节点, 在“参数”设置窗口中, 定位到“参数”栏, 输入如图2所示的参数。

图2 设置全局参数2.解析定义Step03: 在“主屏幕”工具栏中单击“函数”选项, 在下拉菜单中选择“全局→解析”选项。

单击“解析1”子节点, 在“解析”设置窗口中, 定位到“函数名称”栏, 在文本输入框中输入“w”;定位到“定义”栏, 在“表达式”文本输入框中输入“w0*sqrt(1+(x/x)^2)”;定位到“单位”栏, 在“变元”文本输入框中输入“m”, 在“函数”在文本输入框中输入“m”,如图3所示。

Step04:在“主屏幕”工具栏中单击“函数”选项, 在下拉菜单中选择“全局→解析”选项。

COMSOL二维膜层光学性能-吸收率仿真教学

COMSOL二维膜层光学性能-吸收率仿真教学

COMSOL⼆维膜层光学性能-吸收率仿真教学COMSOL⼆维膜层结构光学性能/吸收率仿真教学新建
1. 新建→模型向导→⼆维;
2. →选择物理场:光学→波动光学→电磁波,频域→增加→研究;
3. 选择研究:波长域→完成;
建模
4. ⼏何绘制多个长⽅形形成多层膜结构;
5. 必要的情况下可以在上下层加⼊空⽓层(真空层);
边界条件
6. 添加“端⼝”,设置红外⼊射端⼝,在空⽓层边界上。

再添加“端⼝”,设置出射端⼝,另⼀端的空⽓层;
7. 模型两侧边界设置为“周期性边界条件”;
8. 对于膜层很薄的部分,可以设置为“过渡边界条件”,代替超薄层,厚度可在此条件下设置;
9. 进⾏⽹格化;
材料参数
10. 顶部⼯具栏:增加材料;
11. 可在右侧框内搜索要添加的材料,然后“增加到选择”;或者添加空材料,去选择⼀个域,然后材料属性⽬录下会出现做该仿真必要的参数,输⼊参数即可;研究:结果
12. 研究→波长域,设置波长范围及步长,点击“研究”;
13. 派⽣值→全局计算,表达式选“ewfd.Atotal” ;数据系列运算选“⽆”,计算;仿真图下⽅出现“表格”,得到“波长”与“吸收率”关系。

点击“表图”按钮,得到“吸收曲线”;
14. 派⽣值→全局计算,表达式选“ewfd.Atotal”;数据系列运算选“平均值”,计算;仿真图下⽅出现“表格”,得到“平均吸收率”值。

Comsol_光学模拟入门

Comsol_光学模拟入门

COMSOL User Tips for Optical SimulationsHonghui ShenPhotonics Research Group(INTEC),Ghent University-IMEC,Sint-Pietersnieuwstraat41,9000Gent,Belgiumhonghuishen@July,20121MeshUsually the mesh size is set to beλ/6,where theλis the wavelength in the material. However for plasmonics the mesh size in the vicinity of the metal surface has to befiner, since thefield is confined to the metal surface by exciting the surface ually for silver in the visible wavelength range below5nm mesh size has to be applied to ensure the accuracy of simulations.One can do a convergency test for the mesh size around metal to avoid toofine or coarse meshes used.Since toofine mesh will definitely increase the calculation time and memory demand,on the other hand too coarse mesh will give non-accuratefield result around metal surface.For plasmonics,one has to avoid sharp corners of metal byfillet.Sharp corner will increase the mesh number and cause singularity.2Materials propertiesFor a simulation with wavelength sweep and dispersive material,the optical constants (or the permittivities)of materials corresponding to each wavelength has to be input into the model.There are several ways to do this:ing a analytical expression for the optical constant if ing a Drude-Lorentz dispersion model for metal tofit the measured optical constant1,for other materials like silicon the dispersive formula can be found in some literatures or online();1In COMSOL version4.3,this is implemented directly,see example Nanorods in v4.3.1ing the measured optical constant directly.For thefirst method,which is usually used in FDTD,the unknown parameters in Drude model have to be solved byfitting to the measured data.At some wavelength ranges the derivation of thefitting data by the Drude model is large with respect to the measured SOL provides a more easier way by using the measured data directly,i.e.the second method.For the second method,we have to build two separated txtfiles for both the real and the imaginary parts of the optical constant of e.g.silver.Be aware that in COMSOL a harmonic time dependence of e jωt is used,therefore for a loss material the optical constant is given by n-jk,where k>0.Figure1shows the txtfile for the real part of the optical constant of silver,n.Similarfile for k has to be built too.Figure1:Thefile example of optical constant of silver(dispersive material).Thefirst column is the wavelength in unit m,while the second column is the corresponding real part of refractive index of silver.For COMSOL v3.5,follow the steps below to input these twofiles(n,kfiles of optical constant)into model and set the corresponding domain:1.Clicking‘Option’→‘Functions...’,open the‘Functions’dialog box;2.Clicking the button‘New...’,open the‘New Function’dialog box(Figure2);3.Type e.g.n ag(the real part of optical constant of Ag,the function name can berandom)in the Function name editfield.Choose‘Interpolation’,and choose‘file’in the‘Use data from’(Figure2).4.Click‘Browse’,go to the directory where the nfile locates,import thefile;5.Following the above step,build another function for k ag(the imaginary part ofoptical constant of Ag);26.To this step two function n ag and k ag have been created.Now go to the sub-domain mode and open the’Subdomain settings’dialog box.Follow thefigure3 type n ag(lambda u)−j∗k ag(lambda u)in‘n’.Figure2:Input the optical constant into model as functionsFor COMSOL version above4,following the steps below2:1.Right click Materials node,create Material1(mat1)by choosing‘Material’.Rename‘Material1’as‘Ag’.2.Select the objects that correspond to material silver,choose Ag(mat1)andlocate and expand Material Properties in the Material Browser window.Select the‘Refractive index’under the‘Electromagnetic Models’and click the add sign below.Then a Refractive index(rfi)sub-node is added to the Ag (mat1)node.3.Right click Refractive index(rfi)and select‘Functions’→‘Interpolation’.AddInterpolation1(int1)to the node Refractive index(rfi).4.In the Interpolation Browser window,locate the parameters.Type‘n ag’inthe‘Function name’editfield,then choose‘file’in the‘Data source’.Click the ‘Browse...’button,go to the directory where the nfile locates and import the file,click‘open’to input thefile path into the‘Filename’editfield,and then click ‘Import’button.After this a table of real part of Ag data will be shown.2here only give one way to define material properties,there are other ways.3Figure3:Set the corresponding domain with the predefined functions.5.Repeat the last two steps for the imaginary part.6.After defining all of the materials used in current model in the Materials node,there is one more step to activate the material defined.In the Electromagnetic waves node,locate Material Type and select‘From material’,locate Electric Displacement Field and select‘Refractive index’in the‘Electric displacement field model’.3Light sourceThere are several different types of light source,e.g.point source,line source,plane source.Here ways to define plane source will be introduced.There are two usually used plane source,plane wave source and gaussian beam.For objects in a homogeneous material like a nanoparticle in air,plane wave can be introduced by using scattered formula,more details see examples‘Radar Cross Section’for COMSOL version above 4,and‘Dielectric scattering PML’for COMSOL v3.5.For gaussian beam,see examples‘Second Harmonic Generation of a Gaussian Beam’and‘nanorods’for COMSOL verson4.3,‘Second Harmonic Generation of a Gaussian Beam’for COMSOL v3.5.For models with object on a substrate,e.g.nanoparticles on glass,in these case,the scattered formula does not valid any more(since the object is not enclosed in a single4material).Several possible methods can be used:e two studies(see model example,‘plasmonic wire grating’in COMSOL v4.x),but the drawback of this method is that multiple ports have to be defined for each scattering order,it is feasible for cases with only few scattering orders existing.Ifa model has a lot of scattering orders,it becomes complicated to define all of theports for different orders.e the‘assembly’to introduce a soft source,see‘Assembly’in the‘Examples’fold(Details can be found in the slides included in‘Assembly’.This is also an example for how to set periodic boundary condition).But this seems only valid for COMSOL v3.5.Maybe this is implemented in the newest version4.3.3.Still use the scattered formula with adjustment applied to the initialfield(corre-sponding to the‘Incidentfield’in COMSOL v3.5,and the‘backgroundfield’in COMSOL v4.x).See‘Adjusted scattered’in the‘Examples’fold.4.(For other new methods,please add it here...)Now here details about method3in COMSOL v4.x(for v3.5it is similar)will be introduced.For simplicity,wefirst consider a2D model as shown infigure4(a), a periodic grating(material3,only one period is used in model therefore periodic boundary condition has applied to the lateral sides)on substrate(material2).In order to use the scattered formula,we have to givefield distribution in structure without grating,i.e.figure4(b)as the initialfiled of the model in(a).Thefield distribution in(b)can be easily calculated by Fresnel’s law together with Snell’s law.To simplify further we consider normal incidence.Therefore the totalfield in(b)can be expressed as:total=inc(y>y0)+refl(y>y0)+trans(y≤y0),(1)where‘y0’is the coordinate of the surface of substrate,‘inc’is the incident plane wave,‘refl’the reflected plane wave and the‘trans’the transmitted plane wave.Mathemat-ically Eq.2is realized with function‘sign’by:total=(inc+refl)·u1+trans·u2,(2)u1=(1+sign(y−y0))/2(3)u2=(1−sign(y+y0))/2(4)5(a)(b)Figure4:(a)A grating on a substrate.(b)structure without grating.These variables in the above3equations can be defined in the Variables under the Global Definitions node as shown infigure5.After define the initialfield expression in Variables,the initial(or background)field expression has to befilled into the Backgroundfiled as shown infigure6.More details see‘Adjusted scattered’in the ‘Examples’fold.4ScriptThe best way to learn script is saving an simple model as a script,i.e.the‘.m’file, which run on COMSOL with MATLAB.In a typical script,it usually includes the ge-ometry,mesh,physical setting(point(2D,3D),edge(3D),boundary(2D,3D)and sub-domain(2D,3D)setting),running,and postprocessing.In the following tips in terms of these aspects for COMSOL v3.5will be introduced(script for v4.x is quite different from v3.5and will be not introduced here,one is referred to the COMSOL documentation).4.1Create geometryGeometry example(the whole script is located:‘Scripts\Grating scattered formula’): %Geometrypml1=rect2(period,t pml);–create PML layer,rectangle6Figure5:Define initialfield in the Variables node.Figure6:Define the backgroundfield in the Backgroundfiled.7sub=rect2(period,t sub,‘base’,‘corner’,‘pos’,{‘0’,pos sub});–create PML refl=rect2(period,t refl,‘base’,‘corner’,‘pos’,{‘0’,pos refl});–create reflector p3ht=rect2(period,t p3ht,‘base’,‘corner’,‘pos’,{‘0’,pos p3ht});–create active layersup=rect2(period,t sup,‘base’,‘corner’,‘pos’,{‘0’,pos sup});–create air layer above active layerpml2=rect2(period,t pml,‘base’,‘corner’,‘pos’,{‘0’,pos pml});–create PMLg7=rect2(w gf/2,t gf,‘base’,‘corner’,‘pos’,{‘0’,pos gf y});–create grating on active layerfg=fillet(g7,‘radii’,ffillet,‘point’,[2,3]);–fillet grating sharp corners to avoid singularities.all=sub+refl+p3ht+sup+fg+pml1+pml2;–combine all the geometries created into one.%Geometry objects(following lines are usually needed in a COMSOL script to create geometry.Variable‘fem’includes all of the data in the model,e.g.geometry, physical setting,simulation results.)clear ss.objs={all};={‘all’};s.tags={‘all’};fem.draw=struct(‘s’,s);fem.geom=geomcsg(fem);figure,geomplot(fem);–use to visualize the geometry,to monitor if everything is correct.Tips:1.The‘base’,‘corner’in the rect2command can be neglected.The‘pos’can bespecified by numeric matrix([0,pos refl])instead of cell(e.g.{‘0’,pos refl});2.More command details can be found in the MATLAB command window by type‘help command name’;e command‘fillet’to round the sharp corners of metal components.mand‘geomplot’can be used to visualize the point,edge,boundary andsubdomain labels,which is useful when set corresponding physical conditions.8(Use the property‘edgelabel’of‘geomplot’to show edge label(edge in2D isboundary)).4.2Physical settingTo set conditions for subdomains,boundarys,edges,and points in a script,it is necessaryto label each of these items to distinguish them.The methods for setting conditions for these items are similar,so here we take the boundary and subdomain as examples(see example in‘Scripts\Grating scattered formula’).Before setting the boundary conditions,we have to know the boundary labels,andthis can be easily done by using‘geomplot’with the property‘edgelabel’:figure,geomplot(fem,‘edgelabel’,‘on’);–use to visualize the geometry togetherwith boundary labels.Or you can count it yourself there is a rule how the COMSOL number boundaries, counting from the low-left side to the up-right,but straight linefirst,then curves.After knowing the boundary labels,as following we can set the boundary conditions.clear bnd–clear the‘bnd’which is used to set the boundary condition.bnd.type={‘E0’,‘cont’,‘SC’};–specify in a cell how many different type of bound-ary conditions used in the model.‘E0’represents perfect boundary condition,‘cont’for continuity boundary condition,‘SC’for scattering boundary condition.(‘H0’for perfect boundary condition,but not used in the model.)For each type of the boundary condition in the cell has its own index,e.g.‘1’for‘E0’,‘2’for‘cont’...bnd.ind=[1,3,1,2,1,2,1,2,1,2,1,2,1,2,3,2,2,1,1,1,1,1,1,2,2];–specify the boundary conditions for each of the boundary in the geometry using the boundary condition index specify in the‘bnd.type’.As seen they are25boundaries,so we have to specify each of the boundaries in the sequence of boundary labels.appl.bnd=bnd;–boundary condition settingfinished.For subdomain condition,it is set by‘appl.equ’as following,see also in the example script.clear equequ.Sd={{‘Sdx guess rfweh’;‘lambdaS rfweh’},{‘Sdx guess rfweh’;‘Sdy guess rfweh’},9{‘Sdx guess rfweh’;‘Sdy guess rfweh’},{‘Sdx guess rfweh’;‘Sdy guess rfweh’}};–sub-domain setting,this is PML related,specify the width of PML in x-,y-axis directions.‘Sdx guess rfweh’,‘Sdy guess rfweh’and‘lambdaS rfweh’are some predefined value in COMSOL.For thefirst two means the PML widths in each direction use the geometric width.‘lambdaS rfweh’is used in the case when the geometric width is comparable with wavelength.This command line together with the next command line’equ.coordOn’are only used when there is a PML used in the model The number of types has to be the same number as the types of subdomain conditins specified in‘equ.n’equ.coordOn={{0;1},{0;0},{0;0},{0;0}};–specify which type of PML is activated in this model.this means thefirst‘n air’(stands for air)iin the‘equ.n’is set as PML. The‘{0;1}’stands for the PML absorb light propagating in the y-axis direction.The ‘0;0’with two‘0’deactivates the PML property in subdomain.equ.n={‘n air’,‘n air’,‘nag’,‘np3ht’};–specify subdomain material,‘n air’is defined in constants.‘n ag’and‘np3ht’are defined in global expressions;equ.Stype={‘coord’,‘none’,‘none’,‘none’};–PML type setting,the number of types has to be the same number as the types of subdomain conditins specified in‘equ.n’.‘coord’represents cartesian type of PML used,‘none’for no PML used.equ.matparams=‘n’;–subdomain material parameters,specify by refractive index ‘n’or permittivity.equ.ind=[1,2,3,4,3,2,1];–set the subdomain.appl.equ=equ;–subdomain settingfinished.4.3Geometric sweepFor some simulations geometric parameters have to been scanned to get an optimal design.For this can be accomplished by adding the Parametric Sweep into the Study node in COMSOL v4.x.But for v3.5,one can use COMSOL script(COMSOL with MATLAB)to sweep the geometric paramters with loops,see example for geometric sweep in‘Scripts\Grating scattered formula’.4.4PostprocessingCOMSOL GUI already integrates some useful postprocessing.However for some special user-defined parameters one can export the data to MATLAB,then process fundamental data calculated by COMSOL using script.Some important commands(in COMSOL10v3.5,command names are different in v4.x,corresponding command see documentation in v4.x)usually used in script are listed in following:Command(v3.5)FunctionGeomplot visualize the geometry of the model.Meshplot visualize the mesh.Postint integration in a boundary or domain.Postinterp extract the variable value e.g.E and H at specified points.Details about these commands type‘help command name’in the command window in COMSOL with Matlab.5Cluster runningMore information about high performance computing infrastructure at UGent see http: //www.ugent.be/hpc/en/infrastructure.Details on how to run COMSOL on cluster see user tips at userwiki http://hpc. ugent.be/userwiki/index.php/Main_Page or below.First we build the COMSOL model e.g.‘test22.mph’,then a job script is written to submit the job(the model will run on cluster)to the cluster.Notes on how to write a job script see userwiki.The job will wait in a queue before its running.Note that only job scripts can be submitted to the queuing system.These scripts can be written in a variety of languages e.g.bash,perl,python,...Following are the scripts used to submit jobs for running on single node(for model with low memory consumption,<16GB) and multinode with MPI(for model with large memory consumption,>16GB).COMSOL single node#!/bin/bash#PBS-l nodes=1:ppn=8–Use1node,8processes.#PBS-l walltime=00:30:00–Define the maximum walltime,30minutes,for the job to run.By default,this is1hour.cd$PBS O WORKDIRmodule load COMSOL/4.1.0.112–load COMSOLcomsol batch-np8-inputfile test22.mph–run the model‘test22.mph’COMSOL multinode job with MPI11There have been made several changes to the COMSOL start script.To start MPI jobs correctly,please use the following script example:#!/bin/bash#PBS-l nodes=3:ppn=8–Use3nodes and8processes on each node.#PBS-l walltime=00:30:00cd$PBS O WORKDIRmodule load ictce/4.0.6module load scriptsmodule load COMSOL/4.1.0.112##important.don’t change these variablesexport MYMPICMD=impirunexport MYMPIRUN HYBRID=1comsol-clustersimple batch-inputfile test22.mphAs for geometric sweep on cluster,MATLAB script should also work(but having no experience on this).To do a sweep with GUI,for v3.5,we have to build models separately for different geometric parameters,this can be simply done by saving‘fem’structure as mphfile with script command:flsave(‘modelname.mph’,fem)in a script to avoid building mphfile from GUI step by step.For version4.x,the geometric parameter sweep is embedded in the GUI directly,so one model is enough for different geometric parameters.But for a large model,it is better to build separate mph model for each geometric parameter.Because large model is already take quite long time to calculate,with geometric sweep more time needed.This means longer walltime needed,resulting in longer waiting time in the queue.In addition,longer time perhaps will increase the possibility of crash in the middle of running,resulting in losing data for these sweep parameters which have alreadyfinished.12。

COMSOL在微纳光学领域中的应用

COMSOL在微纳光学领域中的应用

• 实时连接 SolidWorks , AutoDesk Inventor, 和Pro/ENGINEER
支持模型几何的双向调用
• 每种对于CAD的 LiveLink 都包含CAD 导 入模块
仿 真 智 领 创 新
Simulating inspires innovation
材料&参数设定
• 定义材料参数:
Matlab PDE Toolbox 1.0 Femlab 1.0 ~ Femlab 3.1(2003年,v3.0具备独立求解器) COMSOL Multiphysics 3.2a (2005年) COMSOL Multiphysics 3.5a COMSOL Multiphysics v4.2a COMSOL Multiphysics 4.3a(现在)
仿 真 智 领 创 新
Simulating inspires innovation
工程问题物理问题
力学
航空 燃烧
航天
材料
流体力学 传热学
冶金
汽车
电磁学 声学 化学
。。。
等等
仿 真 智 领 创 新
Simulating inspires innovation
工程问题
解析解
很难解得出
没有解析解
数学问题
• 电动机&发电机
• 电阻、感应加热 • SPICE电路与场模拟 • 电磁兼容(EMC)
X射线高压电机电磁场分布
仿 真 智 领 创 新
Simulating inspires innovation
RF模块
用于模拟射频、微波和光学工程中电磁波在结构内部和周围的传播,该 结构可以是金属、电介质、旋磁,甚至是具有工程特性的超材料 • 天线、波导(热力效应) • 微波、射频加热 • 生物加热 • 等离子激光 • 超材料

激光原理_自聚焦效应与其Comsol仿真

激光原理_自聚焦效应与其Comsol仿真

自聚焦的稳态理论
自聚焦的稳态理论
电场振动
自聚焦的稳态理论
前方没有公式了!!
The Fourth Part
Comsol自聚焦仿真
Self focusing simulation based on Comsol
Comsol自聚焦仿真
We are pursuing the best!
Comsol自聚焦仿真
We are pursuing the best!
Comsol自聚焦仿真
We are pursuing the best!
Comsol自聚焦仿真
We are pursuing the best!
The Sixth Part
自聚焦透镜
Self focusing lens
自聚焦透镜
We are pursuing the best!
总结了三种说 法:“自陷模 型”,“运动 焦点模型”, “动态自陷模 型”,提出了 基于锥形波的
解释
等离子体中的 自聚焦现象是 一个研究热点, 关于这方面的 研究不断有新
的进展
The Third Part
自聚焦的基本理论
The basic theory of self focusing
前方有公式!!
自聚焦透镜(Grin Lens)又称 为梯度变折射率透镜,是指其折射 率分布是沿径向渐变的柱状光学透 镜。具有聚焦和成像功能。
右图为Zemax仿真结果。
(3D Layout)
实验上验证了 自聚焦焦点位 置与光功率之 间的关系,当 光功率达到一 定程度以致自 聚焦焦点无穷 远时,自聚焦 等同于自陷
自聚焦的研究历史
We are pursuing the best!

关于comsol模拟的一些问答

关于comsol模拟的一些问答

1.近来用COMSOL计算光子晶体光纤的模场分布,可是不知道PML的参数如何设置,以及边界条件怎么设置,计算出来的结果不对. 实验室老板催得急,算不出来特别郁闷,不想读的心思都有了。

请用过的人帮帮忙吧:)我也是用comsol算光纤的,关于pml层的设定问题,如果不考虑损耗的话,pml层可以不设,你可以试一试就知道了,pml对模场分布基本没有影响2. COMSOL Multiphysics如何模拟带隙光子晶体光纤?要用COMSOL Multiphysics模拟带隙光子晶体光纤,也就是要加入kz,可以用如下方法:(1)用平面波模式,将模型边界条件改为电场,输入一个表达式的名字,例如E1。

(2)定义该边界表达式E1,菜单“选项>表达式>边界表达式”,选择不同的边界,分别写入该边界上电场E1的表达式,这样就能加入kz,将所需的周期性边界方程写入COMSOL Multiphysics。

3.如何准确求光子晶体光纤的限制损耗即有效折射率的虚部我在模拟PCF时,为了求其限制损耗即有效折射率的虚部,在PCF结构的外面加了PML,但是在加了PML 后,却发现光束不能约束在纤芯中了。

不知道哪里出了问题,还望各位高手给予指点,谢谢。

[attach]219885[/attach]加了PML后的结果如下:[attach]219886[/attach]我也是初学,也在做一些光子晶体的方法。

目前还不懂帮你顶顶,大家多多讨论有限元做光子?这个挺有新意,不过要注意是否适用能说一下有限元做光子为什么不合适吗?不过用FDTD做光子的还蛮多的PML的几何不对,应该是加个六边形的PML才对吧:)纤芯比外面的小,当然有可能找到外面的那个模式,多找几个模式或者将外面的区域减小应该就可以了加个圆形的就可以了PML要考虑模型的对称性,比如这个模型可以只计算1/4或者1/6楼主具体交流下怎么划分格点的?我算光子晶体光纤的模式,伪模很多阿,比如设neff=1.5附近寻找,设200个,它就给找出200个neff 出来。

基于COMSOL Multiphysics的几何光学仿真研究

基于COMSOL Multiphysics的几何光学仿真研究
图1 光的折射和反射示意图
2.2 仿真方法研究光的折射和反射 仿真教学能够模拟出真实的实现环境, 并且可 以根据自己需要随意变换实验条件。 图 2 给出了一 束有限宽度的光波入射到两种介质分界面的传播 规律。在模拟中,介质 1 和介质 2 的折射率、入射 线的入射角可以根据自己的需要任意的设置。 在模 拟中,我们设置折射率 n1 1 、 n2 2 ,入射角
全发射中出现隐失波的现象进行了仿真研究。这些结果有利于加深对光传播性质的理解。 关键词:有限元仿真;反射;折射;隐失波 DOI: 10.3969/j.issn.1671-6396.2015.10.025
1
引言
COMSOL Multiphysics
[1]
(1) 反射光线和折射光线都在入射光线和界面 仿真软件以有限元 法线所组成的入射面内; (2)反射角等于入射角 i ' i ; (3)入射角 i 与折射角 r 的正弦之比与入射角 无关,而与介质的相对折射率有关,即 n1sini=n2 sinr。
法为基础,通过求解偏微分方程(单场)或偏微分 方程组(多场)来实现真实物理现象的仿真,被当 今世界科学家称为“第一款真正的任意多物理场 直 接 耦 合 分 析 软 件 ” 。 本 文 利 用 COMSOL Multiphysics 有限元软件对光的反射、折射以及隐 失波的出现条件进行了仿真研究, 并给出了几种仿 真结果,将抽象问题具体化。
中国西科技
2015 年 10 月第 14 卷第 10 期总第 315 期
97
深对隐失波的出现条件极其形态性质的深入理解。
对光传播过程中的反射、 折射现象以及在全发射中 出现隐失波的现象进行了仿真研究, 该研究是对光 学中传统的几何研究方法的拓展, 这些结果有利于 加深对光传播性质的理解。

COMSOL光学案例

COMSOL光学案例

Modeling of Pyramidal Absorbers for an Anechoic ChamberIntroductionIn this example, a microwave absorber is constructed from an infinite 2D array of pyramidal lossy structures. Pyramidal absorbers with radiation-absorbent material (RAM) are commonly used in anechoic chambers for electromagnetic wavemeasurements. Microwave absorption is modeled using a lossy material to imitate the electromagnetic properties of conductive carbon-loaded foam.Perfectly matched layersPortConductive pyramidal formUnit cell surrounded by periodic conditionsConductive coating on the bottomFigure 1: An infinite 2D array of pyramidal absorbers is modeled using periodic boundary conditions on the sides of one unit cell.Model DefinitionThe infinite 2D array of pyramidal structures is modeled using one unit cell with Floquet-periodic boundary conditions on four sides, as shown in Figure 1. Thegeometry of one unit cell consists of one pyramid sitting on a block made of the samematerial. There are perfectly matched layers (PMLs) above the pyramid and the remaining space between the pyramid and the PMLs is filled with air.The pyramidal absorber is made of a conductive material (σ = 0.5 S/m). At the interface of the conductive material and air, the incident field is partially reflected and partially transmitted into the pyramid. The transmitted field is attenuated inside of the lossy material. For angles within a particular range of normal incidence, the propagation direction of the reflected field is not back towards the source, but instead towards another surface of the conductive material. The process of partial reflection and partial transmission with subsequent attenuation is repeated until the field reaches the base of the pyramid. The amplitude of the field at the base of the pyramid is drastically reduced and so the reflection from the absorber at this point is marginal. The process is illustrated in Figure 2.Incident waveConductive foamNoise from outside the chamber isblocked by a highly conductive layerFigure 2: The incident wave is partially transmitted into the conductive foam where it is subsequently attenuated. For angles within a particular range of normal incidence, the reflected component of the field propagates towards another conducting surface where the process is repeated.The bottom of the absorber has a thin highly conductive layer to block any noise from outside the anechoic chamber. Before mounting absorbers on the walls of the anechoicchamber, it is necessary to apply a conductive coating on the walls, which is modeled as a perfect electric conductor (PEC).The model domain immediately outside of the conducting foam is filled with air. Perfectly matched layers (PMLs) above the air at the top of the unit cell absorb higher order modes generated by the periodic structure − if there are any − as well as the upwards traveling excited mode from the source port. The PMLs attenuate the field in the direction perpendicular to the PML boundary. Since the model is solved for a range of incident angles, the wavelength inside the PMLs is set to 2π/|k0cosθ|, which, in some sense, is the wavelength of the normal component of the wave vector.A port boundary condition is placed on the interior boundary of the PMLs, adjacent to the air domain. The interior port boundaries with PML backing require the slit condition. The port orientation is specified to define the inward direction for theS-parameter calculation. Since higher order diffraction modes are not of particular interest in this example, the combination of Domain-backed type slit port and PMLs is used instead of adding a Diffraction order port for each diffraction order and polarization.The periodic boundary condition requires identical surface meshes on paired boundaries. An identical surface mesh can be created by using the Copy Face operation from one boundary to another boundary.Results and DiscussionFigure 3 shows the norm of the electric field and power flow in the case where the elevation angle of incidence is 30 degrees and the azimuth angle is zero. The intensity of the illuminating wave is strong near the tip of the absorber. It decreases towards the base of the pyramid, where it is ultimately very weak.The S-parameter for y-axis polarized incident waves is plotted in Figure 4. The plot shows quantitatively that the absorber performs well for a range of incident elevation angles less than 40 degrees.case where the elevation angle of incidence is 30 degrees and the azimuthal angle is zero.Figure 4: The S-parameter is plotted as a function of incident angle.Application Library path: RF_Module/Passive_Devices/pyramidal_absorberModeling InstructionsFrom the File menu, choose New.N E W1In the New window, click Model Wizard.M O D E L W I Z A R D1In the Model Wizard window, click 3D.2In the Select physics tree, select Radio Frequency>Electromagnetic Waves, Frequency Domain (emw).3Click Add.4Click Study.5In the Select study tree, select Preset Studies>Frequency Domain.6Click Done.G E O M E T R Y11In the Model Builder window, under Component 1 (comp1) click Geometry 1.2In the Settings window for Geometry, locate the Units section.3From the Length unit list, choose mm.G L O B A L D E F I N I T I O N SParameters1On the Home toolbar, click Parameters.2In the Settings window for Parameters, locate the Parameters section.3In the table, enter the following settings:Here, c_const is a predefined COMSOL constant for the speed of light in vacuum.D E F I N I T I O N SVariables 11On the Home toolbar, click Variables and choose Local Variables .2In the Settings window for Variables, locate the Variables section.3In the table, enter the following settings:G E O M E T R Y 1Block 1 (blk1)1On the Geometry toolbar, click Block .2In the Settings window for Block, locate the Size section.3In the Width text field, type 50.4In the Depth text field, type 50.5In the Height text field, type 280.6Locate the Position section. In the x text field, type -25.7In the y text field, type -25.8In the z text field, type -90.9Right-click Component 1 (comp1)>Geometry 1>Block 1 (blk1) and choose Build Selected .Name Expression ValueDescription theta 0[deg]0 rad Elevation angle phi 0[deg]0 rad Azimuth angle f05[GHz]5E9 Hz Frequency lda0c_const/f00.05996 mWavelengthNam e Expression UnitDescriptionk_0emw.k0rad/m Wavenumber, free space k_x k_0*sin(theta)*cos(phi)rad/m Wavenumber, x-component k_y k_0*sin(theta)*sin(phi)rad/m Wavenumber, y-component k_zk_0*cos(theta)rad/mWavenumber, z-component10Click the Wireframe Rendering button on the Graphics toolbar.Block 2 (blk2)1On the Geometry toolbar, click Block.2In the Settings window for Block, locate the Size section.3In the Width text field, type 50.4In the Depth text field, type 50.5In the Height text field, type 180.6Locate the Position section. From the Base list, choose Center.Block 3 (blk3)1On the Geometry toolbar, click Block.2In the Settings window for Block, locate the Size section.3In the Width text field, type 50.4In the Depth text field, type 50.5In the Height text field, type 25.6Locate the Position section. From the Base list, choose Center.7In the z text field, type -77.5.Pyramid 1 (pyr1)1On the Geometry toolbar, click More Primitives and choose Pyramid. 2In the Settings window for Pyramid, locate the Size and Shape section. 3In the Base length 1 text field, type 50.4In the Base length 2 text field, type 50.5In the Height text field, type 120.6In the Ratio text field, type 0.7Locate the Position section. In the z text field, type -65.8Click the Build All Objects button.The finished geometry should look like this.Set up the physics based on the direction of propagation and the E-field polarization. Assume a TE-polarized wave which is equivalent to s-polarization and perpendicular polarization. E x and E z are zero while E y is dominant.E L E C T R O M A G N E T I C W A V E S,F R E Q U E N C Y D O M A I N(E M W)1In the Model Builder window, under Component 1 (comp1) click Electromagnetic Waves, Frequency Domain (emw).2In the Settings window for Electromagnetic Waves, Frequency Domain, locate the Physics-Controlled Mesh section.3Select the Enable check box.Set the maximum mesh size to 0.2 wavelengths or smaller.4In the Maximum element size text field, type lda0/5.5Locate the Analysis Methodology section. From the Methodology options list, choose Fast.Periodic Condition 11On the Physics toolbar, click Boundaries and choose Periodic Condition.2Select Boundaries 1, 4, 9, and 18–20 only.3In the Settings window for Periodic Condition, locate the Periodicity Settingssection.4From the Type of periodicity list, choose Floquet periodicity .5Specify the k F vector asPeriodic Condition 21On the Physics toolbar, click Boundaries and choose Periodic Condition .k_x x k_y y 0z2Select Boundaries 2, 5, 10, 13, 14, and 16 only.3In the Settings window for Periodic Condition, locate the Periodicity Settingssection.4From the Type of periodicity list, choose Floquet periodicity .5Specify the k F vector asPort 11On the Physics toolbar, click Boundaries and choose Port .k_x x k_y y 0z2Select Boundary 11 only.3In the Settings window for Port, locate the Port Properties section.4From the Wave excitation at this port list, choose On .5Select the Activate slit condition on interior port check box.6From the Slit type list, choose Domain-backed .7From the Port orientation list, choose Reverse .8Locate the Port Mode Settings section. Specify the E 0 vector as9In the β text field, type abs(k_z).Scattering Boundary Condition 11On the Physics toolbar, click Boundaries and choose Scattering Boundary Condition .2Select Boundary 12 only.x exp(-i*k_x*x)*exp(-i*k_y*y)[V/m]y 0zM A T E R I A L SMaterial 1 (mat1)1In the Model Builder window, under Component 1 (comp1) right-click Materials andchoose Blank Material .2In the Settings window for Material, locate the Material Contents section.3In the table, enter the following settings:Material 2 (mat2)1In the Model Builder window, right-click Materials and choose Blank Material .2Select Domains 1 and 3 only.3In the Settings window for Material, locate the Material Contents section.4In the table, enter the following settings:PropertyNameValue UnitProperty groupRelative permittivity epsilonr 11Basic Relative permeability mur 11Basic Electrical conductivitysigmaS/mBasicPropertyNameValue UnitProperty groupRelative permittivity epsilonr 11BasicD E F I N I T I O N SPerfectly Matched Layer 1 (pml1)1On the Definitions toolbar, click Perfectly Matched Layer .2Select Domain 4 only.3In the Settings window for Perfectly Matched Layer, locate the Scaling section.4From the Typical wavelength from list, choose User defined .5In the Typical wavelength text field, type 2*pi/abs(k_z).Since the model is solved for a range of incident angles, the wavelength inside the PMLs is set to 2φ/|k 0cos(θ)|, which is the wavelength of the normal component of the wave vector.M E S H 1In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and choose Build All .Relative permeability mur 11Basic Electrical conductivitysigma0.5S/mBasicProperty Name Value Unit Property groupD E F I N I T I O N SView 11On the View 1 toolbar, click Hide Geometric Entities.2Select Domain 4 only.3In the Settings window for Hide Geometric Entities, locate the Geometric Entity Selection section.4From the Geometric entity level list, choose Boundary.5Select Boundaries 4, 5, 9, and 10 only.M E S H1S T U D Y1Step 1: Frequency Domain1In the Model Builder window, under Study 1 click Step 1: Frequency Domain.2In the Settings window for Frequency Domain, locate the Study Settings section. 3In the Frequencies text field, type f0.Parametric Sweep1On the Study toolbar, click Parametric Sweep.2In the Settings window for Parametric Sweep, locate the Study Settings section.3Click Add.4In the table, enter the following settings:Parameter name Parameter value list Parameter unittheta range(0[deg],5[deg],85[deg])5On the Study toolbar, click Compute.R E S U L T SData Sets1On the Results toolbar, click Selection.2In the Settings window for Selection, locate the Geometric Entity Selection section.3From the Geometric entity level list, choose Domain.4Select Domains 1–3 only.Electric Field (emw)1In the Model Builder window, expand the Results>Electric Field (emw) node, then click Multislice 1.2In the Settings window for Multislice, locate the Multiplane Data section.3Find the z-planes subsection. In the Planes text field, type 0.4In the Model Builder window, right-click Electric Field (emw) and choose Arrow Volume.5In the Settings window for Arrow Volume, click Replace Expression in the upper-right corner of the Expression section. From the menu, choose Component1>Electromagnetic Waves, Frequency Domain>Energy andpower>emw.Poavx,...,emw.Poavz - Power flow, time average.6Locate the Arrow Positioning section. Find the x grid points subsection. In the Points text field, type 21.7Find the y grid points subsection. In the Points text field, type 1.8Find the z grid points subsection. In the Points text field, type 21.9On the Electric Field (emw) toolbar, click Plot.10In the Model Builder window, click Electric Field (emw).11In the Settings window for 3D Plot Group, locate the Data section.12From the Parameter value (theta (rad)) list, choose 0.5236.13On the Electric Field (emw) toolbar, click Plot.14Click the Zoom Extents button on the Graphics toolbar.See Figure 3 to compare the plotted results.1D Plot Group 21On the Home toolbar, click Add Plot Group and choose 1D Plot Group.2On the 1D Plot Group 2 toolbar, click Global.3In the Settings window for Global, click Replace Expression in the upper-right corner of the y-axis data section. From the menu, choose Component 1>Electromagnetic Waves, Frequency Domain>Ports>emw.S11dB - S-parameter, dB, 11 component.4On the 1D Plot Group 2 toolbar, click Plot.The calculated S-parameters at the input port are shown as a function of the incident angle. Compare with that shown in Figure 4.。

COMSOL光学仿真专题

COMSOL光学仿真专题

光子晶体光纤SPP传感器
∧=2e-6m, dc=0.5 ∧, d1=0.6 ∧, d2=0.8 ∧ nair=1.0, na=1.33 金属层厚度4e-8m
基模
仿 真 智 领 创 新
Simulating inspires innovation
光子晶体光纤SPP传感器
纤芯中激发的SPP模式图
金属层表面能量分布图
Luneburg透镜
磁透镜
四极质谱仪
仿 真 智 领 创 新
Simulating inspires innovation
光学隐身
仿 真 智 领 创 新
Simulating inspires innovation
Luneburg透镜
仿 真 智 领 创 新
Simulating inspires innovation
• 腔模分析
– 共振频率 – 品质因子
• 瞬态传播/非线性效应
– 群速度(色散) – 倍频产生、自聚焦、自相位调制等
• 多场耦合
– 光与热,电,磁,力特性的耦合
仿 真 智 领 创 新
Simulating inspires innovation
纳米光子学仿真需求
纳米材料/结构的 光学特性 纳米光子学器件 纳米光子学 光纤/波导 波导分析 激光器 隐形斗篷 稳态传输特性分析 光刻 纳米结构的 光学制备、表征方法 光镊/光势阱 分子探测 瞬态/非线性效应分析
电磁波领域研究课题
• 电磁波的产生
– 各种波源的辐射机制
• 电磁波的传播
– 衍射/干涉 – 反射/折射/散射/吸收 – 光电/热/力效应
仿 真 智 领 创 新
Simulating inspires innovation

comsol仿真案例

comsol仿真案例

comsol仿真案例Comsol仿真案例。

在工程领域,仿真技术被广泛应用于产品设计、工艺优化、性能预测等方面。

Comsol Multiphysics作为一款多物理场仿真软件,具有强大的建模和求解能力,能够模拟电磁、结构力学、流体力学等多个物理场的耦合效应,为工程师和科研人员提供了强大的工具来解决复杂问题。

本文将以一个实际案例来介绍Comsol Multiphysics的仿真应用。

我们将以磁场传感器的设计为例,展示如何利用Comsol进行多物理场的仿真分析。

首先,我们需要建立磁场传感器的几何模型。

在Comsol中,可以通过几何建模模块来创建传感器的三维几何结构,包括传感元件的形状、尺寸和材料属性等。

在建模过程中,可以直观地观察和调整传感器的几何参数,以满足设计要求。

接下来,我们需要定义磁场传感器的物理特性。

通过Comsol的物理场模块,可以添加磁场、电磁感应等物理场效应,并设置材料的磁性参数、电导率等物理属性。

这些物理特性将直接影响传感器的性能和响应。

然后,我们可以进行多物理场的耦合仿真。

Comsol Multiphysics能够同时求解多个物理场的方程,并考虑它们之间的相互作用。

在磁场传感器的案例中,我们可以将磁场、电磁感应和结构力学等物理场进行耦合,分析传感器在外部磁场作用下的响应和变形情况。

在仿真过程中,可以通过Comsol的后处理模块来可视化仿真结果,包括磁感应强度分布、电流密度分布、应力应变分布等。

这些结果能够直观地展现传感器的工作状态和性能表现,为设计优化和性能预测提供重要参考。

最后,我们可以通过参数化设计和优化算法,对传感器的关键参数进行调整和优化。

Comsol Multiphysics提供了丰富的参数化建模和优化工具,能够快速高效地进行设计方案的评估和优化,以实现传感器性能的最大化。

总的来说,Comsol Multiphysics作为一款多物理场仿真软件,能够为工程师和科研人员提供强大的仿真分析工具,帮助他们解决复杂的工程和科学问题。

Comsol 光学模拟入门

Comsol 光学模拟入门

COMSOL User Tips for Optical SimulationsHonghui ShenPhotonics Research Group(INTEC),Ghent University-IMEC,Sint-Pietersnieuwstraat41,9000Gent,Belgiumhonghuishen@July,20121MeshUsually the mesh size is set to beλ/6,where theλis the wavelength in the material. However for plasmonics the mesh size in the vicinity of the metal surface has to befiner, since thefield is confined to the metal surface by exciting the surface ually for silver in the visible wavelength range below5nm mesh size has to be applied to ensure the accuracy of simulations.One can do a convergency test for the mesh size around metal to avoid toofine or coarse meshes used.Since toofine mesh will definitely increase the calculation time and memory demand,on the other hand too coarse mesh will give non-accuratefield result around metal surface.For plasmonics,one has to avoid sharp corners of metal byfillet.Sharp corner will increase the mesh number and cause singularity.2Materials propertiesFor a simulation with wavelength sweep and dispersive material,the optical constants (or the permittivities)of materials corresponding to each wavelength has to be input into the model.There are several ways to do this:ing a analytical expression for the optical constant if ing a Drude-Lorentz dispersion model for metal tofit the measured optical constant1,for other materials like silicon the dispersive formula can be found in some literatures or online();1In COMSOL version4.3,this is implemented directly,see example Nanorods in v4.3.1ing the measured optical constant directly.For thefirst method,which is usually used in FDTD,the unknown parameters in Drude model have to be solved byfitting to the measured data.At some wavelength ranges the derivation of thefitting data by the Drude model is large with respect to the measured SOL provides a more easier way by using the measured data directly,i.e.the second method.For the second method,we have to build two separated txtfiles for both the real and the imaginary parts of the optical constant of e.g.silver.Be aware that in COMSOL a harmonic time dependence of e jωt is used,therefore for a loss material the optical constant is given by n-jk,where k>0.Figure1shows the txtfile for the real part of the optical constant of silver,n.Similarfile for k has to be built too.Figure1:Thefile example of optical constant of silver(dispersive material).Thefirst column is the wavelength in unit m,while the second column is the corresponding real part of refractive index of silver.For COMSOL v3.5,follow the steps below to input these twofiles(n,kfiles of optical constant)into model and set the corresponding domain:1.Clicking‘Option’→‘Functions...’,open the‘Functions’dialog box;2.Clicking the button‘New...’,open the‘New Function’dialog box(Figure2);3.Type e.g.n ag(the real part of optical constant of Ag,the function name can berandom)in the Function name editfield.Choose‘Interpolation’,and choose‘file’in the‘Use data from’(Figure2).4.Click‘Browse’,go to the directory where the nfile locates,import thefile;5.Following the above step,build another function for k ag(the imaginary part ofoptical constant of Ag);26.To this step two function n ag and k ag have been created.Now go to the sub-domain mode and open the’Subdomain settings’dialog box.Follow thefigure3 type n ag(lambda u)−j∗k ag(lambda u)in‘n’.Figure2:Input the optical constant into model as functionsFor COMSOL version above4,following the steps below2:1.Right click Materials node,create Material1(mat1)by choosing‘Material’.Rename‘Material1’as‘Ag’.2.Select the objects that correspond to material silver,choose Ag(mat1)andlocate and expand Material Properties in the Material Browser window.Select the‘Refractive index’under the‘Electromagnetic Models’and click the add sign below.Then a Refractive index(rfi)sub-node is added to the Ag (mat1)node.3.Right click Refractive index(rfi)and select‘Functions’→‘Interpolation’.AddInterpolation1(int1)to the node Refractive index(rfi).4.In the Interpolation Browser window,locate the parameters.Type‘n ag’inthe‘Function name’editfield,then choose‘file’in the‘Data source’.Click the ‘Browse...’button,go to the directory where the nfile locates and import the file,click‘open’to input thefile path into the‘Filename’editfield,and then click ‘Import’button.After this a table of real part of Ag data will be shown.2here only give one way to define material properties,there are other ways.3Figure3:Set the corresponding domain with the predefined functions.5.Repeat the last two steps for the imaginary part.6.After defining all of the materials used in current model in the Materials node,there is one more step to activate the material defined.In the Electromagnetic waves node,locate Material Type and select‘From material’,locate Electric Displacement Field and select‘Refractive index’in the‘Electric displacement field model’.3Light sourceThere are several different types of light source,e.g.point source,line source,plane source.Here ways to define plane source will be introduced.There are two usually used plane source,plane wave source and gaussian beam.For objects in a homogeneous material like a nanoparticle in air,plane wave can be introduced by using scattered formula,more details see examples‘Radar Cross Section’for COMSOL version above 4,and‘Dielectric scattering PML’for COMSOL v3.5.For gaussian beam,see examples‘Second Harmonic Generation of a Gaussian Beam’and‘nanorods’for COMSOL verson4.3,‘Second Harmonic Generation of a Gaussian Beam’for COMSOL v3.5.For models with object on a substrate,e.g.nanoparticles on glass,in these case,the scattered formula does not valid any more(since the object is not enclosed in a single4material).Several possible methods can be used:e two studies(see model example,‘plasmonic wire grating’in COMSOL v4.x),but the drawback of this method is that multiple ports have to be defined for each scattering order,it is feasible for cases with only few scattering orders existing.Ifa model has a lot of scattering orders,it becomes complicated to define all of theports for different orders.e the‘assembly’to introduce a soft source,see‘Assembly’in the‘Examples’fold(Details can be found in the slides included in‘Assembly’.This is also an example for how to set periodic boundary condition).But this seems only valid for COMSOL v3.5.Maybe this is implemented in the newest version4.3.3.Still use the scattered formula with adjustment applied to the initialfield(corre-sponding to the‘Incidentfield’in COMSOL v3.5,and the‘backgroundfield’in COMSOL v4.x).See‘Adjusted scattered’in the‘Examples’fold.4.(For other new methods,please add it here...)Now here details about method3in COMSOL v4.x(for v3.5it is similar)will be introduced.For simplicity,wefirst consider a2D model as shown infigure4(a), a periodic grating(material3,only one period is used in model therefore periodic boundary condition has applied to the lateral sides)on substrate(material2).In order to use the scattered formula,we have to givefield distribution in structure without grating,i.e.figure4(b)as the initialfiled of the model in(a).Thefield distribution in(b)can be easily calculated by Fresnel’s law together with Snell’s law.To simplify further we consider normal incidence.Therefore the totalfield in(b)can be expressed as:total=inc(y>y0)+refl(y>y0)+trans(y≤y0),(1)where‘y0’is the coordinate of the surface of substrate,‘inc’is the incident plane wave,‘refl’the reflected plane wave and the‘trans’the transmitted plane wave.Mathemat-ically Eq.2is realized with function‘sign’by:total=(inc+refl)·u1+trans·u2,(2)u1=(1+sign(y−y0))/2(3)u2=(1−sign(y+y0))/2(4)5(a)(b)Figure4:(a)A grating on a substrate.(b)structure without grating.These variables in the above3equations can be defined in the Variables under the Global Definitions node as shown infigure5.After define the initialfield expression in Variables,the initial(or background)field expression has to befilled into the Backgroundfiled as shown infigure6.More details see‘Adjusted scattered’in the ‘Examples’fold.4ScriptThe best way to learn script is saving an simple model as a script,i.e.the‘.m’file, which run on COMSOL with MATLAB.In a typical script,it usually includes the ge-ometry,mesh,physical setting(point(2D,3D),edge(3D),boundary(2D,3D)and sub-domain(2D,3D)setting),running,and postprocessing.In the following tips in terms of these aspects for COMSOL v3.5will be introduced(script for v4.x is quite different from v3.5and will be not introduced here,one is referred to the COMSOL documentation).4.1Create geometryGeometry example(the whole script is located:‘Scripts\Grating scattered formula’): %Geometrypml1=rect2(period,t pml);–create PML layer,rectangle6Figure5:Define initialfield in the Variables node.Figure6:Define the backgroundfield in the Backgroundfiled.7sub=rect2(period,t sub,‘base’,‘corner’,‘pos’,{‘0’,pos sub});–create PML refl=rect2(period,t refl,‘base’,‘corner’,‘pos’,{‘0’,pos refl});–create reflector p3ht=rect2(period,t p3ht,‘base’,‘corner’,‘pos’,{‘0’,pos p3ht});–create active layersup=rect2(period,t sup,‘base’,‘corner’,‘pos’,{‘0’,pos sup});–create air layer above active layerpml2=rect2(period,t pml,‘base’,‘corner’,‘pos’,{‘0’,pos pml});–create PMLg7=rect2(w gf/2,t gf,‘base’,‘corner’,‘pos’,{‘0’,pos gf y});–create grating on active layerfg=fillet(g7,‘radii’,ffillet,‘point’,[2,3]);–fillet grating sharp corners to avoid singularities.all=sub+refl+p3ht+sup+fg+pml1+pml2;–combine all the geometries created into one.%Geometry objects(following lines are usually needed in a COMSOL script to create geometry.Variable‘fem’includes all of the data in the model,e.g.geometry, physical setting,simulation results.)clear ss.objs={all};={‘all’};s.tags={‘all’};fem.draw=struct(‘s’,s);fem.geom=geomcsg(fem);figure,geomplot(fem);–use to visualize the geometry,to monitor if everything is correct.Tips:1.The‘base’,‘corner’in the rect2command can be neglected.The‘pos’can bespecified by numeric matrix([0,pos refl])instead of cell(e.g.{‘0’,pos refl});2.More command details can be found in the MATLAB command window by type‘help command name’;e command‘fillet’to round the sharp corners of metal components.mand‘geomplot’can be used to visualize the point,edge,boundary andsubdomain labels,which is useful when set corresponding physical conditions.8(Use the property‘edgelabel’of‘geomplot’to show edge label(edge in2D isboundary)).4.2Physical settingTo set conditions for subdomains,boundarys,edges,and points in a script,it is necessaryto label each of these items to distinguish them.The methods for setting conditions for these items are similar,so here we take the boundary and subdomain as examples(see example in‘Scripts\Grating scattered formula’).Before setting the boundary conditions,we have to know the boundary labels,andthis can be easily done by using‘geomplot’with the property‘edgelabel’:figure,geomplot(fem,‘edgelabel’,‘on’);–use to visualize the geometry togetherwith boundary labels.Or you can count it yourself there is a rule how the COMSOL number boundaries, counting from the low-left side to the up-right,but straight linefirst,then curves.After knowing the boundary labels,as following we can set the boundary conditions.clear bnd–clear the‘bnd’which is used to set the boundary condition.bnd.type={‘E0’,‘cont’,‘SC’};–specify in a cell how many different type of bound-ary conditions used in the model.‘E0’represents perfect boundary condition,‘cont’for continuity boundary condition,‘SC’for scattering boundary condition.(‘H0’for perfect boundary condition,but not used in the model.)For each type of the boundary condition in the cell has its own index,e.g.‘1’for‘E0’,‘2’for‘cont’...bnd.ind=[1,3,1,2,1,2,1,2,1,2,1,2,1,2,3,2,2,1,1,1,1,1,1,2,2];–specify the boundary conditions for each of the boundary in the geometry using the boundary condition index specify in the‘bnd.type’.As seen they are25boundaries,so we have to specify each of the boundaries in the sequence of boundary labels.appl.bnd=bnd;–boundary condition settingfinished.For subdomain condition,it is set by‘appl.equ’as following,see also in the example script.clear equequ.Sd={{‘Sdx guess rfweh’;‘lambdaS rfweh’},{‘Sdx guess rfweh’;‘Sdy guess rfweh’},9{‘Sdx guess rfweh’;‘Sdy guess rfweh’},{‘Sdx guess rfweh’;‘Sdy guess rfweh’}};–sub-domain setting,this is PML related,specify the width of PML in x-,y-axis directions.‘Sdx guess rfweh’,‘Sdy guess rfweh’and‘lambdaS rfweh’are some predefined value in COMSOL.For thefirst two means the PML widths in each direction use the geometric width.‘lambdaS rfweh’is used in the case when the geometric width is comparable with wavelength.This command line together with the next command line’equ.coordOn’are only used when there is a PML used in the model The number of types has to be the same number as the types of subdomain conditins specified in‘equ.n’equ.coordOn={{0;1},{0;0},{0;0},{0;0}};–specify which type of PML is activated in this model.this means thefirst‘n air’(stands for air)iin the‘equ.n’is set as PML. The‘{0;1}’stands for the PML absorb light propagating in the y-axis direction.The ‘0;0’with two‘0’deactivates the PML property in subdomain.equ.n={‘n air’,‘n air’,‘nag’,‘np3ht’};–specify subdomain material,‘n air’is defined in constants.‘n ag’and‘np3ht’are defined in global expressions;equ.Stype={‘coord’,‘none’,‘none’,‘none’};–PML type setting,the number of types has to be the same number as the types of subdomain conditins specified in‘equ.n’.‘coord’represents cartesian type of PML used,‘none’for no PML used.equ.matparams=‘n’;–subdomain material parameters,specify by refractive index ‘n’or permittivity.equ.ind=[1,2,3,4,3,2,1];–set the subdomain.appl.equ=equ;–subdomain settingfinished.4.3Geometric sweepFor some simulations geometric parameters have to been scanned to get an optimal design.For this can be accomplished by adding the Parametric Sweep into the Study node in COMSOL v4.x.But for v3.5,one can use COMSOL script(COMSOL with MATLAB)to sweep the geometric paramters with loops,see example for geometric sweep in‘Scripts\Grating scattered formula’.4.4PostprocessingCOMSOL GUI already integrates some useful postprocessing.However for some special user-defined parameters one can export the data to MATLAB,then process fundamental data calculated by COMSOL using script.Some important commands(in COMSOL10v3.5,command names are different in v4.x,corresponding command see documentation in v4.x)usually used in script are listed in following:Command(v3.5)FunctionGeomplot visualize the geometry of the model.Meshplot visualize the mesh.Postint integration in a boundary or domain.Postinterp extract the variable value e.g.E and H at specified points.Details about these commands type‘help command name’in the command window in COMSOL with Matlab.5Cluster runningMore information about high performance computing infrastructure at UGent see http: //www.ugent.be/hpc/en/infrastructure.Details on how to run COMSOL on cluster see user tips at userwiki http://hpc. ugent.be/userwiki/index.php/Main_Page or below.First we build the COMSOL model e.g.‘test22.mph’,then a job script is written to submit the job(the model will run on cluster)to the cluster.Notes on how to write a job script see userwiki.The job will wait in a queue before its running.Note that only job scripts can be submitted to the queuing system.These scripts can be written in a variety of languages e.g.bash,perl,python,...Following are the scripts used to submit jobs for running on single node(for model with low memory consumption,<16GB) and multinode with MPI(for model with large memory consumption,>16GB).COMSOL single node#!/bin/bash#PBS-l nodes=1:ppn=8–Use1node,8processes.#PBS-l walltime=00:30:00–Define the maximum walltime,30minutes,for the job to run.By default,this is1hour.cd$PBS O WORKDIRmodule load COMSOL/4.1.0.112–load COMSOLcomsol batch-np8-inputfile test22.mph–run the model‘test22.mph’COMSOL multinode job with MPI11There have been made several changes to the COMSOL start script.To start MPI jobs correctly,please use the following script example:#!/bin/bash#PBS-l nodes=3:ppn=8–Use3nodes and8processes on each node.#PBS-l walltime=00:30:00cd$PBS O WORKDIRmodule load ictce/4.0.6module load scriptsmodule load COMSOL/4.1.0.112##important.don’t change these variablesexport MYMPICMD=impirunexport MYMPIRUN HYBRID=1comsol-clustersimple batch-inputfile test22.mphAs for geometric sweep on cluster,MATLAB script should also work(but having no experience on this).To do a sweep with GUI,for v3.5,we have to build models separately for different geometric parameters,this can be simply done by saving‘fem’structure as mphfile with script command:flsave(‘modelname.mph’,fem)in a script to avoid building mphfile from GUI step by step.For version4.x,the geometric parameter sweep is embedded in the GUI directly,so one model is enough for different geometric parameters.But for a large model,it is better to build separate mph model for each geometric parameter.Because large model is already take quite long time to calculate,with geometric sweep more time needed.This means longer walltime needed,resulting in longer waiting time in the queue.In addition,longer time perhaps will increase the possibility of crash in the middle of running,resulting in losing data for these sweep parameters which have alreadyfinished.12。

利用COMSOL仿真进行二维光子晶体的教学

利用COMSOL仿真进行二维光子晶体的教学

利用COMSOL仿真进行二维光子晶体的教学作者:邱伟彬林志立来源:《高教学刊》2019年第07期摘; 要:文章以COMSOL RF 模块为工具,进行半导体光电子学课程中的光子晶体的教学。

文中以介质光子晶体和色散材料光子晶体为例,给学生介绍了如何利用商用软件计算特定结构的光子晶体的能带结构,并且实现二维光场结构的可视化输出,使学生既掌握光子晶体能带结构的特点,又掌握如何使用商用软件来获得此能带结构。

关键词:COMSOL;光波导;仿真;商用软件中图分类号:G642 文献标志码:A 文章编号:2096-000X(2019)07-0084-03Abstract: In this paper, we use COMSOL RF module as a tool to teach photonic crystals in semiconductor optoelectronics course. Taking dielectric photonic crystals and dispersive materials photonic crystals as examples, this paper introduces how to use commercial software to calculate the band structure of photonic crystals with specific structures, and realize the visual output of two-dimensional optical field structure, so that students can not only grasp the characteristics of band structure of photonic crystals, but also grasp how to use commercial software to get the band structure.Keywords: COMSOL; optical waveguide; simulation; commercial software一、概述光子晶體是一直介电常数受到周期性调制的结构,类似于电子在晶体中的运动受到晶体中受到周期性势场限制而呈现的允带和禁带,光子在周期性介电常数分布的结构中传播时也出现允带和禁带,因此该晶体就被形象地称为光子晶体。

COMSOL光器件仿真技术介绍

COMSOL光器件仿真技术介绍

Simulated by COMSOL Mul)physics
仿 真 智 领 创 新
Simulating inspires innovation
考虑光生载流子
加载 + 1 V 偏置电压
(a)空穴浓度分布 (b)电子浓度分布 (c)x=1um处沿y方向的 电子和空穴浓度变化 (d)静电势分布
仿 真 智 领 创 新
Simulating inspires innovation
束包络法 (Beam Envelopes Method )
Electric field, E(x) Electric field envelope, E1(x)
x
E(x) = E1(x)exp(-­‐jk1x)
– 一维周期性结构 – 2D结构仿真,使用port激发 – 反射谱和透射谱用S参数直接表示
仿 真 智 领 创 新
Simulating inspires innovation
• SPP周期结构散射分析
– 二维周期性结构 – 3D结构仿真,使用背景场激发 – 反射谱和透射谱用功率积分计算
仿 真 智 领 创 新
Simulating inspires innovation
基于COMSOL波动光学模块的
光场分析
仿 真 智 领 创 新
Simulating inspires innovation
光场分析
• 腔模分析
– 特征值问题 – 谐振腔、波导、光栅、光子晶体等结构的特征频率及模场分析
电极接触边界 其他接触使用电流边界
仿 真 智 领 创 新
Simulating inspires innovation
未考虑光生载流子过程的PN结计算
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Simulating inspires innovation
透镜的受热变形
空气/真空
TE10 波导
(未显示) 4µm 宽 “准直” 透镜 PML无反射 截止域
仿 真 智 领 创 新
Simulating inspires innovation
ቤተ መጻሕፍቲ ባይዱ
局部温度
折射率
透镜变形
10 µ-sec 1 ms 100 ms 1 sec
负折射现象
负折射材料
介电常数e和磁导率m均为负数
隐形斗篷
仿 真 智 领 创 新
Simulating inspires innovation
负折射率铁磁流体
Y. Gao, J. P. Huang, Y. M. Liu, L. Gao, K. W. Yu, and X. Zhang, PRL 104, 034501 (2010)
COMSOL Multiphysics
光学系统与微纳光学专题
中仿科技 鲍伟(Feit Bao) 2013年1月
仿 真 智 领 创 新
Simulating inspires innovation
光学理论研究方法 • 几何光学:
– 波长 << 特征尺寸 – 光线追迹
• 波动光学:
– 波长与特征尺寸可比拟 – 有限时域差分方法 – 时域有限元方法
仿 真 智 领 创 新
Simulating inspires innovation
总结
• COMSOL RF模块可满足纳米光子学研究中的 以下需求:
– 波导模式分析 – 稳态传输特性分析 – 瞬态传输特性分析
• COMSOL支持进一步的研究需求
– 支持用户自定义PDEs,处理量子光学问题(薛定谔 方程的求解) – 多物理场耦合,光与物质的相互作用(原子冷却、 粒子囚禁与操控等)
仿 真 智 领 创 新
Simulating inspires innovation
高双折射光子晶体光纤
• 非对称椭圆形空气孔 • 双折射度
Han-Hsuan Yeh, Yuan-Fong Chau 清云科技大学电子工程系
仿 真 智 领 创 新
Simulating inspires innovation
仿 真 智 领 创 新
Simulating inspires innovation
3. 稳态传输特性分析
• 针对问题: – 超材料/负折射材料传输特性 – 波导器件传输特性 – 光栅/金属颗粒散射 – 光刻分辨率分析 • 预置电磁场频域分析应用模式 • 自定义光源入射条件 • 后处理 – 内置反射/透射率计算 – 散射场分布
仿 真 智 领 创 新
Simulating inspires innovation
COMSOL Multiphysics 在此领域享有盛誉
“(在纳米光子学领域)FEM被广泛用于求解电磁 问题,源于一款受欢迎的商业软件:COMSOL Multiphysics。” —Nanophotonics Accessibility and Applicability, the
电磁波领域研究课题
• 电磁波的产生
– 各种波源的辐射机制
• 电磁波的传播
– 衍射/干涉 – 反射/折射/散射/吸收 – 光电/热/力效应
仿 真 智 领 创 新
Simulating inspires innovation
数值分析
• 散射分析
– 散射强度 – 透射/反射率
• 波导分析
– 模式:场分布,传播常数 – 透射/反射率
光子晶体光纤SPP传感器
∧=2e-6m, dc=0.5 ∧, d1=0.6 ∧, d2=0.8 ∧ nair=1.0, na=1.33 金属层厚度4e-8m
基模
仿 真 智 领 创 新
Simulating inspires innovation
光子晶体光纤SPP传感器
纤芯中激发的SPP模式图
金属层表面能量分布图
仿 真 智 领 创 新
Simulating inspires innovation
COMSOL在《Nature》中论文发表量
30 25
20
15 10 5 0 2003 2004 2005 2006 2007 2008 2009 2010 2011
仿 真 智 领 创 新
Simulating inspires innovation
• 粒子追踪现在是可用的物理接口:
– – – – – – – – – – 利用COMSOL求解基于有限元问题的强大求解器 轻松模拟成百上千的粒子 能使用参数扫描 可指定粒子的边界条件 解储存于模型而非在后处理时计算 隐式时间步进 支持粒子/场相互作用 预定义力作为模型树中可用特征 Hamilton算子允许模拟光线追踪 新的后处理工具
4. 时域传输特性分析
• 针对问题
– 瞬态及非线性过程分析 – 金属颗粒表面场增强拉曼散射 分子荧光成像/二次谐波产生
• • • •
预置时域分析应用模式 自定义材料非线性极化率 自定义入射光源的时空分布 后处理
– 时域传输过程动画导出
仿 真 智 领 创 新
Simulating inspires innovation
仿 真 智 领 创 新
Simulating inspires innovation
隐形斗篷
隐形斗篷
超材料制成,使斗篷内的物体在微波波段不可见。 这项基于COMSOL Multiphysics仿真分析的研究工作,由北卡罗 来州达拉莫杜克大学的Steve. Cummer和David. Schurig共同完 成,被Science杂志评为2006年科学突破之一。
COMSOL在《Nature》中论文发表量
119
仿 真 智 领 创 新
Simulating inspires innovation
COMSOL典型光学用户
仿 真 智 领 创 新
Simulating inspires innovation
联系我们
中仿科技官方网站: 免费技术交流社区: 服务电话:400-888-5100 电子邮件:Nathan@ 技术服务:Support@ 软件试用及资料申请:democd@
COMSOL Multiphysics Version 4.0 multiphysics simulation software features a new COMSOL Desktop™ user interface that provides an organized layout and streamlined model building. Quick model setup is enabled in the Model Builder and its graphical programming utility throughout the modeling and simulation process. With the new version, a series of LiveLink™ options integrate the software into the mainstream product design workflow of Autodesk® Inventor®, SolidWorks®, and MATLAB®.
高斯光束的二倍频
仿 真 智 领 创 新
Simulating inspires innovation
四波混频计算结果
仿 真 智 领 创 新
Simulating inspires innovation
Duffing模型处理非线性色散
电子作为阻尼非谐振子:
阻尼
非线性
色散
谐振
磁化系数(折射率)
a = 0,Lorentz色散模型
• 腔模分析
– 共振频率 – 品质因子
• 瞬态传播/非线性效应
– 群速度(色散) – 倍频产生、自聚焦、自相位调制等
• 多场耦合
– 光与热,电,磁,力特性的耦合
仿 真 智 领 创 新
Simulating inspires innovation
纳米光子学仿真需求
纳米材料/结构的 光学特性 纳米光子学器件 纳米光子学 光纤/波导 波导分析 激光器 隐形斗篷 稳态传输特性分析 光刻 纳米结构的 光学制备、表征方法 光镊/光势阱 分子探测 瞬态/非线性效应分析
2. 谐振腔模式分析
• 针对问题:
– 各种谐振腔的模式计算 – 品质因子分析
• 预置电磁场特征频率分析应用模式 • 后处理
– 内置品质因子计算 – 模场分布 – 传播常数/有效折射率
仿 真 智 领 创 新
Simulating inspires innovation
仿 真 智 领 创 新
Simulating inspires innovation
Luneburg透镜
磁透镜
四极质谱仪
仿 真 智 领 创 新
Simulating inspires innovation
光学隐身
仿 真 智 领 创 新
Simulating inspires innovation
Luneburg透镜
仿 真 智 领 创 新
Simulating inspires innovation
RF模块理论基础
• RF = Radio Frequency (Electromagnetic Waves), 3kHz~300GHz • 高频电磁波 电尺寸=结构尺寸/波长>1/100 • 基于经典Maxwell电磁理论
时域分析
频域分析
仿 真 智 领 创 新
Simulating inspires innovation
• 时域分析 • 频域分析
相关文档
最新文档