TAGGED: colour-plot, dxf-file-conversion, plot, sweep, sweep-method
January 30, 2023 at 2:31 am
January 31, 2023 at 12:17 amGuilin SunAnsys Employee
The sweep is nested for width and length. you will need to be able to output the so-called conversion efficiency from an analysis group, from model or any monitor that has this quqnatity.
Creating nested parameter sweeps
I guess the important thing is to get the conversion efficiency. Do you know its mathematical definition that you can follow and compute it? if so, it should be simple.
January 31, 2023 at 1:31 amhyedusaSubscriber
Hi, thank you for reply.
I missed explaining something. I already did the width and length sweep!
and i used for conversion efficiency formula but it doesn't work well. i can't import the sweep data.. what can i add some script???
refractive_index_1= real (getdata("s_params::R_index","index_x"));
refractive_index_2= real (getdata("s_params::T_index","index_x"));
s21_x = s21_x/sqrt(refractive_index_1/refractive_index_2);
s21_y = s21_x/sqrt(refractive_index_1/refractive_index_2);
f = getdata("s_params::T","f");
s21_L = (s21_x +1i*s21_y)/sqrt(2);
s21_R = (s21_x -1i*s21_y)/sqrt(2);
s21_L = (s21_L(:,1) - 1i*s21_L(:,2))/sqrt(2);
effect = abs(s21_RL)^2;
January 31, 2023 at 8:34 pmGuilin SunAnsys Employee
not sure how did you do the sweep.
If it is from script, and you already got the sweep result,you can check the result to know the dimensions.
if it is from sweep object, and the result should be in a matrix of (nf,nwidth, nlength) after extracting the result from getsweepresult, where nf is the number of frequency point, nwidth and nlength are the sweep points for width and length (you may check their lengths with matrix dimensions and make sure they match. do not use the same number of points in order to better distinguish them).
then you can plot
fn=1; for the first frequency point. you can change the number for different frequencies.
please read getsweepresult - Script command for more information.
1: "length" is a script command, you cannot directly use it. I just use it as isslutration. Please use other name for this variable.
2: result is the matrix for your conversion data, since it should be a 3D matrix.
3: your script seems to get the conversion (effect) at one pair of width and length.
If you are using script to do the sweep, please do not plot at each point. otherwise there will be too many figures and sometimes it can freeze your computer, due to display issue (it needs graphic memory).
- 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.
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.
© 2023 Copyright ANSYS, Inc. All rights reserved.