CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Specifying analytical velocity feild (https://www.cfd-online.com/Forums/openfoam-programming-development/159021-specifying-analytical-velocity-feild.html)

Sarang September 8, 2015 01:59

Specifying analytical velocity feild
 
Hello All,

I wish to validate the vof model in OpenFoam. For that , i need to do a vortex stretching problem , where i am supposed to give a velocity field defined as :

Ux = -cos(pi*t/T) * sin(pi*x) * sin(pi*x) * cos (2*pi*y)
Uy = cos(pi*t/T) * sin(pi*y) * sin(pi*y) * cos (2*pi*x)

T= total time t=current time

I am relatively new to OpenFoam. I really dont know how do i access a particular points co-ordinates and use them in the analytical expression. mesh.points() gives me a list of co-ordinated of points. But i need to access a particular point's x/y/z co-ordinate.

Any help will be much appreciated.

Thanks a lot in advance.


All times are GMT -4. The time now is 09:17.