CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Cartesian to cylindrical velocity field conversion (http://www.cfd-online.com/Forums/openfoam-post-processing/61334-cartesian-cylindrical-velocity-field-conversion.html)

francois January 13, 2009 10:13

Hi all, I'm looking for a w
 
Hi all,

I'm looking for a way to convert my cartesian velocity field U in a cylindrical velocity field where X is the axial direction.

Cartesian
UX
UY
UZ

to

Cylindrical
URadial
Utangential
Uaxial

I know that OpenFOAM has got some coordinate system classes and that for the cylindrical one - the class is called cylindricalCS, but don't know how to use this class in OF 1.5 to convert the velocity field for the whole domain.

I did not found an application like Ucomponents to do this kind of postprocessing.

Has someone some info on this ?

Have a nice day
Regards

Francois

olesen January 13, 2009 11:18

Hi Francois, You'll probabl
 
Hi Francois,

You'll probably need to do some coding yourself. I didn't find the application Ucomponents at all, so at least there you are ahead of me!

All the classes derived from coordinateSystem also inherit the methods 'globalVector()' and 'localVector()' that you can use to generate a tmp vector field. This is probably what you want.
A few things to watch for though:
1) the cylindricalCS class uses r/theta/z, you'll need to watch for this if you want the axis to correspond to the global X direction.
2) cylindricalCS uses degrees for theta. If you want radians you'll either need a new class or need to adjust the class accordingly.

francois January 13, 2009 11:37

Hi Mark, Thanks for your an
 
Hi Mark,

Thanks for your answer.

Damned ! I hope such an application was lost somewhere in the path of OpenFOAM.

By the way Ucomponents is no more available in OF 1.5 don't know exactly why ... you have to copy the source from OF 1.4 at /OpenFOAM-1.4.1/applications/utilities/postProcessing/velocityField/Ucomponents/

It's quite surprising that nobody has already such an utility. You can find some more info on this post below but it looks like you can't do that for the whole domain but only for some patches.

http://www.cfd-online.com/OpenFOAM_D...es/1/2652.html

Did someone try to implement this for the velocity field conversion for the whole domain ?

olesen January 13, 2009 11:49

> By the way Ucomponents is no
 
> By the way Ucomponents is no more available in OF 1.5 don't know exactly why

Oh, the same functionality is still there - see src/postProcessing/foamCalcFunctions/field/components + applications/utilities/postProcessing/foamCalc - just not as Ucomponents.

Unfortunately, it seems that the only way to list the utilities available is provoke a FatalError by supplying "foamCalc -help".

Presumable this mechanism should make it easier for you to extend with your utility.

francois January 13, 2009 11:53

whaouu don't know this utility
 
whaouu don't know this utility was there, thanks you very much !

will look at it to see if it can be extended to export the radial, tangential en axial components


Thanks again Mark

villet January 16, 2009 09:16

Hi Francois, I used the met
 
Hi Francois,

I used the method explained in this thread by Osamu Nakamura:

http://www.cfd-online.com/OpenFOAM_D...es/1/2652.html

The radial component can be computed in the same way. I can send you the code if you want.

francois January 16, 2009 13:27

Thanks for the tip ! Well ind
 
Thanks for the tip !
Well indeed I may be interested by your very kind proposition

You can find my email when you clik on my name in the header of this post

Thank you very much for your help
Have a nice day

Regards
Francois

francois January 16, 2009 13:30

Thanks for the tip ! Well ind
 
Thanks for the tip !
Well indeed I may be interested by your very kind proposition

You can find my email when you clik on my name in the header of this post

Thank you very much for your help
Have a nice day

Regards
Francois

floooo January 19, 2009 07:48

Hi Francois, I think you ca
 
Hi Francois,

I think you can use the paraview calculator (that you can find in filters/Common) which is able to make operations between field, U components and coordinate.

When "attribute mode" is on "point data", you have acces to vectors:
(coord, U)
and scalars:
coordx, U_0
coordy, U_1
coordz, U_2

and many operators (cos, sin ...)

Florian

Marcus081 February 12, 2010 12:17

Coordinate System Components (v, w, x) ?
 
1 Attachment(s)
Hi, I have been using the version of ansys 12.1, and the coordinate system appears with these component (v, w, x) , I have not found the form to change it a (x, y, z), since I can do it?


All times are GMT -4. The time now is 04:10.