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 stop COMSOL Events at an exact value?

Please login with a confirmed email address before reporting spam

I am simulating battery cycling using the Events interface. The voltage limits are V_high = 2.45 V and V_low = 2 V. The events are working okay, but there is a problem that I have encountered multiple times. The events never stop at those particular values/limits, as one can see in the figure below. Sometimes the events change at 2.43, sometimes at 2.46 but never at 2.4500 V or 2.000V as I would like to. I'm thinking that the time step (which is now strict) might help with this, but decreasing the time step for a long simulation time would slow the model significantly. I have also checked the option "Store solution before and after events" in the solver output settings.

Can anyone help me to make the events stop/change at exact values without compromising the computation speed?

Unfortunately I cannot send the model, but here are some extracts from the event settings:


3 Replies Last Post Feb 17, 2020, 4:38 p.m. EST
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Feb 17, 2020, 1:27 p.m. EST
Updated: 4 years ago Feb 17, 2020, 1:51 p.m. EST

Paul,

I had similar issues and increasing the scaling in the solver settings for the respective variables improved the situation. It can make the solver more sensitive to the criterion.

Maybe I should add that in case the time stepping is not resolving the event sufficiently then you won't get around reducing it.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Paul, I had similar issues and increasing the scaling in the solver settings for the respective variables improved the situation. It can make the solver more sensitive to the criterion. Maybe I should add that in case the time stepping is not resolving the event sufficiently then you won't get around reducing it. Cheers Edgar

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Feb 17, 2020, 3:47 p.m. EST

This actually solved the problem, but I think it needs some work with the values to increase the precision and model stability. Thank you very much for the help!

This actually solved the problem, but I think it needs some work with the values to increase the precision and model stability. Thank you very much for the help!

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Feb 17, 2020, 4:38 p.m. EST

I am happy I was able to help.

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
I am happy I was able to help.

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.