diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options b/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options index e679c15b7e..1ff1aaa612 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options @@ -18,7 +18,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -40,4 +41,5 @@ EXE_LIBS = \ -lchemistryModel \ -lradiationModels \ -lODE \ + -lregionModels \ -lsurfaceFilmModels diff --git a/applications/solvers/lagrangian/coalChemistryFoam/Make/options b/applications/solvers/lagrangian/coalChemistryFoam/Make/options index a2e3c13d24..ab0bd2c08a 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/Make/options +++ b/applications/solvers/lagrangian/coalChemistryFoam/Make/options @@ -17,7 +17,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude EXE_LIBS = \ @@ -40,5 +41,6 @@ EXE_LIBS = \ -lSLGThermo \ -lchemistryModel \ -lradiationModels \ + -lregionModels \ -lsurfaceFilmModels \ -lODE diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options index 7b471b791a..f7bb7d2f2d 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options @@ -11,7 +11,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude @@ -28,6 +29,7 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ + -lregionModels \ -lsurfaceFilmModels \ -ldynamicMesh \ -ldynamicFvMesh \ diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options index 5e7b8b3518..1de2ec74de 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options @@ -10,7 +10,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ EXE_LIBS = \ -llagrangian \ @@ -24,4 +25,5 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ + -lregionModels \ -lsurfaceFilmModels diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options index e679c15b7e..1ff1aaa612 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options @@ -18,7 +18,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -40,4 +41,5 @@ EXE_LIBS = \ -lchemistryModel \ -lradiationModels \ -lODE \ + -lregionModels \ -lsurfaceFilmModels diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options index ba7c9544a8..1efc598b5b 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options @@ -14,7 +14,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude @@ -32,6 +33,7 @@ EXE_LIBS = \ -lreactionThermophysicalModels \ -lSLGThermo \ -lchemistryModel \ + -lregionModels \ -lradiationModels \ -lsurfaceFilmModels \ -llagrangianIntermediate \ diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createSurfaceFilmModel.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createSurfaceFilmModel.H index 15046e3d49..1db870f0aa 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createSurfaceFilmModel.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createSurfaceFilmModel.H @@ -1,6 +1,7 @@ Info<< "\nConstructing surface film model" << endl; -autoPtr - tsurfaceFilm(surfaceFilmModels::surfaceFilmModel::New(mesh, g)); -surfaceFilmModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm(); +typedef regionModels::surfaceFilmModels::surfaceFilmModel filmModelType; + +autoPtr tsurfaceFilm(filmModelType::New(mesh, g)); +filmModelType& surfaceFilm = tsurfaceFilm(); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/Make/options index 062f9fbd28..fb54b88e26 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/options @@ -17,7 +17,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -39,4 +40,5 @@ EXE_LIBS = \ -lchemistryModel \ -lradiationModels \ -lODE \ + -lregionModels \ -lsurfaceFilmModels diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options index 5d6abe8613..d302015a31 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options @@ -8,7 +8,8 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude EXE_LIBS = \ -llagrangian \ @@ -22,4 +23,5 @@ EXE_LIBS = \ -lcompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ + -lregionModels \ -lsurfaceFilmModels diff --git a/applications/utilities/surface/surfaceInertia/surfaceInertia.C b/applications/utilities/surface/surfaceInertia/surfaceInertia.C index 01a9478866..42663b39fe 100644 --- a/applications/utilities/surface/surfaceInertia/surfaceInertia.C +++ b/applications/utilities/surface/surfaceInertia/surfaceInertia.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/Allwmake b/src/Allwmake index 2013e4b0de..b1bbcea809 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -60,7 +60,7 @@ wmake $makeType randomProcesses thermophysicalModels/Allwmake $* transportModels/Allwmake $* turbulenceModels/Allwmake $* -wmake $makeType surfaceFilmModels +regionModels/Allwmake $* lagrangian/Allwmake $* postProcessing/Allwmake $* mesh/Allwmake $* diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index a885d79c84..191544d7d6 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -114,8 +114,10 @@ derivedFvPatchFields = $(fvPatchFields)/derived $(derivedFvPatchFields)/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C $(derivedFvPatchFields)/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C $(derivedFvPatchFields)/advective/advectiveFvPatchFields.C - $(derivedFvPatchFields)/codedFixedValue/codedFixedValueFvPatchScalarField.C +$(derivedFvPatchFields)/directMappedField/directMappedFieldFvPatchFields.C +$(derivedFvPatchFields)/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C +$(derivedFvPatchFields)/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C $(derivedFvPatchFields)/directMappedFixedValue/directMappedFixedValueFvPatchFields.C $(derivedFvPatchFields)/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C $(derivedFvPatchFields)/fan/fanFvPatchFields.C diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchField.C new file mode 100644 index 0000000000..f540d59bf4 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchField.C @@ -0,0 +1,313 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. + \\/ 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 "directMappedFieldFvPatchField.H" + +#include "volFields.H" +#include "interpolationCell.H" +#include "mapDistribute.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +directMappedFieldFvPatchField::directMappedFieldFvPatchField +( + const fvPatch& p, + const DimensionedField& iF +) +: + directMappedPatchBase(p.patch()), + fixedValueFvPatchField(p, iF), + fieldName_(iF.name()), + setAverage_(false), + average_(pTraits::zero) +{} + + +template +directMappedFieldFvPatchField::directMappedFieldFvPatchField +( + const directMappedFieldFvPatchField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + directMappedPatchBase(p.patch(), ptf), + fixedValueFvPatchField(ptf, p, iF, mapper), + fieldName_(ptf.fieldName_), + setAverage_(ptf.setAverage_), + average_(ptf.average_) +{} + + +template +directMappedFieldFvPatchField::directMappedFieldFvPatchField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + directMappedPatchBase(p.patch(), dict), + fixedValueFvPatchField(p, iF, dict), + fieldName_(dict.template lookupOrDefault("fieldName", iF.name())), + setAverage_(readBool(dict.lookup("setAverage"))), + average_(pTraits(dict.lookup("average"))) +{} + + +template +directMappedFieldFvPatchField::directMappedFieldFvPatchField +( + const fvPatch& p, + const DimensionedField& iF, + + // directMappedPatchBase + const word& sampleRegion, + const sampleMode sampleMode, + const word& samplePatch, + const scalar distance, + + // My settings + const word& fieldName, + const bool setAverage, + const Type average +) +: + directMappedPatchBase + ( + p.patch(), + sampleRegion, + sampleMode, + samplePatch, + distance + ), + fixedValueFvPatchField(p, iF), + fieldName_(fieldName), + setAverage_(setAverage), + average_(average) +{} + + +template +directMappedFieldFvPatchField::directMappedFieldFvPatchField +( + const directMappedFieldFvPatchField& ptf +) +: + directMappedPatchBase(ptf.patch().patch(), ptf), + fixedValueFvPatchField(ptf), + fieldName_(ptf.fieldName_), + setAverage_(ptf.setAverage_), + average_(ptf.average_) +{} + + +template +directMappedFieldFvPatchField::directMappedFieldFvPatchField +( + const directMappedFieldFvPatchField& ptf, + const DimensionedField& iF +) +: + directMappedPatchBase(ptf.patch().patch(), ptf), + fixedValueFvPatchField(ptf, iF), + fieldName_(ptf.fieldName_), + setAverage_(ptf.setAverage_), + average_(ptf.average_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +const GeometricField& +directMappedFieldFvPatchField::sampleField() const +{ + typedef GeometricField fieldType; + + const fvMesh& nbrMesh = refCast(sampleMesh()); + + if (sameRegion()) + { + if (fieldName_ == this->dimensionedInternalField().name()) + { + // Optimisation: bypass field lookup + return + dynamic_cast + ( + this->dimensionedInternalField() + ); + } + else + { + const fvMesh& thisMesh = this->patch().boundaryMesh().mesh(); + return thisMesh.template lookupObject(fieldName_); + } + } + else + { + return nbrMesh.template lookupObject(fieldName_); + } +} + + +template +void directMappedFieldFvPatchField::updateCoeffs() +{ + if (this->updated()) + { + return; + } + + typedef GeometricField fieldType; + + const fvMesh& nbrMesh = refCast(sampleMesh()); + const mapDistribute& distMap = directMappedPatchBase::map(); + + // Result of obtaining remote values + Field newValues; + + switch (mode()) + { + case NEARESTCELL: + { + newValues = sampleField(); + + distMap.distribute(newValues); + + break; + } + case NEARESTPATCHFACE: + { + const label nbrPatchID = nbrMesh.boundaryMesh().findPatchID + ( + samplePatch() + ); + if (nbrPatchID < 0) + { + FatalErrorIn + ( + "void directMappedFieldFvPatchField::updateCoeffs()" + )<< "Unable to find sample patch " << samplePatch() + << " in region " << sampleRegion() + << " for patch " << this->patch().name() << nl + << abort(FatalError); + } + + const fieldType& nbrField = sampleField(); + + newValues = nbrField.boundaryField()[nbrPatchID]; + distMap.distribute(newValues); + + break; + } + case NEARESTFACE: + { + Field allValues(nbrMesh.nFaces(), pTraits::zero); + + const fieldType& nbrField = sampleField(); + + forAll(nbrField.boundaryField(), patchI) + { + const fvPatchField& pf = + nbrField.boundaryField()[patchI]; + label faceStart = pf.patch().patch().start(); + + forAll(pf, faceI) + { + allValues[faceStart++] = pf[faceI]; + } + } + + distMap.distribute(allValues); + + newValues.transfer(allValues); + + break; + } + default: + { + FatalErrorIn("directMappedFieldFvPatchField::updateCoeffs()") + << "Unknown sampling mode: " << mode() + << nl << abort(FatalError); + } + } + + if (setAverage_) + { + Type averagePsi = + gSum(this->patch().magSf()*newValues) + /gSum(this->patch().magSf()); + + if (mag(averagePsi)/mag(average_) > 0.5) + { + newValues *= mag(average_)/mag(averagePsi); + } + else + { + newValues += (average_ - averagePsi); + } + } + + this->operator==(newValues); + + if (debug) + { + Info<< "operating on field:" << this->dimensionedInternalField().name() + << " patch:" << this->patch().name() + << " avg:" << gAverage(*this) + << " min:" << gMin(*this) + << " max:" << gMax(*this) + << endl; + } + + fixedValueFvPatchField::updateCoeffs(); +} + + +template +void directMappedFieldFvPatchField::write(Ostream& os) const +{ + fvPatchField::write(os); + directMappedPatchBase::write(os); + os.writeKeyword("fieldName") << fieldName_ << token::END_STATEMENT << nl; + os.writeKeyword("setAverage") << setAverage_ << token::END_STATEMENT << nl; + os.writeKeyword("average") << average_ << token::END_STATEMENT << nl; + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchField.H new file mode 100644 index 0000000000..27e3160343 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchField.H @@ -0,0 +1,201 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. + \\/ 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 . + +Class + Foam::directMappedFieldFvPatchField + +Description + Self-contained version of directMapped. Does not use information on + patch, instead holds it locally (and possibly duplicate) so use + normal directMapped in preference and only use this if you cannot + change the underlying patch type to directMapped. + +SourceFiles + directMappedFieldFvPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef directMappedFieldFvPatchField_H +#define directMappedFieldFvPatchField_H + +#include "directMappedPatchBase.H" +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class directMappedFieldFvPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template +class directMappedFieldFvPatchField +: + public directMappedPatchBase, + public fixedValueFvPatchField +{ + // Private data + + //- Name of field to sample - defaults to field associated with this + // patchField if not specified + word fieldName_; + + //- If true adjust the mapped field to maintain average value average_ + const bool setAverage_; + + //- Average value the mapped field is adjusted to maintain if + // setAverage_ is set true + const Type average_; + + + // Private Member Functions + + //- Field to sample. Either on my or nbr mesh + const GeometricField& sampleField() const; + + +public: + + //- Runtime type information + TypeName("directMappedField"); + + + // Constructors + + //- Construct from patch and internal field + directMappedFieldFvPatchField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + directMappedFieldFvPatchField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct from patch, internal field and distance for normal type + // sampling + directMappedFieldFvPatchField + ( + const fvPatch&, + const DimensionedField&, + + // directMappedPatchBase + const word& sampleRegion, + const sampleMode sampleMode, + const word& samplePatch, + const scalar distance, + + // My settings + const word& fieldName, + const bool setAverage, + const Type average + ); + + //- Construct by mapping given + // directMappedFieldFvPatchField + // onto a new patch + directMappedFieldFvPatchField + ( + const directMappedFieldFvPatchField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + directMappedFieldFvPatchField + ( + const directMappedFieldFvPatchField& + ); + + //- Construct and return a clone + virtual tmp > clone() const + { + return tmp > + ( + new directMappedFieldFvPatchField + ( + *this + ) + ); + } + + //- Construct as copy setting internal field reference + directMappedFieldFvPatchField + ( + const directMappedFieldFvPatchField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp > clone + ( + const DimensionedField& iF + ) const + { + return tmp > + ( + new directMappedFieldFvPatchField + ( + *this, + iF + ) + ); + } + + + // Member functions + + // Evaluation functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "directMappedFieldFvPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelI.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchFields.C similarity index 75% rename from src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelI.H rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchFields.C index c9a99ffe29..085b058c71 100644 --- a/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelI.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,22 +23,21 @@ License \*---------------------------------------------------------------------------*/ -#include "heatTransferModel.H" +#include "directMappedFieldFvPatchFields.H" +#include "volMesh.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -inline const Foam::surfaceFilmModels::surfaceFilmModel& -Foam::surfaceFilmModels::heatTransferModel::owner() const +namespace Foam { - return owner_; -} +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -inline const Foam::dictionary& -Foam::surfaceFilmModels::heatTransferModel::coeffs() const -{ - return coeffs_; -} +makePatchFields(directMappedField); +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam // ************************************************************************* // diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelI.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchFields.H similarity index 69% rename from src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelI.H rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchFields.H index 13455cee7b..1f172c8098 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelI.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,29 +23,27 @@ License \*---------------------------------------------------------------------------*/ -#include "injectionModel.H" +#ifndef directMappedFieldFvPatchFields_H +#define directMappedFieldFvPatchFields_H + +#include "directMappedFieldFvPatchField.H" +#include "fieldTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -inline const Foam::surfaceFilmModels::surfaceFilmModel& -Foam::surfaceFilmModels::injectionModel::owner() const +namespace Foam { - return owner_; -} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -inline const Foam::dictionary& -Foam::surfaceFilmModels::injectionModel::coeffs() const -{ - return coeffs_; -} +makePatchTypeFieldTypedefs(directMappedField) +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -inline Foam::scalar Foam::surfaceFilmModels::injectionModel::injectedMass() -const -{ - return injectedMass_; -} +} // End namespace Foam +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif // ************************************************************************* // diff --git a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelI.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchFieldsFwd.H similarity index 68% rename from src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelI.H rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchFieldsFwd.H index 0585867dc0..5f6cb46deb 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelI.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedField/directMappedFieldFvPatchFieldsFwd.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,29 +23,28 @@ License \*---------------------------------------------------------------------------*/ -#include "surfaceFilmModel.H" +#ifndef directMappedFieldFvPatchFieldsFwd_H +#define directMappedFieldFvPatchFieldsFwd_H + +#include "fieldTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -inline const Foam::Switch& -Foam::surfaceFilmModels::surfaceFilmModel::active() const +namespace Foam { - return active_; -} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -inline const Foam::dictionary& -Foam::surfaceFilmModels::surfaceFilmModel::coeffs() const -{ - return coeffs_; -} +template class directMappedFieldFvPatchField; +makePatchTypeFieldTypedefs(directMappedField) -inline const Foam::surfaceFilmModels::surfaceFilmModel::thermoModelType& -Foam::surfaceFilmModels::surfaceFilmModel::thermoModel() const -{ - return thermoModel_; -} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif // ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C similarity index 74% rename from src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C index 0bbb056b9a..ef3c890437 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C @@ -2,16 +2,16 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ 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 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 2 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 @@ -19,22 +19,18 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*---------------------------------------------------------------------------*/ #include "directMappedFixedInternalValueFvPatchField.H" #include "UIndirectList.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -directMappedFixedInternalValueFvPatchField:: +Foam::directMappedFixedInternalValueFvPatchField:: directMappedFixedInternalValueFvPatchField ( const fvPatch& p, @@ -46,7 +42,7 @@ directMappedFixedInternalValueFvPatchField template -directMappedFixedInternalValueFvPatchField:: +Foam::directMappedFixedInternalValueFvPatchField:: directMappedFixedInternalValueFvPatchField ( const directMappedFixedInternalValueFvPatchField& ptf, @@ -60,7 +56,7 @@ directMappedFixedInternalValueFvPatchField template -directMappedFixedInternalValueFvPatchField:: +Foam::directMappedFixedInternalValueFvPatchField:: directMappedFixedInternalValueFvPatchField ( const fvPatch& p, @@ -73,7 +69,7 @@ directMappedFixedInternalValueFvPatchField template -directMappedFixedInternalValueFvPatchField:: +Foam::directMappedFixedInternalValueFvPatchField:: directMappedFixedInternalValueFvPatchField ( const directMappedFixedInternalValueFvPatchField& ptf @@ -84,7 +80,7 @@ directMappedFixedInternalValueFvPatchField template -directMappedFixedInternalValueFvPatchField:: +Foam::directMappedFixedInternalValueFvPatchField:: directMappedFixedInternalValueFvPatchField ( const directMappedFixedInternalValueFvPatchField& ptf, @@ -98,7 +94,7 @@ directMappedFixedInternalValueFvPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void directMappedFixedInternalValueFvPatchField::updateCoeffs() +void Foam::directMappedFixedInternalValueFvPatchField::updateCoeffs() { typedef GeometricField FieldType; @@ -125,14 +121,22 @@ void directMappedFixedInternalValueFvPatchField::updateCoeffs() // Retrieve the neighbour field const fvPatchField& nbrField = - nbrPatch.lookupPatchField + nbrPatch.template lookupPatchField ( this->dimensionedInternalField().name() ); // Retrieve the neighbour patch internal field - Field nbrIntFld(nbrField.patchInternalField()); - distMap.distribute(nbrIntFld); + Field nbrIntFld = nbrField.patchInternalField(); + mapDistribute::distribute + ( + Pstream::defaultCommsType, + distMap.schedule(), + distMap.constructSize(), + distMap.subMap(), // what to send + distMap.constructMap(), // what to receive + nbrIntFld + ); // Assign (this) patch internal field to its neighbour values Field& intFld = const_cast&>(this->internalField()); @@ -141,14 +145,13 @@ void directMappedFixedInternalValueFvPatchField::updateCoeffs() template -void directMappedFixedInternalValueFvPatchField::write(Ostream& os) const +void Foam::directMappedFixedInternalValueFvPatchField::write +( + Ostream& os +) const { directMappedFixedValueFvPatchField::write(os); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.H similarity index 92% rename from src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.H rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.H index 4aef5ebd2c..d9448400a9 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.H @@ -2,16 +2,16 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ 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 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 2 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 @@ -19,7 +19,8 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class Foam::directMappedFixedInternalValueFvPatchField diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C similarity index 78% rename from src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C index 11a290c3c1..d64936eb2e 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C @@ -2,16 +2,16 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ 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 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 2 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 @@ -19,7 +19,8 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*---------------------------------------------------------------------------*/ diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.H similarity index 77% rename from src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.H rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.H index efc2b26edf..4dfabf7304 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.H @@ -2,16 +2,16 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ 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 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 2 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 @@ -19,7 +19,8 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*---------------------------------------------------------------------------*/ @@ -36,7 +37,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeFieldTypedefs(directMappedFixedInternalValue); +makePatchTypeFieldTypedefs(directMappedFixedInternalValue) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFieldsFwd.H similarity index 77% rename from src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFieldsFwd.H rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFieldsFwd.H index 3c1fba79ae..a675960604 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFieldsFwd.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFieldsFwd.H @@ -2,16 +2,16 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ 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 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 2 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 @@ -19,7 +19,8 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*---------------------------------------------------------------------------*/ @@ -37,7 +38,7 @@ namespace Foam template class directMappedFixedInternalValueFvPatchField; -makePatchTypeFieldTypedefs(directMappedFixedInternalValue); +makePatchTypeFieldTypedefs(directMappedFixedInternalValue) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.C similarity index 75% rename from src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.C rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.C index c9230d8adf..77b8ea18f0 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.C @@ -2,16 +2,16 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ 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 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 2 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 @@ -19,22 +19,18 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*---------------------------------------------------------------------------*/ #include "directMappedFixedPushedInternalValueFvPatchField.H" #include "UIndirectList.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -directMappedFixedPushedInternalValueFvPatchField:: +Foam::directMappedFixedPushedInternalValueFvPatchField:: directMappedFixedPushedInternalValueFvPatchField ( const fvPatch& p, @@ -46,7 +42,7 @@ directMappedFixedPushedInternalValueFvPatchField template -directMappedFixedPushedInternalValueFvPatchField:: +Foam::directMappedFixedPushedInternalValueFvPatchField:: directMappedFixedPushedInternalValueFvPatchField ( const directMappedFixedPushedInternalValueFvPatchField& ptf, @@ -60,7 +56,7 @@ directMappedFixedPushedInternalValueFvPatchField template -directMappedFixedPushedInternalValueFvPatchField:: +Foam::directMappedFixedPushedInternalValueFvPatchField:: directMappedFixedPushedInternalValueFvPatchField ( const fvPatch& p, @@ -73,7 +69,7 @@ directMappedFixedPushedInternalValueFvPatchField template -directMappedFixedPushedInternalValueFvPatchField:: +Foam::directMappedFixedPushedInternalValueFvPatchField:: directMappedFixedPushedInternalValueFvPatchField ( const directMappedFixedPushedInternalValueFvPatchField& ptf @@ -84,7 +80,7 @@ directMappedFixedPushedInternalValueFvPatchField template -directMappedFixedPushedInternalValueFvPatchField:: +Foam::directMappedFixedPushedInternalValueFvPatchField:: directMappedFixedPushedInternalValueFvPatchField ( const directMappedFixedPushedInternalValueFvPatchField& ptf, @@ -98,7 +94,8 @@ directMappedFixedPushedInternalValueFvPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void directMappedFixedPushedInternalValueFvPatchField::updateCoeffs() +void +Foam::directMappedFixedPushedInternalValueFvPatchField::updateCoeffs() { typedef GeometricField FieldType; @@ -117,7 +114,7 @@ void directMappedFixedPushedInternalValueFvPatchField::updateCoeffs() template -void directMappedFixedPushedInternalValueFvPatchField::write +void Foam::directMappedFixedPushedInternalValueFvPatchField::write ( Ostream& os ) const @@ -126,8 +123,4 @@ void directMappedFixedPushedInternalValueFvPatchField::write } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.H similarity index 92% rename from src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.H rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.H index 3074b80896..69bdb1a694 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.H @@ -2,16 +2,16 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ 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 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 2 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 @@ -19,7 +19,8 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class Foam::directMappedFixedPushedInternalValueFvPatchField diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C similarity index 78% rename from src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C index b7ab210106..cbbbeb4223 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C @@ -2,16 +2,16 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ 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 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 2 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 @@ -19,7 +19,8 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*---------------------------------------------------------------------------*/ diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.H similarity index 80% rename from src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.H rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.H index 97b7b7e25c..bff180bbc2 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.H @@ -2,16 +2,16 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ 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 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 2 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 @@ -19,7 +19,8 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*---------------------------------------------------------------------------*/ @@ -36,7 +37,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeFieldTypedefs(directMappedFixedPushedInternalValue); +makePatchTypeFieldTypedefs(directMappedFixedPushedInternalValue) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFieldsFwd.H similarity index 77% rename from src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFieldsFwd.H rename to src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFieldsFwd.H index f0c8d864b2..faae7f722e 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFieldsFwd.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFieldsFwd.H @@ -2,16 +2,16 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ 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 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 2 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 @@ -19,7 +19,8 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*---------------------------------------------------------------------------*/ @@ -37,7 +38,7 @@ namespace Foam template class directMappedFixedPushedInternalValueFvPatchField; -makePatchTypeFieldTypedefs(directMappedFixedInternalValue); +makePatchTypeFieldTypedefs(directMappedFixedInternalValue) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/coalCombustion/Make/options b/src/lagrangian/coalCombustion/Make/options index 33cc415fdf..640565da2e 100644 --- a/src/lagrangian/coalCombustion/Make/options +++ b/src/lagrangian/coalCombustion/Make/options @@ -18,7 +18,8 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude LIB_LIBS = \ -lfiniteVolume \ @@ -36,4 +37,5 @@ LIB_LIBS = \ -lSLGThermo \ -lcompressibleRASModels \ -lcompressibleLESModels \ + -lregionModels \ -lsurfaceFilmModels diff --git a/src/lagrangian/intermediate/Make/options b/src/lagrangian/intermediate/Make/options index 0d45fdda60..6290aae9da 100644 --- a/src/lagrangian/intermediate/Make/options +++ b/src/lagrangian/intermediate/Make/options @@ -17,7 +17,8 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude LIB_LIBS = \ diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C index 38fa34ccf7..07ec7cc21e 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C @@ -24,8 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "SurfaceFilmModel.H" -#include "mathematicalConstants.H" #include "surfaceFilmModel.H" +#include "mathematicalConstants.H" #include "directMappedWallPolyPatch.H" using namespace Foam::constant; @@ -133,29 +133,34 @@ void Foam::SurfaceFilmModel::inject(TrackData& td) } // Retrieve the film model from the owner database - const surfaceFilmModels::surfaceFilmModel& filmModel = + const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel = this->owner().db().objectRegistry::template lookupObject - + ( "surfaceFilmProperties" ); - const labelList& filmPatches = filmModel.filmBottomPatchIDs(); + if (!filmModel.active()) + { + return; + } + + const labelList& filmPatches = filmModel.intCoupledPatchIDs(); const labelList& primaryPatches = filmModel.primaryPatchIDs(); + const polyBoundaryMesh& pbm = this->owner().mesh().boundaryMesh(); + forAll(filmPatches, i) { - const label primaryPatchI = primaryPatches[i]; - const directMappedWallPolyPatch& wpp = - refCast - ( - this->owner().mesh().boundaryMesh()[primaryPatchI] - ); - - const labelList& injectorCellsPatch = wpp.faceCells(); - const label filmPatchI = filmPatches[i]; - const mapDistribute& distMap = wpp.map(); + const label primaryPatchI = primaryPatches[i]; + + const directMappedPatchBase& mapPatch = + filmModel.mappedPatches()[filmPatchI]; + const mapDistribute& distMap = mapPatch.map(); + + const labelList& injectorCellsPatch = pbm[primaryPatchI].faceCells(); + cacheFilmFields(filmPatchI, primaryPatchI, distMap, filmModel); forAll(injectorCellsPatch, j) @@ -209,7 +214,7 @@ void Foam::SurfaceFilmModel::cacheFilmFields const label filmPatchI, const label primaryPatchI, const mapDistribute& distMap, - const surfaceFilmModels::surfaceFilmModel& filmModel + const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel ) { massParcelPatch_ = filmModel.massForPrimary().boundaryField()[filmPatchI]; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H index fe4de983b9..792eb876ae 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H @@ -47,9 +47,12 @@ namespace Foam { // Forward declaration of classes -namespace surfaceFilmModels +namespace regionModels { - class surfaceFilmModel; + namespace surfaceFilmModels + { + class surfaceFilmModel; + } } class mapDistribute; @@ -114,7 +117,7 @@ protected: const label filmPatchI, const label primaryPatchI, const mapDistribute& distMap, - const surfaceFilmModels::surfaceFilmModel& filmModel + const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel ); //- Set the individual parcel properties diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C index 6958547647..7249846b13 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C @@ -141,7 +141,7 @@ Foam::vector Foam::ThermoSurfaceFilm::splashDirection template void Foam::ThermoSurfaceFilm::absorbInteraction ( - surfaceFilmModels::surfaceFilmModel& filmModel, + regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, const label faceI, @@ -218,7 +218,7 @@ void Foam::ThermoSurfaceFilm::bounceInteraction template void Foam::ThermoSurfaceFilm::drySplashInteraction ( - surfaceFilmModels::surfaceFilmModel& filmModel, + regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, const label faceI, @@ -274,7 +274,7 @@ void Foam::ThermoSurfaceFilm::drySplashInteraction template void Foam::ThermoSurfaceFilm::wetSplashInteraction ( - surfaceFilmModels::surfaceFilmModel& filmModel, + regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, parcelType& p, const polyPatch& pp, const label faceI, @@ -331,6 +331,7 @@ void Foam::ThermoSurfaceFilm::wetSplashInteraction U = -epsilon*(Un) + 5/7*(Ut); keepParticle = true; + return; } else if ((We >= 20) && (We < Wec)) // spread - assume absorb { @@ -350,7 +351,7 @@ void Foam::ThermoSurfaceFilm::wetSplashInteraction template void Foam::ThermoSurfaceFilm::splashInteraction ( - surfaceFilmModels::surfaceFilmModel& filmModel, + regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, const label faceI, @@ -390,8 +391,8 @@ void Foam::ThermoSurfaceFilm::splashInteraction const scalar dBarSplash = 1/cbrt(6.0)*cbrt(mRatio/Ns)*d + ROOTVSMALL; // cumulative diameter splash distribution - const scalar dMin = 0.01*d; - const scalar dMax = d; + const scalar dMax = cbrt(mRatio)*d; + const scalar dMin = 0.001*dMax; const scalar K = exp(-dMin/dBarSplash) - exp(-dMax/dBarSplash); // surface energy of secondary parcels [J] @@ -567,11 +568,11 @@ bool Foam::ThermoSurfaceFilm::transferParcel ) { // Retrieve the film model from the owner database - surfaceFilmModels::surfaceFilmModel& filmModel = - const_cast + regionModels::surfaceFilmModels::surfaceFilmModel& filmModel = + const_cast ( this->owner().db().objectRegistry::template - lookupObject + lookupObject ( "surfaceFilmProperties" ) @@ -579,7 +580,7 @@ bool Foam::ThermoSurfaceFilm::transferParcel const label patchI = pp.index(); - if (filmModel.isFilmPatch(patchI)) + if (filmModel.isRegionPatch(patchI)) { const label faceI = pp.whichFace(p.face()); @@ -627,10 +628,11 @@ bool Foam::ThermoSurfaceFilm::transferParcel } } + // transfer parcel/parcel interactions complete return true; } - // do not transfer parcel + // parcel not interacting with film return false; } @@ -641,7 +643,7 @@ void Foam::ThermoSurfaceFilm::cacheFilmFields const label filmPatchI, const label primaryPatchI, const mapDistribute& distMap, - const surfaceFilmModels::surfaceFilmModel& filmModel + const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel ) { SurfaceFilmModel::cacheFilmFields diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H index 8aa316a6d5..72f8525687 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H @@ -104,7 +104,7 @@ protected: const SLGThermo& thermo_; - // Cached injector fields per film patch + // Cached injector fields per film patch //- Film temperature / patch face scalarList TFilmPatch_; @@ -168,7 +168,7 @@ protected: //- Absorb parcel into film void absorbInteraction ( - surfaceFilmModels::surfaceFilmModel& filmModel, + regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, const label faceI, @@ -188,7 +188,7 @@ protected: //- Parcel interaction with dry surface void drySplashInteraction ( - surfaceFilmModels::surfaceFilmModel& filmModel, + regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, const label faceI, @@ -198,7 +198,7 @@ protected: //- Parcel interaction with wetted surface void wetSplashInteraction ( - surfaceFilmModels::surfaceFilmModel& filmModel, + regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, parcelType& p, const polyPatch& pp, const label faceI, @@ -208,7 +208,7 @@ protected: //- Bai parcel splash interaction model void splashInteraction ( - surfaceFilmModels::surfaceFilmModel& filmModel, + regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, const label faceI, @@ -228,7 +228,8 @@ protected: const label filmPatchI, const label primaryPatchI, const mapDistribute& distMap, - const surfaceFilmModels::surfaceFilmModel& filmModel + const regionModels::surfaceFilmModels::surfaceFilmModel& + filmModel ); //- Set the individual parcel properties @@ -247,7 +248,7 @@ public: // Constructors - //- Construct from components + //- Construct from components ThermoSurfaceFilm ( const dictionary& dict, diff --git a/src/regionModels/Allwmake b/src/regionModels/Allwmake new file mode 100755 index 0000000000..7713ded586 --- /dev/null +++ b/src/regionModels/Allwmake @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +wmake libso regionModel +#wmake libso pyrolysisModels +wmake libso surfaceFilmModels +#wmake libso regionCoupling + + +# ----------------------------------------------------------------- end-of-file diff --git a/src/regionModels/regionModel/Make/files b/src/regionModels/regionModel/Make/files new file mode 100644 index 0000000000..4bd58bd061 --- /dev/null +++ b/src/regionModels/regionModel/Make/files @@ -0,0 +1,7 @@ +/* Region models */ +regionModel/regionModel.C +singleLayerRegion/singleLayerRegion.C +regionModel1D/regionModel1D.C + + +LIB = $(FOAM_LIBBIN)/libregionModels diff --git a/src/regionModels/regionModel/Make/options b/src/regionModels/regionModel/Make/options new file mode 100644 index 0000000000..d27c95d033 --- /dev/null +++ b/src/regionModels/regionModel/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools diff --git a/src/regionModels/regionModel/regionModel/regionModel.C b/src/regionModels/regionModel/regionModel/regionModel.C new file mode 100644 index 0000000000..e72ef348db --- /dev/null +++ b/src/regionModels/regionModel/regionModel/regionModel.C @@ -0,0 +1,283 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. + \\/ 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "regionModel.H" +#include "fvMesh.H" +#include "Time.H" +#include "directMappedWallPolyPatch.H" +#include "zeroGradientFvPatchFields.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace regionModels +{ + defineTypeNameAndDebug(regionModel, 0); +} +} + +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // + +void Foam::regionModels::regionModel::constructMeshObjects() +{ + // construct region mesh + regionMeshPtr_.reset + ( + new fvMesh + ( + IOobject + ( + lookup("regionName"), + time_.timeName(), + time_, + IOobject::MUST_READ + ) + ) + ); +} + + +void Foam::regionModels::regionModel::initialise() +{ + if (debug) + { + Pout<< "regionModel::initialise()" << endl; + } + + label nBoundaryFaces = 0; + DynamicList