diff --git a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C index 9d6adf3027a4fbcd300f80b32c3ebcda3aaa1e53..91a3e495a1a2075d7c814ddccf35aad649daf523 100644 --- a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C +++ b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2018 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -431,7 +431,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::correct { label cellI = cells_[i]; - const vector Ufnorm = UfCells[i]/mag(UfCells[i]); + const vector Ufnorm = UfCells[i]/(mag(UfCells[i]) + SMALL); const tensor D = rotationTensor(Ufnorm, flowDir_); @@ -452,7 +452,6 @@ void Foam::fv::directionalPressureGradientExplicitSource::correct Info<< "UfCell:= " << UfCells[i] << "U : " << U[cellI] << endl; } } - writeProps(gradP0_ + dGradP_); }