diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C index 81559df141edf32e9acf4d3ed6573aefd3cd6757..d48a63449117cc972f7283b05f4c1e14ca315c18 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -389,6 +389,8 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr tmp<fluxFieldType> phiCorr = phiAbs.oldTime() - (fvc::interpolate(U.oldTime()) & mesh().Sf()); + phiCorr().boundaryField() = pTraits<typename flux<Type>::type>::zero; + return tmp<fluxFieldType> ( new fluxFieldType @@ -430,7 +432,7 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr && phiAbs.dimensions() == dimVelocity*dimArea ) { - return tmp<fluxFieldType> + tmp<fluxFieldType> ddtPhiCorr ( new fluxFieldType ( @@ -446,6 +448,10 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr ) ) ); + + ddtPhiCorr().boundaryField() = pTraits<typename flux<Type>::type>::zero; + + return ddtPhiCorr; } else if ( @@ -453,7 +459,7 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr && phiAbs.dimensions() == rho.dimensions()*dimVelocity*dimArea ) { - return tmp<fluxFieldType> + tmp<fluxFieldType> ddtPhiCorr ( new fluxFieldType ( @@ -476,6 +482,10 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr ) ) ); + + ddtPhiCorr().boundaryField() = pTraits<typename flux<Type>::type>::zero; + + return ddtPhiCorr; } else if ( @@ -483,7 +493,7 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr && phiAbs.dimensions() == rho.dimensions()*dimVelocity*dimArea ) { - return tmp<fluxFieldType> + tmp<fluxFieldType> ddtPhiCorr ( new fluxFieldType ( @@ -497,6 +507,10 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr ) ) ); + + ddtPhiCorr().boundaryField() = pTraits<typename flux<Type>::type>::zero; + + return ddtPhiCorr; } else { diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index f9937b532cdf4a84561e1e63e687fe387c3fe503..a69f7f5add6d6ee9c1d3a6c2ffd52f3da59873ad 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -576,12 +576,18 @@ void Foam::fvMatrix<Type>::relax(const scalar alpha) // Also add the source contribution from the relaxation forAll(pa, face) { - Type iCoeff0 = iCoeffs[face]; - iCoeffs[face] = cmptMag(iCoeffs[face]); - sumOff[pa[face]] -= cmptMin(iCoeffs[face]); - iCoeffs[face] /= alpha; - S[pa[face]] += - cmptMultiply(iCoeffs[face] - iCoeff0, psi_[pa[face]]); + // Type iCoeff0 = iCoeffs[face]; + // iCoeffs[face] = cmptMag(iCoeffs[face]); + // sumOff[pa[face]] -= cmptMin(iCoeffs[face]); + // iCoeffs[face] /= alpha; + D[pa[face]] += + cmptMag(cmptMin(iCoeffs[face])) + - cmptMin(iCoeffs[face]); + sumOff[pa[face]] += + cmptMag(cmptMin(iCoeffs[face])) + - cmptMin(iCoeffs[face]); + // S[pa[face]] += + // cmptMultiply(iCoeffs[face] - iCoeff0, psi_[pa[face]]); } } } diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C index 98ed53686089aab9add585aabec71ef18273370e..c16288ea357cba049519162dc11b7e8267ff6ff9 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,6 +32,7 @@ License #include "surfaceInterpolate.H" #include "fvcSurfaceIntegrate.H" #include "slicedSurfaceFields.H" +#include "wedgeFvPatch.H" #include "syncTools.H" #include "fvm.H" @@ -567,19 +568,29 @@ void Foam::MULES::limiter fvsPatchScalarField& lambdaPf = lambdaBf[patchi]; const scalarField& phiCorrfPf = phiCorrBf[patchi]; - const labelList& pFaceCells = mesh.boundary()[patchi].faceCells(); - - forAll(lambdaPf, pFacei) + if (isA<wedgeFvPatch>(mesh.boundary()[patchi])) { - label pfCelli = pFaceCells[pFacei]; + lambdaPf = 0; + } + else + { + const labelList& pFaceCells = + mesh.boundary()[patchi].faceCells(); - if (phiCorrfPf[pFacei] > 0.0) - { - lambdaPf[pFacei] = min(lambdaPf[pFacei], lambdap[pfCelli]); - } - else + forAll(lambdaPf, pFacei) { - lambdaPf[pFacei] = min(lambdaPf[pFacei], lambdam[pfCelli]); + label pfCelli = pFaceCells[pFacei]; + + if (phiCorrfPf[pFacei] > 0.0) + { + lambdaPf[pFacei] = + min(lambdaPf[pFacei], lambdap[pfCelli]); + } + else + { + lambdaPf[pFacei] = + min(lambdaPf[pFacei], lambdam[pfCelli]); + } } } }