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

div and laplacian

Register Blogs Community New Posts Updated Threads Search

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2013, 09:18
Red face div and laplacian
  #1
Member
 
Reza
Join Date: Feb 2012
Posts: 67
Rep Power: 14
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: 790
Rep Power: 21
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: 67
Rep Power: 14
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: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
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: 67
Rep Power: 14
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


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about scalar transport osimonsimon OpenFOAM Running, Solving & CFD 33 August 21, 2020 10:45
Passive scalar transport novyno OpenFOAM Running, Solving & CFD 10 May 5, 2016 13:31
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 19:46.