CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   velocity in cylindrical coordinate (https://www.cfd-online.com/Forums/openfoam/83078-velocity-cylindrical-coordinate.html)

 nimasam December 14, 2010 04:00

velocity in cylindrical coordinate

i have an axisymetric mesh with wedge boundary condition ;) now i like to calculate Ur and Uteta , once i saw we can convert Cartesian coordinate system into cylindrical coordinate but it seems it does not work in openFoam 1.6.x , this function is protected type :(

cylindricalCS ccs
(
"ccs",
vector(0, 0, 0), // center point of ccs
vector(0, 0, 1), // axis of ccs
vector(1, 1, 0) // base axis for cylindrical angle
);

vectorField Uint = U.internalField();
vectorField Ucyl = ccs.globalToLocal(Uint,false); //error line!!!

error: virtual Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::cylindricalCS::globalToLocal(const Foam::vectorField&, bool) const is protected

now is there any suggestion how i can access to Ur and U tetha?

 stevenvanharen December 14, 2010 11:59

Quote:
 Originally Posted by nimasam (Post 287331) i have an axisymetric mesh with wedge boundary condition ;) now i like to calculate Ur and Uteta , once i saw we can convert Cartesian coordinate system into cylindrical coordinate but it seems it does not work in openFoam 1.6.x , this function is protected type :( cylindricalCS ccs ( "ccs", vector(0, 0, 0), // center point of ccs vector(0, 0, 1), // axis of ccs vector(1, 1, 0) // base axis for cylindrical angle ); vectorField Uint = U.internalField(); vectorField Ucyl = ccs.globalToLocal(Uint,false); //error line!!! error: virtual Foam::tmp > > Foam::cylindricalCS::globalToLocal(const Foam::vectorField&, bool) const is protected now is there any suggestion how i can access to Ur and U tetha?

http://www.cfd-online.com/Forums/ope...tup-error.html

Your coding is a bit different in my code, could do the trick. However I wrote it for 1.7.

 nimasam December 14, 2010 16:09

thank you for ur interest i will look ur code and inform u;), could u visualize stream line for a wedge type axisymmetric mesh? streamFunction only work for 2D case.

 ali jafari September 9, 2013 17:43

cylindricalcs details

Quote:
 Originally Posted by stevenvanharen (Post 287414) check out this thread: http://www.cfd-online.com/Forums/ope...tup-error.html Your coding is a bit different in my code, could do the trick. However I wrote it for 1.7.
hi
can you tell me where and how should I apply cylindricalcs ? I really need that .

Special Thanks

 All times are GMT -4. The time now is 07:52.