CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   div and laplacian (http://www.cfd-online.com/Forums/openfoam-programming-development/126649-div-laplacian.html)

gooya_kabir November 22, 2013 10:18

div and laplacian
 
Hi friends,

I want to generate some equations in open foam. My interest is to generate (d2v/dx2)+(d2v/dy2). But in openfoam there is "div" and "laplacian" commands which make equations in x, y and z directions and I want just in x and y directions. What can I do?

Thank you in advance for your help and comments.
Kind Regards

Bernhard November 22, 2013 10:32

Use a 2D mesh, i.e. flat and parallel front and back planes, with only one cell. Set the boundary conditions to empty.

gooya_kabir November 22, 2013 10:40

Quote:

Originally Posted by Bernhard (Post 463092)
Use a 2D mesh, i.e. flat and parallel front and back planes, with only one cell. Set the boundary conditions to empty.

thanks for your response :). But my geometry is 3D, and just I want to apply an equation which has gradient in x and y directions.?!

ngj November 23, 2013 08:12

Hallo,

This basically means that you are solving a system in 3D, which is of the form:

1\cdot\frac{\partial^2 v}{\partial x^2} + 1\cdot\frac{\partial^2 v}{\partial y^2} + 0\cdot\frac{\partial^2 v}{\partial z^2} = 0

I believe that the Laplacian operator in OpenFoam does support a diffusivity as a tensor of rank two, which basically means that the above equation could be re-written as:

\nabla\boldsymbol{\cdot}\mathbf{\Gamma}\nabla v = 0

where

\mathbf{\Gamma} = \left[\begin{array}{ccc}1&0&0\\0&1&0\\0&0&0\end{array}\right]

and \nabla=(\partial/\partial x,\,\partial/\partial y,\,\partial/\partial y).

Good luck,

Niels

gooya_kabir November 25, 2013 05:28

thank you. I think I could not transform my words. I want to apply the below equation, what's the mathematical description of this equation in open foam?

-∂p/∂x=μ((∂^2 v)/(∂y^2 )+(∂^2 v)/(∂z^2 ))

Quote:

Originally Posted by ngj (Post 463190)
Hallo,

This basically means that you are solving a system in 3D, which is of the form:

1\cdot\frac{\partial^2 v}{\partial x^2} + 1\cdot\frac{\partial^2 v}{\partial y^2} + 0\cdot\frac{\partial^2 v}{\partial z^2} = 0

I believe that the Laplacian operator in OpenFoam does support a diffusivity as a tensor of rank two, which basically means that the above equation could be re-written as:

\nabla\boldsymbol{\cdot}\mathbf{\Gamma}\nabla v = 0

where

\mathbf{\Gamma} = \left[\begin{array}{ccc}1&0&0\\0&1&0\\0&0&0\end{array}\right]

and \nabla=(\partial/\partial x,\,\partial/\partial y,\,\partial/\partial y).

Good luck,

Niels



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