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/Matlab Interface initial condition

Please login with a confirmed email address before reporting spam

Hello,

I simulated a cylinder with radius R with 2 different regions. The first one is the central of the cylinder (radius S), whereas the second one is at the inner wall (thickness = R - S). In the former one I use the Navier-Stokes equation and the convection-diffusion equation, in the latter I use only the diffusion-reaction equation (velocity = 0).

I exported the m-file in Matlab and it works. Now I would like to do following for loop in Matlab:

1. Solve the geometry for the first time step;
2. Changing the radius S (R = const);
3. Solve the update geometry using the solution of the previous simulation as initial condition;

The problem is that I cannot do the last step, I get this message "Messages: Wrong number of dofs in property init". I guess it happened because modifying the geometry changes also the number of mesh and there is no agreement between the first and the second geometry.
I think it is possible to interpolate the solution of the first step to fit with new geometry, but I do not know how to do it.

Any help would be greatly appreciated.

Thanks in advance,
Enrico

0 Replies Last Post 2010年5月10日 GMT-4 14:29
COMSOL Moderator

Hello Enrico Magrofuoco

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.