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.

Definite integral calculation

Please login with a confirmed email address before reporting spam

Hi!

let's say I want to evaluate this definite integral sin(alpha+theta)d_theta from theta=0 to 90 deg where alpha is a known number. How to do that? Alpha is different in every step of the calculation thus integration has to be performed at every step.


Best regards
Rokas

13 Replies Last Post 13 juin 2016, 03:39 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 12:30 UTC−4
How is your question related to COMSOL?

--
Pu, ZHANG
DTU Fotonik
How is your question related to COMSOL? -- Pu, ZHANG DTU Fotonik

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 13:44 UTC−4
Thanks for your answer :)

I am working on time-dependent simulation where my alpha changes and the value of the integral is used in the next step. My question is related to COMSOL because the integral has to be evaluated by COMSOL as a part of the model. Hope this helps :)

Cheers
Rokas
Thanks for your answer :) I am working on time-dependent simulation where my alpha changes and the value of the integral is used in the next step. My question is related to COMSOL because the integral has to be evaluated by COMSOL as a part of the model. Hope this helps :) Cheers Rokas

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 14:29 UTC−4
Does integration coupling variable help?

--
Pu, ZHANG
DTU Fotonik
Does integration coupling variable help? -- Pu, ZHANG DTU Fotonik

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 15:28 UTC−4
Can you please elaborate?
Can you please elaborate?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 15:33 UTC−4
I'm not sure about your particular case. But you can try to search in the documentation or just google it. Actually I think the first google result looks relevant: www.comsol.com/community/forums/general/thread/15392/

--
Pu, ZHANG
DTU Fotonik
I'm not sure about your particular case. But you can try to search in the documentation or just google it. Actually I think the first google result looks relevant: http://www.comsol.com/community/forums/general/thread/15392/ -- Pu, ZHANG DTU Fotonik

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 15:59 UTC−4
I don't think it is related with my thread. The thing is that I want to integrate not over a time or the coordinate. My integration should be performed independent to somewhat is happening in the model but the integration should be done at every time step. I attached a pdf of the equation I want to implement.
I don't think it is related with my thread. The thing is that I want to integrate not over a time or the coordinate. My integration should be performed independent to somewhat is happening in the model but the integration should be done at every time step. I attached a pdf of the equation I want to implement.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 17:06 UTC−4
Isn't it possible to do the integration by yourself...?

--
Pu, ZHANG
DTU Fotonik
Isn't it possible to do the integration by yourself...? -- Pu, ZHANG DTU Fotonik

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 17:27 UTC−4

Yes, this integral has a simple analytic solution. You can define it as a simple function into your model.

Cheers
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Yes, this integral has a simple analytic solution. You can define it as a simple function into your model. Cheers Edgar -- Edgar J. Kaiser emPhys Physical Technology http://www.emphys.com

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 17:27 UTC−4
I can do the integration by Matlab, it is not a problem but how to join my values with COMSOL simulation? In this case, my theta comes from Comsol, I do integration in Matlab and then obtain value should be submitted to Comsol and this routine should be performed every step. Is this what you meant?
I can do the integration by Matlab, it is not a problem but how to join my values with COMSOL simulation? In this case, my theta comes from Comsol, I do integration in Matlab and then obtain value should be submitted to Comsol and this routine should be performed every step. Is this what you meant?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 17:29 UTC−4
Guys, I wrote this function as an example, unfortunately, the real function I use has no analytic solution.
Guys, I wrote this function as an example, unfortunately, the real function I use has no analytic solution.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 17:31 UTC−4
Then you still can solve it numerically and use the interpolation option in COMSOL to define the function.

--
Pu, ZHANG
DTU Fotonik
Then you still can solve it numerically and use the interpolation option in COMSOL to define the function. -- Pu, ZHANG DTU Fotonik

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2014, 17:35 UTC−4
I think that is a brilliant idea :)
I think that is a brilliant idea :)

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 13 juin 2016, 03:39 UTC−4
have you found a good way to solve the problem in comsol but not use the numerical solution?
have you found a good way to solve the problem in comsol but not use the numerical solution?

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.