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.

Reducing 3D data to 2D by integrating over one dimension

Please login with a confirmed email address before reporting spam

I have a cylinder with a temperature distribution. I would like to average the data circumferentially and apply the resultant field into a 2D axisymmetric version of the same cylinder. What would be the best way of going about this? I don't think that I can do it without external manipulation, i.e. Matlab.

Thanks.

6 Replies Last Post 02.06.2011, 01:25 GMT-4
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 26.05.2011, 02:27 GMT-4
Hi

you have the integration and extrusion coupling operators under the "Definition" node to do that, see the doc

--
Good luck
Ivar
Hi you have the integration and extrusion coupling operators under the "Definition" node to do that, see the doc -- Good luck Ivar

Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26.05.2011, 04:02 GMT-4
Hi Clinton

You have to use the projection integration operator: Model->Definitions->Model Couplings->General projection


Lars Gregersen
Comsol Denmark
Hi Clinton You have to use the projection integration operator: Model->Definitions->Model Couplings->General projection Lars Gregersen Comsol Denmark

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26.05.2011, 14:18 GMT-4
I've never explored this feature. I've only ever used the "derived values" node for simpler postprocessing. I will give it a look. Thank you.
I've never explored this feature. I've only ever used the "derived values" node for simpler postprocessing. I will give it a look. Thank you.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 01.06.2011, 18:26 GMT-4
I am still having some trouble, so let me describe the problem in more detail, now that I've looked at the coupling functions...

I am trying to use general projection coupling to take a temperature distribution within a
cylinder from 3D to an axisymmtric 2D approximation. Mathematically, it is
expressed (in terms of cylindrical coordinates) as...

T2D(r,z)=int(T3D(r,theta,z),theta,0,2*pi)/(2*pi)

The model as it stands is in cartesian coordinates, so I defined
variables r=sqrt(x^2+y^2) and theta=atan2(x,y). I attempted to defined a
secondary, cylindrical coordinate system to remove the shortcomings of
these definitions (like atan2 not being unique from 0 to 2*pi), but the
coupling feature doesn't seem to allow for different systems.

As far as the interface for general projection, I do not quite understand
x-,y-, and z-expression fields. The source lists x,y,z, but destination
only lists x,y. Does that mean that the program integrates along whatever
is in the z-expression field, since it is not in the destination domain? I
have entered r into the x field, z into the y field, and theta into the z
field. I defined a variable T2D as the result of this projection. When I
graph T2D, the results do not make sense.

I believe that I am missing some things to do this correctly. Please
walk me through how to do this. Thank you.

Thanks again for the help.
I am still having some trouble, so let me describe the problem in more detail, now that I've looked at the coupling functions... I am trying to use general projection coupling to take a temperature distribution within a cylinder from 3D to an axisymmtric 2D approximation. Mathematically, it is expressed (in terms of cylindrical coordinates) as... T2D(r,z)=int(T3D(r,theta,z),theta,0,2*pi)/(2*pi) The model as it stands is in cartesian coordinates, so I defined variables r=sqrt(x^2+y^2) and theta=atan2(x,y). I attempted to defined a secondary, cylindrical coordinate system to remove the shortcomings of these definitions (like atan2 not being unique from 0 to 2*pi), but the coupling feature doesn't seem to allow for different systems. As far as the interface for general projection, I do not quite understand x-,y-, and z-expression fields. The source lists x,y,z, but destination only lists x,y. Does that mean that the program integrates along whatever is in the z-expression field, since it is not in the destination domain? I have entered r into the x field, z into the y field, and theta into the z field. I defined a variable T2D as the result of this projection. When I graph T2D, the results do not make sense. I believe that I am missing some things to do this correctly. Please walk me through how to do this. Thank you. Thanks again for the help.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 01.06.2011, 18:26 GMT-4
I am still having some trouble, so let me describe the problem in more detail, now that I've looked at the coupling functions...

I am trying to use general projection coupling to take a temperature distribution within a
cylinder from 3D to an axisymmtric 2D approximation. Mathematically, it is
expressed (in terms of cylindrical coordinates) as...

T2D(r,z)=int(T3D(r,theta,z),theta,0,2*pi)/(2*pi)

The model as it stands is in cartesian coordinates, so I defined
variables r=sqrt(x^2+y^2) and theta=atan2(x,y). I attempted to defined a
secondary, cylindrical coordinate system to remove the shortcomings of
these definitions (like atan2 not being unique from 0 to 2*pi), but the
coupling feature doesn't seem to allow for different systems.

As far as the interface for general projection, I do not quite understand
x-,y-, and z-expression fields. The source lists x,y,z, but destination
only lists x,y. Does that mean that the program integrates along whatever
is in the z-expression field, since it is not in the destination domain? I
have entered r into the x field, z into the y field, and theta into the z
field. I defined a variable T2D as the result of this projection. When I
graph T2D, the results do not make sense.

I believe that I am missing some things to do this correctly. Please
walk me through how to do this. Thank you.

Thanks again for the help.
I am still having some trouble, so let me describe the problem in more detail, now that I've looked at the coupling functions... I am trying to use general projection coupling to take a temperature distribution within a cylinder from 3D to an axisymmtric 2D approximation. Mathematically, it is expressed (in terms of cylindrical coordinates) as... T2D(r,z)=int(T3D(r,theta,z),theta,0,2*pi)/(2*pi) The model as it stands is in cartesian coordinates, so I defined variables r=sqrt(x^2+y^2) and theta=atan2(x,y). I attempted to defined a secondary, cylindrical coordinate system to remove the shortcomings of these definitions (like atan2 not being unique from 0 to 2*pi), but the coupling feature doesn't seem to allow for different systems. As far as the interface for general projection, I do not quite understand x-,y-, and z-expression fields. The source lists x,y,z, but destination only lists x,y. Does that mean that the program integrates along whatever is in the z-expression field, since it is not in the destination domain? I have entered r into the x field, z into the y field, and theta into the z field. I defined a variable T2D as the result of this projection. When I graph T2D, the results do not make sense. I believe that I am missing some things to do this correctly. Please walk me through how to do this. Thank you. Thanks again for the help.

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 02.06.2011, 01:25 GMT-4
Hi

first of all normally the right hand rule angles are defined as thetaz = atan2(y,x) but that is also a question of convention. Then for me atan2 is unique, but if it is not from 0-2*pi its probably from -pi to pi

I didn neither niot find the extrusion and projection coupling operator very intuitive, and still need to carefully check each tim what I'm doing on a simple example, the variable names x,y,z can normall be replaced by your own equation a 3D to 2D means indeed integration over the missing 1D, it all depends on how you define this integration line

--
Good luck
Ivar
Hi first of all normally the right hand rule angles are defined as thetaz = atan2(y,x) but that is also a question of convention. Then for me atan2 is unique, but if it is not from 0-2*pi its probably from -pi to pi I didn neither niot find the extrusion and projection coupling operator very intuitive, and still need to carefully check each tim what I'm doing on a simple example, the variable names x,y,z can normall be replaced by your own equation a 3D to 2D means indeed integration over the missing 1D, it all depends on how you define this integration line -- 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.