diff --git a/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C b/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C index a497e4fd3..848349ddd 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C @@ -63,7 +63,7 @@ reconstruct ( IOobject ( - "volIntegrate("+ssf.name()+')', + "volIntegrate(" + ssf.name() + ')', ssf.instance(), mesh, IOobject::NO_READ, @@ -74,6 +74,27 @@ reconstruct zeroGradientFvPatchField::typeName ) ); + GeometricField& reconField = + treconField(); + + // Note: + // 1) Reconstruction is only available in cell centres: there is no need + // to invert the tensor on the boundary + // 2) For boundaries, the only reconstructed data is the flux times + // normal. Based on this guess, boundary conditions can adjust + // patch values + // HJ, 12/Aug/2011 + + GeometricField fluxTimesNormal = + surfaceSum((mesh.Sf()/mesh.magSf())*ssf); + + reconField.internalField() = + ( + inv(surfaceSum(sqr(mesh.Sf())/mesh.magSf())().internalField()) + & fluxTimesNormal.internalField() + ); + + reconField.boundaryField() = fluxTimesNormal.boundaryField(); treconField().correctBoundaryConditions();