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.

General Suggested Debugging Method

Please login with a confirmed email address before reporting spam

This is a general question about debugging COMSOL models. I'd like to know the most efficient way to debug problems with a model... let me explain...

In written code it's pretty easy to comment out sections of the code and test the remaining to see where the errors are. If it doesn't solve the problem, the original code is still there and easy to uncomment to go back to what it was. But as far as I know there's no analogous method in COMSOL - once you change something the original is gone. For example, I want to try a different boundary condition equation, or change some variables, or solve with a single reaction instead of multiple reactions.

Right now it seems to me the only way to do this kind of testing/debugging *and keep my original information* (key point) is to save as a new model any changes I make. But it seems there's got to be a better way...or is there?

I don't want to get into the particular problem I'm having at this moment - this is a question that is independent of that.

Thanks for any suggestions...

2 Replies Last Post Mar 11, 2011, 12:36 p.m. EST
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 Mar 11, 2011, 1:37 a.m. EST
Hi

I have sent off to support a few times that they should accept a "comment character" in their field values so one could add comments or formulas.

Today my best method to debug is the enable disable and then wrapping a long formula I do not want to remember and rewrite within ()*0. As COMSOL has an analytical "analyser" during discretisation, all values set to zero are ignored and this does not seem to make the model heavier.

Jean-François had proposed once that COMSOL implement a simple text editor to allow us to edit easier the formulas, I have some that cover my 2x24" screen in length, and a bit more) no easy to navigate therein ;)

If we are several to suggest this to COMSOl I'm sure it will come in a future realease

--
Good luck
Ivar
Hi I have sent off to support a few times that they should accept a "comment character" in their field values so one could add comments or formulas. Today my best method to debug is the enable disable and then wrapping a long formula I do not want to remember and rewrite within ()*0. As COMSOL has an analytical "analyser" during discretisation, all values set to zero are ignored and this does not seem to make the model heavier. Jean-François had proposed once that COMSOL implement a simple text editor to allow us to edit easier the formulas, I have some that cover my 2x24" screen in length, and a bit more) no easy to navigate therein ;) If we are several to suggest this to COMSOl I'm sure it will come in a future realease -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 11, 2011, 12:36 p.m. EST
Hi Ivar,

Thanks for the thoughts. The ()*0 is a clever solution! I will use that for sure.

Joe
Hi Ivar, Thanks for the thoughts. The ()*0 is a clever solution! I will use that for sure. Joe

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.