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.

Integration in 2D domain

Please login with a confirmed email address before reporting spam

I'm doing a 2D time-dependent heat transfer simulation and encountered some problems.

I have a 2D subdomain, in x-y coordinate. I have a position dependent variable, say absorption coefficient abs_coeff(x,y). Assume abs_coeff(x,y) is resolved by Comsol in the last time frame, so I don't have an expression for it. In next time step, I want to integrate abs_coeff(x,y) only over x direction . How can I define this in 'integration coupling variables'? I think the default integration in 2D domain integrates over both x and y directions, right?

Besides, I want comsol to evaluate the expression on the destination points, which means if it integrates from x=0 to arbitrary x, I want Comsol to call the integral in that x position. Should I integrate like dest(abs_coeff(x,y))?

Any help will be appreciated!

7 Replies Last Post 12.11.2010, 01:28 GMT-5
Ruud Borger COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.11.2010, 11:48 GMT-5
Dear Fan,

What version of Comsol are you using? You can check this by clicking Help => About Comsol Multiphysics.

In v4.0 and newer, you can integrate over lines/boundaries via Model Couplings (in the Definitions node) or via Derived Values (in the Results node). This is also possible in Comsol v3.5a.

As for integrating x from 0 up to any x0, I believe you can use Probes (v4.0 and newer) for that, but I recommend you contact support@comsol.com for that. Please include your license number, which you can find the same way you can find your Comsol version number.

Good luck.
Dear Fan, What version of Comsol are you using? You can check this by clicking Help => About Comsol Multiphysics. In v4.0 and newer, you can integrate over lines/boundaries via Model Couplings (in the Definitions node) or via Derived Values (in the Results node). This is also possible in Comsol v3.5a. As for integrating x from 0 up to any x0, I believe you can use Probes (v4.0 and newer) for that, but I recommend you contact support@comsol.com for that. Please include your license number, which you can find the same way you can find your Comsol version number. Good luck.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.11.2010, 14:02 GMT-5
Hi

I wanted to add that in V4 integrations in the Definition nodes allows to select the reference frame to work on, while the integration in the results are by default limited to the one of the results data set, this is logical, but sometimes forgotten and strange result might appear particularly in structural, as now the spatial frame is driven by default by the displacements

Nothing, wrong, this is just a reminder ;)

--
Good luck
Ivar
Hi I wanted to add that in V4 integrations in the Definition nodes allows to select the reference frame to work on, while the integration in the results are by default limited to the one of the results data set, this is logical, but sometimes forgotten and strange result might appear particularly in structural, as now the spatial frame is driven by default by the displacements Nothing, wrong, this is just a reminder ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.11.2010, 14:21 GMT-5
Hi Ruud,

Thanks a lot for the suggestion. I have both 3.5a and 4.0a. But I am using 3.5a for my current work. I checked integration coupling variables in 3.5a, and found I can only do boundary integration. There is no ''line'' integration choice for me. Since what I wanna do is integration from x=0 to arbitrary position x in a fixed line, rather than any boundary, how could I realize this?

Could you give me a little bit more hints on how to use Derived Values in 3.5a version?

Thanks again.

Fan
Hi Ruud, Thanks a lot for the suggestion. I have both 3.5a and 4.0a. But I am using 3.5a for my current work. I checked integration coupling variables in 3.5a, and found I can only do boundary integration. There is no ''line'' integration choice for me. Since what I wanna do is integration from x=0 to arbitrary position x in a fixed line, rather than any boundary, how could I realize this? Could you give me a little bit more hints on how to use Derived Values in 3.5a version? Thanks again. Fan

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.11.2010, 14:41 GMT-5
Hi Lvar,

Thanks a lot for the reminding. I am currently using V3.5a, so how does integration in "integration coupling variables" and "postprocessing" differ? Since I am doing time-dependent and have to call the integral from the last time step in the next time step, which one do you suggest?

Thanks,
Fan
Hi Lvar, Thanks a lot for the reminding. I am currently using V3.5a, so how does integration in "integration coupling variables" and "postprocessing" differ? Since I am doing time-dependent and have to call the integral from the last time step in the next time step, which one do you suggest? Thanks, Fan

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.11.2010, 15:20 GMT-5
Hi

3.5 is somewhat limited (compared to v4) so I'm afraid you need to use matlab to get to the time stepping details.
For postprocessing you have the at() operator and a few others, see the doc

--
Good luck
Ivar
Hi 3.5 is somewhat limited (compared to v4) so I'm afraid you need to use matlab to get to the time stepping details. For postprocessing you have the at() operator and a few others, see the doc -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.11.2010, 15:30 GMT-5
Hi Lvar,

I see. I may switch to V4.0 then. I have another quick question about boundary/line integration for V4.0. For boundary integration in Definition nodes or line integration in Results nodes in GUI, I can only integrate over the boundary rather than any line within a domain, right? So for arbitrary line integration within a domain, I can only couple with Matlab?

Thanks,
Fan
Hi Lvar, I see. I may switch to V4.0 then. I have another quick question about boundary/line integration for V4.0. For boundary integration in Definition nodes or line integration in Results nodes in GUI, I can only integrate over the boundary rather than any line within a domain, right? So for arbitrary line integration within a domain, I can only couple with Matlab? Thanks, Fan

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.11.2010, 01:28 GMT-5
Hi

in V4 you have more options: on the Data Set you can make a new processed data set defined as a cut plqane or line or... on these data sets you can then apply a postprocessing integration.

If you need your results for the solution then you need to define your operators in the Definition node, either with projection coupling variables, or by splitting your geoemtry to have an internal border where you want to integrate

--
Good luck
Ivar
Hi in V4 you have more options: on the Data Set you can make a new processed data set defined as a cut plqane or line or... on these data sets you can then apply a postprocessing integration. If you need your results for the solution then you need to define your operators in the Definition node, either with projection coupling variables, or by splitting your geoemtry to have an internal border where you want to integrate -- Good luck Ivar

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.