diff --git a/applications/solvers/basic/potentialFoam/createFields.H b/applications/solvers/basic/potentialFoam/createFields.H index dd6d1db04..ce912510e 100644 --- a/applications/solvers/basic/potentialFoam/createFields.H +++ b/applications/solvers/basic/potentialFoam/createFields.H @@ -1,98 +1,99 @@ - Info<< "Reading velocity field U\n" << endl; - volVectorField U +Info<< "Reading velocity field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - U = dimensionedVector("0", U.dimensions(), vector::zero); - - surfaceScalarField phi - ( - IOobject - ( - "phi", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - fvc::interpolate(U) & mesh.Sf() - ); - - if (args.optionFound("initialiseUBCs")) - { - U.correctBoundaryConditions(); - phi = fvc::interpolate(U) & mesh.Sf(); - } - - - // Default name for the pressure field - word pName("p"); - - // Update name of the pressure field from the command-line option - args.optionReadIfPresent("pName", pName); - - // Infer the pressure BCs from the velocity BCs - wordList pBCTypes - ( - U.boundaryField().size(), - fixedValueFvPatchScalarField::typeName - ); - - forAll(U.boundaryField(), patchi) - { - if (U.boundaryField()[patchi].fixesValue()) - { - pBCTypes[patchi] = zeroGradientFvPatchScalarField::typeName; - } - } - - Info<< "Constructing pressure field " << pName << nl << endl; - volScalarField p - ( - IOobject - ( - pName, - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::NO_WRITE - ), + "U", + runTime.timeName(), mesh, - dimensionedScalar(pName, sqr(dimVelocity), 0), - pBCTypes - ); + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Constructing velocity potential field Phi\n" << endl; - volScalarField Phi +U = dimensionedVector("0", U.dimensions(), vector::zero); + +surfaceScalarField phi +( + IOobject ( - IOobject - ( - "Phi", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::NO_WRITE - ), + "phi", + runTime.timeName(), mesh, - dimensionedScalar("Phi", dimLength*dimVelocity, 0), - p.boundaryField().types() - ); + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + fvc::interpolate(U) & mesh.Sf() +); - label PhiRefCell = 0; - scalar PhiRefValue = 0; - setRefCell +if (args.optionFound("initialiseUBCs")) +{ + U.correctBoundaryConditions(); + phi = fvc::interpolate(U) & mesh.Sf(); +} + + +// Default name for the pressure field +word pName("p"); + +// Update name of the pressure field from the command-line option +args.optionReadIfPresent("pName", pName); + +// Infer the pressure BCs from the velocity BCs +wordList pBCTypes +( + U.boundaryField().size(), + fixedValueFvPatchScalarField::typeName +); + +forAll(U.boundaryField(), patchi) +{ + if (U.boundaryField()[patchi].fixesValue()) + { + pBCTypes[patchi] = zeroGradientFvPatchScalarField::typeName; + } +} + +Info<< "Constructing pressure field " << pName << nl << endl; +volScalarField p +( + IOobject ( - Phi, - potentialFlow.dict(), - PhiRefCell, - PhiRefValue - ); + pName, + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ), + mesh, + dimensionedScalar(pName, sqr(dimVelocity), 0), + pBCTypes +); + +Info<< "Constructing velocity potential field Phi\n" << endl; +volScalarField Phi +( + IOobject + ( + "Phi", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ), + mesh, + dimensionedScalar("Phi", dimLength*dimVelocity, 0), + p.boundaryField().types() +); + +label PhiRefCell = 0; +scalar PhiRefValue = 0; +setRefCell +( + Phi, + potentialFlow.dict(), + PhiRefCell, + PhiRefValue +); +mesh.setFluxRequired(Phi.name()); diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H index c527d0a30..fa27e4b38 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -1,109 +1,111 @@ - Info<< "Reading field p\n" << endl; - volScalarField p +Info<< "Reading field p\n" << endl; +volScalarField p +( + IOobject ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field U\n" << endl; - volVectorField U +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - #include "createPhi.H" +#include "createPhi.H" - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, simple.dict(), pRefCell, pRefValue); +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell(p, simple.dict(), pRefCell, pRefValue); +mesh.setFluxRequired(p.name()); - Info<< "Reading field pa\n" << endl; - volScalarField pa +Info<< "Reading field pa\n" << endl; +volScalarField pa +( + IOobject ( - IOobject - ( - "pa", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "pa", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field Ua\n" << endl; - volVectorField Ua +Info<< "Reading field Ua\n" << endl; +volVectorField Ua +( + IOobject ( - IOobject - ( - "Ua", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "Ua", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - #include "createPhia.H" +#include "createPhia.H" - label paRefCell = 0; - scalar paRefValue = 0.0; - setRefCell +label paRefCell = 0; +scalar paRefValue = 0.0; +setRefCell +( + pa, + simple.dict(), + paRefCell, + paRefValue +); +mesh.setFluxRequired(pa.name()); + + +singlePhaseTransportModel laminarTransport(U, phi); + +autoPtr turbulence +( + incompressible::RASModel::New(U, phi, laminarTransport) +); + + +dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0); +dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0); + +dimensionedScalar lambda(laminarTransport.lookup("lambda")); +dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax")); + +const labelList& inletCells = mesh.boundary()["inlet"].faceCells(); +//const labelList& outletCells = mesh.boundary()["outlet"].faceCells(); + +volScalarField alpha +( + IOobject ( - pa, - simple.dict(), - paRefCell, - paRefValue - ); - - - singlePhaseTransportModel laminarTransport(U, phi); - - autoPtr turbulence - ( - incompressible::RASModel::New(U, phi, laminarTransport) - ); - - - dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0); - dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0); - - dimensionedScalar lambda(laminarTransport.lookup("lambda")); - dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax")); - - const labelList& inletCells = mesh.boundary()["inlet"].faceCells(); - //const labelList& outletCells = mesh.boundary()["outlet"].faceCells(); - - volScalarField alpha - ( - IOobject - ( - "alpha", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - lambda*max(Ua & U, zeroSensitivity) - ); - zeroCells(alpha, inletCells); - //zeroCells(alpha, outletCells); + "alpha", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + lambda*max(Ua & U, zeroSensitivity) +); +zeroCells(alpha, inletCells); +//zeroCells(alpha, outletCells); diff --git a/applications/solvers/incompressible/icoFoam/createFields.H b/applications/solvers/incompressible/icoFoam/createFields.H index 7f5ba06c4..0d01e2a5c 100644 --- a/applications/solvers/incompressible/icoFoam/createFields.H +++ b/applications/solvers/incompressible/icoFoam/createFields.H @@ -1,55 +1,56 @@ - Info<< "Reading transportProperties\n" << endl; +Info<< "Reading transportProperties\n" << endl; - IOdictionary transportProperties +IOdictionary transportProperties +( + IOobject ( - IOobject - ( - "transportProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); + "transportProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) +); - dimensionedScalar nu +dimensionedScalar nu +( + transportProperties.lookup("nu") +); + +Info<< "Reading field p\n" << endl; +volScalarField p +( + IOobject ( - transportProperties.lookup("nu") - ); + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field p\n" << endl; - volScalarField p + +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); +#include "createPhi.H" - #include "createPhi.H" - - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); +mesh.setFluxRequired(p.name()); diff --git a/applications/solvers/incompressible/nonNewtonianIcoFoam/createFields.H b/applications/solvers/incompressible/nonNewtonianIcoFoam/createFields.H index 10a51b9d7..d2ec50c88 100644 --- a/applications/solvers/incompressible/nonNewtonianIcoFoam/createFields.H +++ b/applications/solvers/incompressible/nonNewtonianIcoFoam/createFields.H @@ -1,39 +1,40 @@ - Info<< "Reading field p\n" << endl; - volScalarField p +Info<< "Reading field p\n" << endl; +volScalarField p +( + IOobject ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field U\n" << endl; - volVectorField U +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - #include "createPhi.H" +#include "createPhi.H" - singlePhaseTransportModel fluid(U, phi); +singlePhaseTransportModel fluid(U, phi); - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); +mesh.setFluxRequired(p.name()); diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/createFields.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/createFields.H index 16302f207..f4707dacc 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/createFields.H +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/createFields.H @@ -43,6 +43,7 @@ surfaceScalarField phi label pRefCell = 0; scalar pRefValue = 0.0; setRefCell(p, pimple.dict(), pRefCell, pRefValue); +mesh.setFluxRequired(p.name()); singlePhaseTransportModel laminarTransport(Urel, phi); diff --git a/applications/solvers/incompressible/pimpleFoam/createFields.H b/applications/solvers/incompressible/pimpleFoam/createFields.H index 4de4d0df8..1abf327c1 100644 --- a/applications/solvers/incompressible/pimpleFoam/createFields.H +++ b/applications/solvers/incompressible/pimpleFoam/createFields.H @@ -32,6 +32,7 @@ volVectorField U label pRefCell = 0; scalar pRefValue = 0.0; setRefCell(p, pimple.dict(), pRefCell, pRefValue); +mesh.setFluxRequired(p.name()); singlePhaseTransportModel laminarTransport(U, phi); diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createFields.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createFields.H new file mode 100644 index 000000000..3ab37cd44 --- /dev/null +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createFields.H @@ -0,0 +1,2 @@ +#include "../createFields.H" +mesh.setFluxRequired("pcorr"); diff --git a/applications/solvers/incompressible/pisoFoam/createFields.H b/applications/solvers/incompressible/pisoFoam/createFields.H index c89520fda..2d1c48a1f 100644 --- a/applications/solvers/incompressible/pisoFoam/createFields.H +++ b/applications/solvers/incompressible/pisoFoam/createFields.H @@ -1,42 +1,43 @@ - Info<< "Reading field p\n" << endl; - volScalarField p +Info<< "Reading field p\n" << endl; +volScalarField p +( + IOobject ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field U\n" << endl; - volVectorField U +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - #include "createPhi.H" +#include "createPhi.H" - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, piso.dict(), pRefCell, pRefValue); +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell(p, piso.dict(), pRefCell, pRefValue); +mesh.setFluxRequired(p.name()); - singlePhaseTransportModel laminarTransport(U, phi); +singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence - ( - incompressible::turbulenceModel::New(U, phi, laminarTransport) - ); +autoPtr turbulence +( + incompressible::turbulenceModel::New(U, phi, laminarTransport) +); diff --git a/applications/solvers/incompressible/shallowWaterFoam/createFields.H b/applications/solvers/incompressible/shallowWaterFoam/createFields.H index 3bcfb6835..2716b8713 100644 --- a/applications/solvers/incompressible/shallowWaterFoam/createFields.H +++ b/applications/solvers/incompressible/shallowWaterFoam/createFields.H @@ -73,3 +73,5 @@ hTotal.write(); Info<< "Creating Coriolis Force" << endl; const dimensionedVector F("F", ((2.0*Omega) & gHat)*gHat); + +mesh.setFluxRequired(h.name()); diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H index fae17d58d..d7096ed08 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H @@ -1,55 +1,56 @@ - Info<< "Reading field p\n" << endl; - volScalarField p +Info<< "Reading field p\n" << endl; +volScalarField p +( + IOobject ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field Urel\n" << endl; - volVectorField Urel +Info<< "Reading field Urel\n" << endl; +volVectorField Urel +( + IOobject ( - IOobject - ( - "Urel", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "Urel", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading/calculating face flux field phi\n" << endl; - surfaceScalarField phi +Info<< "Reading/calculating face flux field phi\n" << endl; +surfaceScalarField phi +( + IOobject ( - IOobject - ( - "phi", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - linearInterpolate(Urel) & mesh.Sf() - ); + "phi", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + linearInterpolate(Urel) & mesh.Sf() +); - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, simple.dict(), pRefCell, pRefValue); +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell(p, simple.dict(), pRefCell, pRefValue); +mesh.setFluxRequired(p.name()); - singlePhaseTransportModel laminarTransport(Urel, phi); +singlePhaseTransportModel laminarTransport(Urel, phi); - autoPtr turbulence - ( - incompressible::RASModel::New(Urel, phi, laminarTransport) - ); +autoPtr turbulence +( + incompressible::RASModel::New(Urel, phi, laminarTransport) +); - Info<< "Creating SRF model\n" << endl; - autoPtr SRF(SRF::SRFModel::New(Urel)); +Info<< "Creating SRF model\n" << endl; +autoPtr SRF(SRF::SRFModel::New(Urel)); diff --git a/applications/solvers/incompressible/simpleFoam/createFields.H b/applications/solvers/incompressible/simpleFoam/createFields.H index 18ef4d704..c89372bc3 100644 --- a/applications/solvers/incompressible/simpleFoam/createFields.H +++ b/applications/solvers/incompressible/simpleFoam/createFields.H @@ -1,42 +1,43 @@ - Info<< "Reading field p\n" << endl; - volScalarField p +Info<< "Reading field p\n" << endl; +volScalarField p +( + IOobject ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field U\n" << endl; - volVectorField U +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - #include "createPhi.H" +#include "createPhi.H" - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, simple.dict(), pRefCell, pRefValue); +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell(p, simple.dict(), pRefCell, pRefValue); +mesh.setFluxRequired(p.name()); - singlePhaseTransportModel laminarTransport(U, phi); +singlePhaseTransportModel laminarTransport(U, phi); - autoPtr turbulence - ( - incompressible::turbulenceModel::New(U, phi, laminarTransport) - ); +autoPtr turbulence +( + incompressible::turbulenceModel::New(U, phi, laminarTransport) +); diff --git a/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C b/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C index 6d5f4d2d4..c0ed1db01 100644 --- a/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C +++ b/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,13 +42,13 @@ void Foam::fvSchemes::clear() defaultD2dt2Scheme_.clear(); interpolationSchemes_.clear(); defaultInterpolationScheme_.clear(); - divSchemes_.clear(); // optional + divSchemes_.clear(); defaultDivScheme_.clear(); - gradSchemes_.clear(); // optional + gradSchemes_.clear(); defaultGradScheme_.clear(); snGradSchemes_.clear(); defaultSnGradScheme_.clear(); - laplacianSchemes_.clear(); // optional + laplacianSchemes_.clear(); defaultLaplacianScheme_.clear(); fluxRequired_.clear(); defaultFluxRequired_ = false; @@ -558,6 +558,17 @@ Foam::ITstream& Foam::fvSchemes::laplacianScheme(const word& name) const } +void Foam::fvSchemes::setFluxRequired(const word& name) +{ + if (debug) + { + Info<< "Setting fluxRequired for " << name << endl; + } + + fluxRequired_.add(name, true); +} + + bool Foam::fvSchemes::fluxRequired(const word& name) const { if (debug) diff --git a/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.H b/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.H index d16dd7a81..bf3099929 100644 --- a/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.H +++ b/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,6 +130,8 @@ public: ITstream& laplacianScheme(const word& name) const; + void setFluxRequired(const word& name); + bool fluxRequired(const word& name) const; //- Return true if the default ddtScheme is steadyState diff --git a/tutorials/basic/potentialFoam/cylinder/system/fvSchemes b/tutorials/basic/potentialFoam/cylinder/system/fvSchemes index e71ede26d..b3cb517e4 100644 --- a/tutorials/basic/potentialFoam/cylinder/system/fvSchemes +++ b/tutorials/basic/potentialFoam/cylinder/system/fvSchemes @@ -47,11 +47,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - Phi ; -} - // ************************************************************************* // diff --git a/tutorials/basic/potentialFoam/pitzDaily/system/fvSchemes b/tutorials/basic/potentialFoam/pitzDaily/system/fvSchemes index 998719cae..e3bb95078 100644 --- a/tutorials/basic/potentialFoam/pitzDaily/system/fvSchemes +++ b/tutorials/basic/potentialFoam/pitzDaily/system/fvSchemes @@ -47,11 +47,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - Phi ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes b/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes index 4a2232f73..028cb552d 100644 --- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes +++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes @@ -49,11 +49,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes b/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes index e5ff26a90..efb06e0f4 100644 --- a/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes +++ b/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes @@ -54,12 +54,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes index 06b08169d..04847ab84 100644 --- a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes @@ -53,11 +53,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p; - pa; -} // ************************************************************************* // diff --git a/tutorials/incompressible/icoFoam/cavity/system/fvSchemes b/tutorials/incompressible/icoFoam/cavity/system/fvSchemes index dede0a6cb..025dfc081 100644 --- a/tutorials/incompressible/icoFoam/cavity/system/fvSchemes +++ b/tutorials/incompressible/icoFoam/cavity/system/fvSchemes @@ -47,11 +47,5 @@ snGradSchemes default orthogonal; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/icoFoam/cavityClipped/system/fvSchemes b/tutorials/incompressible/icoFoam/cavityClipped/system/fvSchemes index dd463415d..212c7bd2a 100644 --- a/tutorials/incompressible/icoFoam/cavityClipped/system/fvSchemes +++ b/tutorials/incompressible/icoFoam/cavityClipped/system/fvSchemes @@ -46,11 +46,5 @@ snGradSchemes default orthogonal; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/icoFoam/cavityGrade/system/fvSchemes b/tutorials/incompressible/icoFoam/cavityGrade/system/fvSchemes index ec51402ce..72d70d2c2 100644 --- a/tutorials/incompressible/icoFoam/cavityGrade/system/fvSchemes +++ b/tutorials/incompressible/icoFoam/cavityGrade/system/fvSchemes @@ -46,11 +46,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/icoFoam/elbow/system/fvSchemes b/tutorials/incompressible/icoFoam/elbow/system/fvSchemes index 2c4dcb7a1..edea98c32 100644 --- a/tutorials/incompressible/icoFoam/elbow/system/fvSchemes +++ b/tutorials/incompressible/icoFoam/elbow/system/fvSchemes @@ -46,11 +46,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSchemes b/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSchemes index 302740c30..ca9faeb19 100644 --- a/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSchemes +++ b/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSchemes @@ -47,11 +47,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/system/fvSchemes index 44da6880a..35cf907ec 100644 --- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/system/fvSchemes @@ -50,12 +50,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - pcorr ; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSchemes index ad01e32e1..cec8c92ce 100644 --- a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSchemes @@ -50,12 +50,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - pcorr ; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/system/fvSchemes index f65b5bf39..5eab8e1c0 100644 --- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/system/fvSchemes @@ -52,12 +52,5 @@ snGradSchemes default limited corrected 0.33; } -fluxRequired -{ - default no; - pcorr ; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes index f65b5bf39..5eab8e1c0 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes @@ -52,12 +52,5 @@ snGradSchemes default limited corrected 0.33; } -fluxRequired -{ - default no; - pcorr ; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSchemes index 82d5997ca..a993ff41f 100644 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSchemes @@ -50,13 +50,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - pcorr ; - p; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/fvSchemes index da2c979ea..5db95f315 100644 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/fvSchemes @@ -50,12 +50,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes index f8bab393c..746184a64 100644 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes @@ -54,11 +54,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes b/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes index ff07884de..8e5d8a941 100644 --- a/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes @@ -52,11 +52,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes index ff07884de..8e5d8a941 100644 --- a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes @@ -52,11 +52,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes b/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes index 8973a7c1c..a7c834182 100644 --- a/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes @@ -51,12 +51,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes index 2e7d0a848..6cfc7e2e9 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes @@ -50,12 +50,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes b/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes index e72eaed33..f3462c0da 100644 --- a/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes @@ -61,11 +61,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes index 2c7ad38af..440b2b231 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes @@ -57,12 +57,6 @@ snGradSchemes default limited corrected 0.33; } -fluxRequired -{ - default no; - p; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes index 33a55391e..64721464c 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes @@ -52,13 +52,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p; - Phi; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes b/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes index 59c8e9867..f017d958d 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes @@ -48,11 +48,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes index 75f357060..2da8edf96 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes @@ -51,11 +51,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes b/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes index 9d066714d..886aa7a11 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes @@ -53,11 +53,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes index ff07884de..8e5d8a941 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes @@ -52,11 +52,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes b/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes index 930ef501a..e91f50966 100644 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes @@ -50,11 +50,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes index ee3301aea..55e113a10 100644 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes @@ -50,11 +50,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/fvSchemes b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/fvSchemes index ee3301aea..55e113a10 100644 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/fvSchemes +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/fvSchemes @@ -50,11 +50,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes index 82039ee1f..675ce090d 100644 --- a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes +++ b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes @@ -45,10 +45,5 @@ snGradSchemes default uncorrected; } -fluxRequired -{ - h; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes b/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes index 38d944924..50a72fd55 100644 --- a/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes @@ -48,12 +48,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes b/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes index 6a50ad98d..8fc98dfeb 100644 --- a/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes @@ -49,11 +49,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes b/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes index 81136adfa..816363a61 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes @@ -49,13 +49,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p; - Phi; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes b/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes index eff3e37ae..7707bb166 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes @@ -52,11 +52,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes b/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes index c91475d42..caf871a8b 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes @@ -52,12 +52,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes index 268cde63e..308b280e1 100644 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes @@ -52,11 +52,5 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/rotorDisk/system/fvSchemes b/tutorials/incompressible/simpleFoam/rotorDisk/system/fvSchemes index 2c41c0415..868870fe4 100644 --- a/tutorials/incompressible/simpleFoam/rotorDisk/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/rotorDisk/system/fvSchemes @@ -58,12 +58,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - wallDist { method meshWave; diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/system/fvSchemes b/tutorials/incompressible/simpleFoam/turbineSiting/system/fvSchemes index 445a2f3bd..1d67406c9 100644 --- a/tutorials/incompressible/simpleFoam/turbineSiting/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/turbineSiting/system/fvSchemes @@ -50,11 +50,5 @@ snGradSchemes default limited corrected 0.333; } -fluxRequired -{ - default no; - p; -} - // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/system/fvSchemes b/tutorials/incompressible/simpleFoam/windAroundBuildings/system/fvSchemes index 3a3dd154a..2075c248f 100644 --- a/tutorials/incompressible/simpleFoam/windAroundBuildings/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/system/fvSchemes @@ -57,12 +57,6 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - wallDist { method meshWave;