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.

Variable Dependent Parametric Sweep

Please login with a confirmed email address before reporting spam

Hello Everyone,

I have been stuck with this issue for sometime now and cannot seem to find a way around it! I am trying to run a parametric sweep over two variables (e.g X and Y). I have defined X to have the range: range(1,1,10). I would like to define the Y range in terms of the current X value such as:

range(0.1*X,0.1,0.5*X)

This is only a simplified version of the dependency I would like to use as I thought a clearer model would be easier to explain. The actual section of my script is:

model.study('std1').create('batsw', 'BatchSweep');
model.study('std1').feature('batsw').label('Batch Sweep - JACK');
model.study('std1').feature('batsw').set('sweeptype', 'filled');
model.study('std1').feature('batsw').setIndex('pname', 'L', 0);
model.study('std1').feature('batsw').setIndex('plistarr', '', 0);
model.study('std1').feature('batsw').setIndex('punit', 'mm', 0);
%model.study('std1').feature('batsw').setIndex('pname', 'L', 0);
%model.study('std1').feature('batsw').setIndex('plistarr', '', 0);
%model.study('std1').feature('batsw').setIndex('punit', '', 0);
model.study('std1').feature('batsw').setIndex('plistarr', 'range(L_min,L_step,L_max)', 0);
model.study('std1').feature('batsw').setIndex('pname', 'D', 1);
model.study('std1').feature('batsw').setIndex('plistarr', '', 1);
model.study('std1').feature('batsw').setIndex('punit', 'mm', 1);
%model.study('std1').feature('batsw').setIndex('pname', 'D', 1);
%model.study('std1').feature('batsw').setIndex('plistarr', '', 1);
%model.study('std1').feature('batsw').setIndex('punit', '', 1);

model.study('std1').feature('batsw').setIndex('plistarr', 'range(0.1*L,0.01,0.5*L)' , 1 ) ; % This is the line!!

model.study('std1').feature('batsw').set('useaccumtable', 'off');
model.study('std1').feature('batsw').set('maxallow', '6');
model.study('std1').feature('batsw').set('synchsolutions', 'on');


0 Replies Last Post Jul 27, 2015, 7:11 a.m. EDT
COMSOL Moderator

Hello Jack Gartlan

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.