diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/Make/files b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/Make/files new file mode 100644 index 0000000000..b72bc1ae83 --- /dev/null +++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/Make/files @@ -0,0 +1,3 @@ +steadyParticleTracks.C + +EXE = $(FOAM_APPBIN)/steadyParticleTracks diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/Make/options b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/Make/options new file mode 100644 index 0000000000..004f0474b8 --- /dev/null +++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/Make/options @@ -0,0 +1,9 @@ +EXE_INC = \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -llagrangian \ + -lmeshTools \ + -lfiniteVolume diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/createFields.H b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/createFields.H new file mode 100644 index 0000000000..24854ab6b6 --- /dev/null +++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/createFields.H @@ -0,0 +1,16 @@ +word dictName(args.optionLookupOrDefault("dict", "particleTrackDict")); + +IOdictionary propsDict +( + IOobject + ( + dictName, + runTime.constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED + ) +); + +word cloudName(propsDict.lookup("cloudName")); + +List userFields(propsDict.lookup("fields")); \ No newline at end of file diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/particleTrackDict b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/particleTrackDict new file mode 100644 index 0000000000..32c50127d5 --- /dev/null +++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/particleTrackDict @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object particleTrackDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +cloudName reactingCloud1Tracks; + +fields ( d U T ); + +// ************************************************************************* // + diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C new file mode 100644 index 0000000000..050395a86f --- /dev/null +++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C @@ -0,0 +1,327 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2010 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 + +Application + steadyParticleTracks + +Description + Generates a VTK file of particle tracks for cases that were computed using + a steady-state cloud + NOTE: case must be re-constructed (if running in parallel) before use + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "Cloud.H" +#include "IOdictionary.H" +#include "fvMesh.H" +#include "Time.H" +#include "timeSelector.H" +#include "OFstream.H" +#include "passiveParticleCloud.H" + +#include "SortableList.H" +#include "IOobjectList.H" +#include "PtrList.H" +#include "Field.H" +#include "steadyParticleTracksTemplates.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +using namespace Foam; + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +label validateFields +( + const List& userFields, + const IOobjectList& cloudObjs +) +{ + List ok(userFields.size(), false); + + forAll(userFields, i) + { + ok[i] = ok[i] || fieldOk