-
-
April 4, 2023 at 11:18 pm
Nirvan Gajadharsingh
SubscriberHello.
I have found the eigen modes for my ridge waveguide geometry, and now I want to integrate the electric field over the entire profile to get the total electric flux outside the waveguide expressed as a ratio to the total electric flux in the entire simulation domain. This is expressed as:
∫ExEzdxdz (air) / ∫ExEzdxdz(total)
I can perform this integration easily in python using the pinch command to grab the 2D data and placing it into an array. I would now like to specify boundaries over the simulation domain to just integrate the E-field contained in air. From the picture attached, you can see the 3 regions of the simulation domain, air in dark blue, LibNO3 in red and glass in sky blue.
1)How can I export the refractive index information into an array which has the same dimensions as that of the array used to store the fields Ex, Ey or Ez. This way all points associated with air has the refractive index 1, all points associated with LibNO3 and glass have the corresponding refractive index associated with that point.
2)Can this be done directly in lumerical without using python or matlab? If yes what commands will be useful
-
April 5, 2023 at 5:46 pm
Guilin Sun
Ansys EmployeeA1: Unfortunately FDE cannot output the refractive index profile. You may file a feature request by referring this post:
New Feature vote: Vote new features, and file your feature request
A2: you can either directly calcualte the integration by specifying the region in GUI:
or you can use script:
x1=.1e06;
x2=.5e-6;
y1=-2e-6;
y2=1e-6;
You specify the coordinates of the region.
setanalysis("integration shape","rectangular");
setanalysis("y1",y1);setanalysis("y2",y2);
setanalysis("x1",x1);setanalysis("x2",x2);
area=getanalysis("fraction integrated");
You can do a loop or two region integration to get the ratio.
-
April 8, 2023 at 7:14 pm
Nirvan Gajadharsingh
SubscriberHi,
Thanks, that does help but on my version of Lumerical Mode there are only 2 geometries available for use with the integrate function, rectangular and circular, neither of these allows me to select the profile shape accurately along the air/LbNO3 boundary of my ridge waveguide(ridge is at an angle). Is there another way to get this done? I used a rectangle and a polygon to build my structure and the integrate "solid" specification is not available.
-
April 10, 2023 at 4:48 pm
Guilin Sun
Ansys EmployeeYou can either use the "rectangular", or export the data, use whatever the window function you want and do the integration. you can use script:
E1=getresult("mode1","E");
Ex=E1.Ex;
Ey=E1.Ey;
H1 = getresult( "mode1", "H" );
Hx=H1.Hx;
Hy=H1.Hy;
EH=pinch(Ex*conj(Hy)-Ey*conj(Hx));
x=E1.x;
y=E1.y;
then you can use a window function to further process the data.
-
- 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
- Finding your Ansys (or Lumerical) account number
- Ansys Insight: Diverging Simulations
- Ansys Insight: Why my simulation result is different from published paper or experiment?
- Is there a Lumerical script command to output the Simulation and Memory requirements?
-
5454
-
3419
-
2473
-
1310
-
1022
© 2023 Copyright ANSYS, Inc. All rights reserved.