Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Plot "set of curves" after parametric sweep with two variables (stationary study, heat transfer)

Please login with a confirmed email address before reporting spam

Hello everyone,

I tried to search the forum and to find examples in the tutorial models but couldn't find a solution.

I have the following static heat transfer problem:

A membrane, which is supported by 4 beams, is heated up with a constant power. I now want to find the max. temperature in the membrane as a function of the beam length (conduction) and the emissivity of the membrane (radiation).

Therefore, I set a domain point probe and ran a parametric sweep with the two variables "beam_length" and "emissivity". The sweep itself runs fine and I can access the different solutions.

Now I would like to plot a set of curves, with the maximal temperature on the y-axis, the beam lenght on the x-axis and the emissivity as parameter.Does anyone know how to do it? There should be an "easy" way, no?!

I guess it would be possible if I could "seperate" the parametric solution depending one parameter (e.g. emissivity) to create different solutions and then use them in a plot-group, but I don't know how to do it.

Thanks for consideration, any help is appreciated.

Cheers, Simon

7 Replies Last Post Mar 8, 2011, 7:06 a.m. EST
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 Nov 26, 2010, 8:12 a.m. EST
Hi

in 3.5 or 4 ?

in 4 I would try (havent tested yet) two parametrical sweeps, as if you do both in one then your parameters are stacked.

Note that a specific parametric sweep goes around the geomery (and restarts at initial conditions) while a continuation sweep is good for non geometrical variables ad takes into account the previous steps to extrapolate where to go for next step.
In this way your two parameters are also in line (unstacked)

--
Good luck
Ivar
Hi in 3.5 or 4 ? in 4 I would try (havent tested yet) two parametrical sweeps, as if you do both in one then your parameters are stacked. Note that a specific parametric sweep goes around the geomery (and restarts at initial conditions) while a continuation sweep is good for non geometrical variables ad takes into account the previous steps to extrapolate where to go for next step. In this way your two parameters are also in line (unstacked) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 26, 2010, 9:10 a.m. EST
Thanks for your response.

I'm using 4.0a.

I could manage to get the desired plot, but not in a "comfortable" way: I am using different studies for one parameter (e.g. emissivity), which I have to change by hand. In these studies I make then a sweep for the second parameter ( e.g. beam length). As a result I get different solutions which I can combine in a plot group.
As the beam length should have a higer resolution than the emissivity (3 different values are ok), this approach is reasonable for me, but surely there must be a better way.


I guess you mean, I should do 2 parameter sweeps in one study?! I did, like shown in the attached screenshot. The sweep itself works, but if I want to plot, I can not select the results belonging to each parameter (e.g. emissivity). Just all results are plotted in the same plot.
Thanks for your response. I'm using 4.0a. I could manage to get the desired plot, but not in a "comfortable" way: I am using different studies for one parameter (e.g. emissivity), which I have to change by hand. In these studies I make then a sweep for the second parameter ( e.g. beam length). As a result I get different solutions which I can combine in a plot group. As the beam length should have a higer resolution than the emissivity (3 different values are ok), this approach is reasonable for me, but surely there must be a better way. I guess you mean, I should do 2 parameter sweeps in one study?! I did, like shown in the attached screenshot. The sweep itself works, but if I want to plot, I can not select the results belonging to each parameter (e.g. emissivity). Just all results are plotted in the same plot.


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 Nov 26, 2010, 9:40 a.m. EST
Hi

then leave the geometrical parameter loop in the "external parametric" sweep, and check the "extension - continuation" box on the stationary solver (new feature n V4) and add the physical variable parameter here, this will make an internal sweep for each external geometrical sweep

--
Good luck
Ivar
Hi then leave the geometrical parameter loop in the "external parametric" sweep, and check the "extension - continuation" box on the stationary solver (new feature n V4) and add the physical variable parameter here, this will make an internal sweep for each external geometrical sweep -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 28, 2010, 12:23 p.m. EST
Hello,

thanks for your help Ivar.

I understood and implemented your idea with an outer "parametric sweep" and an inner "continuation parameter sweep".
Unfortunately, a solution could not be found. The solver starts, but stops with this message:

Invalid property value.
- Property: solnum
'Solution' is an array of integers.
- : ""

I tried all direct solvers with different tolerances (0.9 - 0.001) and also refined the mesh (minimum element quality now0.0083).
For a "manually sweep" on the other hand, with all the different combinations I could find a solution.

Any ideas?


Hello, thanks for your help Ivar. I understood and implemented your idea with an outer "parametric sweep" and an inner "continuation parameter sweep". Unfortunately, a solution could not be found. The solver starts, but stops with this message: Invalid property value. - Property: solnum 'Solution' is an array of integers. - : "" I tried all direct solvers with different tolerances (0.9 - 0.001) and also refined the mesh (minimum element quality now0.0083). For a "manually sweep" on the other hand, with all the different combinations I could find a solution. Any ideas?


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 Nov 28, 2010, 3:13 p.m. EST
Hi

I do not think that is from the method, for me it's a weakness of the 4.0a fixed in latest 4.1 about how v4 should "refresh" a study when the solver sequence already is there.

In v4.0a my way was to systematically DELETE the solver sequence and rebuild it (either automatically or by hand) from scratch. This implies also delting all solutions and plot settings.

Since I'm using 4.1 the *automtic" feature of COMSOL overcome this. That was my experiuence with the "solnum" error. So I can only advise that you try too, save your file into a new name/new fileversion and delete all solver data and restart rebuilding the solver sequence and then solve + remake your derive values and plots

The best get your hands on v4.1 latests patch it's much more stable and free of these issues, plus it has a cut&paste functionality operating, CNTRL-Z saves a lot of time ;)

--
Good luck
Ivar
Hi I do not think that is from the method, for me it's a weakness of the 4.0a fixed in latest 4.1 about how v4 should "refresh" a study when the solver sequence already is there. In v4.0a my way was to systematically DELETE the solver sequence and rebuild it (either automatically or by hand) from scratch. This implies also delting all solutions and plot settings. Since I'm using 4.1 the *automtic" feature of COMSOL overcome this. That was my experiuence with the "solnum" error. So I can only advise that you try too, save your file into a new name/new fileversion and delete all solver data and restart rebuilding the solver sequence and then solve + remake your derive values and plots The best get your hands on v4.1 latests patch it's much more stable and free of these issues, plus it has a cut&paste functionality operating, CNTRL-Z saves a lot of time ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 30, 2010, 6:06 a.m. EST
Thanks a lot!

I guess I am going for V4.1 then...

Thanks a lot! I guess I am going for V4.1 then...

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 8, 2011, 7:06 a.m. EST
Hi, i also use two parameters, but my case is a little different.

The outer sweep is depending on depth and the inner sweep is depending on period, each of the two parameters is correspond to a efficient. I want to make the depth as x axis,period as y axis, and efficient as z axis.

How can i obtain this figure in COMSOL?

Thanks.
Hi, i also use two parameters, but my case is a little different. The outer sweep is depending on depth and the inner sweep is depending on period, each of the two parameters is correspond to a efficient. I want to make the depth as x axis,period as y axis, and efficient as z axis. How can i obtain this figure in COMSOL? Thanks.

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.