


{"id":235766,"date":"2022-09-20T08:37:20","date_gmt":"2022-09-20T08:37:20","guid":{"rendered":"\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/"},"modified":"2022-09-20T08:37:20","modified_gmt":"2022-09-20T08:37:20","slug":"how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/","title":{"rendered":"How to set the OAM parameters of incident light in Lumerical FDTD?"},"content":{"rendered":"<p>Hi Everyone,<\/p>\n<p>Right now, I want to set up the orbital angular momentum (OAM) modes of the incident light in Lumerical FDTD. Does anyone know how to set the OAM mode of incident light?<\/p>\n<p>It looks like that we can&#8217;t set up this in the software itself, but we might be able to set it up in the lumerical script section. Below is an example of setting some parameters of the incident light, which I got online. It might a hint\/reference to you.<\/p>\n<p>Really hope someone can tackle this issue. Thanks.<\/p>\n<div># scriptfile:usr_custom_source.lsf<\/div>\n<div>&nbsp;<\/div>\n<div># define position vectors<\/div>\n<div>&nbsp;<\/div>\n<div>x=linspace(-10e-6,10e-6,401);<\/div>\n<div>y=linspace(-10e-6,10e-6,401);<\/div>\n<div>z=0; #this is z z-normal source<\/div>\n<div>&nbsp;<\/div>\n<div>X=meshgridx(x,y);<\/div>\n<div>Y=meshgridx(x,y);<\/div>\n<div>&nbsp;<\/div>\n<div>lambda0=0.5e-6;<\/div>\n<div>f=c\/lambda0;<\/div>\n<div>w=2*pi*f;<\/div>\n<div>k=2*pi\/lambda0;<\/div>\n<div>&nbsp;<\/div>\n<div>#calculate k-space field profiles<\/div>\n<div>NA=0.2;<\/div>\n<div>&nbsp;<\/div>\n<div>kx=linspace(-k,k,200);<\/div>\n<div>ky=linspace(-k,k,200);<\/div>\n<div>Kx=meshgridx(kx,ky);<\/div>\n<div>Ky=meshgridy(kx,ky);<\/div>\n<div>phi=atan2(Ky,Kx);<\/div>\n<div>theta=real(acos(sqrt(1-Kx^2\/k^2-Ky^2\/k^2)));<\/div>\n<div>envelope=exp(-0.5*(Kx^2+Ky^2)\/(NA*k)^2);<\/div>\n<div>&nbsp;<\/div>\n<div>Exk=cos(phi)*cos(theta)*envelope;<\/div>\n<div>&nbsp;<\/div>\n<div>Eyk=sin(phi)*cos(theta)*envelope;<\/div>\n<div>&nbsp;<\/div>\n<div>Ezk=sin(theta)*envelope;<\/div>\n<div>&nbsp;<\/div>\n<div>Ex=-1i*czt(Exk,kx,ky,x,y);<\/div>\n<div>&nbsp;<\/div>\n<div>Ey=-1i*czt(Eyk,kx,ky,x,y);<\/div>\n<div>&nbsp;<\/div>\n<div>Ez=-1i*czt(Ezk,kx,ky,x,y);<\/div>\n<div>&nbsp;<\/div>\n<div>Hxk=-sqrt(eps0\/mu0)*sin(phi)*envelope;<\/div>\n<div>Hyk=sqrt(eps0\/mu0)*cos(phi)*envelope;<\/div>\n<div>Hx=-1i*czt(Hxk,kx,ky,x,y);<\/div>\n<div>Hy=-1i*czt(Hyk,kx,ky,x,y);<\/div>\n<div>Hz=0*Ex;<\/div>\n<div>&nbsp;<\/div>\n<div># sacle fild so E^2=1<\/div>\n<div>&nbsp;<\/div>\n<div>E2=abs(Ex)^2+abs(Ey)^2+abs(Ez)^2;<\/div>\n<div>scaleFactor=sqrt(max(E2));<\/div>\n<div>Ex=Ex\/scaleFactor;<\/div>\n<div>Ey=Ey\/scaleFactor;<\/div>\n<div>Ez=Ez\/scaleFactor;<\/div>\n<div>Hx=Hx\/scaleFactor;<\/div>\n<div>Hy=Hy\/scaleFactor;<\/div>\n<div>Hz=Hz\/scaleFactor;<\/div>\n<div>&nbsp;<\/div>\n<div># package field data into the EM fields dataset<\/div>\n<div>&nbsp;<\/div>\n<div>EM=rectilineardataset(&#8220;EM fields&#8221;,x,y,z);<\/div>\n<div>EM.addparameter(&#8220;lambda&#8221;,c\/f,&#8221;f&#8221;,f);<\/div>\n<div>EM.addattribute(&#8220;E&#8221;,Ex,Ey,Ez);<\/div>\n<div>EM.addattribute(&#8220;H&#8221;,Hx,Hy,Hz);<\/div>\n<div>&nbsp;<\/div>\n<div># save dataset to .mat file<\/div>\n<div>matlabsave(&#8220;import_data.mat&#8221;,EM);<\/div>\n","protected":false},"template":"","class_list":["post-235766","topic","type-topic","status-closed","hentry","topic-tag-define-source","topic-tag-LumericalFDTD-1","topic-tag-photonics","topic-tag-source-setting-1"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Hi Everyone,Right now, I want to set up the orbital angular momentum (OAM) modes of the incident light in Lumerical FDTD. Does anyone know how to set the OAM mode of incident light?It looks like that we can&#039;t set up this in the software itself, but we might be able to set it up in\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Learning Forum | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to set the OAM parameters of incident light in Lumerical FDTD? | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"Hi Everyone,Right now, I want to set up the orbital angular momentum (OAM) modes of the incident light in Lumerical FDTD. Does anyone know how to set the OAM mode of incident light?It looks like that we can&#039;t set up this in the software itself, but we might be able to set it up in\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-09-20T08:37:20+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-09-20T08:37:20+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to set the OAM parameters of incident light in Lumerical FDTD? | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Hi Everyone,Right now, I want to set up the orbital angular momentum (OAM) modes of the incident light in Lumerical FDTD. Does anyone know how to set the OAM mode of incident light?It looks like that we can&#039;t set up this in the software itself, but we might be able to set it up in\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic-tag\\\/define-source\\\/#listItem\",\"name\":\"define-source\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic-tag\\\/define-source\\\/#listItem\",\"position\":3,\"name\":\"define-source\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic-tag\\\/define-source\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\\\/#listItem\",\"name\":\"How to set the OAM parameters of incident light in Lumerical FDTD?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\\\/#listItem\",\"position\":4,\"name\":\"How to set the OAM parameters of incident light in Lumerical FDTD?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic-tag\\\/define-source\\\/#listItem\",\"name\":\"define-source\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\\\/\",\"name\":\"How to set the OAM parameters of incident light in Lumerical FDTD? | Ansys Learning Forum\",\"description\":\"Hi Everyone,Right now, I want to set up the orbital angular momentum (OAM) modes of the incident light in Lumerical FDTD. Does anyone know how to set the OAM mode of incident light?It looks like that we can't set up this in the software itself, but we might be able to set it up in\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\\\/#breadcrumblist\"},\"datePublished\":\"2022-09-20T08:37:20+00:00\",\"dateModified\":\"2022-09-20T08:37:20+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to set the OAM parameters of incident light in Lumerical FDTD? | Ansys Learning Forum","description":"Hi Everyone,Right now, I want to set up the orbital angular momentum (OAM) modes of the incident light in Lumerical FDTD. Does anyone know how to set the OAM mode of incident light?It looks like that we can't set up this in the software itself, but we might be able to set it up in","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/forum","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","position":2,"name":"Topics","item":"https:\/\/innovationspace.ansys.com\/forum\/topics\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/define-source\/#listItem","name":"define-source"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/define-source\/#listItem","position":3,"name":"define-source","item":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/define-source\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/#listItem","name":"How to set the OAM parameters of incident light in Lumerical FDTD?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/#listItem","position":4,"name":"How to set the OAM parameters of incident light in Lumerical FDTD?","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/define-source\/#listItem","name":"define-source"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization","name":"Ansys Learning Forum","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/forum\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/","name":"How to set the OAM parameters of incident light in Lumerical FDTD? | Ansys Learning Forum","description":"Hi Everyone,Right now, I want to set up the orbital angular momentum (OAM) modes of the incident light in Lumerical FDTD. Does anyone know how to set the OAM mode of incident light?It looks like that we can't set up this in the software itself, but we might be able to set it up in","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/#breadcrumblist"},"datePublished":"2022-09-20T08:37:20+00:00","dateModified":"2022-09-20T08:37:20+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/forum\/#website","url":"https:\/\/innovationspace.ansys.com\/forum\/","name":"Ansys Learning Forum","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Learning Forum | Ansys Innovation Space","og:type":"article","og:title":"How to set the OAM parameters of incident light in Lumerical FDTD? | Ansys Learning Forum","og:description":"Hi Everyone,Right now, I want to set up the orbital angular momentum (OAM) modes of the incident light in Lumerical FDTD. Does anyone know how to set the OAM mode of incident light?It looks like that we can't set up this in the software itself, but we might be able to set it up in","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/","article:published_time":"2022-09-20T08:37:20+00:00","article:modified_time":"2022-09-20T08:37:20+00:00","twitter:card":"summary_large_image","twitter:title":"How to set the OAM parameters of incident light in Lumerical FDTD? | Ansys Learning Forum","twitter:description":"Hi Everyone,Right now, I want to set up the orbital angular momentum (OAM) modes of the incident light in Lumerical FDTD. Does anyone know how to set the OAM mode of incident light?It looks like that we can't set up this in the software itself, but we might be able to set it up in"},"aioseo_meta_data":{"post_id":"235766","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"content","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":true,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2024-10-28 19:03:27","updated":"2024-10-28 19:03:27","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\/topics\/\" title=\"Topics\">Topics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/define-source\/\" title=\"define-source\">define-source<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to set the OAM parameters of incident light in Lumerical FDTD?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Topics","link":"https:\/\/innovationspace.ansys.com\/forum\/topics\/"},{"label":"define-source","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/define-source\/"},{"label":"How to set the OAM parameters of incident light in Lumerical FDTD?","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-set-the-oam-parameters-of-incident-light-in-lumerical-fdtd\/"}],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["263442","2592","39090"],"_bbp_author_ip":["23.220.96.180"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1377"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["235766"],"_bbp_forum_id":["27833"],"_bbp_engagement":["2592","39090","263442"],"_bbp_voice_count":["3"],"_bbp_reply_count":["3"],"_bbp_last_reply_id":["287750"],"_bbp_last_active_id":["287750"],"_bbp_last_active_time":["2023-06-08 14:29:13"]},"test":"jingyangpeng2022163-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/235766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/235766\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=235766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}