CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

anisotropic diffusion fvm::laplacian

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

LinkBack Thread Tools Display Modes
Old   December 30, 2012, 11:18
Default anisotropic diffusion fvm::laplacian
New Member
Michael Buchmayr
Join Date: Mar 2010
Posts: 16
Rep Power: 9
MichiB is on a distinguished road

I have had a look at the implicit discretization of anisotropic diffusion (fvm::laplacian).
It seems to me that the implementation is wrong. At least I haven't yet managed to figure out why the coefficients are as they are.
It is fairly easy to follow in Ferzinger & Peric how the non-orthogonal correction approach is done for scalar "gamma" fields.
For tensor fields it's a bit more tricky.
What is being passed to the uncorrected (implicit) laplacian function is the scalar field sfGammaSn.
For me it would make sense to pass a vector field sfGamma and then split the derivative nabla(vf) into a derivative along d and a derivative along

I think the way fvm::laplacian is implemented now shouldn't even work for scalar "gammas" right?
Otherwise there wouldn't exist a template version for fvm::laplacians for scalars.

I would appriciate if anybody can exchange thoughts on this topic / approves my thoughts / teaches me wrong / explains to me the implementation.


template<class Type, class GType>
tmp<fvMatrix<Type> >
gaussLaplacianScheme<Type, GType>::fvmLaplacianUncorrected
const surfaceScalarField& gammaMagSf, actually passes sfGammaSn
const GeometricField<Type, fvPatchField, volMesh>& vf
tmp<surfaceScalarField> tdeltaCoeffs =
const surfaceScalarField& deltaCoeffs = tdeltaCoeffs();

tmp<fvMatrix<Type> > tfvm
new fvMatrix<Type>
deltaCoeffs.dimensions()*gammaMagSf.dimensions()*v f.dimensions()
fvMatrix<Type>& fvm = tfvm();

fvm.upper() = deltaCoeffs.internalField()*gammaMagSf.internalFie ld();

Last edited by MichiB; January 10, 2013 at 05:43.
MichiB is offline   Reply With Quote

Old   January 10, 2013, 05:47
New Member
Michael Buchmayr
Join Date: Mar 2010
Posts: 16
Rep Power: 9
MichiB is on a distinguished road
I figured out that the coeffs indeed correspond to what I've derived

which is (Sf dot Gamma dot Sf)/(Sf dot d) ... for the uncorrected laplacian.

I hope I didn't confuse anyone that read this message! If so, sorry!
MichiB is offline   Reply With Quote


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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
How to stop diffusion and advection in a zone for selected species. hda FLUENT 0 March 19, 2012 00:59
How to implement anisotropic diffusion coefficient benk OpenFOAM 1 March 25, 2010 22:41
Species diffusion coefficient iceabc FLUENT 1 June 10, 2004 10:04
Anisotropic Diffusion Coefficient FLUENT 0 March 29, 2001 02:15

All times are GMT -4. The time now is 15:54.