diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H index 7e84ef50fe..3e8a587768 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H @@ -7,6 +7,11 @@ if (pimple.nCorr() <= 1) phi = (fvc::interpolate(U) & mesh.Sf()); +if (ddtPhiCorr) +{ + phi += fvc::ddtPhiCorr(rAU, U, phi); +} + if (p.needReference()) { fvc::makeRelative(phi, U); diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/readControls.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/readControls.H index 8f48f5d7d4..2ad7f610f0 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/readControls.H +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/readControls.H @@ -8,3 +8,5 @@ const bool checkMeshCourantNo = pimpleDict.lookupOrDefault("checkMeshCourantNo", false); + const bool ddtPhiCorr = + pimpleDict.lookupOrDefault("ddtPhiCorr", true); diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C index 8e3500c9d6..1face6ddd5 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C @@ -58,6 +58,9 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + surfaceScalarField phiAbs("phiAbs", phi); + fvc::makeAbsolute(phiAbs, U); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -67,9 +70,6 @@ int main(int argc, char *argv[]) #include "alphaCourantNo.H" #include "CourantNo.H" - // Make the fluxes absolute - fvc::makeAbsolute(phi, U); - #include "setDeltaT.H" runTime++; @@ -78,8 +78,18 @@ int main(int argc, char *argv[]) scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); - // Do any mesh changes - mesh.update(); + { + // Calculate the relative velocity used to map the relative flux phi + volVectorField Urel("Urel", U); + + if (mesh.moving()) + { + Urel -= fvc::reconstruct(fvc::meshPhi(U)); + } + + // Do any mesh changes + mesh.update(); + } if (mesh.changing()) { @@ -96,9 +106,6 @@ int main(int argc, char *argv[]) #include "correctPhi.H" } - // Make the fluxes relative to the mesh motion - fvc::makeRelative(phi, U); - if (mesh.changing() && checkMeshCourantNo) { #include "meshCourantNo.H" diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H index 84c1fe45b6..4b90d99499 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H @@ -3,16 +3,19 @@ surfaceScalarField rAUf(fvc::interpolate(rAU)); U = rAU*UEqn.H(); - surfaceScalarField phiU("phiU", (fvc::interpolate(U) & mesh.Sf())); + + phiAbs = + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rAU, rho, U, phiAbs); if (p_rgh.needReference()) { - fvc::makeRelative(phiU, U); - adjustPhi(phiU, U, p_rgh); - fvc::makeAbsolute(phiU, U); + fvc::makeRelative(phiAbs, U); + adjustPhi(phiAbs, U, p_rgh); + fvc::makeAbsolute(phiAbs, U); } - phi = phiU + + phi = phiAbs + ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) @@ -38,11 +41,13 @@ } } - U += rAU*fvc::reconstruct((phi - phiU)/rAUf); + U += rAU*fvc::reconstruct((phi - phiAbs)/rAUf); U.correctBoundaryConditions(); #include "continuityErrs.H" + phiAbs = phi; + // Make the fluxes relative to the mesh motion fvc::makeRelative(phi, U); diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index f6214c8e62..0a085485f1 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -936,12 +936,6 @@ int main(int argc, char *argv[]) const word dictName (args.optionLookupOrDefault("dict", "extrudeToRegionMeshDict")); - mappedPatchBase::sampleMode sampleMode = mappedPatchBase::NEARESTPATCHFACE; - if (args.optionFound("AMI")) - { - sampleMode = mappedPatchBase::NEARESTPATCHFACEAMI; - } - IOdictionary dict ( IOobject @@ -966,6 +960,9 @@ int main(int argc, char *argv[]) dict.lookup("faceZonesShadow") >> zoneShadowNames; } + mappedPatchBase::sampleMode sampleMode = + mappedPatchBase::sampleModeNames_[dict.lookup("sampleMode")]; + const Switch oneD(dict.lookup("oneD")); const Switch adaptMesh(dict.lookup("adaptMesh")); diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMeshDict b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMeshDict index 7aa652fb79..b5f14db5d6 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMeshDict +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMeshDict @@ -15,10 +15,10 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Name of region to create -region liquidFilm; +region liquidFilm; // FaceZones to extrude -faceZones (f0); +faceZones (f0); // FaceZone shadow //faceZonesShadow (fBaffleShadow); @@ -30,10 +30,13 @@ faceZones (f0); // - extruding boundary faces: repatched to be on mapped patches // If false: leave original mesh intact. Extruded mesh will still have // mapped patch which might need to be adapted. -adaptMesh true; +adaptMesh true; + +// Sample mode for inter-region communication +sampleMode nearestPatchFace; // Extrude 1D-columns of cells? -oneD false; +oneD false; // If oneD is true. Specify which boundary is wanted between the layers //oneDPolyPatchType emptyPolyPatch; //wedgePolyPatch @@ -42,23 +45,23 @@ oneD false; //- Extrusion model to use. The only logical choice is linearNormal? //- Linear extrusion in normal direction -extrudeModel linearNormal; +extrudeModel linearNormal; //- Linear extrusion in specified direction -//extrudeModel linearDirection; +// extrudeModel linearDirection; //- Wedge extrusion. If nLayers is 1 assumes symmetry around plane. -// extrudeModel wedge; +// extrudeModel wedge; //- Extrudes into sphere around (0 0 0) -//extrudeModel linearRadial; +// extrudeModel linearRadial; //- Extrudes into sphere with grading according to pressure (atmospherics) -//extrudeModel sigmaRadial; +// extrudeModel sigmaRadial; -nLayers 10; +nLayers 10; -expansionRatio 0.9; +expansionRatio 0.9; linearNormalCoeffs { diff --git a/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.C b/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.C index a73a7bc4e6..c0720d90cb 100644 --- a/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.C +++ b/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.C @@ -40,7 +40,7 @@ Foam::Field Foam::interpolateSplineXY forAll(xNew, i) { - yNew[i] = interpolateSmoothXY(xNew[i], xOld, yOld); + yNew[i] = interpolateSplineXY(xNew[i], xOld, yOld); } return yNew; diff --git a/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C b/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C index 9eb89527f3..7c72beaf99 100644 --- a/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C +++ b/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C @@ -107,7 +107,7 @@ bool Foam::adjustPhi { massCorr = (massIn - fixedMassOut)/adjustableMassOut; } - else if (mag(fixedMassOut - massIn)/totalFlux > 1e-10) + else if (mag(fixedMassOut - massIn)/totalFlux > 1e-8) { FatalErrorIn ( diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C index 326adefd74..819f39ecfb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C @@ -114,20 +114,67 @@ void Foam::mappedFixedInternalValueFvPatchField::updateCoeffs() const mappedPatchBase& mpp = refCast(this->patch().patch()); const fvMesh& nbrMesh = refCast(mpp.sampleMesh()); - const label samplePatchI = mpp.samplePolyPatch().index(); - const fvPatch& nbrPatch = nbrMesh.boundary()[samplePatchI]; + Field nbrIntFld; - // Retrieve the neighbour field - const fvPatchField& nbrField = - nbrPatch.template lookupPatchField - ( - this->dimensionedInternalField().name() - ); + switch (mpp.mode()) + { + case mappedPatchBase::NEARESTCELL: + { + FatalErrorIn + ( + "void mappedFixedValueFvPatchField::updateCoeffs()" + ) << "Cannot apply " + << mappedPatchBase::sampleModeNames_ + [ + mappedPatchBase::NEARESTCELL + ] + << " mapping mode for patch " << this->patch().name() + << exit(FatalError); - // Retrieve the neighbour patch internal field - Field nbrIntFld(nbrField.patchInternalField()); - mpp.distribute(nbrIntFld); + break; + } + case mappedPatchBase::NEARESTPATCHFACE: + { + const label samplePatchI = mpp.samplePolyPatch().index(); + const fvPatchField& nbrPatchField = + this->sampleField().boundaryField()[samplePatchI]; + nbrIntFld = nbrPatchField.patchInternalField(); + mpp.distribute(nbrIntFld); + + break; + } + case mappedPatchBase::NEARESTFACE: + { + Field allValues(nbrMesh.nFaces(), pTraits::zero); + + const FieldType& nbrField = this->sampleField(); + + forAll(nbrField.boundaryField(), patchI) + { + const fvPatchField& pf = nbrField.boundaryField()[patchI]; + const Field pif(pf.patchInternalField()); + + label faceStart = pf.patch().start(); + + forAll(pf, faceI) + { + allValues[faceStart++] = pif[faceI]; + } + } + + mpp.distribute(allValues); + nbrIntFld.transfer(allValues); + + break; + } + default: + { + FatalErrorIn("mappedFixedValueFvPatchField::updateCoeffs()") + << "Unknown sampling mode: " << mpp.mode() + << abort(FatalError); + } + } // Restore tag UPstream::msgType() = oldTag; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H index b7838497e5..d60ae3bc3c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H @@ -71,7 +71,10 @@ class mappedFixedValueFvPatchField : public fixedValueFvPatchField { - // Private data + +protected: + + // Protected data //- Name of field to sample - defaults to field associated with this // patchField if not specified @@ -90,7 +93,7 @@ class mappedFixedValueFvPatchField mutable autoPtr > interpolator_; - // Private Member Functions + // Protected Member Functions //- Field to sample. Either on my or nbr mesh const GeometricField& sampleField() const; diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H index 3afb9d8c4b..68c432e97a 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H @@ -146,9 +146,9 @@ public: }; -private: +protected: - // Private data + // Protected data //- Patch to sample const polyPatch& patch_; @@ -199,7 +199,7 @@ private: dictionary surfDict_; - // Private Member Functions + // Protected Member Functions //- Collect single list of samples and originating processor+face. void collectSamples diff --git a/src/parallel/decompose/ptscotchDecomp/Make/options b/src/parallel/decompose/ptscotchDecomp/Make/options index ea5b0c3ad8..1e34631aa1 100644 --- a/src/parallel/decompose/ptscotchDecomp/Make/options +++ b/src/parallel/decompose/ptscotchDecomp/Make/options @@ -3,9 +3,10 @@ sinclude $(RULES)/mplib$(WM_MPLIB) EXE_INC = \ $(PFLAGS) $(PINC) \ + -I$(SCOTCH_ROOT)/include \ -I$(SCOTCH_ARCH_PATH)/include/$(FOAM_MPI) \ -I/usr/include/scotch \ -I../decompositionMethods/lnInclude LIB_LIBS = \ - -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lrt + -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lrt diff --git a/src/parallel/decompose/scotchDecomp/Make/options b/src/parallel/decompose/scotchDecomp/Make/options index b2f7015e24..3bb11fba5c 100644 --- a/src/parallel/decompose/scotchDecomp/Make/options +++ b/src/parallel/decompose/scotchDecomp/Make/options @@ -7,9 +7,10 @@ sinclude $(RULES)/mplib$(WM_MPLIB) EXE_INC = \ $(PFLAGS) $(PINC) \ + -I$(SCOTCH_ROOT)/include \ -I$(SCOTCH_ARCH_PATH)/include \ -I/usr/include/scotch \ -I../decompositionMethods/lnInclude LIB_LIBS = \ - -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt + -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerTemplates.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerTemplates.C index d2bf7306d1..4076a8494a 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerTemplates.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerTemplates.C @@ -1,77 +1,77 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "kinematicSingleLayer.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace regionModels -{ -namespace surfaceFilmModels -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -template -void kinematicSingleLayer::constrainFilmField -( - Type& field, - const typename Type::cmptType& value -) -{ - forAll(intCoupledPatchIDs_, i) - { - label patchI = intCoupledPatchIDs_[i]; - field.boundaryField()[patchI] = value; - if (debug) - { - Info<< "Constraining " << field.name() - << " boundary " << field.boundaryField()[patchI].patch().name() - << " to " << value << endl; - } - } - forAll(passivePatchIDs_, i) - { - label patchI = passivePatchIDs_[i]; - field.boundaryField()[patchI] = value; - if (debug) - { - Info<< "Constraining " << field.name() - << " boundary " << field.boundaryField()[patchI].patch().name() - << " to " << value << endl; - } - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // end namespace Foam -} // end namespace regionModels -} // end namespace surfaceFilmModels - -// ************************************************************************* // + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "kinematicSingleLayer.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace regionModels +{ +namespace surfaceFilmModels +{ + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template +void kinematicSingleLayer::constrainFilmField +( + Type& field, + const typename Type::cmptType& value +) +{ + forAll(intCoupledPatchIDs_, i) + { + label patchI = intCoupledPatchIDs_[i]; + field.boundaryField()[patchI] = value; + if (debug) + { + Info<< "Constraining " << field.name() + << " boundary " << field.boundaryField()[patchI].patch().name() + << " to " << value << endl; + } + } + forAll(passivePatchIDs_, i) + { + label patchI = passivePatchIDs_[i]; + field.boundaryField()[patchI] = value; + if (debug) + { + Info<< "Constraining " << field.name() + << " boundary " << field.boundaryField()[patchI].patch().name() + << " to " << value << endl; + } + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // end namespace Foam +} // end namespace regionModels +} // end namespace surfaceFilmModels + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C index 5f28777553..73b89be91d 100644 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "nuSgsUSpaldingWallFunctionFvPatchScalarField.H" +#include "LESModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -47,8 +48,6 @@ nuSgsUSpaldingWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - UName_("U"), - nuName_("nu"), kappa_(0.41), E_(9.8) {} @@ -64,8 +63,6 @@ nuSgsUSpaldingWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(ptf, p, iF, mapper), - UName_(ptf.UName_), - nuName_(ptf.nuName_), kappa_(ptf.kappa_), E_(ptf.E_) {} @@ -80,8 +77,6 @@ nuSgsUSpaldingWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - UName_(dict.lookupOrDefault("U", "U")), - nuName_(dict.lookupOrDefault("nu", "nu")), kappa_(dict.lookupOrDefault("kappa", 0.41)), E_(dict.lookupOrDefault("E", 9.8)) {} @@ -94,8 +89,6 @@ nuSgsUSpaldingWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(nwfpsf), - UName_(nwfpsf.UName_), - nuName_(nwfpsf.nuName_), kappa_(nwfpsf.kappa_), E_(nwfpsf.E_) {} @@ -109,8 +102,6 @@ nuSgsUSpaldingWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(nwfpsf, iF), - UName_(nwfpsf.UName_), - nuName_(nwfpsf.nuName_), kappa_(nwfpsf.kappa_), E_(nwfpsf.E_) {} @@ -123,16 +114,15 @@ void nuSgsUSpaldingWallFunctionFvPatchScalarField::evaluate const Pstream::commsTypes ) { + const LESModel& lesModel = db().lookupObject("LESProperties"); + const label patchi = patch().index(); + const fvPatchVectorField& U = lesModel.U().boundaryField()[patchi]; + const scalarField nuw = lesModel.nu()().boundaryField()[patchi]; + const scalarField& ry = patch().deltaCoeffs(); - const fvPatchVectorField& U = - patch().lookupPatchField(UName_); - const scalarField magUp(mag(U.patchInternalField() - U)); - const scalarField& nuw = - patch().lookupPatchField(nuName_); - scalarField& nuSgsw = *this; const scalarField magFaceGradU(mag(U.snGrad())); @@ -185,8 +175,6 @@ void nuSgsUSpaldingWallFunctionFvPatchScalarField::evaluate void nuSgsUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); - writeEntryIfDifferent(os, "U", "U", UName_); - writeEntryIfDifferent(os, "nu", "nu", nuName_); os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; writeEntry("value", os); @@ -201,6 +189,7 @@ makePatchTypeField nuSgsUSpaldingWallFunctionFvPatchScalarField ); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace LESModels diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.H index 1ebccdc8ca..11de1fb06f 100644 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.H @@ -58,12 +58,6 @@ class nuSgsUSpaldingWallFunctionFvPatchScalarField { // Private data - //- Name of velocity field - word UName_; - - //- Name of laminar viscosity field - word nuName_; - //- Von Karman constant scalar kappa_; diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/extrudeToRegionMeshDict b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/extrudeToRegionMeshDict index da254a0470..424d9deb69 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/extrudeToRegionMeshDict +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/extrudeToRegionMeshDict @@ -20,6 +20,8 @@ faceZones (fRight_zone fLeft_zone); oneD true; +sampleMode nearestPatchFace; + oneDPolyPatchType emptyPolyPatch; //wedgePolyPatch extrudeModel linearNormal; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/extrudeToRegionMeshDict b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/extrudeToRegionMeshDict index 92b3f984e1..8917dc6019 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/extrudeToRegionMeshDict +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/extrudeToRegionMeshDict @@ -18,6 +18,8 @@ region wallFilmRegion; faceZones (wallFilmFaces); +sampleMode nearestPatchFace; + oneD false; extrudeModel linearNormal; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/extrudeToRegionMeshDict b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/extrudeToRegionMeshDict index 35ce583303..6cfa8d6cb0 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/extrudeToRegionMeshDict +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/extrudeToRegionMeshDict @@ -24,6 +24,8 @@ faceZones oneD false; +sampleMode nearestPatchFace; + extrudeModel linearNormal; nLayers 1; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/extrudeToRegionMeshDict b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/extrudeToRegionMeshDict index 92b3f984e1..c207619060 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/extrudeToRegionMeshDict +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/extrudeToRegionMeshDict @@ -20,6 +20,8 @@ faceZones (wallFilmFaces); oneD false; +sampleMode nearestPatchFace; + extrudeModel linearNormal; nLayers 1; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/extrudeToRegionMeshDict b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/extrudeToRegionMeshDict index 92b3f984e1..c207619060 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/extrudeToRegionMeshDict +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/extrudeToRegionMeshDict @@ -20,6 +20,8 @@ faceZones (wallFilmFaces); oneD false; +sampleMode nearestPatchFace; + extrudeModel linearNormal; nLayers 1; diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict index 105d0818dd..64223ec7b8 100644 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict @@ -39,7 +39,9 @@ dynamicRefineFvMeshCoeffs // on surfaceScalarFields that do not need to be reinterpolated. correctFluxes ( - (phi U) + (phi Urel) + (phiAbs U) + (phiAbs_0 U_0) (nHatf none) (rho*phi none) (ghf none)