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.

Parametric Sweep gives different results with separate calculations

Please login with a confirmed email address before reporting spam

Hello,

Strange things happened when I use Parametric sweep function today. Initially, I solved a model by setting a parameter as a fixed number ( say "a"). Then I swept this parameters with different values (say "a", "b" , and 'c"). Both calculations converged but when I checked the results, the one from separate calculation ("a" only), is different from the one (with same parameter value "a") obtained from parametric sweep.
I checked several times and redid the modeling for couple of times, but do know the reasons.

Someone also encountered similar problems? Which results should I trust and what might be the reason?
Please advice,
Thanks!

1 Reply Last Post 14 lug 2014, 07:06 GMT-4
Frank van Gool COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 lug 2014, 07:06 GMT-4
Dear Neverland,

A parametric sweep will typically reuse the previous result as initial conditions for the next parameter. This means that a different solving path is taken.
Next to this, a non-linear problem might have multiple solutions which are all valid. Depending on the initial conditions you can find a different result. (for instance different flow profiles can be found in a CFD model)

Maybe you can elaborate a bit on what type of difference we are looking at. Do you have a different magnitude of the solution (by how much), or do you have a different shape of the solution?

If the magnitude is highly different, you might want to check the results with a lower relative tolerance (say 1e-5 vs. 1e-3) and recheck the results.

If the shape is different, I typically rely more on the sweep results as this often follows a natural path.

Note that if you do not want to reuse the previous results, uncheck "use parametric solver" in the parametric sweep.

Best regards,
Frank
Dear Neverland, A parametric sweep will typically reuse the previous result as initial conditions for the next parameter. This means that a different solving path is taken. Next to this, a non-linear problem might have multiple solutions which are all valid. Depending on the initial conditions you can find a different result. (for instance different flow profiles can be found in a CFD model) Maybe you can elaborate a bit on what type of difference we are looking at. Do you have a different magnitude of the solution (by how much), or do you have a different shape of the solution? If the magnitude is highly different, you might want to check the results with a lower relative tolerance (say 1e-5 vs. 1e-3) and recheck the results. If the shape is different, I typically rely more on the sweep results as this often follows a natural path. Note that if you do not want to reuse the previous results, uncheck "use parametric solver" in the parametric sweep. Best regards, Frank

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.