|
[Sponsors] |
December 26, 2021, 19:08 |
Coding laplacian equation
|
#1 |
New Member
Patryk
Join Date: Dec 2021
Posts: 5
Rep Power: 4 |
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. |
|
December 26, 2021, 19:23 |
|
#2 |
New Member
Patryk
Join Date: Dec 2021
Posts: 5
Rep Power: 4 |
||
December 27, 2021, 04:57 |
|
#3 |
Senior Member
|
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? |
|
December 27, 2021, 14:34 |
|
#4 |
New Member
Patryk
Join Date: Dec 2021
Posts: 5
Rep Power: 4 |
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! |
|
December 27, 2021, 14:43 |
|
#5 |
Senior Member
|
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). |
|
Tags |
syntax |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Coding 1D euler equation in C | rambharath | Main CFD Forum | 2 | February 16, 2015 10:58 |
regarding coding of population balance equation | shashi@1991 | Fluent UDF and Scheme Programming | 0 | September 14, 2014 06:08 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |
Non-linearity Pressure Equation -- PISO algorithm | gdeneyer | OpenFOAM Programming & Development | 1 | August 23, 2012 06:19 |
error message | cuteapathy | CFX | 14 | March 20, 2012 07:45 |