TAGGED: #Modal_Analysis, Lumerical-Mode
-
-
March 29, 2023 at 10:17 am
Xuanchang Zhang
SubscriberHi,
I am trying to use matlab to plot the distribution of fraction integrated along the x-axis for my laser structure. However, I noticed that this value is not directly exported. Instead, I can see Ex Ey Ez have been exported. I am wondering if there is an algorithm that I can use to find the integrated power.
Many thanks,
-
March 29, 2023 at 10:53 pm
Guilin Sun
Ansys EmployeeFor a given region, you can use
getanalysis("fraction integrated");
to get the integrated result.
It seems you want to get results from different regions. In such case I would suggest to get the field data, and do the integration for whatever the region you want with script.
Be aware that, FDE may use non uniform mesh but matlab always assumes uniform mesh. So you might need to interpolate the data into uniform mesh before exporting the data to matlab.
Please refer to this post https://forum.ansys.com/forums/topic/ansys-insight:--matlabhuatushizhenwenti/
-
March 30, 2023 at 10:20 am
Xuanchang Zhang
SubscriberHi,
Thanks for the quick reply. I am afraid I didn’t express the question very clearly. I am wondering if I can get the value of integrated power of each (x,z) coordinate so that I can plot the distribution of power along x or z axis. In another word, would it be possible to calculate the energy density of each coordinate as shown in this screenshot?
To me, getanalysis is more like obtaining a final value of the selected area.
Thanks
-
-
March 31, 2023 at 4:45 pm
Guilin Sun
Ansys EmployeeYes, you can. For example, I wrote the following script:
x1=.1e06;
x2=.5e-6;
y1=-2e-6;
y2=1e-6;
setanalysis("integration shape","rectangular");
setanalysis("y1",y1);setanalysis("y2",y2);
setanalysis("x1",x1);setanalysis("x2",x2);
area=getanalysis("fraction integrated");
you can easily convert it to a loop by assigning matrix values to x1,x2,y1 and y2.
However, the Energy density and other values in "component" can only be for the whole mode profile. If you want caculate them differently, please extract the mode profile and calculate the quantity you want.
you can try
E=getresult("mode1","E");
H=getresult("mode1","H");
x=E.x;
E=E.E; #data set
H=H.H;
Ex=pinch(E(:,:,:,1,1));
Ey=pinch(E(:,:,:,1,2));
Please check the dimensions of the matrices and know what do they mean.
E is a 5D matrix:x,y,z,f,{1,2,3}, where {1,2,3} means Ex,Ey and Ez.
-
May 24, 2023 at 3:00 pm
Xuanchang Zhang
SubscriberHi,
Thanks for your help. I am wondering how I can extract the refractive index using the same method that you mentioned for the energy density.
Thank you
-
-
May 24, 2023 at 6:38 pm
Guilin Sun
Ansys EmployeeUnfortunately currently FDE does not have output for refractive index. Please file a feature request by referring to this post, please do not reply in the post:
New Feature vote: Vote new features, and file your feature request
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- “Import optical generation” or “delta generation rate”?
- Error: addfdtd is not a valid function or a variable name
- Error on Lumerical device
- Using a license file on a new license server
- Ansys Insight: Transmission results greater than one
- Ansys Insight: Diverging Simulations
- Finding your Ansys (or Lumerical) account number
- Is there a Lumerical script command to output the Simulation and Memory requirements?
- Ansys Insight: Why my simulation result is different from published paper or experiment?
-
5162
-
3251
-
2443
-
1308
-
956
© 2023 Copyright ANSYS, Inc. All rights reserved.