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 Jun 13, 2016, 3:39 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 29, 2014, 12:30 p.m. EDT
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 Mar 29, 2014, 1:44 p.m. EDT
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 Mar 29, 2014, 2:29 p.m. EDT
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 Mar 29, 2014, 3:28 p.m. EDT
Can you please elaborate?
Can you please elaborate?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 29, 2014, 3:33 p.m. EDT
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 Mar 29, 2014, 3:59 p.m. EDT
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 Mar 29, 2014, 5:06 p.m. EDT
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 Mar 29, 2014, 5:27 p.m. EDT

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 Mar 29, 2014, 5:27 p.m. EDT
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 Mar 29, 2014, 5:29 p.m. EDT
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 Mar 29, 2014, 5:31 p.m. EDT
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 Mar 29, 2014, 5:35 p.m. EDT
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 Jun 13, 2016, 3:39 a.m. EDT
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.