CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

div and laplacian

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By Bernhard
  • 1 Post By ngj

Reply
 
LinkBack Thread Tools Display Modes
Old   November 22, 2013, 09:18
Red face div and laplacian
  #1
Member
 
Reza
Join Date: Feb 2012
Posts: 60
Rep Power: 4
gooya_kabir is on a distinguished road
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
gooya_kabir is offline   Reply With Quote

Old   November 22, 2013, 09:32
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 787
Rep Power: 11
Bernhard is on a distinguished road
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 likes this.
Bernhard is offline   Reply With Quote

Old   November 22, 2013, 09:40
Default
  #3
Member
 
Reza
Join Date: Feb 2012
Posts: 60
Rep Power: 4
gooya_kabir is on a distinguished road
Quote:
Originally Posted by Bernhard View Post
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.?!
gooya_kabir is offline   Reply With Quote

Old   November 23, 2013, 07:12
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,528
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
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 likes this.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   November 25, 2013, 04:28
Default
  #5
Member
 
Reza
Join Date: Feb 2012
Posts: 60
Rep Power: 4
gooya_kabir is on a distinguished road
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 View Post
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 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about scalar transport osimonsimon OpenFOAM Running, Solving & CFD 32 August 23, 2014 01:07
Passive scalar transport novyno OpenFOAM Running, Solving & CFD 9 September 6, 2012 06:52
Convection-diffusion in 1D : wrong solution for a large Delta x nuovodna OpenFOAM 15 October 20, 2010 13:36
Implementation of div, laplacian, etc and variables sven OpenFOAM 3 July 19, 2009 18:18
Dimensions of laplacian in PISO loop kumar2 OpenFOAM Running, Solving & CFD 2 July 3, 2006 14:34


All times are GMT -4. The time now is 01:11.