Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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 coupling variables

Please login with a confirmed email address before reporting spam

I am solving the Navier-Stokes equation in 3D (time-dependent). Afterwards I like to compute the total kinetic energy by integrating the velocity squared over the volume. I like to have this energy available as a variable (so for example E(t); Energy as a function of time). In the Comsol documentation I read that this can be done using integration coupling variable (that integrates an expression over selected geometric entities). So in the model builder I right-click Definitions and then choose via Model Couplings, Integration. In the settings window I can then give the integration operator a name (let's say I call it E for energy) and I select the source (the 3d domain). But I do not see where I can specify the expression that needs to be integrated. So can anyone tell me where to specify the expression that the integration operator needt to act upon?

Thanks in advance,

Leon

7 Replies Last Post 3 janv. 2013, 06:05 UTC−5
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 14 mars 2011, 08:03 UTC−4
Hi

In the definition node you define an "operator" that applies to something you define elsewhere. In the definition you only specify entities where it applies and integration information (this is different from v3.5 now its a two step operation, and you first define an operator then afterwards the variable(s) even several with the same operator)

In your case you need to define a global (or model or entity local) variable E = intop1(spf.U^2) or whatever you want in there.

Note: in 2D-axi you might want to add the 2*pi*r to integrate over the volume, all depends on what you want to do, or you want to multiply by the entity density, in which case DO IT INSIDE THE INTEGRATION () because your density is not really uniquely define outside an entity scope, as it might change from entity to entity

The result is a scalar, for a transient analysis or a parametric sweep it becomes a vector, you need to select "at()" which time you want the output via the general time/parameter selection tab in the results window

--
Good luck
Ivar
Hi In the definition node you define an "operator" that applies to something you define elsewhere. In the definition you only specify entities where it applies and integration information (this is different from v3.5 now its a two step operation, and you first define an operator then afterwards the variable(s) even several with the same operator) In your case you need to define a global (or model or entity local) variable E = intop1(spf.U^2) or whatever you want in there. Note: in 2D-axi you might want to add the 2*pi*r to integrate over the volume, all depends on what you want to do, or you want to multiply by the entity density, in which case DO IT INSIDE THE INTEGRATION () because your density is not really uniquely define outside an entity scope, as it might change from entity to entity The result is a scalar, for a transient analysis or a parametric sweep it becomes a vector, you need to select "at()" which time you want the output via the general time/parameter selection tab in the results window -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 mars 2011, 08:20 UTC−4
Many thanks. All clear now.

Leon
Many thanks. All clear now. Leon

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28 mars 2012, 05:40 UTC−4
Hi.

I have a somewhat related problem:

on a whole 3D (x, y, z) domain, I want to define a value f(x)=integral over y and z of k(x,y,z)

With k beeing my turbulent cinetic energy.

How can I do this?
Hi. I have a somewhat related problem: on a whole 3D (x, y, z) domain, I want to define a value f(x)=integral over y and z of k(x,y,z) With k beeing my turbulent cinetic energy. How can I do this?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 janv. 2013, 04:04 UTC−5
Hello,

I am using one integration coupling variable in my problem that couples General form PDE with solid mechanics module. When I select "Integration" as the method for this coupling variable, the problem hits the maximum memory (around 20GB) and ends the solution with an "out of memory" error. However, when I select "Summation over nodes" as the method, the solution works with around 1.5GB memory. Do you have any explanation for this difference?
Hello, I am using one integration coupling variable in my problem that couples General form PDE with solid mechanics module. When I select "Integration" as the method for this coupling variable, the problem hits the maximum memory (around 20GB) and ends the solution with an "out of memory" error. However, when I select "Summation over nodes" as the method, the solution works with around 1.5GB memory. Do you have any explanation for this difference?

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 3 janv. 2013, 05:28 UTC−5
Hi

that can also depend on what expression you use in your variable based on the integration you defined.
Normally COMSOL takes care itself to use the "right one" but if you mix a "summation" internal variable and an "integration" one, COMSOL might get fooled

--
Good luck
Ivar
Hi that can also depend on what expression you use in your variable based on the integration you defined. Normally COMSOL takes care itself to use the "right one" but if you mix a "summation" internal variable and an "integration" one, COMSOL might get fooled -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 janv. 2013, 05:57 UTC−5
hello,

The expressions are the same. I only changed the method. The method "summation over nodes" worked well while the method "integration" crashed.

Thank you,
Onur S. Aslan
hello, The expressions are the same. I only changed the method. The method "summation over nodes" worked well while the method "integration" crashed. Thank you, Onur S. Aslan

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 3 janv. 2013, 06:05 UTC−5
Hi

Indeed but what are you expressions ?

as some of the internal COMSOL variables require "summation over nodes" (mainly reaction forces variables), other use the interpolated "integration" way, and if you mix both type of variables in an expression I'm not what COMSOL tries out ;)

check the doc for the given variables

And check also the units, summation and integration dos not have the same effect here

sometimes it could be also a frame issue, but normally the default settings are OK

--
Good luck
Ivar
Hi Indeed but what are you expressions ? as some of the internal COMSOL variables require "summation over nodes" (mainly reaction forces variables), other use the interpolated "integration" way, and if you mix both type of variables in an expression I'm not what COMSOL tries out ;) check the doc for the given variables And check also the units, summation and integration dos not have the same effect here sometimes it could be also a frame issue, but normally the default settings are OK -- 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.