|
[Sponsors] |
October 28, 2019, 08:56 |
fvm::laplacian - fvc::div
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi all,
yesterday a question arises about the divDevRhoREff() calculation (Calculating divDevReff) Here, we have the following constellation Code:
tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const { return ( - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); }
What I don´t get right now is the following:
So the question would be as follow: Can anyone give more insight into the fields that are returned by the fvc::grad(U), dev() and fvc::div() functions. Thanks in advance. Tobi
__________________
Keep foaming, Tobias Holzmann |
|
October 29, 2019, 12:23 |
|
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
Hello Tobias,
to answer your questions: fvc:grad(U) returns the velocity gradient tensor, see https://caefn.com/openfoam/tensor-operations fvc:div returns the divergence of the tensor and dev is the deviation part of the tensor. how they are calculated is explained in the OpenFOAM programmer guide. by the way the operator - which takes a fvMatrix and a geometricField as input is defined (see https://www.openfoam.com/documentati...8C_source.html) what it does, it adds the Geometric field to the source of the matrix and returns this new matrix. Hope it helps Michael |
|
October 29, 2019, 13:30 |
|
#3 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi Michael,
thanks for your answer. Most of the things were clear. The only interesting point was that I could not find the implementation of the operator- for a fvMatrix which takes the GeometricField<Type> as giben here: https://cpp.openfoam.org/v7/classFoam_1_1fvMatrix.html However, if we jump into the source code of the fvMatrix.C file, it is there. I expected the operator- should be visible in the doxygen class too. Code:
template<class Type> Foam::tmp<Foam::fvMatrix<Type>> Foam::operator- ( const fvMatrix<Type>& A, const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu ) { checkMethod(A, tsu(), "-"); tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A)); tC.ref().source() += tsu().mesh().V()*tsu().primitiveField(); tsu.clear(); return tC; } Thank you for your hint.
__________________
Keep foaming, Tobias Holzmann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fvc::div for surfaceVectorField | ARTem | OpenFOAM Programming & Development | 4 | November 2, 2018 13:41 |
anisotropic diffusion fvm::laplacian | MichiB | OpenFOAM | 1 | January 10, 2013 05:47 |
fvc::div() strange behaviour | ivan_cozza | OpenFOAM Running, Solving & CFD | 2 | February 6, 2010 07:09 |
fvm::laplacian appropriate for d/dx(d/dy) | sven | OpenFOAM | 1 | December 10, 2009 13:24 |
What type return fvcdiv | su_junwei | OpenFOAM Running, Solving & CFD | 6 | October 13, 2008 08:09 |