STYLE: Consistency updates for LTS solver

This commit is contained in:
andy
2011-05-03 17:39:18 +01:00
parent 2f374d0d7a
commit 3051d333b3
4 changed files with 12 additions and 8 deletions

View File

@ -27,13 +27,16 @@ License
scalar maxCo(readScalar(pimple.dict().lookup("maxCo"))); scalar maxCo(readScalar(pimple.dict().lookup("maxCo")));
// Maximum time scale // Maximum time scale
scalar maxDeltaT = readScalar(pimple.dict().lookup("maxDeltaT")); scalar maxDeltaT(pimple.dict().lookupOrDefault<scalar>("maxDeltaT", GREAT));
// Smoothing parameter (0-1) when smoothing iterations > 0 // Smoothing parameter (0-1) when smoothing iterations > 0
scalar alphaTauSmooth(pimple.dict().lookupOrDefault("alphaTauSmooth", 0.1)); scalar rDeltaTSmoothingCoeff
(
pimple.dict().lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1)
);
// Maximum change in cell temperature per iteration (relative to previous value) // Maximum change in cell temperature per iteration (relative to previous value)
scalar alphaTauTemp(pimple.dict().lookupOrDefault("alphaTauTemp", 0.05)); scalar alphaTemp(pimple.dict().lookupOrDefault("alphaTemp", 0.05));
// ************************************************************************* // // ************************************************************************* //

View File

@ -82,7 +82,7 @@ Info<< "Time scales min/max:" << endl;
/rho /rho
); );
tau = alphaTauTemp*thermo.Cp()*T/(tau + ROOTVSMALL); tau = alphaTemp*thermo.Cp()*T/(tau + ROOTVSMALL);
Info<< " Temperature = " << min(maxDeltaT, gMin(tau)) << ", " Info<< " Temperature = " << min(maxDeltaT, gMin(tau)) << ", "
<< min(maxDeltaT, gMax(tau)) << endl; << min(maxDeltaT, gMax(tau)) << endl;
@ -105,7 +105,7 @@ Info<< "Time scales min/max:" << endl;
// Spatially smooth the time scale field // Spatially smooth the time scale field
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fvc::smooth(rDeltaT, alphaTauSmooth); fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
Info<< " Overall = " << min(1/rDeltaT).value() Info<< " Overall = " << min(1/rDeltaT).value()
<< ", " << max(1/rDeltaT).value() << nl << endl; << ", " << max(1/rDeltaT).value() << nl << endl;

View File

@ -85,8 +85,9 @@ PIMPLE
rhoMax rhoMax [1 -3 0 0 0] 1.5; rhoMax rhoMax [1 -3 0 0 0] 1.5;
maxCo 0.5; maxCo 0.5;
rDeltaTSmoothingCoeff 0.1;
maxDeltaT 1; maxDeltaT 1;
alphaTauTemp 0.005; alphaTemp 0.005;
} }
additional additional

View File

@ -72,8 +72,8 @@ PIMPLE
rhoMax rhoMax [1 -3 0 0 0] 1.5; rhoMax rhoMax [1 -3 0 0 0] 1.5;
maxCo 5; maxCo 5;
alphaTauSmooth 1; rDeltaTSmoothingCoeff 1;
alphaTauTemp 1; alphaTemp 1;
maxDeltaT 1; maxDeltaT 1;
} }