From e49d70a85ae64b375992a0407b984bead99027f6 Mon Sep 17 00:00:00 2001 From: graham Date: Mon, 9 Mar 2009 19:29:08 +0000 Subject: [PATCH] Created new functionObject for dsmcFields, renamed post processing utility dsmcFields to dsmcFieldsCalc and calling function object from there. --- .../miscellaneous/dsmcFields/Make/files | 3 - .../miscellaneous/dsmcFieldsCalc/Make/files | 3 + .../Make/options | 2 + .../dsmcFieldsCalc.C} | 99 +------- src/lagrangian/Allwmake | 1 + .../clouds/Templates/DsmcCloud/DsmcCloud.C | 8 +- .../clouds/Templates/DsmcCloud/DsmcCloudI.H | 33 +++ .../functionObjects/utilities/Make/files | 3 + .../functionObjects/utilities/Make/options | 6 +- .../utilities/dsmcFields/IOdsmcFields.C | 50 ++++ .../utilities/dsmcFields/dsmcFields.C | 236 ++++++++++++++++++ .../utilities/dsmcFields/dsmcFields.H | 144 +++++++++++ .../dsmcFields/dsmcFieldsFunctionObject.C | 43 ++++ .../dsmcFields/dsmcFieldsFunctionObject.H | 55 ++++ 14 files changed, 590 insertions(+), 96 deletions(-) delete mode 100755 applications/utilities/postProcessing/miscellaneous/dsmcFields/Make/files create mode 100755 applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/Make/files rename applications/utilities/postProcessing/miscellaneous/{dsmcFields => dsmcFieldsCalc}/Make/options (77%) rename applications/utilities/postProcessing/miscellaneous/{dsmcFields/dsmcFields.C => dsmcFieldsCalc/dsmcFieldsCalc.C} (55%) create mode 100644 src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C create mode 100644 src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C create mode 100644 src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H create mode 100644 src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.C create mode 100644 src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H diff --git a/applications/utilities/postProcessing/miscellaneous/dsmcFields/Make/files b/applications/utilities/postProcessing/miscellaneous/dsmcFields/Make/files deleted file mode 100755 index c667194d88..0000000000 --- a/applications/utilities/postProcessing/miscellaneous/dsmcFields/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -dsmcFields.C - -EXE = $(FOAM_APPBIN)/dsmcFields diff --git a/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/Make/files b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/Make/files new file mode 100755 index 0000000000..5cba9c270d --- /dev/null +++ b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/Make/files @@ -0,0 +1,3 @@ +dsmcFieldsCalc.C + +EXE = $(FOAM_APPBIN)/dsmcFieldsCalc diff --git a/applications/utilities/postProcessing/miscellaneous/dsmcFields/Make/options b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/Make/options similarity index 77% rename from applications/utilities/postProcessing/miscellaneous/dsmcFields/Make/options rename to applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/Make/options index 4eb433b999..4e81bb55de 100755 --- a/applications/utilities/postProcessing/miscellaneous/dsmcFields/Make/options +++ b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/Make/options @@ -2,6 +2,7 @@ EXE_INC = \ -I$(LIB_SRC)/postProcessing/postCalc \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/postProcessing/functionObjects/utilities/lnInclude \ -I$(LIB_SRC)/lagrangian/dsmc/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude @@ -9,6 +10,7 @@ EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ -lmeshTools \ -lfiniteVolume \ + -lutilityFunctionObjects \ -llagrangian \ -ldsmc diff --git a/applications/utilities/postProcessing/miscellaneous/dsmcFields/dsmcFields.C b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C similarity index 55% rename from applications/utilities/postProcessing/miscellaneous/dsmcFields/dsmcFields.C rename to applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C index 2a831fdd48..8f86ab437f 100644 --- a/applications/utilities/postProcessing/miscellaneous/dsmcFields/dsmcFields.C +++ b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C @@ -34,6 +34,7 @@ Description #include "calc.H" #include "fvc.H" #include "dsmcCloud.H" +#include "dsmcFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -133,97 +134,17 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) Info<< "Reading field iDofMean" << endl; volScalarField iDofMean(iDofMeanheader, mesh); - // Check if there are any zero values in the density fields + dsmcFields dF + ( + "dsmcFieldsUtility", + mesh, + dictionary(), + false + ); - if (min(rhoNMean).value() > VSMALL) + if (writeResults) { - // TODO Sort out boundary field values if required - - Info<< nl << "Calculating UMean field." << endl; - volVectorField UMean - ( - IOobject - ( - "UMean", - runTime.timeName(), - mesh, - IOobject::NO_READ - ), - momentumMean/rhoMMean - ); - - Info<< nl << "Calculating translationalTMean field." << endl; - volScalarField translationalTMean - ( - IOobject - ( - "translationalTMean", - runTime.timeName(), - mesh, - IOobject::NO_READ - ), - 2.0/(3.0*dsmcCloud::kb*rhoNMean) - *(linearKEMean - 0.5*rhoMMean*(UMean & UMean)) - ); - - Info<< nl << "Calculating internalTMean field." << endl; - volScalarField internalTMean - ( - IOobject - ( - "internalTMean", - runTime.timeName(), - mesh, - IOobject::NO_READ - ), - 2.0/(dsmcCloud::kb*iDofMean)*internalEMean - ); - - Info<< nl << "Calculating overallTMean field." << endl; - volScalarField overallTMean - ( - IOobject - ( - "overallTMean", - runTime.timeName(), - mesh, - IOobject::NO_READ - ), - 2.0/(dsmcCloud::kb*(3.0*rhoNMean + iDofMean)) - *(linearKEMean - 0.5*rhoMMean*(UMean & UMean) + internalEMean) - ); - - Info<< nl << "mag(UMean) max/min : " - << max(mag(UMean)).value() << " " - << min(mag(UMean)).value() << endl; - - Info<< nl << "translationalTMean max/min : " - << max(translationalTMean).value() << " " - << min(translationalTMean).value() << endl; - - Info<< nl << "internalTMean max/min : " - << max(internalTMean).value() << " " - << min(internalTMean).value() << endl; - - Info<< nl << "overallTMean max/min : " - << max(overallTMean).value() << " " - << min(overallTMean).value() << endl; - - if (writeResults) - { - UMean.write(); - translationalTMean.write(); - internalTMean.write(); - overallTMean.write(); - } - } - else - { - Info<< "Small or negative value (" << min(rhoNMean) - << ") found in rhoNMean field. " - << "Not calculating fields to avoid division by zero " - << "or invalid results." - << endl; + dF.write(); } } } diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake index 41b2fd9bf9..fea6fce12e 100755 --- a/src/lagrangian/Allwmake +++ b/src/lagrangian/Allwmake @@ -6,6 +6,7 @@ wmake libso basic wmake libso solidParticle wmake libso intermediate wmake libso dieselSpray +wmake libso dsmc molecularDynamics/Allwmake diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C index e82ae42fb8..13b2526eab 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -85,6 +85,8 @@ void Foam::DsmcCloud::initialise const IOdictionary& dsmcInitialiseDict ) { + Info<< nl << "Initialising particles" << endl; + const scalar temperature ( readScalar(dsmcInitialiseDict.lookup("temperature")) @@ -619,6 +621,9 @@ void Foam::DsmcCloud::evolve() { typename ParcelType::trackData td(*this); + // Reset the surface data collection fields + resetSurfaceDataFields(); + if (debug) { this->dumpParticlePositions(); @@ -627,9 +632,6 @@ void Foam::DsmcCloud::evolve() // Insert new particles from the inflow boundary this->inflowBoundary().inflow(); - // Reset the surface data collection fields - resetSurfaceDataFields(); - // Move the particles ballistically with their current velocities Cloud::move(td); diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H index 44ce59af50..1745389cad 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H @@ -358,6 +358,10 @@ Foam::DsmcCloud::rhoN() const rhoN *= nParticle_/mesh().cellVolumes(); + trhoN().boundaryField() = trhoN().boundaryField().boundaryInternalField(); + + trhoN().correctBoundaryConditions(); + return trhoN; } @@ -395,6 +399,10 @@ Foam::DsmcCloud::rhoM() const rhoM *= nParticle_/mesh().cellVolumes(); + trhoM().boundaryField() = trhoM().boundaryField().boundaryInternalField(); + + trhoM().correctBoundaryConditions(); + return trhoM; } @@ -430,6 +438,11 @@ Foam::DsmcCloud::dsmcRhoN() const dsmcRhoN[cellI]++; } + tdsmcRhoN().boundaryField() = + tdsmcRhoN().boundaryField().boundaryInternalField(); + + tdsmcRhoN().correctBoundaryConditions(); + return tdsmcRhoN; } @@ -472,6 +485,11 @@ Foam::DsmcCloud::momentum() const momentum *= nParticle_/mesh().cellVolumes(); + tmomentum().boundaryField() = + tmomentum().boundaryField().boundaryInternalField(); + + tmomentum().correctBoundaryConditions(); + return tmomentum; } @@ -509,6 +527,11 @@ Foam::DsmcCloud::linearKE() const linearKE *= nParticle_/mesh().cellVolumes(); + tlinearKE().boundaryField() = + tlinearKE().boundaryField().boundaryInternalField(); + + tlinearKE().correctBoundaryConditions(); + return tlinearKE; } @@ -546,6 +569,11 @@ Foam::DsmcCloud::internalE() const internalE *= nParticle_/mesh().cellVolumes(); + tinternalE().boundaryField() = + tinternalE().boundaryField().boundaryInternalField(); + + tinternalE().correctBoundaryConditions(); + return tinternalE; } @@ -584,6 +612,11 @@ Foam::DsmcCloud::iDof() const iDof *= nParticle_/mesh().cellVolumes(); + tiDof().boundaryField() = + tiDof().boundaryField().boundaryInternalField(); + + tiDof().correctBoundaryConditions(); + return tiDof; } diff --git a/src/postProcessing/functionObjects/utilities/Make/files b/src/postProcessing/functionObjects/utilities/Make/files index ae95721ac8..2d37c7c8f3 100644 --- a/src/postProcessing/functionObjects/utilities/Make/files +++ b/src/postProcessing/functionObjects/utilities/Make/files @@ -1,4 +1,7 @@ dynamicPressure/dynamicPressure.C dynamicPressure/dynamicPressureFunctionObject.C +dsmcFields/dsmcFields.C +dsmcFields/dsmcFieldsFunctionObject.C + LIB = $(FOAM_LIBBIN)/libutilityFunctionObjects diff --git a/src/postProcessing/functionObjects/utilities/Make/options b/src/postProcessing/functionObjects/utilities/Make/options index 5166bcc9e3..623013bc21 100644 --- a/src/postProcessing/functionObjects/utilities/Make/options +++ b/src/postProcessing/functionObjects/utilities/Make/options @@ -1,9 +1,13 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/lagrangian/dsmc/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude LIB_LIBS = \ -lfiniteVolume \ -lmeshTools \ - -lsampling + -lsampling \ + -llagrangian \ + -ldsmc diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C b/src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C new file mode 100644 index 0000000000..32627acb3c --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 + +Typedef + Foam::IOdsmcFields + +Description + Instance of the generic IOOutputFilter for dsmcFields. + +\*---------------------------------------------------------------------------*/ + +#ifndef IOdsmcFields_H +#define IOdsmcFields_H + +#include "dsmcFields.H" +#include "IOOutputFilter.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef IOOutputFilter IOdsmcFields; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C new file mode 100644 index 0000000000..3aaa9c514a --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C @@ -0,0 +1,236 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "dsmcFields.H" +#include "volFields.H" +#include "dictionary.H" +#include "dsmcCloud.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(dsmcFields, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dsmcFields::dsmcFields +( + const word& name, + const objectRegistry& obr, + const dictionary& dict, + const bool loadFromFiles +) +: + name_(name), + obr_(obr), + active_(true) +{ + // Check if the available mesh is an fvMesh, otherwise deactivate + if (!isA(obr_)) + { + active_ = false; + WarningIn + ( + "dsmcFields::dsmcFields" + "(const objectRegistry&, const dictionary&)" + ) << "No fvMesh available, deactivating." << nl + << endl; + } + + read(dict); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dsmcFields::~dsmcFields() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::dsmcFields::read(const dictionary& dict) +{ + if (active_) + { + + } +} + + +void Foam::dsmcFields::execute() +{ + // Do nothing - only valid on write +} + + +void Foam::dsmcFields::end() +{ + // Do nothing - only valid on write +} + + +void Foam::dsmcFields::write() +{ + if (active_) + { + word rhoNMeanName = "rhoNMean"; + word rhoMMeanName = "rhoMMean"; + word momentumMeanName = "momentumMean"; + word linearKEMeanName = "linearKEMean"; + word internalEMeanName = "internalEMean"; + word iDofMeanName = "iDofMean"; + + const volScalarField& rhoNMean = obr_.lookupObject + ( + rhoNMeanName + ); + + const volScalarField& rhoMMean = obr_.lookupObject + ( + rhoMMeanName + ); + + const volVectorField& momentumMean = obr_.lookupObject + ( + momentumMeanName + ); + + const volScalarField& linearKEMean = obr_.lookupObject + ( + linearKEMeanName + ); + + const volScalarField& internalEMean = obr_.lookupObject + ( + internalEMeanName + ); + + const volScalarField& iDofMean = obr_.lookupObject + ( + iDofMeanName + ); + + if (min(rhoNMean).value() > VSMALL) + { + Info<< "Calculating dsmcFields." << endl; + + Info<< " Calculating UMean field." << endl; + volVectorField UMean + ( + IOobject + ( + "UMean", + obr_.time().timeName(), + obr_, + IOobject::NO_READ + ), + momentumMean/rhoMMean + ); + + Info<< " Calculating translationalT field." << endl; + volScalarField translationalT + ( + IOobject + ( + "translationalT", + obr_.time().timeName(), + obr_, + IOobject::NO_READ + ), + 2.0/(3.0*dsmcCloud::kb*rhoNMean) + *(linearKEMean - 0.5*rhoMMean*(UMean & UMean)) + ); + + Info<< " Calculating internalT field." << endl; + volScalarField internalT + ( + IOobject + ( + "internalT", + obr_.time().timeName(), + obr_, + IOobject::NO_READ + ), + 2.0/(dsmcCloud::kb*iDofMean)*internalEMean + ); + + Info<< " Calculating overallT field." << endl; + volScalarField overallT + ( + IOobject + ( + "overallT", + obr_.time().timeName(), + obr_, + IOobject::NO_READ + ), + 2.0/(dsmcCloud::kb*(3.0*rhoNMean + iDofMean)) + *(linearKEMean - 0.5*rhoMMean*(UMean & UMean) + internalEMean) + ); + + Info<< " mag(UMean) max/min : " + << max(mag(UMean)).value() << " " + << min(mag(UMean)).value() << endl; + + Info<< " translationalT max/min : " + << max(translationalT).value() << " " + << min(translationalT).value() << endl; + + Info<< " internalT max/min : " + << max(internalT).value() << " " + << min(internalT).value() << endl; + + Info<< " overallT max/min : " + << max(overallT).value() << " " + << min(overallT).value() << endl; + + UMean.write(); + + translationalT.write(); + + internalT.write(); + + overallT.write(); + + Info<< "dsmcFields written." << nl << endl; + } + else + { + Info<< "Small or negative value (" << min(rhoNMean) + << ") found in rhoNMean field. " + << "Not calculating dsmcFields to avoid division by zero " + << "or invalid results." + << endl; + } + } +} + + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H new file mode 100644 index 0000000000..b53dda6700 --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H @@ -0,0 +1,144 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 + +Class + Foam::dsmcFields + +Description + Calculate intensive fields: + - UMean + - translationalT + - internalT + - overallT + from averaged extensive fields from a DSMC calculation. + +SourceFiles + dsmcFields.C + IOdsmcFields.H + +\*---------------------------------------------------------------------------*/ + +#ifndef dsmcFields_H +#define dsmcFields_H + +#include "pointFieldFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +class objectRegistry; +class dictionary; +class mapPolyMesh; + +/*---------------------------------------------------------------------------*\ + Class dsmcFields Declaration +\*---------------------------------------------------------------------------*/ + +class dsmcFields +{ + // Private data + + //- Name of this set of dsmcFields objects + word name_; + + const objectRegistry& obr_; + + //- on/off switch + bool active_; + + // Private Member Functions + + //- Disallow default bitwise copy construct + dsmcFields(const dsmcFields&); + + //- Disallow default bitwise assignment + void operator=(const dsmcFields&); + + +public: + + //- Runtime type information + TypeName("dsmcFields"); + + + // Constructors + + //- Construct for given objectRegistry and dictionary. + // Allow the possibility to load fields from files + dsmcFields + ( + const word& name, + const objectRegistry&, + const dictionary&, + const bool loadFromFiles = false + ); + + + // Destructor + + virtual ~dsmcFields(); + + + // Member Functions + + //- Return name of the set of dsmcFields + virtual const word& name() const + { + return name_; + } + + //- Read the dsmcFields data + virtual void read(const dictionary&); + + //- Execute, currently does nothing + virtual void execute(); + + //- Execute at the final time-loop, currently does nothing + virtual void end(); + + //- Calculate the dsmcFields and write + virtual void write(); + + //- Update for changes of mesh + virtual void updateMesh(const mapPolyMesh&) + {} + + //- Update for changes of mesh + virtual void movePoints(const pointField&) + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.C b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.C new file mode 100644 index 0000000000..cd5324f25b --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.C @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "dsmcFieldsFunctionObject.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineNamedTemplateTypeNameAndDebug(dsmcFieldsFunctionObject, 0); + + addToRunTimeSelectionTable + ( + functionObject, + dsmcFieldsFunctionObject, + dictionary + ); +} + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H new file mode 100644 index 0000000000..cf34cdaa2e --- /dev/null +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 + +Typedef + Foam::dsmcFieldsFunctionObject + +Description + FunctionObject wrapper around dsmcFields to allow it to be created via + the functions list within controlDict. + +SourceFiles + dsmcFieldsFunctionObject.C + +\*---------------------------------------------------------------------------*/ + +#ifndef dsmcFieldsFunctionObject_H +#define dsmcFieldsFunctionObject_H + +#include "dsmcFields.H" +#include "OutputFilterFunctionObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef OutputFilterFunctionObject + dsmcFieldsFunctionObject; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //