diff --git a/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H index 55be311749..867fb9f641 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H @@ -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); diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H index ed802ba6d2..df14de0e76 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H @@ -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()); diff --git a/etc/controlDict b/etc/controlDict index a2302326dc..72112b0ddc 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -498,7 +498,6 @@ DebugSwitches flowRateInletVelocity 0; fluxCorrectedVelocity 0; foamChemistryReader 0; - foamFile 0; forceCoeffs 0; forces 0; fourth 0; diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index 97b7c091b0..e111b33067 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -37,6 +37,7 @@ License #include "sigInt.H" #include "sigQuit.H" #include "sigSegv.H" +#include "endian.H" #include @@ -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; } diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 6ce30fd57f..a904f8092b 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -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); } diff --git a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/system/sampleDict b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/system/sampleDict index b5fb7d735a..9ad795924b 100644 --- a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/system/sampleDict +++ b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/system/sampleDict @@ -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'. // diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict b/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict index 1335867e72..59da172c16 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict +++ b/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict @@ -15,11 +15,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -DebugSwitches -{ - SolverPerformance 2; -} - application simpleFoam; startFrom startTime;