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

This commit is contained in:
mattijs
2010-10-08 18:01:13 +01:00
6 changed files with 47 additions and 44 deletions

View File

@ -30,15 +30,7 @@ if (transonic)
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
// Retain the residual from the first iteration pEqn.solve();
if (nonOrth == 0)
{
pEqn.solve();
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {
@ -60,15 +52,7 @@ else
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
// Retain the residual from the first iteration pEqn.solve();
if (nonOrth == 0)
{
pEqn.solve();
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {

View File

@ -43,16 +43,28 @@
porousZones pZones(mesh); porousZones pZones(mesh);
Switch pressureImplicitPorosity(false);
// nUCorrectors used for pressureImplicitPorosity // nUCorrectors used for pressureImplicitPorosity
int nUCorr = 0; int nUCorr = 0;
const bool pressureImplicitPorosity = if (pZones.size())
( {
pZones.size() // nUCorrectors for pressureImplicitPorosity
&& mesh.solutionDict().subDict("SIMPLE").readIfPresent if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
( {
"nUCorrectors", nUCorr = readInt
nUCorr (
) mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
&& (nUCorr > 0) );
); }
if (nUCorr > 0)
{
pressureImplicitPorosity = true;
Info<< "Using pressure implicit porosity" << endl;
}
else
{
Info<< "Using pressure explicit porosity" << endl;
}
}

View File

@ -15,15 +15,8 @@
); );
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
// retain the residual from the first iteration
if (nonOrth == 0) pEqn.solve();
{
pEqn.solve();
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {

View File

@ -1,11 +1,11 @@
cellSet heater new boxToCell (-0.01 0 -100 )(0.01 0.01 100) cellSet heater new boxToCell (-0.01001 0 -100 )(0.01001 0.00999 100)
cellSet heater add boxToCell (-0.01 -100 -0.01)(0.01 0.01 0.01) cellSet heater add boxToCell (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001)
cellZoneSet heater new setToCellZone heater cellZoneSet heater new setToCellZone heater
cellSet leftSolid new boxToCell (-100 0 -100 )(-0.01 0.01 100) cellSet leftSolid new boxToCell (-100 0 -100 )(-0.01001 0.00999 100)
cellZoneSet leftSolid new setToCellZone leftSolid cellZoneSet leftSolid new setToCellZone leftSolid
cellSet rightSolid new boxToCell (0.01 0 -100 )(100 0.01 100) cellSet rightSolid new boxToCell (0.01001 0 -100 )(100 0.00999 100)
cellZoneSet rightSolid new setToCellZone rightSolid cellZoneSet rightSolid new setToCellZone rightSolid
cellSet topAir new boxToCell (-100 0.01 -100 )(100 100 100) cellSet topAir new boxToCell (-100 0.00999 -100 )(100 100 100)
cellZoneSet topAir new setToCellZone topAir cellZoneSet topAir new setToCellZone topAir
cellSet bottomAir clear cellSet bottomAir clear
cellSet bottomAir add cellToCell heater cellSet bottomAir add cellToCell heater

View File

@ -18,9 +18,16 @@ solvers
{ {
rho rho
{ {
solver PCG solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1e-8; tolerance 1e-8;
relTol 0.1;
}
rhoFinal
{
$rho;
tolerance 1e-8;
relTol 0; relTol 0;
} }

View File

@ -18,9 +18,16 @@ solvers
{ {
rho rho
{ {
solver PCG solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1e-7; tolerance 1e-7;
relTol 0.1;
}
rhoFinal
{
$rho;
tolerance 1e-7;
relTol 0; relTol 0;
} }