Added support for "pFinal".

This commit is contained in:
henry
2009-01-08 20:05:46 +00:00
parent eb2e37b296
commit fcdcf55610
7 changed files with 24 additions and 13 deletions

View File

@ -100,7 +100,19 @@ int main(int argc, char *argv[])
); );
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if
(
corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
{
pEqn.solve(mesh.solver("pFinal"));
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {

View File

@ -308,7 +308,7 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
g = rv1[nm]; g = rv1[nm];
scalar h = rv1[k]; scalar h = rv1[k];
scalar f = ((y - z)*(y + z) + (g - h)*(g + h))/(2.0*h*y); scalar f = ((y - z)*(y + z) + (g - h)*(g + h))/(2.0*h*y);
g = sqrtSumSqr(f, 1.0); g = sqrtSumSqr(f, scalar(1));
f = ((x - z)*(x + z) + h*((y/(f + sign(g, f))) - h))/x; f = ((x - z)*(x + z) + h*((y/(f + sign(g, f))) - h))/x;
scalar c = 1.0; scalar c = 1.0;
s = 1.0; s = 1.0;

View File

@ -143,7 +143,7 @@ void Foam::processorPolyPatch::initGeometry()
( (
Pstream::blocking, Pstream::blocking,
neighbProcNo(), neighbProcNo(),
+ 3*(sizeof(label) + size()*sizeof(vector)) 3*(sizeof(label) + size()*sizeof(vector) + sizeof(float))
); );
toNeighbProc toNeighbProc
@ -163,7 +163,7 @@ void Foam::processorPolyPatch::calcGeometry()
( (
Pstream::blocking, Pstream::blocking,
neighbProcNo(), neighbProcNo(),
3*(sizeof(label) + size()*sizeof(vector)) 3*(sizeof(label) + size()*sizeof(vector) + sizeof(float))
); );
fromNeighbProc fromNeighbProc
>> neighbFaceCentres_ >> neighbFaceCentres_
@ -582,7 +582,7 @@ bool Foam::processorPolyPatch::order
transformedCtrs = masterCtrs-v[0]; transformedCtrs = masterCtrs-v[0];
} }
else else
{ {
transformedCtrs = masterCtrs-v; transformedCtrs = masterCtrs-v;
} }
matchedAll = matchPoints matchedAll = matchPoints
@ -605,7 +605,7 @@ bool Foam::processorPolyPatch::order
masterAnchors -= v[0]; masterAnchors -= v[0];
} }
else else
{ {
masterAnchors -= v; masterAnchors -= v;
} }
} }

View File

@ -65,7 +65,7 @@ Istream& operator>>(Istream& is, unsigned int& i)
if (t.isLabel()) if (t.isLabel())
{ {
i = unsigned(t.labelToken()); i = static_cast<unsigned int>(t.labelToken());
} }
else else
{ {

View File

@ -44,7 +44,6 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Return a string representation of an ulong
word name(const unsigned long i) word name(const unsigned long i)
{ {
std::ostringstream osBuffer; std::ostringstream osBuffer;
@ -66,7 +65,7 @@ Istream& operator>>(Istream& is, unsigned long& i)
if (t.isLabel()) if (t.isLabel())
{ {
i = ulong(t.labelToken()); i = static_cast<unsigned long>(t.labelToken());
} }
else else
{ {

View File

@ -119,12 +119,12 @@ void SpalartAllmarasIDDES::dTildaUpdate(const volScalarField& S)
2.0*(pos(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.0)); 2.0*(pos(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.0));
volScalarField fStep = min(2.0*pow(expTerm, -9.0), 1.0); volScalarField fStep = min(2.0*pow(expTerm, -9.0), scalar(1));
volScalarField fHyb = max(1.0 - fd(S), fStep); volScalarField fHyb = max(1.0 - fd(S), fStep);
volScalarField fAmp = 1.0 - max(ft(S), fl(S)); volScalarField fAmp = 1.0 - max(ft(S), fl(S));
volScalarField fRestore = max(fHill - 1.0, 0.0)*fAmp; volScalarField fRestore = max(fHill - 1.0, scalar(0))*fAmp;
// volScalarField ft2 = IGNORING ft2 terms // volScalarField ft2 = IGNORING ft2 terms
@ -132,7 +132,7 @@ void SpalartAllmarasIDDES::dTildaUpdate(const volScalarField& S)
( (
min min
( (
100.0, scalar(100),
(1.0 - Cb1_/(Cw1_*sqr(kappa_)*fwStar_)*fv2())/max(SMALL, fv1()) (1.0 - Cb1_/(Cw1_*sqr(kappa_)*fwStar_)*fv2())/max(SMALL, fv1())
) )
); );

View File

@ -139,7 +139,7 @@ void nuSgsSpalartAllmarasWallFunctionFvPatchScalarField::evaluate
do do
{ {
scalar kUu = min(kappa*magUpara/utau, 100); scalar kUu = min(kappa*magUpara/utau, 50);
scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu); scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
scalar f = scalar f =