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.

Using exact time from Event Interface

Please login with a confirmed email address before reporting spam

Hi everyone,

I am wondering that How can I extract value of time from Event interface during Time-Dependent Solver to use for another purpose?

For example, I use Event Interface to set up an expression : "A-100 >0"
Can I use the value of time when the expresssion changes form False to True ?

Thanks a lot for any help !

Best Regards,
N.N

4 Replies Last Post 24.05.2016, 05:44 GMT-4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 20.05.2016, 09:02 GMT-4
Hello Nhan,
Have you considered using the approach mentioned in the thread www.comsol.com/community/forums/general/thread/112182/ ?
Best regards,
Jeff
Hello Nhan, Have you considered using the approach mentioned in the thread https://www.comsol.com/community/forums/general/thread/112182/ ? Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 21.05.2016, 14:53 GMT-4
Hi Jeff,
Thanks a lot for your help !
I read your thread you mentioned before and I find it very useful.


But I have not still known how to do something like this :

For example, I use Event Interface to set up an expression : "A-100 >0"
Then I declare a new expression in ODE like this : "t-t_event" (t_event is the moment as the expression above becomes TRUE )
If A-100 >10 at t=5.5 [s], for instance, the value of "t_event" is supposed to be 5.5

Can I do that in Comsol ?

Thanks a lot for your help !
Hi Jeff, Thanks a lot for your help ! I read your thread you mentioned before and I find it very useful. But I have not still known how to do something like this : For example, I use Event Interface to set up an expression : "A-100 >0" Then I declare a new expression in ODE like this : "t-t_event" (t_event is the moment as the expression above becomes TRUE ) If A-100 >10 at t=5.5 [s], for instance, the value of "t_event" is supposed to be 5.5 Can I do that in Comsol ? Thanks a lot for your help !

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 23.05.2016, 09:00 GMT-4
The idea is to use a global ODE to integrate a state parameter set initially to 1 and which changes value to 0 when the event occurs. From that point on, the variable for the ODE will be "stuck" at the time at which the event occurred.
Please contact COMSOL Support (support@comsol.com) if you need further help with this.
Best,
Jeff
The idea is to use a global ODE to integrate a state parameter set initially to 1 and which changes value to 0 when the event occurs. From that point on, the variable for the ODE will be "stuck" at the time at which the event occurred. Please contact COMSOL Support (support@comsol.com) if you need further help with this. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 24.05.2016, 05:44 GMT-4
Hi Jeff,
Thank you very much for your help !
Hi Jeff, Thank you very much for your 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.