-
-
September 27, 2023 at 10:11 amFinn SalhoffSubscriber
Good Day,
I am modelling a waveguide and simulate the modes with FEEM solver. I want to compare the results with the results obtained by MODE.
I want to process the field data calculated by FEEM solver. The field data is a unstructured data set. Using the visualizer tool, spatial data in my case x and y is shown. How can i achieve the same by lumerical scripting language?
My end goal is to find the maximum field in a specific area of the device.
Where can i find more information about the software?
Kind regards, Finn
-
September 27, 2023 at 5:44 pmAmrita PatiAnsys Employee
Hi Finn,
If you just want to visualize the data using the script then you can use the getresult and visualize script commands. For example,
field = getresult("FEEM","fields");
visualize(field);However, if you want to compare the datasets from MODE and FEEM simulation (quantitative comparison), it would be much more starightforward to post-process/compare the data with MODE if we can interpolate it into rectillinear mesh. This can be acheived by the interptri script command.
I have a sample script where I interpolate the field result in CHARGE from a triangular mesh to a rectillinear mesh. You can use a similar approach for field results obtained from FEEM.
x = linspace(-14.5e-6,0e-6,2000);
y = 0;
z = linspace(1e-06,3e-06,500);
x_no = length(x);
z_no = length(z);
Ex= matrix(x_no,z_no);
Ey= matrix(x_no,z_no);
Ez = matrix(x_no,z_no);
X = meshgrid3dx(x,y,z);
Y = meshgrid3dy(x,y,z);
Z = meshgrid3dz(x,y,z);
run("CHARGE");
electrostatics = getresult("CHARGE","electrostatics");
E = pinch(electrostatics.E);
Ex_tri = pinch(E,2,1);
Ey_tri = pinch(E,2,2);
Ez_tri = pinch(E,2,3);
vtx_x = electrostatics.x;
vtx_z = electrostatics.z;
vtx = [vtx_x,vtx_z];
tri = electrostatics.elements;
Ex(:,:) = interptri(tri,vtx,Ex_tri,x,z);
Ey(:,:) = interptri(tri,vtx,Ey_tri,x,z);
Ez(:,:) = interptri(tri,vtx,Ez_tri,x,z);
image(x*1e6,z*1e6,Ex(:,:),"x (um)","z (um)","E");
image(x*1e6,z*1e6,Ey(:,:),"x (um)","z (um)","E");
image(x*1e6,z*1e6,Ez(:,:),"x (um)","z (um)","E");Here I first define the 2D rectilinear grid (you can set this based on the MODE simulation which would make it easier to compare), where I want the fields to be interpolated to. Then I initialize the matrices where the final fields (Ex,Ey, and Ez) will be stored. Then I get the results from CHARGE and interpolate them using the interptri script command.
For general information, please visit the Ansys Optics Page: https://optics.ansys.com/hc/en-us
From here you can access the 1. Knowledge Base (KB): which consists of articles on various solvers and topics. 2. App Gallery (APP): here you find simulation example files, and detailed information for different application areas using different solvers (including FEEM). 3. Ansys Innovation Courses: You can find courses on different solvers and scripting. For a list of all script commands, please refer to: https://optics.ansys.com/hc/en-us/articles/360034923553-Lumerical-scripting-language-Alphabetical-list
Please let me know if you have any questions.
Regards,
Amrita -
October 24, 2023 at 3:54 pmFinn SalhoffSubscriber
Hello Amrita,
"interptri" was the function i needed. Thank your for the helpful answer.
Regards, Finn
-
- The topic ‘FEEM unstructured data processing’ is closed to new replies.
- Difference between answers in version 2024 and 2017 lumerical mode solution
- Errors Running Ring Modulator Example on Cluster
- INTERCONNECT – No results unless rerun simulation until it gives any
- Import material .txt file with script
- Trapezoidal ring
- Help for qINTERCONNECT
- Absorption cross-section of AuNR excited by prism-based TIR
- Issues with getting result from interconnent analysis script
- How to measure transmission coefficients on a given plane .
- Topology Optimization Error
-
1416
-
599
-
591
-
565
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.