CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Coding laplacian equation

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By dlahaye
  • 1 Post By dlahaye

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 26, 2021, 18:08
Default Coding laplacian equation
  #1
New Member
 
Patryk
Join Date: Dec 2021
Posts: 5
Rep Power: 4
Patryk Stawicki is on a distinguished road
How I can write,as a fvScheme, laplace equation?

I always find a syntax like this laplacian(nu,u), where u is the function under the differentiation. What I don't know is how to find "nu", I know it's a diffusion term, but I don't know how It should it be calculated so the equation holds for my case.
Patryk Stawicki is offline   Reply With Quote

Old   December 26, 2021, 18:23
Default
  #2
New Member
 
Patryk
Join Date: Dec 2021
Posts: 5
Rep Power: 4
Patryk Stawicki is on a distinguished road
what i meant is that, I always thought of laplacian operator to be: \nabla^2

but now i see some different version

\nabla\bullet (v*\nabla)

I don't see how to change the equation to the second form and to introduce(and to determine the valeu) of this "v" - diffusion term
Patryk Stawicki is offline   Reply With Quote

Old   December 27, 2021, 03:57
Default
  #3
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 730
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Laplacian(u) = div( grad(u) ).

To verify this, it suffices to use the definition. Indeed,

LHS = Laplacian(u) = \sum_i \partial^2 u / partial^2 x_i

while grad(u) = Vector( \partial u / partial x_1, \partial u / partial x_2, \partial u / partial x_3 )

thus RHS = div( grad(u) ) = \sum_i \partial^2 u / partial^2 x_i

and thus LHS = RHS.

Does this help?
Patryk Stawicki likes this.
dlahaye is online now   Reply With Quote

Old   December 27, 2021, 13:34
Default
  #4
New Member
 
Patryk
Join Date: Dec 2021
Posts: 5
Rep Power: 4
Patryk Stawicki is on a distinguished road
Yes it helped a lot. Thank you very much.

Now what I still don't know how I should define the value or a function "nu"

In syntax of the laplacian is for example laplacian(nu,u).

I have no idea what's exactly is this nu term and if it's needed always.

For example in a problem i'm right now solving, I have just a laplace equation, there is no diffusion term(that's what it's called I believe). In such case should i put it as some constant like nu=1?

Thanks in advance!
Patryk Stawicki is offline   Reply With Quote

Old   December 27, 2021, 13:43
Default
  #5
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 730
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Yes, true.

For nu = 1, div( nu grad(u) ) = div( 1 grad(u) ) = Laplacian(u)

Diffusion is direction-independent and spatial-independent.

For nu <> 1, div( nu grad(u) ) is a "generalised Laplacian" that can be direction and/or spatial dependent.

Think of diffusion of heat. In regions in space with small (large) temperature gradient, diffusion will be small (large).
Patryk Stawicki likes this.
dlahaye is online now   Reply With Quote

Reply

Tags
syntax


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
Coding 1D euler equation in C rambharath Main CFD Forum 2 February 16, 2015 09:58
regarding coding of population balance equation shashi@1991 Fluent UDF and Scheme Programming 0 September 14, 2014 05:08
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Non-linearity Pressure Equation -- PISO algorithm gdeneyer OpenFOAM Programming & Development 1 August 23, 2012 05:19
error message cuteapathy CFX 14 March 20, 2012 06:45


All times are GMT -4. The time now is 12:24.