graphField: Moved graphs directory into postProcessing

This commit is contained in:
Will Bainbridge
2019-05-20 10:43:36 +01:00
parent deb279aa83
commit 0889ff91c7
9 changed files with 90 additions and 13 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,6 +35,7 @@ Description
#include "fft.H" #include "fft.H"
#include "calcEk.H" #include "calcEk.H"
#include "graph.H" #include "graph.H"
#include "writeFile.H"
#include "pisoControl.H" #include "pisoControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -117,7 +118,10 @@ int main(int argc, char *argv[])
{ {
calcEk(U, K).write calcEk(U, K).write
( (
runTime.path()/"graphs"/runTime.timeName(), runTime.path()
/functionObjects::writeFile::outputPrefix
/"graphs"
/runTime.timeName(),
"Ek", "Ek",
runTime.graphFormat() runTime.graphFormat()
); );

View File

@ -1,4 +1,11 @@
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance()); fileName path
(
UMean.rootPath()
/UMean.caseName()
/functionObjects::writeFile::outputPrefix
/"graphs"
/UMean.instance()
);
mkDir(path); mkDir(path);
scalarField UMeanXvalues scalarField UMeanXvalues

View File

@ -39,6 +39,7 @@ Description
#include "volFields.H" #include "volFields.H"
#include "channelIndex.H" #include "channelIndex.H"
#include "makeGraph.H" #include "makeGraph.H"
#include "writeFile.H"
using namespace Foam; using namespace Foam;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -36,6 +36,7 @@ Description
#include "Kmesh.H" #include "Kmesh.H"
#include "turbGen.H" #include "turbGen.H"
#include "calcEk.H" #include "calcEk.H"
#include "writeFile.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -69,7 +70,10 @@ int main(int argc, char *argv[])
calcEk(U, K).write calcEk(U, K).write
( (
runTime.path()/"graphs"/runTime.timeName(), runTime.path()
/functionObjects::writeFile::outputPrefix
/"graphs"
/runTime.timeName(),
"Ek", "Ek",
runTime.graphFormat() runTime.graphFormat()
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,6 +35,7 @@ Description
#include "volFields.H" #include "volFields.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "graph.H" #include "graph.H"
#include "writeFile.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -62,7 +63,14 @@ void makeGraph
const word& graphFormat const word& graphFormat
) )
{ {
fileName path(vsf.rootPath()/vsf.caseName()/"graphs"/vsf.instance()); fileName path
(
vsf.rootPath()
/vsf.caseName()
/functionObjects::writeFile::outputPrefix
/"graphs"
/vsf.instance()
);
mkDir(path); mkDir(path);
makeGraph makeGraph

View File

@ -1,7 +1,33 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "writeCellGraph.H" #include "writeCellGraph.H"
#include "volFields.H" #include "volFields.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "graph.H" #include "graph.H"
#include "writeFile.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -16,7 +42,13 @@ void writeCellGraph
const word& graphFormat const word& graphFormat
) )
{ {
fileName path(vsf.time().path()/"graphs"/vsf.time().timeName()); fileName path
(
vsf.time().path()
/functionObjects::writeFile::outputPrefix
/"graphs"
/vsf.time().timeName()
);
mkDir(path); mkDir(path);
graph graph
@ -29,7 +61,6 @@ void writeCellGraph
).write(path/vsf.name(), graphFormat); ).write(path/vsf.name(), graphFormat);
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View File

@ -1,9 +1,33 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "writePatchGraph.H" #include "writePatchGraph.H"
#include "volFields.H" #include "volFields.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "graph.H" #include "graph.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -29,7 +53,6 @@ void writePatchGraph
).write(vsf.time().timePath()/vsf.name(), graphFormat); ).write(vsf.time().timePath()/vsf.name(), graphFormat);
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
rm -rf 0/enstrophy graphs rm -rf 0/enstrophy
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase cleanCase
rm -rf graphs
rm -f *.eps yPlus_vs_uPlus rm -f *.eps yPlus_vs_uPlus
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------