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 integrals over variables in the model definition

Please login with a confirmed email address before reporting spam

We have a 2D model involving fluid flow and transport of diluted species. The latter includes an "R term," which adds a source for the species. We would like R to be a function of the spatial position, R(x',y'), computed as an integral over y and the species concentration itself. So, the integral involves both y' and a dependent variable: R(x', y') = integral from y0 to y' of F( tds.c(x',y) dy .

Questions:
1. Can COMSOL do this, or will it upset the minimization over the mesh?
2. How do we implement this? Some pieces of F(tds.c) are coded in variables right now. Do we use the "component coupling" approach shown in www.comsol.com/blogs/overview-integration-methods-space-time/ ? Or, do we use the additional physics interface approach from that link?

Does anyone know of a sample model that does something similar. As usual, I'm having trouble finding the right documentation section.

Just to emphasize- we're not looking to do integrals for post-processing. The integrals define the model and affect the solution.

Thanks.

3 Replies Last Post 7 mai 2015, 11:45 UTC−4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 7 mai 2015, 08:58 UTC−4
Hello Ed,
You can use the additional physics approach presented in the blog, except that your integration is relative to y not x and so your beta will be (0,1), not (1,0).
I am attaching a basic model that shows this. In it I set up the transport of diffuse species physics so that c has the analytical solution c(x,y)=y; this allows you to double-check that the solution is correct: u=.5*y^2.
Best,
Jeff
Hello Ed, You can use the additional physics approach presented in the blog, except that your integration is relative to y not x and so your beta will be (0,1), not (1,0). I am attaching a basic model that shows this. In it I set up the transport of diffuse species physics so that c has the analytical solution c(x,y)=y; this allows you to double-check that the solution is correct: u=.5*y^2. Best, Jeff


Please login with a confirmed email address before reporting spam

Posted: 10 years ago 7 mai 2015, 09:04 UTC−4
Thanks, Jeff. I'll explore the model you sent. Can you help me understand why the approach is to add additional physics vs. a coupling component? I was just about to try a projection coupling component. I'm asking so that I can deepen my understanding of COMSOL concepts.

Thanks,

-Ed
Thanks, Jeff. I'll explore the model you sent. Can you help me understand why the approach is to add additional physics vs. a coupling component? I was just about to try a projection coupling component. I'm asking so that I can deepen my understanding of COMSOL concepts. Thanks, -Ed

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 7 mai 2015, 11:45 UTC−4
Hi Ed,
It may well be possible to achieve the same results by other means, including component couplings, but the additional physics approach is intuitive to me and follows exactly what's presented in the blog (With the transposition of x and y, of course).
Best,
Jeff
Hi Ed, It may well be possible to achieve the same results by other means, including component couplings, but the additional physics approach is intuitive to me and follows exactly what's presented in the blog (With the transposition of x and y, of course). Best, Jeff

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.