1 Introduction
Reconstruction operation is used in OpenFOAM e.g. in BuoyantBoussinesqPisoFoam to reconstruct "...a volume field from a face flux field introducing pseudo-staggered grid setup... to avoid checker-board pressure oscillations that may occur on co-located grids".
2 Method description
Let’s consider a reconstruction fvc::reconstruct(…)
operator for the case of the cell
centered values recovery of the velocity vector based on the face flux f f S
r r j = u × of the
control volume.
Surface normal vectors is
(1)
which can be represented as the scalar product of the face normal unity vector f n and the aread of the face f f A S r = :
According to the fvcReconstruct.C file:
00042 template<class Type> 00043 tmp 00044 < 00045 GeometricField 00046 < 00047 typename outerProduct<vector,Type>::type, fvPatchField, volMesh 00048 > 00049 > 00050 reconstruct 00051 ( 00052 const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf 00053 ) 00054 { 00055 typedef typename outerProduct<vector, Type>::type GradType; 00056 00057 const fvMesh& mesh = ssf.mesh(); 00058 00059 tmp<GeometricField<GradType, fvPatchField, volMesh> > treconField 00060 ( 00061 new GeometricField<GradType, fvPatchField, volMesh> 00062 ( 00063 IOobject 00064 ( 00065 "volIntegrate("+ssf.name()+')', 00066 ssf.instance(), 00067 mesh, 00068 IOobject::NO_READ, 00069 IOobject::NO_WRITE 00070 ), 00071 inv(surfaceSum(sqr(mesh.Sf())/mesh.magSf())) 00072 & surfaceSum((mesh.Sf()/mesh.magSf())*ssf), 00073 zeroGradientFvPatchField<GradType>::typeName 00074 ) 00075 ); 00076 00077 treconField().correctBoundaryConditions(); 00078 00079 return treconField; 00080 }
Thereby, the reconstructed velocity values * u r are calculated as:
(3)
Here one should remember that in the OpenFOAM the square operator (...)2 performed on the vector argument produces a symmetric tensor (it is not the scalar product of a vector with itself) using an outer product of the vector:
(4)
The obtained 2nd rank tensor is normalized by the face area f A and summarized (using operator Σ f ... ) over all faces of control volume:
(5)
The inversion of the tensor W is used to represent the normalization (is this correct?). According to the Eq. (2), the face normal component of velocity vector f n u r is calculated as
(6)
thus
(7)
Finally the Eq. (3) can be rewritten as the weighted sum (with face areas as the weighted coefficients) averaged using normalization tensor W:
(8)
--Makaveli lcf 01:12, 23 October 2011 (CEST)