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.

Plotting transient solution with parametric sweep.

Please login with a confirmed email address before reporting spam

Hi
I have a simple reactive-transport model involving two chemical species which are coupled together through a reaction term. I am interested in a transient solution. I wanted to perform simulations with different flow rates and I thought I could do this by connecting a parametric sweep to the transient solver and then solve with different values of the advection term. The model seems to solve without any problem, but I can not figure out how to plot the solutions from the parametric sweep, I want to look at the evolution of the species concentration in the outflow with time for each parameter value. This seems like it should be simple and straight forward, but I cannot figure it out. I am using COMSOL 4.1.


3 Replies Last Post 17 mag 2011, 10:11 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 apr 2011, 11:28 GMT-4
In addition to my previous post. The model works fine, however when I solve using a parametric sweep for a given parameter. Only the solution for the last parameter value is available for post-processing. Although I can select the other solutions as options to plot, they all appear to be empty, it seems like comsol is not saving these early solutions. I am not sure if this is a bug in comsol, or if I am doing something wrong.

More confusing is that I created a simple reactive-transport model involving only 1 species and I can view and plot the model solutions for all the values solved for by the parametric sweep. However when I switch to the more complicated model I only get the last one. All the solver settings appear to be the same in both models.
In addition to my previous post. The model works fine, however when I solve using a parametric sweep for a given parameter. Only the solution for the last parameter value is available for post-processing. Although I can select the other solutions as options to plot, they all appear to be empty, it seems like comsol is not saving these early solutions. I am not sure if this is a bug in comsol, or if I am doing something wrong. More confusing is that I created a simple reactive-transport model involving only 1 species and I can view and plot the model solutions for all the values solved for by the parametric sweep. However when I switch to the more complicated model I only get the last one. All the solver settings appear to be the same in both models.

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 apr 2011, 13:13 GMT-4
Hi

When you add a parameter sweep you get normality 2 solution cases, one for the last (active) one and one with all parameters, check you main plot node reference (1st entry) (sometimes you need to regenerate your solver sequence, if you have fiddled too much with it, then COMSOL might get lost ;)

Then when you have a nested parametric sweep or one parametric + 1 transient, if you postprocess via the Defined variable you get double nested tables. There you have a selection for the "inner solution" or the "outer solution" depending if you want to see the rows or the columns

--
Good luck
Ivar
Hi When you add a parameter sweep you get normality 2 solution cases, one for the last (active) one and one with all parameters, check you main plot node reference (1st entry) (sometimes you need to regenerate your solver sequence, if you have fiddled too much with it, then COMSOL might get lost ;) Then when you have a nested parametric sweep or one parametric + 1 transient, if you postprocess via the Defined variable you get double nested tables. There you have a selection for the "inner solution" or the "outer solution" depending if you want to see the rows or the columns -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 mag 2011, 10:11 GMT-4
Chris,

Have you had any success with this?

I am having a similar problem when I do a parametric sweep with a time transient problem. If I try to plot the time dependence of a variable (say Temperature) I can identify the solution set that supposedly has values for each of the parameter values. As Ivar points out, I can get the drop down menu that allows me to select parameter values, and the figure is fine if I select the last value of the parameter. However, if I select one of the earlier values, I get a plot with both axes ranging very close to zero and no data at all. If I select "all" the values, I see the single line on the plot, corresponding to the last parameter value.

Note that I have had many models that used parametric sweeps and frequency domain solutions and did not see the problem there.

Noa
Chris, Have you had any success with this? I am having a similar problem when I do a parametric sweep with a time transient problem. If I try to plot the time dependence of a variable (say Temperature) I can identify the solution set that supposedly has values for each of the parameter values. As Ivar points out, I can get the drop down menu that allows me to select parameter values, and the figure is fine if I select the last value of the parameter. However, if I select one of the earlier values, I get a plot with both axes ranging very close to zero and no data at all. If I select "all" the values, I see the single line on the plot, corresponding to the last parameter value. Note that I have had many models that used parametric sweeps and frequency domain solutions and did not see the problem there. Noa

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.