Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop

This commit is contained in:
Andrew Heather
2017-06-29 14:18:41 +01:00
7 changed files with 43 additions and 25 deletions

View File

@ -109,19 +109,11 @@ K = 0.5*magSqr(U);
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
thermo.correctRho(psi*p - psip0, rhoMin, rhoMax);
rho = thermo.rho();
}
else if (pimple.SIMPLErho())
{
thermo.correctRho(psi*p - psip0, rhoMin, rhoMax);
rho = thermo.rho();
}
else
{
thermo.correctRho(psi*p - psip0, rhoMin, rhoMax);
}
thermo.correctRho(psi*p - psip0, rhoMin, rhoMax) ;
rho = thermo.rho();
if (thermo.dpdt())
{
dpdt = fvc::ddt(p);

View File

@ -1,4 +1,11 @@
rho = thermo.rho();
if (!pimple.SIMPLErho())
{
rho = thermo.rho();
}
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution
const volScalarField psip0(psi*p);
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
@ -92,9 +99,11 @@ K = 0.5*magSqr(U);
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
rho = thermo.rho();
}
thermo.correctRho(psi*p - psip0, rhoMin, rhoMax);
rho = thermo.rho();
{
rhoUf = fvc::interpolate(rho*U);
surfaceVectorField n(mesh.Sf()/mesh.magSf());

View File

@ -498,7 +498,6 @@ DebugSwitches
flowRateInletVelocity 0;
fluxCorrectedVelocity 0;
foamChemistryReader 0;
foamFile 0;
forceCoeffs 0;
forces 0;
fourth 0;

View File

@ -37,6 +37,7 @@ License
#include "sigInt.H"
#include "sigQuit.H"
#include "sigSegv.H"
#include "endian.H"
#include <cctype>
@ -53,6 +54,22 @@ Foam::string::size_type Foam::argList::usageMin = 20;
Foam::string::size_type Foam::argList::usageMax = 80;
Foam::word Foam::argList::postProcessOptionName("postProcess");
// file-scope
// Hint about machine endian, OpenFOAM label and scalar sizes
static const std::string archHint =
(
#ifdef WM_LITTLE_ENDIAN
"LSB"
#elif defined (WM_BIG_ENDIAN)
"MSB"
#else
"???"
#endif
";label=" + std::to_string(8*sizeof(Foam::label))
+ ";scalar=" + std::to_string(8*sizeof(Foam::scalar))
);
Foam::argList::initValidTables::initValidTables()
{
argList::addOption
@ -622,6 +639,7 @@ void Foam::argList::parse
{
IOobject::writeBanner(Info, true)
<< "Build : " << Foam::FOAMbuild << nl
<< "Arch : " << archHint << nl
<< "Exec : " << argListStr_.c_str() << nl
<< "Date : " << dateString.c_str() << nl
<< "Time : " << timeString.c_str() << nl
@ -1228,7 +1246,8 @@ void Foam::argList::printUsage() const
Info<< nl
<<"Using: OpenFOAM-" << Foam::FOAMversion
<< " (see www.OpenFOAM.com)" << nl
<<"Build: " << Foam::FOAMbuild << nl
<< "Build: " << Foam::FOAMbuild << nl
<< "Arch: " << archHint << nl
<< endl;
}

View File

@ -199,7 +199,7 @@ void Foam::fvMesh::storeOldVol(const scalarField& V)
*this,
IOobject::NO_READ,
IOobject::NO_WRITE,
true
false
),
*this,
dimVolume
@ -281,8 +281,8 @@ Foam::fvMesh::fvMesh(const IOobject& io)
time().timeName(),
*this,
IOobject::MUST_READ,
IOobject::AUTO_WRITE,
true
IOobject::NO_WRITE,
false
),
*this
);
@ -869,6 +869,11 @@ bool Foam::fvMesh::writeObject
// solver smooth restart using second order time schemes.
//ok = phiPtr_->oldTime().write();
}
if (V0Ptr_ && V0Ptr_->writeOpt() == IOobject::AUTO_WRITE)
{
// For second order restarts we need to write V0
ok = V0Ptr_->write();
}
return ok && polyMesh::writeObject(fmt, ver, cmp);
}

View File

@ -26,8 +26,7 @@ setFormat raw;
// Surface output format. Choice of
// null : suppress output
// foamFile : separate points, faces and values file
// dx : DX scalar or vector format
// foam : separate points, faces and values file
// vtk : VTK ascii format
// raw : x y z value format for use with e.g. gnuplot 'splot'.
//

View File

@ -15,11 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
DebugSwitches
{
SolverPerformance 2;
}
application simpleFoam;
startFrom startTime;