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.

line integration of scalar field for use in study, not as result

Please login with a confirmed email address before reporting spam

hello,

i am having great difficulty figuring out how to use a line integral inside of a study. for example, i am seeking to use the line integral of a temperature field (1st interface) across a line in order to find an avg. temperature across that line and then use this value to apply a volume force to fluid flow (2nd interface), as in natural convection. i can find the line integral in the results section, and am trying understand how to employ this sort of function in the study itself.

any help here would be greatly appreciated,

thanks,

henry

5 Replies Last Post Nov 27, 2013, 9:57 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 9, 2012, 6:47 p.m. EDT
You could use the 'integration model coupling' in the

>> model >> definitions >> model couplings >> integration

Good Luck.
You could use the 'integration model coupling' in the >> model >> definitions >> model couplings >> integration 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 Aug 10, 2012, 3:22 a.m. EDT
Hi

and for average values, you have the built in "average" operator, side by side with the integration, it's the same one but it normalises automatically over the Length/Area/volume

--
Good luck
Ivar
Hi and for average values, you have the built in "average" operator, side by side with the integration, it's the same one but it normalises automatically over the Length/Area/volume -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 13, 2012, 2:08 p.m. EDT
Hi Ivar

Does this average operator account for the different distance between nodes, if the mesh size is not constant over the domain.

I found different settings for integration, auto/integration/summation which vary the result but I couldn't understand the difference.

Thanks in advance
Hi Ivar Does this average operator account for the different distance between nodes, if the mesh size is not constant over the domain. I found different settings for integration, auto/integration/summation which vary the result but I couldn't understand the difference. Thanks in advance

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 Aug 14, 2012, 1:18 a.m. EDT
Hi

Normally COMSOL takes care of the meshing and its implications, which means you operate the physics ONLY on the entities (Domains and Boundaries). I know this is very confusing for most people having worked with classical FEM programmes, it took. me long to catch this. And it is not really stressed in the COMSOL courses, but OK I'm not COMSOL so I cannot influence this. With COMSOL consider the meshing as a time signal discretisation, for a soun d you need to respect the Nyquist criteria for sampling density, for meshing you need the equivalent but for the fluxed (spatial derivatives of your dependent variables) or in some cases to resolve the second saptial derivative.

The average operator (applied on T) is really an aveop1(T) = intop1(T)/intop1(1). While intop1(1) menas integration over the entity for 1* dx*dy*dz (or howmany dimensions required) which corresponds to the total Volume, surface or length respectively.

The option to "sum over nodes", is there only for a few spacial cases, as for the variables of reaction forces, but COMSOL looks after this so normally you can ignore it. Dependent variables should be "integrated" default choice.

What I find handy, now that units is working better (perhaps still excepton lagrange multipliers), is to use the units to check which options to use, as most variables are fluxes or densities (per m^2 or per m^3) if you do not integrate them correctly, the units are wrong.

--
Good luck
Ivar
Hi Normally COMSOL takes care of the meshing and its implications, which means you operate the physics ONLY on the entities (Domains and Boundaries). I know this is very confusing for most people having worked with classical FEM programmes, it took. me long to catch this. And it is not really stressed in the COMSOL courses, but OK I'm not COMSOL so I cannot influence this. With COMSOL consider the meshing as a time signal discretisation, for a soun d you need to respect the Nyquist criteria for sampling density, for meshing you need the equivalent but for the fluxed (spatial derivatives of your dependent variables) or in some cases to resolve the second saptial derivative. The average operator (applied on T) is really an aveop1(T) = intop1(T)/intop1(1). While intop1(1) menas integration over the entity for 1* dx*dy*dz (or howmany dimensions required) which corresponds to the total Volume, surface or length respectively. The option to "sum over nodes", is there only for a few spacial cases, as for the variables of reaction forces, but COMSOL looks after this so normally you can ignore it. Dependent variables should be "integrated" default choice. What I find handy, now that units is working better (perhaps still excepton lagrange multipliers), is to use the units to check which options to use, as most variables are fluxes or densities (per m^2 or per m^3) if you do not integrate them correctly, the units are wrong. -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 27, 2013, 9:57 a.m. EST
Hello all

I would like to ask your opinion regarding the linear spatial integral operator.

Let say I have a 1D model, a line that goes from 0 to Xmax.

When I use the integral operator in the domain does this evaluate a variable always in the whole domain (from 0 to Xmax)?

Do you know how I can evaluate an integral from 0 to x, where x is the position in the domain.

I need to evaluate an integral of a variable in my model. My model is a 1D model and it consists of a PDE that is the time dependent diffusion balance. Inside my diffusivity I need to evaluate the integral of a variable and in particular when my model solves the solution at x1 the integral has to be from 0 to x1, when it moves to evaluate the solution at x2 I need to evaluate the integral from 0 to x2.

I know that Boolean expressions are available to evaluate the integral in a specific space, for istance from x1 to x2, but my problem is that I don't know the upper limit because it depends on the position.

Can you please suggest me a way to solve this problem?

Thank you in advance
Loredana
Hello all I would like to ask your opinion regarding the linear spatial integral operator. Let say I have a 1D model, a line that goes from 0 to Xmax. When I use the integral operator in the domain does this evaluate a variable always in the whole domain (from 0 to Xmax)? Do you know how I can evaluate an integral from 0 to x, where x is the position in the domain. I need to evaluate an integral of a variable in my model. My model is a 1D model and it consists of a PDE that is the time dependent diffusion balance. Inside my diffusivity I need to evaluate the integral of a variable and in particular when my model solves the solution at x1 the integral has to be from 0 to x1, when it moves to evaluate the solution at x2 I need to evaluate the integral from 0 to x2. I know that Boolean expressions are available to evaluate the integral in a specific space, for istance from x1 to x2, but my problem is that I don't know the upper limit because it depends on the position. Can you please suggest me a way to solve this problem? Thank you in advance Loredana

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.