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.

Combine multiple study runs with different parameter values

Please login with a confirmed email address before reporting spam

Hi everybody,

I am looking for a way how to loop a study and activate in each loop run different edge currents on different parts of the geometry. (physics: magnetic fields) At the end I would like to sum up the results (norm of the B-field) of every simulation run and plot this. I tried using the parametric sweep option but I think it doesn't allow such complex modifications. Am I wrong?

I managed to script this task using the Matlab interface but it would be nice to have it done within COMSOL in order to run the study on our cluster.

5 Replies Last Post 17 mars 2014, 02:56 UTC−4
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 janv. 2014, 09:37 UTC−5
Alexander,

the parametric study allows to use more than one parameter and to specify the desired combinations.

Cheers
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Alexander, the parametric study allows to use more than one parameter and to specify the desired combinations. Cheers Edgar -- Edgar J. Kaiser emPhys Physical Technology http://www.emphys.com

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 janv. 2014, 11:11 UTC−5
Hi Edgar,

Thanks for the hint. I managed to run the simulation using the parametric sweep option. But the combination of the results still seems to be tricky.

To be more specific I want to sum the expression "abs(mf.normB)" for the different parametric runs to one dataset, which then should contain ( abs(mf.normB)_(first parameter combination) + abs(mf.normB)_(second parameter combination)+ ... + abs(mf.normB)_(last parameter combination))
in order to plot, detect the minimum, ect.
Hi Edgar, Thanks for the hint. I managed to run the simulation using the parametric sweep option. But the combination of the results still seems to be tricky. To be more specific I want to sum the expression "abs(mf.normB)" for the different parametric runs to one dataset, which then should contain ( abs(mf.normB)_(first parameter combination) + abs(mf.normB)_(second parameter combination)+ ... + abs(mf.normB)_(last parameter combination)) in order to plot, detect the minimum, ect.

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 janv. 2014, 18:09 UTC−5
Alexander,

check what you can do with at() and with() operators. I guess with() is what you need.

Cheers
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Alexander, check what you can do with at() and with() operators. I guess with() is what you need. Cheers Edgar -- Edgar J. Kaiser emPhys Physical Technology http://www.emphys.com

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28 janv. 2014, 03:55 UTC−5
Hi Edgar,

your advice was again very helpful and indeed a combined with() operator in the expression field allowed me to plot the desired combined expression within one plot, and to find the minimum within the volume.
Thanks very much for your fast and accurate help!

Alex
Hi Edgar, your advice was again very helpful and indeed a combined with() operator in the expression field allowed me to plot the desired combined expression within one plot, and to find the minimum within the volume. Thanks very much for your fast and accurate help! Alex

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 mars 2014, 02:56 UTC−4
Hi,

I have a similar problem, but do not understand the solution given.
Where and how do I use the at(), with() ?

My problem, to be precise, is I want to calculate a potential which is a function of 2 values for 1 parameter. I need the 2nd derivative of the square sum of the two solutions, but I don't know how to add. In math I need something like d(d( |E(wavelength1)+E(wavelength2)|^2,x,x).

thanks in advance,
Lars
Hi, I have a similar problem, but do not understand the solution given. Where and how do I use the at(), with() ? My problem, to be precise, is I want to calculate a potential which is a function of 2 values for 1 parameter. I need the 2nd derivative of the square sum of the two solutions, but I don't know how to add. In math I need something like d(d( |E(wavelength1)+E(wavelength2)|^2,x,x). thanks in advance, Lars

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.