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.

ode and time discrete solver---week-end musing and learning

Please login with a confirmed email address before reporting spam

playing with comsol new features I stumble on solving an ode with the time discrete solver.
No matter what I do [ using bdf, prev operators as explained in the doc or in the exem-le pubished by Nicklas on this forum... I ALWAYS end with duplicate variable errors and some strange variable list in the equation vie mode
for exemple if I try to solve f1'=1, f1(0)=0

I will write in the ode node

bdf(f1,1)-11 as the equation

and put the proper initial condition

I get duplicate variable error names when I try to run
but then in the comsol generated equation some "strange variable are created f1t=bdf(f1,2) GENERATED by comsol and then
f1tt=bdf(bdf(f1,2),1)) again COMSOL generated .... and apparently wrong [ derivative shoud be first order bdf according to the doc...

Does somebody know the proper way to code global ODE for use of discrete time solver?

Or is there a bug/limitation I have not seen in the doc/release note...

I should say that I have no problem coding pde... ONLY global ODE...

I attach the small file corresponding to the little example above

Thanks
JF


EDIT I should add that the SAME coding as above BUT as a weak pde defined on a point on a geometry solve properly the equationbut then I need to export the solution in the glibal settting... complicated


4 Replies Last Post Aug 8, 2012, 4:24 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 Oct 16, 2010, 10:45 a.m. EDT
Hi Jean François

It's probably a bug in 4.0a (0.993) as in my provisional 4.1 (0.74) your model loads in and solves straight out, no reference to any errors

--
Good luck
Ivar
Hi Jean François It's probably a bug in 4.0a (0.993) as in my provisional 4.1 (0.74) your model loads in and solves straight out, no reference to any errors -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 16, 2010, 11:34 a.m. EDT
Thanks Ivar
this is very helpful
Who do you need to bribe to get a provisionnal. 4.1.? :-)

JF
Thanks Ivar this is very helpful Who do you need to bribe to get a provisionnal. 4.1.? :-) JF

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 8, 2012, 3:26 a.m. EDT
Hi Ivar and JF,

Thanks Ivar for your help. I confirm that the model is now running well on 4.1/4.2.

However, I found a new bug:

It seems that if you change the STUDY TYPE from time-dependent to time-discrete (and still keep the time-discrete solver), the error related to 'Duplicate variable names' appears again (see mph file attached).

Hope this bug will be removed in future releases.

Regards,
Hi Ivar and JF, Thanks Ivar for your help. I confirm that the model is now running well on 4.1/4.2. However, I found a new bug: It seems that if you change the STUDY TYPE from time-dependent to time-discrete (and still keep the time-discrete solver), the error related to 'Duplicate variable names' appears again (see mph file attached). Hope this bug will be removed in future releases. Regards,


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 8, 2012, 4:24 a.m. EDT
I've reproduced the bug in 4.2a, but it seems to be fixed in 4.3.
I've reproduced the bug in 4.2a, but it seems to be fixed in 4.3.

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.