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
22.08.2011, 01:50 GMT-4
Hi
have you tried to combine a parametric sweep with a transient, and use your "Parameter" to switch the BC's, you might need to fiddle the equations of the BC's or make you own "switchable" but I believe that should work nicely
--
Good luck
Ivar
Hi
have you tried to combine a parametric sweep with a transient, and use your "Parameter" to switch the BC's, you might need to fiddle the equations of the BC's or make you own "switchable" but I believe that should work nicely
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
24.08.2011, 15:10 GMT-4
Hi Ivar,
Thank you very much for your input.
However I couldn't get it to work using parametric study, but I have been able to modify the matlab code and set up a loop to continuously change the boundary condition back and forth.
Now I just have 1 question. As you can see I am doing a time dependent analysis upto 1800 s.
But I want to use the last time step of solver 1 (sol1) as initial condition for solver 2 (sol2). However I can't see how the last time step of solver 1 at 1800 s can be specified, as from the code I am unable to see this.
Thank you.
Shriram
.
.
.
.
.
model.sol('sol1').runAll;
model.sol('sol2').feature('st1').name('Compile Equations: Time Dependent 1');
model.sol('sol2').feature('st1').set('studystep', 'time1');
model.sol('sol2').feature('v1').set('control', 'time1');
model.sol('sol2').feature('v1').set('initmethod', 'sol');
model.sol('sol2').feature('v1').set('initsol', 'sol1');
model.sol('sol2').feature('t1').set('control', 'time1');
model.sol('sol2').feature('t1').set('tlist', '0 1 2 5 10 18 25 50 100 300 600 900 1200 1500 1800');
model.sol('sol2').feature('t1').set('maxorder', '2');
model.sol('sol2').feature('t1').feature('fc1').set('maxiter', '5');
model.sol('sol2').feature('t1').feature('fc1').set('jtech', 'once');
model.sol('sol2').runAll;
Hi Ivar,
Thank you very much for your input.
However I couldn't get it to work using parametric study, but I have been able to modify the matlab code and set up a loop to continuously change the boundary condition back and forth.
Now I just have 1 question. As you can see I am doing a time dependent analysis upto 1800 s.
But I want to use the last time step of solver 1 (sol1) as initial condition for solver 2 (sol2). However I can't see how the last time step of solver 1 at 1800 s can be specified, as from the code I am unable to see this.
Thank you.
Shriram
.
.
.
.
.
model.sol('sol1').runAll;
model.sol('sol2').feature('st1').name('Compile Equations: Time Dependent 1');
model.sol('sol2').feature('st1').set('studystep', 'time1');
model.sol('sol2').feature('v1').set('control', 'time1');
model.sol('sol2').feature('v1').set('initmethod', 'sol');
model.sol('sol2').feature('v1').set('initsol', 'sol1');
model.sol('sol2').feature('t1').set('control', 'time1');
model.sol('sol2').feature('t1').set('tlist', '0 1 2 5 10 18 25 50 100 300 600 900 1200 1500 1800');
model.sol('sol2').feature('t1').set('maxorder', '2');
model.sol('sol2').feature('t1').feature('fc1').set('maxiter', '5');
model.sol('sol2').feature('t1').feature('fc1').set('jtech', 'once');
model.sol('sol2').runAll;