Using simultaneously a Parametric and a Function sweep

José Ángel Bejarano Vázquez

Please login with a confirmed email address before reporting spam

Hi, I am currently working on a model that I need to upload to a Cluster that has no MATLAB nor Javascript functioning, so everything must be contained in a .mph that i can run from CMD. I need to do several studies where a function and some parameters switch. If I have in my Study a parameter sweep and a Function sweep, the computation takes all possible combination beween these two sweeps. What I want instead, is to have studies done one to one.

As an example, if I have a parametric sweep with a parameter A taking the values (1,2) and a function sweep with (fun1(t),fun2(t)), what I want to be done is only 2 studies. One that takes [A=1,fun1(t)] and another one that takes [A=2,fun2(t)].

Thanks.


1 Reply Last Post 2024年4月26日 GMT+2 19:54
Mark Cops COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 months ago 2024年4月26日 GMT+2 19:54
Updated: 4 months ago 2024年4月26日 GMT+2 19:55

Yes this can be done. A function switch can be run as a parameteric sweep by creating the parameter funsw.sw1 (global level) or funsw.comp1.sw1 (component level). In the parameteric sweep, sweep over the indices of the functions in the switch. Add this parameter to the parameters table. This is described more in the documentionhere.

So for your example, the overall setup would be a parameteric sweep over two parameters ( A and funsw.sw1 (if global switch) using specific combinations setting.

-Mark

Yes this can be done. A function switch can be run as a parameteric sweep by creating the parameter funsw.sw1 (global level) or funsw.comp1.sw1 (component level). In the parameteric sweep, sweep over the indices of the functions in the switch. Add this parameter to the parameters table. This is described more in the documention [here](https://doc.comsol.com/6.1/docserver/#!/com.comsol.help.comsol/comsol_ref_definitions.20.046.html?) . So for your example, the overall setup would be a parameteric sweep over two parameters ( A and funsw.sw1 (if global switch) using specific combinations setting. -Mark

Reply

Please read thediscussion forum rulesbefore posting.

Pleaselog into post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL®software users who are on-subscription should submit their questions via theSupport Centerfor a more comprehensive response from the Technical Support team.

Baidu
map