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

Please login with a confirmed email address before reporting spam

Hi,

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]

13 Replies Last Post 12 giu 2017, 04:26 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20 set 2010, 12:57 GMT-4
Hi

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
Hi 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

Posted: 1 decade ago 20 set 2010, 13:01 GMT-4
Hi,

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
Hi, 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

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 set 2010, 00:59 GMT-4
Hi

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
Hi 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

Posted: 1 decade ago 21 set 2010, 08:32 GMT-4
Hi,

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
Hi, 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


Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 set 2010, 10:52 GMT-4
Hi

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
Hi 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

Posted: 1 decade ago 14 feb 2011, 08:50 GMT-5
Hi,

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
Hi, 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

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 feb 2011, 09:40 GMT-5
Hi

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
Hi 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

Posted: 1 decade ago 14 feb 2011, 09:52 GMT-5
Yey, I have just been thinking about it and it seemed to me a little crazy ;) But, anyway, I will try to suggest to COMSOL team to improve this feature ;)
Have a nice day!
K.
Yey, I have just been thinking about it and it seemed to me a little crazy ;) But, anyway, I will try to suggest to COMSOL team to improve this feature ;) Have a nice day! K.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 feb 2011, 06:26 GMT-5
So, they are working on it. We will have it in 4.2. in the summer ;)

Cheers, K.
So, they are working on it. We will have it in 4.2. in the summer ;) Cheers, K.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 feb 2011, 07:09 GMT-5
Hi

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
Hi 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

Posted: 1 decade ago 25 mag 2013, 12:03 GMT-4
Hi

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
Hi 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

Posted: 9 years ago 7 ott 2015, 07:30 GMT-4
Hi,


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.
Hi, 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

Posted: 7 years ago 12 giu 2017, 04:26 GMT-4
Updated: 7 years ago 12 giu 2017, 04:32 GMT-4
Hi,
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
Hi, 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.