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.

Plot an expression along a specific coordinate system

Please login with a confirmed email address before reporting spam

Hi

I defined a cylindrical system (r,phi,a) and I'd like to get the results along one of these specific coordinates.

Since all the direct results expressions are defined in cartesian coordinates (x,y,z). I would like my magnetic field along x "mf.Hx", as an example, to be expressed and shown along r.

I found that the way to do so seem to insert an expression in the plot expression setting. I found that the cylindrical system is included in the definitions window. But I can't find a way to have my expression calculated along r since I get an error. Also, I can't figure out which one to select from the list between "Base vector (sys2) a", "coordinate, a component (sys2.a)" or "coordinate transform to system (sys2)".

What should I do please ?

Thanks a lot

1 Reply Last Post 15 gen 2013, 08:01 GMT-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 15 gen 2013, 08:01 GMT-5
Hi

the cylindrical coordinates "sys2" (or 3 or 4 depending on how many you define) defines (sys2.r sys2.phi sys2.a) with something like a=z-Z0 r=sqrt((x-X0)^2+(y-Y0)^2) and phi=atan2((y-Y0),(x-X0) (pls check I might have got a sign wrong ;) with (X0,Y0,Z0) the origine of your

Still you need two write out your results fully with cylindrical coordinates in a similar way

You have also the coordinate transform matrix values sys2... as well as the inverse, check the Results tab and the doc for the full naming convention

--
Good luck
Ivar
Hi the cylindrical coordinates "sys2" (or 3 or 4 depending on how many you define) defines (sys2.r sys2.phi sys2.a) with something like a=z-Z0 r=sqrt((x-X0)^2+(y-Y0)^2) and phi=atan2((y-Y0),(x-X0) (pls check I might have got a sign wrong ;) with (X0,Y0,Z0) the origine of your Still you need two write out your results fully with cylindrical coordinates in a similar way You have also the coordinate transform matrix values sys2... as well as the inverse, check the Results tab and the doc for the full naming convention -- 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.