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.

how to reinitialize model components within an external script...?

Please login with a confirmed email address before reporting spam

Hello,
I am wondering which command to use in order to reinitialize/reset a mode orl some parts of a model such as, model.sol, model.study, model.mesh.. and so forth,
during the course of an externally controlled script that run a comsol model.

I have tried things like
" model.physics.clear" and their likes but they do not work obviously, so when the script try to execute for a second time say, "model.physics", it stops telling me the study already exists....

I cannot find anything in the comsol api doc or matlab livelink on this subject. [ or I dont know where to look and th e various indexes does not provide any clues... and still have to put my hand on one example where this feature will be used....

Any suggestion??? it must be pretty basic I am sure

Thanks

3 Replies Last Post Sep 24, 2010, 9:50 a.m. EDT
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 Sep 24, 2010, 8:05 a.m. EDT
Hi
sorry cannot help, for that one, I have not had time to study the API yet.

In the GUI I suppose you are referring to the << File - Reset history >>

--
Good luck
Ivar
Hi sorry cannot help, for that one, I have not had time to study the API yet. In the GUI I suppose you are referring to the > -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 24, 2010, 8:16 a.m. EDT
Ivar,
Thanks for reading
I think it is more complex than that
It is related tp the proper way to run a comsol model from matlab and pass some parameters that will be calculated from matlab to comsol
that can on a case by case basis, either change the physics settings, the meshing or the geometry or a combination of both..

JF
Ivar, Thanks for reading I think it is more complex than that It is related tp the proper way to run a comsol model from matlab and pass some parameters that will be calculated from matlab to comsol that can on a case by case basis, either change the physics settings, the meshing or the geometry or a combination of both.. JF

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 24, 2010, 9:50 a.m. EDT
partrtially answering my own question..
might be useful for others.. going alontg the same way...

"model.batch" is the solution to my initial problem


JF
partrtially answering my own question.. might be useful for others.. going alontg the same way... "model.batch" is the solution to my initial problem JF

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.