-
-
June 2, 2023 at 8:42 am
Miller Testing
SubscriberI have already tried the sroughness script example for learning. I am wondering how I can understand the function and if there is any way to know how sroughness processes or analyzes data based on the syntax provided on this website (https://optics.ansys.com/hc/en-us/articles/360034926193-sroughness).
Syntax: out = sroughness(x_span, y_span, sigma_rms, corr_x, corr_y, seed);
Any information would be appreciated. Thank you!
-
June 2, 2023 at 8:31 pm
Guilin Sun
Ansys EmployeeThe explanation for this script can be found here https://optics.ansys.com/hc/en-us/articles/360034926193-sroughness-Script-command
Basically it assumes a normal distribution, characterized by rms and corrlation lengths,first in the Fourier space and then transformed into real space. you van refer this example https://optics.ansys.com/hc/en-us/articles/360042213854-Bidirectional-scattering-distribution-function-BSDF-
I would encourage you to try. Once you created the rough surface it is one sample and you can do one simulation. Then you can quantify the reflection and transmission for such assuming periodic rough surface. DIfferent seed can create difference sample. Depending on how do you process the results, you may do a serious of simulations (different samples) and then you can get statistical reuslt.
-
June 5, 2023 at 10:02 am
Miller Testing
SubscriberDear Guilin Sun,
Thank you very much for your reply and insight. I have read the article that you provided for me and also tried the example in the article.
However, I have some questions about this:
1. Is there any way that we can characterize or generate surface roughness using the roughness exponent (α) or by adding the roughness exponent to the formula (so it will basically have three components in the formula, such as RMS, correlation lengths, and roughness exponent)? Are there any articles or information that support this information?
2. After trying the example in the article, can we export or plot the intensity value or any value of the picture to MATLAB or OriginLab besides from ASAP?
3. Previously, I had tried using import surface data (https://optics.ansys.com/hc/en-us/articles/360034901973-Surface-import-Simulation-object) to generate my roughness into FDTD. At that time, I had surface roughness data of 512×512 that I had exported from MATLAB to a textnote.txt file. Then, using that .txt file, I imported it into FDTD directly. So, I set both the x-span and y-span to 512×512 um (micrometers). However, when it generated the import surface roughness in FDTD, it was not completely the same roughness as the roughness that I had already simulated in MATLAB. In addition, if I tried to extend the x-span or y-span directly from the import structure data, the roughness would decrease and it would become somehow “rounded?” or “smooth”. For example, when I tried to import surface roughness data of 2048×2048 into FDTD, somehow it still produced some roughness on the surface, but more than that, such as 3000++, the surface would somehow look less rough or smooth.
I wonder if there are any limitations in the import surface function or if there are any steps I missed or did wrong.
FYI, when I tried to import larger data into FDTD, the size of the file would increase a lot and Lumerical FDTD itself would also become a little laggy. Is this a normal occurrence when we try to add larger surface roughness data or what reason may cause this?
Your guidance is greatly appreciated. Thank you!
-
June 5, 2023 at 9:34 pm
Guilin Sun
Ansys EmployeeA1: unforunately currently it does not include this parameter of the roughness exponent. It seems this parameter is related to Sigma. Probably you can deduct it from rms data. If it is mandatory, you can either create your own roughness surface, or submit a feature request by referring to this post:
New Feature vote: Vote new features, and file your feature request
A2: You have the data from neff_xy_wafer so you can save it to matlab or other data format.
A3: surface roughness data of 512×512 does not mean 512×512 um (micrometers). Did you import the space coordinates? If the coordinates and data are matched they should be exactly the same. You can not arbitrarily change the coordinates. Please visit the import surface article again https://optics.ansys.com/hc/en-us/articles/360034901973-Surface-import-Simulation-object
Yes, when large amount of data is imported the GUI can be slow due to limited display memory. You may try the binary import. Once imported and it shows correctly, you can choose "wire frame" for display.
-
- 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.
- “Import optical generation” or “delta generation rate”?
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- Using a license file on a new license server
- Ansys Insight: Diverging Simulations
- Error: addfdtd is not a valid function or a variable name
- Error on Lumerical device
- Questions about the calculation of the cross-polarization conversion efficiency of metasurface
- Ansys Insight: About override mesh in FDTD: its use and settings
- Finding your Ansys (or Lumerical) account number
- Lumerical – error message when trying to open from Linux terminal
-
7592
-
4440
-
2953
-
1427
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.