diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index b25fd944c5..8e340a7e16 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -87,7 +87,7 @@ forAll(Y, i) { Y[i] = Y0[i]; - h0 += Y0[i]*specieData[i].Hs(p[i], T0); + h0 += Y0[i]*specieData[i].Hs(p[0], T0); } thermo.he() = dimensionedScalar("h", dimEnergy/dimMass, h0); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options index 365e64d1b1..ca2936633a 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options @@ -1,5 +1,8 @@ EXE_INC = \ -I../buoyantBoussinesqSimpleFoam \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ @@ -9,6 +12,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lfvOptions \ + -lsampling \ -lmeshTools \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H index 65c92dab51..76b0ef0168 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H @@ -11,12 +11,18 @@ - fvm::laplacian(alphaEff, T) == radiation->ST(rhoCpRef, T) + + fvOptions(T) ); TEqn.relax(); + + fvOptions.constrain(TEqn); + TEqn.solve(); radiation->correct(); + fvOptions.correct(T); + rhok = 1.0 - beta*(T - TRef); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H index 07f46ec998..92768088b9 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H @@ -5,10 +5,14 @@ fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U) + == + fvOptions(U) ); UEqn.relax(); + fvOptions.constrain(UEqn); + if (pimple.momentumPredictor()) { solve @@ -23,4 +27,6 @@ )*mesh.magSf() ) ); + + fvOptions.correct(U); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C index 65dda0653e..6168082e1d 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C @@ -48,8 +48,9 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "RASModel.H" -#include "pimpleControl.H" #include "radiationModel.H" +#include "fvIOoptionList.H" +#include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,6 +62,7 @@ int main(int argc, char *argv[]) #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createIncompressibleRadiationModel.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "CourantNo.H" diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options index 6905967f04..6a6311e47c 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options @@ -1,5 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ -I$(LIB_SRC)/transportModels \ @@ -7,7 +10,9 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lsampling \ -lmeshTools \ + -lfvOptions \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleTransportModels diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H index a0c5d24b2b..c495e58285 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H @@ -8,10 +8,17 @@ ( fvm::div(phi, T) - fvm::laplacian(alphaEff, T) + == + fvOptions(T) ); TEqn.relax(); + + fvOptions.constrain(TEqn); + TEqn.solve(); + fvOptions.correct(T); + rhok = 1.0 - beta*(T - TRef); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H index cbe464fc02..dd516edf2f 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H @@ -4,16 +4,20 @@ ( fvm::div(phi, U) + turbulence->divDevReff(U) + == + fvOptions(U) ); UEqn().relax(); + fvOptions.constrain(UEqn()); + if (simple.momentumPredictor()) { solve ( UEqn() - == + == fvc::reconstruct ( ( @@ -22,4 +26,6 @@ )*mesh.magSf() ) ); + + fvOptions.correct(U); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C index 4fc37efd28..b0d2f98aeb 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C @@ -48,6 +48,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "RASModel.H" +#include "fvIOoptionList.H" #include "simpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -59,6 +60,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" simpleControl simple(mesh); diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C index 277ed8caf2..2370c16ba3 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C @@ -254,31 +254,47 @@ void Foam::DistributedDelaunayMesh::findProcessorBoundaryCells /Pstream::nProcs() ); + std::list infinite_cells; + Triangulation::incident_cells + ( + Triangulation::infinite_vertex(), + std::back_inserter(infinite_cells) + ); + for ( - All_cells_iterator cit = Triangulation::all_cells_begin(); - cit != Triangulation::all_cells_end(); + typename std::list::iterator vcit = infinite_cells.begin(); + vcit != infinite_cells.end(); + ++vcit + ) + { + Cell_handle cit = *vcit; + + // Index of infinite vertex in this cell. + int i = cit->index(Triangulation::infinite_vertex()); + + Cell_handle c = cit->neighbor(i); + + if (c->unassigned()) + { + c->cellIndex() = this->getNewCellIndex(); + + if (checkProcBoundaryCell(c, circumsphereOverlaps)) + { + cellToCheck.insert(c->cellIndex()); + } + } + } + + + for + ( + Finite_cells_iterator cit = Triangulation::finite_cells_begin(); + cit != Triangulation::finite_cells_end(); ++cit ) { - if (Triangulation::is_infinite(cit)) - { - // Index of infinite vertex in this cell. - int i = cit->index(Triangulation::infinite_vertex()); - - Cell_handle c = cit->neighbor(i); - - if (c->unassigned()) - { - c->cellIndex() = this->getNewCellIndex(); - - if (checkProcBoundaryCell(c, circumsphereOverlaps)) - { - cellToCheck.insert(c->cellIndex()); - } - } - } - else if (cit->parallelDualVertex()) + if (cit->parallelDualVertex()) { if (cit->unassigned()) { @@ -315,12 +331,20 @@ void Foam::DistributedDelaunayMesh::findProcessorBoundaryCells continue; } - checkProcBoundaryCell + if ( - citNeighbor, - circumsphereOverlaps - ); + checkProcBoundaryCell + ( + citNeighbor, + circumsphereOverlaps + ) + ) + { + cellToCheck.insert(citNeighbor->cellIndex()); + } } + + cellToCheck.unset(cit->cellIndex()); } } } @@ -521,7 +545,6 @@ Foam::label Foam::DistributedDelaunayMesh::referVertices << originalParallelVertices[vI].procIndex() << " " << originalParallelVertices[vI].index() << endl; } - } } } diff --git a/applications/utilities/postProcessing/velocityField/Pe/Pe.C b/applications/utilities/postProcessing/velocityField/Pe/Pe.C index 0c4f61729c..544a116921 100644 --- a/applications/utilities/postProcessing/velocityField/Pe/Pe.C +++ b/applications/utilities/postProcessing/velocityField/Pe/Pe.C @@ -130,7 +130,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) mesh.magSf() * mesh.surfaceInterpolation::deltaCoeffs() * fvc::interpolate(RASModel->nuEff()) - ) + ) ) ); } @@ -192,8 +192,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) mesh, IOobject::NO_READ ), - mesh.surfaceInterpolation::deltaCoeffs() - * (mag(phi)/mesh.magSf())*(runTime.deltaT()/nu) + mag(phi) + /( + mesh.magSf() + * mesh.surfaceInterpolation::deltaCoeffs() + * nu + ) ) ); } @@ -317,8 +321,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) mesh, IOobject::NO_READ ), - mesh.surfaceInterpolation::deltaCoeffs() - * (mag(phi)/(mesh.magSf()))*(runTime.deltaT()/mu) + mag(phi) + /( + mesh.magSf() + * mesh.surfaceInterpolation::deltaCoeffs() + * mu + ) ) ); } @@ -330,26 +338,6 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) << abort(FatalError); } - - // can also check how many cells exceed a particular Pe limit - /* - { - label count = 0; - label PeLimit = 200; - forAll(PePtr(), i) - { - if (PePtr()[i] > PeLimit) - { - count++; - } - - } - - Info<< "Fraction > " << PeLimit << " = " - << scalar(count)/Pe.size() << endl; - } - */ - Info<< "Pe max : " << max(PePtr()).value() << endl; if (writeResults) diff --git a/etc/caseDicts/foamyHexMeshDict b/etc/caseDicts/foamyHexMeshDict index d6f87bf6a3..cd0c9367a3 100644 --- a/etc/caseDicts/foamyHexMeshDict +++ b/etc/caseDicts/foamyHexMeshDict @@ -78,6 +78,7 @@ motionControl objOutput no; timeChecks no; + printVertexInfo off; maxLoadUnbalance 0.2; diff --git a/src/OpenFOAM/memory/autoPtr/autoPtr.H b/src/OpenFOAM/memory/autoPtr/autoPtr.H index 0d5944128e..c3ea064fb1 100644 --- a/src/OpenFOAM/memory/autoPtr/autoPtr.H +++ b/src/OpenFOAM/memory/autoPtr/autoPtr.H @@ -63,11 +63,11 @@ public: //- Store object pointer inline explicit autoPtr(T* = 0); - //- Construct as copy by transfering pointer to this autoPtr and + //- Construct as copy by transferring pointer to this autoPtr and // setting the arguments pointer to NULL inline autoPtr(const autoPtr&); - //- Construct either by transfering pointer or cloning. Should + //- Construct either by transferring pointer or cloning. Should // only be called with type that supports cloning. inline autoPtr(const autoPtr&, const bool reUse); diff --git a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C index 738f87d0a8..81d722a57b 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C @@ -88,7 +88,17 @@ Foam::porosityModel::porosityModel const word& cellZoneName ) : - MeshObject(mesh), + regIOobject + ( + IOobject + ( + name, + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ) + ), name_(name), mesh_(mesh), dict_(dict), diff --git a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H index 36a5a9eafb..06df0bfdae 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H +++ b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H @@ -36,7 +36,6 @@ SourceFiles #ifndef porosityModel_H #define porosityModel_H -#include "MeshObject.H" #include "fvMesh.H" #include "dictionary.H" #include "fvMatricesFwd.H" @@ -56,7 +55,7 @@ namespace Foam class porosityModel : - public MeshObject + public regIOobject { private: diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C index 108109702b..bc4bf5ee88 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C @@ -76,7 +76,7 @@ tmp laminar::Us() const ( IOobject ( - typeName + ".Us", + typeName + ":Us", owner_.regionMesh().time().timeName(), owner_.regionMesh(), IOobject::NO_READ, @@ -104,7 +104,7 @@ tmp laminar::mut() const ( IOobject ( - typeName + ".mut", + typeName + ":mut", owner_.regionMesh().time().timeName(), owner_.regionMesh(), IOobject::NO_READ, diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C index 4a08755ee3..8b0a0c5f16 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,8 +26,6 @@ License #include "standardPhaseChange.H" #include "addToRunTimeSelectionTable.H" #include "thermoSingleLayer.H" -#include "specie.H" -#include "heatTransferModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 5e78e48c97..90915d25eb 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -141,7 +141,7 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() forAll(epsilonPatches, i) { label patchI = epsilonPatches[i]; - const fvPatchField& wf = weights.boundaryField()[patchI]; + const fvPatchScalarField& wf = weights.boundaryField()[patchI]; cornerWeights_[patchI] = 1.0/wf.patchInternalField(); } @@ -237,9 +237,9 @@ void epsilonWallFunctionFvPatchScalarField::calculate scalar w = cornerWeights[faceI]; - epsilon[cellI] = w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]); + epsilon[cellI] += w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]); - G[cellI] = + G[cellI] += w *(mutw[faceI] + muw[faceI]) *magGradUw[faceI] @@ -464,6 +464,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs FieldType& epsilon = const_cast(dimensionedInternalField()); + scalarField& epsilonf = *this; + // only set the values if the weights are < 1 - tolerance forAll(weights, faceI) { @@ -475,6 +477,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI]; + epsilonf[faceI] = epsilon[cellI]; } } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index fff165e15e..d0d9865c5c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -143,7 +143,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights() forAll(omegaPatches, i) { label patchI = omegaPatches[i]; - const fvPatchField& wf = weights.boundaryField()[patchI]; + const fvPatchScalarField& wf = weights.boundaryField()[patchI]; cornerWeights_[patchI] = 1.0/wf.patchInternalField(); } @@ -244,9 +244,9 @@ void omegaWallFunctionFvPatchScalarField::calculate scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]); - omega[cellI] = w*sqrt(sqr(omegaVis) + sqr(omegaLog)); + omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog)); - G[cellI] = + G[cellI] += w *(mutw[faceI] + muw[faceI]) *magGradUw[faceI] @@ -481,6 +481,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs FieldType& omega = const_cast(dimensionedInternalField()); + scalarField& omegaf = *this; + // only set the values if the weights are < 1 - tolerance forAll(weights, faceI) { @@ -492,6 +494,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI]; + omegaf[faceI] = omega[cellI]; } } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 7fb6fcfb96..da2913f304 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -141,7 +141,7 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() forAll(epsilonPatches, i) { label patchI = epsilonPatches[i]; - const fvPatchField& wf = weights.boundaryField()[patchI]; + const fvPatchScalarField& wf = weights.boundaryField()[patchI]; cornerWeights_[patchI] = 1.0/wf.patchInternalField(); } @@ -464,6 +464,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs FieldType& epsilon = const_cast(dimensionedInternalField()); + scalarField& epsilonf = *this; + // only set the values if the weights are < 1 - tolerance forAll(weights, faceI) { @@ -475,6 +477,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI]; + epsilonf[faceI] = epsilon[cellI]; } } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 554c18542d..9aec38bc38 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -143,7 +143,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights() forAll(omegaPatches, i) { label patchI = omegaPatches[i]; - const fvPatchField& wf = weights.boundaryField()[patchI]; + const fvPatchScalarField& wf = weights.boundaryField()[patchI]; cornerWeights_[patchI] = 1.0/wf.patchInternalField(); } @@ -242,9 +242,9 @@ void omegaWallFunctionFvPatchScalarField::calculate scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]); - omega[cellI] = w*sqrt(sqr(omegaVis) + sqr(omegaLog)); + omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog)); - G[cellI] = + G[cellI] += w *(nutw[faceI] + nuw[faceI]) *magGradUw[faceI] @@ -479,6 +479,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs FieldType& omega = const_cast(dimensionedInternalField()); + scalarField& omegaf = *this; + // only set the values if the weights are < 1 - tolerance forAll(weights, faceI) { @@ -490,6 +492,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI]; + omegaf[faceI] = omega[cellI]; } } diff --git a/wmake/wmake b/wmake/wmake index ebcd38cb6e..b9977fa7e1 100755 --- a/wmake/wmake +++ b/wmake/wmake @@ -50,6 +50,7 @@ The 'target' is a Makefile target: e.g., Make/linux64GccDPOpt/fvMesh.o or a special target: + dwim search up directories tree for Make sub-directory and build all all subdirectories, uses any Allwmake files if they exist exe build statically linked executable lib build statically linked archive lib (.a) @@ -136,7 +137,7 @@ fi #------------------------------------------------------------------------------ -# check arguments and change to the directory in which to run wmake +# Check arguments and change to the directory in which to run wmake #------------------------------------------------------------------------------ unset dir makeType @@ -167,6 +168,51 @@ then fi +#------------------------------------------------------------------------------ +# Search up directories tree for the Make sub-directory and build there +#------------------------------------------------------------------------------ + +unset dir +MakeDir=Make + +expandpath() +{ + dir=`dirname $1` + cwd=$PWD + cd $dir + exPath=$PWD + cd $cwd +} + +find_target() +{ + expandpath $1 + + if [ "$exPath" = "$WM_PROJECT_DIR" -o "$exPath" = "$HOME" -o "$exPath" = "/" ]; then + echo "$Script error: could not find Make directory" + elif [ -d "$1/Make" ]; then + echo Target $1 + dir=$1 + else + find_target "$1/.." + fi +} + +if [ "$makeType" = dwim ] +then + find_target . + makeType= + + if [ "$dir" ] + then + cd $dir 2>/dev/null || { + echo "$Script error: could not change to directory '$dir'" 1>&2 + exit 1 + } + fi +fi + + #------------------------------------------------------------------------------ # Recurse the application directories tree #------------------------------------------------------------------------------ @@ -254,8 +300,9 @@ $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontInc rc=$? [ $rc -eq 0 ] || exit $rc + #------------------------------------------------------------------------------ -# make the object files and link +# Make the object files and link #------------------------------------------------------------------------------ cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType"