-
-
June 2, 2023 at 8:42 amMiller TestingSubscriber
I 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 pmGuilin SunAnsys Employee
The 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 amMiller TestingSubscriber
Dear 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 pmGuilin SunAnsys Employee
A1: 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.
-
- The topic ‘I want to know the function of the ‘sroughness’ script command’ 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
- Help for qINTERCONNECT
- Trapezoidal ring
- Issues with getting result from interconnent analysis script
- How to measure transmission coefficients on a given plane .
- Topology Optimization Error
- Absorption cross-section of AuNR excited by prism-based TIR
-
1301
-
591
-
544
-
524
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.