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.

Comsol 4: using simulation results as an initial condition to next simulation

Please login with a confirmed email address before reporting spam

Hi,

I am finding difficulty in using the simulation results as an initial condition to the next simulation.
Does anyone know, how to do it?

It was bit easy to do it in Comsol 3.5a.

Thanks,
Rakesh

4 Replies Last Post 2 dic 2011, 04:31 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 giu 2010, 13:55 GMT-4
I am very new to Comsol but I would also like to know more about this.

Thank You
I am very new to Comsol but I would also like to know more about this. Thank You

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 giu 2010, 17:26 GMT-4
What I do is to copy my results (right click) and then use the copied one as the initial condition (right click on variables).

In my case it crashed when I did it initially. Support told me to add:
(bash) export MALLOC_CHECK_=0
(tcsh) setenv MALLOC_CHECK_ 0

hope it helps.
What I do is to copy my results (right click) and then use the copied one as the initial condition (right click on variables). In my case it crashed when I did it initially. Support told me to add: (bash) export MALLOC_CHECK_=0 (tcsh) setenv MALLOC_CHECK_ 0 hope it helps.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20 dic 2010, 18:54 GMT-5
I can only speak for having done so with MATLAB, but what I did was create an m-file and copy the block of code that sets up the solution, and enforce a "sol" initial condition.

After setting up your model,

% Run winding pulse
model.sol('sol3').runAll;

% Redefine system for diffusion
model.physics('c').feature('cfeq1').set('a', '0');
model.physics('c').feature('cfeq1').set('c', {'Dw' '0' '0' 'Dw'});
model.study('std1').feature('time1').set('tlist', '0, 1.5');
model.sol('sol3').feature('t1').set('tlist', '0, 1.5');
model.sol('sol3').feature('t1').set('timemethod', 'bdf');
model.sol('sol3').feature('t1').set('tstepsbdf', 'free');
model.sol('sol3').feature('v1').set('initmethod', 'sol');
model.sol('sol3').feature('v1').set('initsol', 'sol3');

% Run diffusion
model.sol('sol3').runAll;

The line model.sol('sol3').feature('v1').set('initmethod', 'sol'); is the important line.
I can only speak for having done so with MATLAB, but what I did was create an m-file and copy the block of code that sets up the solution, and enforce a "sol" initial condition. After setting up your model, % Run winding pulse model.sol('sol3').runAll; % Redefine system for diffusion model.physics('c').feature('cfeq1').set('a', '0'); model.physics('c').feature('cfeq1').set('c', {'Dw' '0' '0' 'Dw'}); model.study('std1').feature('time1').set('tlist', '0, 1.5'); model.sol('sol3').feature('t1').set('tlist', '0, 1.5'); model.sol('sol3').feature('t1').set('timemethod', 'bdf'); model.sol('sol3').feature('t1').set('tstepsbdf', 'free'); model.sol('sol3').feature('v1').set('initmethod', 'sol'); model.sol('sol3').feature('v1').set('initsol', 'sol3'); % Run diffusion model.sol('sol3').runAll; The line model.sol('sol3').feature('v1').set('initmethod', 'sol'); is the important line.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 dic 2011, 04:31 GMT-5
What is the 'initmethod' ??

I attatched these sentences

model.sol('sol1').feature('o1').set('initmethod', 'sol');
model.sol('sol1').feature('o1').set('initsol', 'sol1);

but the below error occured

??? Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Unknown property
Messages:
Unknown property
- Property: initmethod
What is the 'initmethod' ?? I attatched these sentences model.sol('sol1').feature('o1').set('initmethod', 'sol'); model.sol('sol1').feature('o1').set('initsol', 'sol1); but the below error occured ??? Java exception occurred: Exception: com.comsol.util.exceptions.FlException: Unknown property Messages: Unknown property - Property: initmethod

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.