Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Parametric Cutlines and Exporting of Data
Posted 20.09.2010, 08:59 GMT-4 Low-Frequency Electromagnetics, Parameters, Variables, & Functions, Studies & Solvers Version 4.3a, Version 5.2, Version 5.2a 13 Replies
Please login with a confirmed email address before reporting spam
I am currently solving a parametric sweep problem where I am varying a geometry parameter. I wish to create a cutline on the geometry which depends on this.
Currently I have my cutline defined with respect to this variable (d_sep), however the issue is when plotting or exporting the data, COMSOL appears to only calculate this with respect to the last solved instance of d_sep, and not realize that it was parametrically swept.
Is there a variable I can use that COMSOL will recognize as all the parameter and this calculate the cutline based on this?
Specifics:
Parametric Sweep:
parameter name: d_sep
parameter values: range(20,20,200)
Cutline:
x1: d_sep/2-1e-6
x2:d_sep/2-1e-6
y1:0
y2:0
z1: z_c+3[in]
z2:z_c-3[in]
Please login with a confirmed email address before reporting spam
I do remember there was an issue with 3.5a and the gemoetry not beong "updated" for a parametric sweep.
This means you need to use fully the Matlab interface to loop around (linked to the fact that the meshing is static within the GUI, and you need to remesh when you move a boundary.
in V4 this should not be an issue, as meshing is stored and rerun. There it's to set up the solver to loop around (havent tried it yet)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
The resulting solution makes sense. The issue is for example when I wish to plot the data it is grabbing the value for d_sep from the last parameter value - not linking the d_sep value to the parameter number.
Is there a global variable that defines the parameter separately? That way instead of defining my cutline with respect to d_sep, it could be defined with respect to 'parameter' and so at parameter value 200 it uses that, and at value 40 it would use 40.
-Yusuf
Please login with a confirmed email address before reporting spam
for multiiple parameter plots one must check that all values are selected in the general tab, otherwise only the last value is shown
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I guess my previous post was not clear, I'll try to clarify this one with some screen shots.
I am running a parametric simulation on parameter d_sep - this controls the separation distance between 2 objects.
I am generating a 1D plot using a cutline which depends on parameter d_sep.
When plotting all parametric instances I get the plot seen in plot output.jpg.
HOWEVER, this is really the output for all parametric instances with the cutline determined using the final value for d_sep as opposed to a separate value for d_sep.
That is to say, the cutline is determined based on parameter d_sep from the global definitions parameter, which is understandable. Is there a variable I can use in my cutline definition that would generate a different cutline related to each parameter?
-Yusuf
Attachments:
Please login with a confirmed email address before reporting spam
I suspect it comes from the fact that you make the plot once finished, and then the d_sepis fixed at last selected value.
have you tried to use a probe plot defined in the "Definitions" section?
This should update during solving with the correct d_sep then, but remains to know if you can overlay them all with a "keep-plot tick somewhere" and 2nd how is the scaling of the graph done
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I would like to ask exactly the same thing. How shoud I define the CutLine (or whatever geometrical in Data Sets) if I want to have it dependant on the geomterical parameter from the Parametric sweep? All data I have stored. But anyway, COMSOL still uses the last value and I need to change it because of postprocessing - to compare results etc.... Maybe I did not exactly understand the answer.
Thank you a lot!
Katarina
Please login with a confirmed email address before reporting spam
you are right, if I define a Data Set Cut Line from a parametric sweep with parameter "Param", and give a parameter as Length*Param for the X length coordinate only the first one seems selected.
The only workaround I see is to draw the line as an interior boundary, have it updated in the geometry and use a full outer Parametric Sweep (not a solver continuation sweep) and then plot on the boundary
Worth to send a suggestion to support for future improvements
by the way there is a sign bug I believe, if you add "additional lines" you must inverse the sign to get the lines drawn
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Have a nice day!
K.
Please login with a confirmed email address before reporting spam
Cheers, K.
Please login with a confirmed email address before reporting spam
have received the same info a few moments ago, in the mean time I understand now better a few other issues with parameters & variables in the plot and Data set region. Today these are only analysed when you define them, so we need to use the "hard way" by hand updating the coordinates one by one, but it works also that way
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
It seems that this havent been resolved yet. Im doing a parametric sweep in 2D, and using 2D cut-lines in order to find the leakage flux between magnets as they move. I have a 'dx' variable which Im sweeping, and my cut-lines are defined using this variable.
However, the cut-line position is not updated as the parametric sweep progress. Any workarounds?
Im using the matlab livelink, but I do not wanna use for-loops for the sweeps, but rather the built in parametric sweep in comsol, since the simulation time here is about 70% less.
Thx for any reply.
regards
Sigbjørn
Please login with a confirmed email address before reporting spam
I am having similar problem while exporting on "cutlines" using parameters from the "Parametric sweep".
The parameter I used in "Parametric sweep" is radius and it is not being updated while exporting for each steps of the study. It seems the issue is not still resolved or there is another way to solve it?
Thanks
H.
Please login with a confirmed email address before reporting spam
I have still the same problem. I do a parametric sweep with a changing geometry parameter. Using a Cut Line the 1D-plots doesn't change the geometry. Just the last used geometry can be used.
Do you have a solution for this by now ?
Kind regards
Julian
Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.
Suggested Content
- KNOWLEDGE BASE Parameter Selection is Not Available in the PTC Creo Parametric User Interface
- BLOG How to Use Job Sequences to Save Data After Solving Your Model
- KNOWLEDGE BASE Performing a Mesh Refinement Study
- BLOG Performing Topology Optimization with the Density Method
- FORUM Exporting 3D plot data to .mat or .csv file