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.

Coordinate systems: From 2D axial symmetry to 3D

Please login with a confirmed email address before reporting spam

Hey,

I encountered a problem when modeling heating of a 3D copper cylinder in 2D axial symmetry. I tried to do an Arrow line plot in 3D over "total heat flux" but the arrows appearing are not physically correct, since it by default plots:
{x,y,z}={ht.tfluxr, ht.tfluxphi, ht.tfluxz}. Meaning that what I plot is radial component of heat flux in x. How can I go around this problem without making a 3D model? I tried using {x,y,z}={ht.tfluxx, ht.tfluxy, ht.tfluxz} as if I did it in 3D but it does not work.

Thanks

Petter

cylindrical coordinates cartesian

7 Replies Last Post 23 nov. 2012, 07:44 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 22 nov. 2012, 15:56 UTC−5
Hi

sometimes COMSOL proposes plot settings that do not correspond to the type of geoemtry you have, then you must open the corresponding plot node and change the variable names, typically switch the x,y,z,r or whatever vector component suffixes

This is a postprocessing command, and no need to resolve

--
Good luck
Ivar
Hi sometimes COMSOL proposes plot settings that do not correspond to the type of geoemtry you have, then you must open the corresponding plot node and change the variable names, typically switch the x,y,z,r or whatever vector component suffixes This is a postprocessing command, and no need to resolve -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22 nov. 2012, 17:37 UTC−5
Thanks for your quick response Ivar! I must still be missing something since I do not get it to work even with your advise. When using 2D-axial {x,y} does not seem to exist. The only define coordinates in the model is {r,z}, not even {phi} seems to exist. However, the proposal when plotting total heat flux for the 3D-model generated by the symmetry is:
x-component: ht.tfluxr
y-component: ht.tfluxphi
z-component: ht.tfluxz

I can't change it to:
x-component: ht.tfluxx
y-component: ht.tfluxy
z-component: ht.tfluxz

Since comsol gives the message:
"Cannot evaluate expression.
Failed to evaluate variable.
- Variable: ht.tfuxx
- Geometry: 1
etc..."

Where am I thinking wrong? I also tried to plot {nx,ny,nz} but i get the same error message for nx.

Any idea?

--
Thanks
Petter
Thanks for your quick response Ivar! I must still be missing something since I do not get it to work even with your advise. When using 2D-axial {x,y} does not seem to exist. The only define coordinates in the model is {r,z}, not even {phi} seems to exist. However, the proposal when plotting total heat flux for the 3D-model generated by the symmetry is: x-component: ht.tfluxr y-component: ht.tfluxphi z-component: ht.tfluxz I can't change it to: x-component: ht.tfluxx y-component: ht.tfluxy z-component: ht.tfluxz Since comsol gives the message: "Cannot evaluate expression. Failed to evaluate variable. - Variable: ht.tfuxx - Geometry: 1 etc..." Where am I thinking wrong? I also tried to plot {nx,ny,nz} but i get the same error message for nx. Any idea? -- Thanks Petter

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 23 nov. 2012, 01:53 UTC−5
Hi

what about rereading some of the docs user manual on 2D-axi (I preconise to index the PDF and to do searches thereon). You will then see that 2D uses (x-y) as (horizontal respectively vertical 2D) coordinates, but in 2D-axi these are renamed (r-z) that is "why" you need to do the mapping x=>r y=>z but once you have got this trick its easy ;)

--
Good luck
Ivar
Hi what about rereading some of the docs user manual on 2D-axi (I preconise to index the PDF and to do searches thereon). You will then see that 2D uses (x-y) as (horizontal respectively vertical 2D) coordinates, but in 2D-axi these are renamed (r-z) that is "why" you need to do the mapping x=>r y=>z but once you have got this trick its easy ;) -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 nov. 2012, 04:12 UTC−5
Hi,

This is a known limitation when revolving a 2D axisymmetric solution into 3D using a Revolution 2D data set and then visualizing vector fields in 3D. But there is a way to get access to the angle phi and convert the cylindrical components into Cartesian components:

In the settings window for the Revolution 2D data set node, under Advanced, select the "Define variables" check box to define the variables rev1phi for the angle phi. You can then (after re-solving or updating the solution), use the following expressions in the text fields for the x, y, and z components:

ht.tfluxr*cos(rev1phi)
ht.tfluxr*sin(rev1phi)
ht.tfluxz

Best regards,
Magnus Ringh, COMSOL
Hi, This is a known limitation when revolving a 2D axisymmetric solution into 3D using a Revolution 2D data set and then visualizing vector fields in 3D. But there is a way to get access to the angle phi and convert the cylindrical components into Cartesian components: In the settings window for the Revolution 2D data set node, under Advanced, select the "Define variables" check box to define the variables rev1phi for the angle phi. You can then (after re-solving or updating the solution), use the following expressions in the text fields for the x, y, and z components: ht.tfluxr*cos(rev1phi) ht.tfluxr*sin(rev1phi) ht.tfluxz Best regards, Magnus Ringh, COMSOL

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 nov. 2012, 04:22 UTC−5
Hi again,

In fact, no re-solving or update of the solution is required.

Best regards,
Magnus Ringh, COMSOL
Hi again, In fact, no re-solving or update of the solution is required. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 nov. 2012, 07:32 UTC−5
Thanks! :D
Thanks! :D

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 23 nov. 2012, 07:44 UTC−5
Hi Magnus

Thanks, I hadnt tought of that one :)

--
Good luck
Ivar
Hi Magnus Thanks, I hadnt tought of that one :) -- 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.