Laplacian calculation

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Marie Pomarède

Laplacian calculation

Post by Marie Pomarède »

Hi everyone,

My question is about the calculation of the Laplace operator of a scalar or a vector with Code_Saturne. I am driven by the need to construct a dynamical system in Code_Saturne kernel (I'm still working with Code_Saturne v.1.3.3).

Thus, I have to calculate gradients, for which I just use calls to GRDCEL, and Laplacians. For the latter, I cannot use the composition of (INIMAS & DIVMAS ( GRDCEL) ), since this composition of two approximated operators gives erroneous approximations : the continuous definition of the Laplacian = DIV(GRAD( . )) is not true while using this double approximation.

The routine BILSC2.F seems to be more adapted to my need, but I'm not sure to what extent I can use it. I also have to precise that I would use it just at the first time of my calculation.

Did anybody have to calculate Laplacian with Code_Saturne 1.3.3 ? If yes, did you use this routine or another ? The management of the various entries seems to be far from easy for a non time-dependant calculation ...

Any answer would help !

Best regards,

Marie Pomarède
Jonathan Mougenot

Re: Laplacian calculation

Post by Jonathan Mougenot »

Hello,

I use Code Saturne 2.0.0 and I want to calcute a "laplacian" like :

                div(b grad c)  where c is a variable and b is a transport property

So I would like to use bilsc2 as you.

I realized a simply steady test case :
  -> Geometric : a cube
  -> Pressure and velocity without evolution
  -> c a variable (without diffusion) equal to z ordonate to the power 3
  -> b = 1 everywhere

I computed gradient (grdcel) and laplacian (bilsc2 with iconvp = 0) in usvpst.f90 (source files are in the archive). To define b (viscf and viscb), I used viscfa.

I found difference between analytic expression (respectively 3*z^2 and 6*z) and routines solutions. I resume the difference in comparison.pdf (in the archive). I think that real problems are the boundary cells.

I suppose that I don't use correctly grdcel and bilsc2. Could anybody help me ?

Best regards,
Jonathan
Attachments
Test_Case-tar.gz
(203.73 KiB) Downloaded 209 times
Post Reply