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.
Changing geometry etc. between study steps
Posted 2013年9月18日 GMT-4 06:22 Interfacing, Chemical Reaction Engineering Version 4.3b 1 Reply
Please login with a confirmed email address before reporting spam
I've got a rather exotic problem at hand.
I want to use the Livelink to Matlab of COMSOL 4.3b to simulate an evolving system. I am using the Diluted Species Package.
So I start with a configuration (some geometry and reactions etc.) and start a time dependent study step. After the study step ends, I examine the data and generate new geometric objects which also execute reactions etc.
Then a new study step starts with the last data from the old study step and the pattern is repeated in a loop.
But how do I do this correctly? My order is
1) Run first study step
2) Build new geometric objects using the original geometry-name like this
### model.geom('geom1').feature.create('elp1', 'Ellipsoid');
3) Run the geometry
### model.geom('geom1').run;
4) Add the new objects to a selection and add it to the diluted species physics
### model.physics('chds').selection.named('newobjects_union_dom');
5) Add the reactions to these union.
6) Run the next study step like this:
### model.sol('sol1').feature('st2').name('Compile Equations: Time Dependent 2 (2)');
### model.sol('sol1').feature('st2').set('studystep', 'time2');
### model.sol('sol1').feature('v2').set('solnum', 'last');
### model.sol('sol1').feature('v2').set('notsolmethod', 'sol');
### model.sol('sol1').feature('v2').set('initsol', 'sol1');
### model.sol('sol1').feature('v2').set('notsolnum', 'auto');
### model.sol('sol1').feature('v2').set('notsol', 'sol1');
### model.sol('sol1').feature('v2').set('control', 'time2');
### model.sol('sol1').feature('v2').set('initmethod', 'sol');
### model.sol('sol1').feature('t2').set('tout', 'tsteps');
### model.sol('sol1').feature('t2').set('tlist', 'range(0,0.1,3)');
### model.sol('sol1').feature('t2').set('maxorder', '2');
### model.sol('sol1').feature('t2').feature('fc1').set('damp', '0.9');
### model.sol('sol1').feature('t2').feature('fc1').set('jtech', 'once');
### model.sol('sol1').feature('t2').feature('fc1').set('maxiter', '8');
### model.sol('sol1').feature('t2').feature('i1').set('rhob', '20');
### model.sol('sol1').feature('t2').feature('i1').feature('mg1').feature('pr').feature('sl1').set('relax', '0.5');
### model.sol('sol1').feature('t2').feature('i1').feature('mg1').feature('pr').feature('sl1').set('linerelax', '0.2');
### model.sol('sol1').feature('t2').feature('i1').feature('mg1').feature('pr').feature('sl1').set('seconditer', '2');
### model.sol('sol1').feature('t2').feature('i1').feature('mg1').feature('po').feature('sl1').set('relax', '0.5');
### model.sol('sol1').feature('t2').feature('i1').feature('mg1').feature('po').feature('sl1').set('linerelax', '0.2');
### model.sol('sol1').feature('t2').feature('i1').feature('mg1').feature('po').feature('sl1').set('seconditer', '2');
### model.sol('sol1').feature('t2').feature('i1').feature('mg1').feature('cs').feature('d1').set('linsolver', 'pardiso');
### model.sol('sol1').runAll;
### figure
### mphplot(model, 'pg2');
The problem is now that mphplot gives me a slice of substrate distribution if I execute it directly after step one. In the order above I dont get a slice and I don't know if anything at all was calculated.
Do I have to remesh or something like this? Does this keep the old values from step 1 valid for step 2?
Any ideas how to approach this? Thank you very much!
Damian
Hello Damian Kösters
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.