Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2012-04-02 10:57:51 +01:00
3 changed files with 52 additions and 21 deletions

View File

@ -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
{

View File

@ -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]]);
}
}
}

View File

@ -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)
forAll(lambdaPf, pFacei)
{
lambdaPf[pFacei] = min(lambdaPf[pFacei], lambdap[pfCelli]);
}
else
{
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]);
}
}
}
}