mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -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
|
||||
{
|
||||
|
||||
@ -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]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user