mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://sgidm/home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -59,7 +59,6 @@ int main(int argc, char *argv[])
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "readTimeControls.H"
|
||||
#include "readAdditionalSolutionControls.H"
|
||||
#include "createFields.H"
|
||||
#include "createRDeltaT.H"
|
||||
#include "createRadiationModel.H"
|
||||
@ -74,7 +73,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readAdditionalSolutionControls.H"
|
||||
#include "readTimeControls.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
@ -9,11 +9,9 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
)
|
||||
);
|
||||
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
|
||||
if (solveSpecies)
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
|
||||
@ -78,7 +78,6 @@ int main(int argc, char *argv[])
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "readAdditionalSolutionControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
dictionary additional = mesh.solutionDict().subDict("additional");
|
||||
|
||||
// flag to activate solve transport for each specie (Y vector)
|
||||
bool solveSpecies = additional.lookupOrDefault("solveSpecies", true);
|
||||
@ -60,7 +60,6 @@ int main(int argc, char *argv[])
|
||||
#include "startSummary.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
bool solveSpecies = true;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -57,7 +57,6 @@ int main(int argc, char *argv[])
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
bool solveSpecies = true;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
8
applications/utilities/miscellaneous/foamHelp/Allwmake
Executable file
8
applications/utilities/miscellaneous/foamHelp/Allwmake
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
wmake libso helpTypes
|
||||
wmake
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
3
applications/utilities/miscellaneous/foamHelp/Make/files
Normal file
3
applications/utilities/miscellaneous/foamHelp/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
foamHelp.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/foamHelp
|
||||
15
applications/utilities/miscellaneous/foamHelp/Make/options
Normal file
15
applications/utilities/miscellaneous/foamHelp/Make/options
Normal file
@ -0,0 +1,15 @@
|
||||
EXE_INC = \
|
||||
-IhelpTypes/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lhelpTypes \
|
||||
-lfiniteVolume \
|
||||
-lincompressibleTurbulenceModel \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lincompressibleRASModels \
|
||||
-lcompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
-lcompressibleLESModels \
|
||||
-lradiationModels \
|
||||
-lfluidThermophysicalModels
|
||||
68
applications/utilities/miscellaneous/foamHelp/foamHelp.C
Normal file
68
applications/utilities/miscellaneous/foamHelp/foamHelp.C
Normal file
@ -0,0 +1,68 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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/>.
|
||||
|
||||
Application
|
||||
foamHelp
|
||||
|
||||
Description
|
||||
Top level wrapper utility around foam help utilities
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "helpType.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "addRegionOption.H"
|
||||
if (argc < 2)
|
||||
{
|
||||
FatalError
|
||||
<< "No help utility has been supplied" << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
const word utilityName = argv[1];
|
||||
|
||||
Foam::autoPtr<Foam::helpType> utility
|
||||
(
|
||||
helpType::New(utilityName)
|
||||
);
|
||||
|
||||
utility().init();
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
utility().execute(args, mesh);
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,8 @@
|
||||
helpType/helpType.C
|
||||
helpType/helpTypeNew.C
|
||||
helpBoundary/helpBoundary.C
|
||||
helpFunctionObject/helpFunctionObject.C
|
||||
|
||||
doxygenXmlParser/doxygenXmlParser.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libhelpTypes
|
||||
@ -0,0 +1,13 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lincompressibleTurbulenceModel \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lincompressibleRASModels \
|
||||
-lcompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
-lcompressibleLESModels \
|
||||
-lradiationModels \
|
||||
-lbasicThermophysicalModels
|
||||
@ -0,0 +1,246 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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 "doxygenXmlParser.H"
|
||||
#include "wordRe.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::doxygenXmlParser::doxygenXmlParser
|
||||
(
|
||||
const fileName& fName,
|
||||
const string& startTag,
|
||||
const string& searchStr,
|
||||
const bool exactMatch
|
||||
)
|
||||
:
|
||||
dictionary(dictionary::null)
|
||||
{
|
||||
IFstream is(fName);
|
||||
|
||||
char c;
|
||||
|
||||
// skip forward to entry name
|
||||
skipForward(is, startTag);
|
||||
|
||||
while (is.get(c))
|
||||
{
|
||||
if (c == '<')
|
||||
{
|
||||
// if in block, read block name
|
||||
string blockName = "";
|
||||
string params = "";
|
||||
bool readingParam = false;
|
||||
while (is.get(c) && c != '>')
|
||||
{
|
||||
if (c == ' ')
|
||||
{
|
||||
readingParam = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (readingParam)
|
||||
{
|
||||
params = params + c;
|
||||
}
|
||||
else
|
||||
{
|
||||
blockName = blockName + c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (blockName == '/' + startTag)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if ((blockName == "compound") && (params == "kind=\"file\""))
|
||||
{
|
||||
// keep entry
|
||||
word name = "";
|
||||
fileName path = "";
|
||||
word fName = "";
|
||||
bool foundName = false;
|
||||
bool foundPath = false;
|
||||
bool foundFName = false;
|
||||
bool earlyExit = false;
|
||||
while (!foundName || !foundPath || !foundFName)
|
||||
{
|
||||
word entryName;
|
||||
getEntry<word>(is, entryName);
|
||||
if (entryName == "name")
|
||||
{
|
||||
getValue<word>(is, name);
|
||||
if (wordRe(".*.H", wordRe::DETECT).match(name))
|
||||
{
|
||||
foundName = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// not interested in this compound
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (entryName == "path")
|
||||
{
|
||||
getValue<fileName>(is, path);
|
||||
|
||||
// filter path on regExp
|
||||
if (wordRe(searchStr, wordRe::DETECT).match(path))
|
||||
{
|
||||
foundPath = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// not interested in this compound
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (entryName == "filename")
|
||||
{
|
||||
getValue<word>(is, fName);
|
||||
foundFName = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
skipBlock(is, entryName);
|
||||
}
|
||||
}
|
||||
|
||||
if (foundPath && !earlyExit)
|
||||
{
|
||||
word tName(path.components().last());
|
||||
|
||||
// only insert if type is not already known
|
||||
// NOTE: not ideal for cases where there are multiple types
|
||||
// but contained within different namespaces
|
||||
// preferentially take exact match if it exists
|
||||
if (exactMatch && (tName + ".H") == name)
|
||||
{
|
||||
dictionary dict(dictionary::null);
|
||||
dict.add("name", name);
|
||||
dict.add("filename", fName + ".html");
|
||||
dict.add("path", path);
|
||||
this->add(tName, dict);
|
||||
}
|
||||
else if
|
||||
(
|
||||
!exactMatch
|
||||
&& !found(tName)
|
||||
&& wordRe(".*" + tName + ".*", wordRe::DETECT).match(name)
|
||||
)
|
||||
{
|
||||
dictionary dict(dictionary::null);
|
||||
dict.add("name", name);
|
||||
dict.add("filename", fName + ".html");
|
||||
dict.add("path", path);
|
||||
this->add(tName, dict);
|
||||
}
|
||||
}
|
||||
|
||||
// skip remanining entries
|
||||
skipBlock(is, blockName);
|
||||
}
|
||||
else
|
||||
{
|
||||
skipBlock(is, blockName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::doxygenXmlParser::skipBlock(IFstream& is, const word blockName) const
|
||||
{
|
||||
// recurse to move forward in 'is' until come across </blockName>
|
||||
|
||||
string closeName = "";
|
||||
|
||||
// fast-forward until we reach a '<'
|
||||
char c;
|
||||
while (is.get(c) && c != '<')
|
||||
{}
|
||||
|
||||
// check to see if this is a closing block
|
||||
if (is.get(c) && c == '/')
|
||||
{
|
||||
while (is.get(c) && c != '>')
|
||||
{
|
||||
closeName += c;
|
||||
}
|
||||
|
||||
if (closeName == blockName)
|
||||
{
|
||||
// finished reading block
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
skipBlock(is, blockName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
skipBlock(is, blockName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::doxygenXmlParser::skipForward
|
||||
(
|
||||
IFstream& is,
|
||||
const word blockName
|
||||
) const
|
||||
{
|
||||
// recurse to move forward in 'is' until come across <blockName>
|
||||
|
||||
// fast-forward until we reach a '<'
|
||||
char c;
|
||||
while (is.get(c) && c != '<')
|
||||
{}
|
||||
|
||||
string entryName = "";
|
||||
while (is.get(c) && c != '>')
|
||||
{
|
||||
entryName = entryName + c;
|
||||
}
|
||||
|
||||
if (entryName == blockName)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
skipForward(is, blockName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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/>.
|
||||
|
||||
Class
|
||||
Foam::doxygenXmlParser
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef doxygenXmlParser_H
|
||||
#define doxygenXmlParser_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "IFstream.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class doxygenXmlParser Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class doxygenXmlParser
|
||||
:
|
||||
public dictionary
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Construct from components
|
||||
doxygenXmlParser
|
||||
(
|
||||
const fileName& fName,
|
||||
const string& startTag,
|
||||
const string& searchStr,
|
||||
const bool exactMatch
|
||||
);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Skip past a block
|
||||
void skipBlock(IFstream& is, const word blockName) const;
|
||||
|
||||
//- Skip forward to block
|
||||
void skipForward(IFstream& is, const word blockName) const;
|
||||
|
||||
//- Return the entry
|
||||
template<class Type>
|
||||
void getEntry(IFstream& is, Type& entry) const;
|
||||
|
||||
//- Return the entry value
|
||||
template<class Type>
|
||||
void getValue(IFstream& is, Type& entry) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "doxygenXmlParserTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,67 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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 "doxygenXmlParser.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::doxygenXmlParser::getEntry(IFstream& is, Type& entry) const
|
||||
{
|
||||
char c;
|
||||
while (is.get(c) && c != '<')
|
||||
{}
|
||||
|
||||
entry = "";
|
||||
if (is.get(c) && c == '/')
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
entry = entry + c;
|
||||
}
|
||||
|
||||
while (is.get(c) && c != '>')
|
||||
{
|
||||
entry = entry + c;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::doxygenXmlParser::getValue(IFstream& is, Type& entry) const
|
||||
{
|
||||
char c;
|
||||
|
||||
entry = "";
|
||||
while (is.get(c) && c != '<')
|
||||
{
|
||||
entry = entry + c;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,192 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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 "helpBoundary.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace helpTypes
|
||||
{
|
||||
defineTypeNameAndDebug(helpBoundary, 0);
|
||||
addNamedToRunTimeSelectionTable
|
||||
(
|
||||
helpType,
|
||||
helpBoundary,
|
||||
dictionary,
|
||||
boundary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::helpTypes::helpBoundary::helpBoundary()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::helpTypes::helpBoundary::~helpBoundary()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::helpTypes::helpBoundary::init()
|
||||
{
|
||||
helpType::init();
|
||||
|
||||
argList::validArgs.append("boundary");
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"field",
|
||||
"word",
|
||||
"list available conditions for field"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"constraint",
|
||||
"list constraint patches"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"fixedValue",
|
||||
"list fixed value patches (use with -field option)"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::helpTypes::helpBoundary::execute
|
||||
(
|
||||
const argList& args,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
bool abortVar(env("FOAM_ABORT"));
|
||||
if (abortVar)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::helpTypes::helpBoundary::execute"
|
||||
"("
|
||||
"const argList&, "
|
||||
"const fvMesh&"
|
||||
")"
|
||||
)
|
||||
<< "Please unset FOAM_ABORT to use this utlity"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
word condition(word::null);
|
||||
word fieldName(word::null);
|
||||
|
||||
if (args.optionReadIfPresent("browse", condition))
|
||||
{
|
||||
// TODO: strip scoping info if present?
|
||||
// e.g. conditions with leading "compressible::" will not be found
|
||||
// ".*[fF]vPatchField.*" + className + ".*"
|
||||
displayDoc(condition, ".*[fF]vPatchField.*", false);
|
||||
}
|
||||
else if (args.optionFound("constraint"))
|
||||
{
|
||||
HashSet<word> constraintTypes(fvPatch::constraintTypes());
|
||||
Info<< "Constraint types:" << nl;
|
||||
forAllConstIter(HashSet<word>, constraintTypes, iter)
|
||||
{
|
||||
Info<< " " << iter.key() << nl;
|
||||
}
|
||||
Info<< endl;
|
||||
}
|
||||
else if (args.optionReadIfPresent("field", fieldName))
|
||||
{
|
||||
IOobject fieldHeader
|
||||
(
|
||||
fieldName,
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ
|
||||
);
|
||||
|
||||
if (fieldHeader.headerOk())
|
||||
{
|
||||
if (args.optionFound("fixedValue"))
|
||||
{
|
||||
fixedValueFieldConditions<scalar>(fieldHeader);
|
||||
fixedValueFieldConditions<vector>(fieldHeader);
|
||||
fixedValueFieldConditions<sphericalTensor>(fieldHeader);
|
||||
fixedValueFieldConditions<symmTensor>(fieldHeader);
|
||||
fixedValueFieldConditions<tensor>(fieldHeader);
|
||||
}
|
||||
else
|
||||
{
|
||||
(void)fieldConditions<scalar>(fieldHeader, true);
|
||||
(void)fieldConditions<vector>(fieldHeader, true);
|
||||
(void)fieldConditions<sphericalTensor>(fieldHeader, true);
|
||||
(void)fieldConditions<symmTensor>(fieldHeader, true);
|
||||
(void)fieldConditions<tensor>(fieldHeader, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::helpTypes::helpBoundary::execute"
|
||||
"("
|
||||
"const argList&, "
|
||||
"const fvMesh&"
|
||||
")"
|
||||
)
|
||||
<< "Unable to read field " << fieldName << exit(FatalError);
|
||||
}
|
||||
}
|
||||
else if (args.optionReadIfPresent("fixedValue", fieldName))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::helpTypes::helpBoundary::execute"
|
||||
"("
|
||||
"const argList&, "
|
||||
"const fvMesh&"
|
||||
")"
|
||||
)
|
||||
<< "-field option must be specified when using the -fixedValue "
|
||||
<< "option" << exit(FatalError);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: strip scoping info if present?
|
||||
// e.g. conditions with leading "compressible::" will not be found
|
||||
// ".*[fF]vPatchField.*" + className + ".*"
|
||||
displayDocOptions(".*[fF]vPatchField.*", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,126 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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/>.
|
||||
|
||||
Class
|
||||
Foam::helpBoundary
|
||||
|
||||
Description
|
||||
This class provides help for boundary conditions (patch fields). When no
|
||||
additional arguments are given, the utility outputs all known boundary
|
||||
conditions.
|
||||
|
||||
Usage:
|
||||
\plaintable
|
||||
\c -browse \<patch type\> | open documentation for patch in browser
|
||||
\c -field \<name\> | boundary conditions for a given field
|
||||
\c -constraint | list constraint boundary conditions
|
||||
\c -fixedValue | list \c fixedValue type boundary conditions
|
||||
\endplaintable
|
||||
|
||||
Note
|
||||
To use the \c -fixedValue option, the \c -field option should also be used
|
||||
|
||||
SeeAlso
|
||||
Foam::helpType
|
||||
Foam::fvPatchField
|
||||
|
||||
SourceFiles
|
||||
helpBoundary.C
|
||||
helpBoundaryTemplates.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef helpBoundary_H
|
||||
#define helpBoundary_H
|
||||
|
||||
#include "helpType.H"
|
||||
#include "IOobject.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace helpTypes
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class helpBoundary Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class helpBoundary
|
||||
:
|
||||
public helpType
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Return/output the available boundary conditions for fields of Type
|
||||
template<class Type>
|
||||
wordList fieldConditions(const IOobject& io, const bool write) const;
|
||||
|
||||
//- Output the available fixed boundary conditions for fields of Type
|
||||
template<class Type>
|
||||
void fixedValueFieldConditions(const IOobject& io) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("helpBoundary");
|
||||
|
||||
//- Constructor
|
||||
helpBoundary();
|
||||
|
||||
//- Destructor
|
||||
virtual ~helpBoundary();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Initialise - typically setting static variables,
|
||||
// e.g. command line arguments
|
||||
virtual void init();
|
||||
|
||||
//- Execute the help
|
||||
virtual void execute(const argList& args, const fvMesh& mesh);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace helpTypes
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "helpBoundaryTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,161 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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 "GeometricField.H"
|
||||
#include "fvPatchField.H"
|
||||
#include "volMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::wordList Foam::helpTypes::helpBoundary::fieldConditions
|
||||
(
|
||||
const IOobject& io,
|
||||
const bool write
|
||||
) const
|
||||
{
|
||||
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
||||
|
||||
if (io.headerClassName() == fieldType::typeName)
|
||||
{
|
||||
wordList types
|
||||
(
|
||||
fvPatchField<Type>::dictionaryConstructorTablePtr_->sortedToc()
|
||||
);
|
||||
|
||||
if (write)
|
||||
{
|
||||
Info<< "Available boundary conditions for "
|
||||
<< pTraits<Type>::typeName << " field: " << io.name() << nl;
|
||||
|
||||
forAll(types, i)
|
||||
{
|
||||
Info<< " " << types[i] << nl;
|
||||
}
|
||||
|
||||
Info<< endl;
|
||||
}
|
||||
|
||||
return types;
|
||||
}
|
||||
|
||||
return wordList();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::helpTypes::helpBoundary::fixedValueFieldConditions
|
||||
(
|
||||
const IOobject& io
|
||||
) const
|
||||
{
|
||||
wordList types(fieldConditions<Type>(io, false));
|
||||
|
||||
if (!types.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
||||
|
||||
const fvMesh& mesh = dynamic_cast<const fvMesh&>(io.db());
|
||||
|
||||
fieldType fld
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dummy",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
|
||||
);
|
||||
|
||||
|
||||
Info<< "Fixed value boundary conditions for "
|
||||
<< pTraits<Type>::typeName << " field: " << io.name() << nl;
|
||||
|
||||
// throw exceptions to avoid fatal errors when casting from generic patch
|
||||
// type to incompatible patch type
|
||||
FatalIOError.throwExceptions();
|
||||
FatalError.throwExceptions();
|
||||
|
||||
bool foundFixed = false;
|
||||
forAll(types, i)
|
||||
{
|
||||
const word& patchType = types[i];
|
||||
|
||||
try
|
||||
{
|
||||
polyPatch pp
|
||||
(
|
||||
"defaultFaces",
|
||||
0,
|
||||
mesh.nInternalFaces(),
|
||||
0,
|
||||
mesh.boundaryMesh(),
|
||||
patchType
|
||||
);
|
||||
|
||||
fvPatch fvp(pp, mesh.boundary());
|
||||
|
||||
tmp<fvPatchField<Type> > pf
|
||||
(
|
||||
fvPatchField<Type>::New
|
||||
(
|
||||
patchType,
|
||||
fvp,
|
||||
fld
|
||||
)
|
||||
);
|
||||
|
||||
if (pf().fixesValue())
|
||||
{
|
||||
Info<< " " << patchType << nl;
|
||||
foundFixed = true;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundFixed)
|
||||
{
|
||||
// no conditions???
|
||||
Info<< " none" << nl;
|
||||
}
|
||||
|
||||
Info<< endl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,88 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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 "helpFunctionObject.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace helpTypes
|
||||
{
|
||||
defineTypeNameAndDebug(helpFunctionObject, 0);
|
||||
addNamedToRunTimeSelectionTable
|
||||
(
|
||||
helpType,
|
||||
helpFunctionObject,
|
||||
dictionary,
|
||||
functionObject
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::helpTypes::helpFunctionObject::helpFunctionObject()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::helpTypes::helpFunctionObject::~helpFunctionObject()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::helpTypes::helpFunctionObject::init()
|
||||
{
|
||||
helpType::init();
|
||||
|
||||
argList::validArgs.append("functionObject");
|
||||
}
|
||||
|
||||
|
||||
void Foam::helpTypes::helpFunctionObject::execute
|
||||
(
|
||||
const argList& args,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
word function(word::null);
|
||||
|
||||
if (args.optionReadIfPresent("browse", function))
|
||||
{
|
||||
displayDoc(function, ".*[fF]unctionObject.*", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
displayDocOptions(".*[fF]unctionObject.*", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,98 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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/>.
|
||||
|
||||
Class
|
||||
Foam::helpFunctionObject
|
||||
|
||||
Description
|
||||
This class provides help for functionObjects. When no additional arguments
|
||||
are given, the utility outputs all known function objects.
|
||||
|
||||
Usage:
|
||||
\plaintable
|
||||
\c -browse \<patch type\> | open documentation for object in browser
|
||||
\endplaintable
|
||||
|
||||
SeeAlso
|
||||
Foam::helpType
|
||||
Foam::functionObject
|
||||
|
||||
SourceFiles
|
||||
helpFunctionObject.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef helpFunctionObject_H
|
||||
#define helpFunctionObject_H
|
||||
|
||||
#include "helpType.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace helpTypes
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class helpFunctionObject Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class helpFunctionObject
|
||||
:
|
||||
public helpType
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("helpFunctionObject");
|
||||
|
||||
//- Constructor
|
||||
helpFunctionObject();
|
||||
|
||||
//- Destructor
|
||||
virtual ~helpFunctionObject();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Initialise - typically setting static variables,
|
||||
// e.g. command line arguments
|
||||
virtual void init();
|
||||
|
||||
//- Execute the help
|
||||
virtual void execute(const argList& args, const fvMesh& mesh);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace helpTypes
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,185 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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 "helpType.H"
|
||||
#include "doxygenXmlParser.H"
|
||||
#include "SortableList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(helpType, 0);
|
||||
defineRunTimeSelectionTable(helpType, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
Foam::fileName Foam::helpType::doxygenPath() const
|
||||
{
|
||||
const dictionary& docDict = debug::controlDict().subDict("Documentation");
|
||||
List<fileName> docDirs(docDict.lookup("doxyDocDirs"));
|
||||
|
||||
label dirI = -1;
|
||||
forAll(docDirs, i)
|
||||
{
|
||||
if (isDir(docDirs[i].expand()))
|
||||
{
|
||||
dirI = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dirI == -1)
|
||||
{
|
||||
Info<< "No Doxygen sources found under search paths: "
|
||||
<< docDirs << endl;
|
||||
return fileName();
|
||||
}
|
||||
|
||||
return docDirs[dirI];
|
||||
}
|
||||
|
||||
|
||||
void Foam::helpType::displayDocOptions
|
||||
(
|
||||
const string& searchStr,
|
||||
const bool exactMatch
|
||||
) const
|
||||
{
|
||||
fileName doxyPath(doxygenPath());
|
||||
|
||||
if (doxyPath.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Info<< "Found doxygen help in " << doxyPath.c_str() << nl << endl;
|
||||
|
||||
doxygenXmlParser parser
|
||||
(
|
||||
doxyPath/"../DTAGS",
|
||||
"tagfile",
|
||||
searchStr,
|
||||
exactMatch
|
||||
);
|
||||
|
||||
Info<< "Valid types include:" << nl << SortableList<word>(parser.toc());
|
||||
}
|
||||
|
||||
|
||||
void Foam::helpType::displayDoc
|
||||
(
|
||||
const word& className,
|
||||
const string& searchStr,
|
||||
const bool exactMatch
|
||||
) const
|
||||
{
|
||||
fileName doxyPath(doxygenPath());
|
||||
|
||||
if (doxyPath.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Info<< "Found doxygen help in " << doxyPath.c_str() << nl << endl;
|
||||
|
||||
string docBrowser = getEnv("FOAM_DOC_BROWSER");
|
||||
if (docBrowser.empty())
|
||||
{
|
||||
const dictionary& docDict =
|
||||
debug::controlDict().subDict("Documentation");
|
||||
docDict.lookup("docBrowser") >> docBrowser;
|
||||
}
|
||||
|
||||
doxygenXmlParser parser
|
||||
(
|
||||
doxyPath/"../DTAGS",
|
||||
"tagfile",
|
||||
searchStr,
|
||||
exactMatch
|
||||
);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< parser;
|
||||
}
|
||||
|
||||
if (parser.found(className))
|
||||
{
|
||||
fileName docFile(doxyPath/parser.subDict(className).lookup("filename"));
|
||||
|
||||
// can use FOAM_DOC_BROWSER='application file://%f' if required
|
||||
docBrowser.replaceAll("%f", docFile);
|
||||
|
||||
fileName classFolder(parser.subDict(className).lookup("path"));
|
||||
word classFile(parser.subDict(className).lookup("name"));
|
||||
|
||||
Info<< "Showing documentation for type " << className << nl << endl;
|
||||
|
||||
Info<< "Source file: " << classFolder.c_str() << classFile << nl
|
||||
<< endl;
|
||||
|
||||
system(docBrowser);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::helpType::displayDoc(const word, const string)"
|
||||
)
|
||||
<< "No help for type " << className << " found."
|
||||
<< " Valid options include:" << SortableList<word>(parser.toc())
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::helpType::helpType()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::helpType::~helpType()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::helpType::init()
|
||||
{
|
||||
argList::addOption
|
||||
(
|
||||
"browse",
|
||||
"word",
|
||||
"display documentation for boundary condition in browser"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,125 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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/>.
|
||||
|
||||
Class
|
||||
Foam::helpType
|
||||
|
||||
Description
|
||||
Base class for foam help classes
|
||||
|
||||
SourceFiles
|
||||
helpType.C
|
||||
helpTypeNew.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef helpType_H
|
||||
#define helpType_H
|
||||
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "autoPtr.H"
|
||||
#include "argList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// forward declaration of classes
|
||||
|
||||
class fvMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class helpType Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class helpType
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
//- Return file path to the Doxygen sources (if available)
|
||||
fileName doxygenPath() const;
|
||||
|
||||
//- Display the list of documentation options
|
||||
void displayDocOptions
|
||||
(
|
||||
const string& searchStr,
|
||||
const bool exactMatch
|
||||
) const;
|
||||
|
||||
//- Display the help documentation in a browser
|
||||
void displayDoc
|
||||
(
|
||||
const word& className,
|
||||
const string& searchStr,
|
||||
const bool exactMatch
|
||||
) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("helpType");
|
||||
|
||||
// Declare runtime constructor selection table
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
helpType,
|
||||
dictionary,
|
||||
(),
|
||||
()
|
||||
);
|
||||
|
||||
|
||||
//- Constructor
|
||||
helpType();
|
||||
|
||||
//- Selector
|
||||
static autoPtr<helpType> New(const word& helpTypeName);
|
||||
|
||||
//- Destructor
|
||||
virtual ~helpType();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Initialise - typically setting static variables,
|
||||
// e.g. command line arguments
|
||||
virtual void init();
|
||||
|
||||
//- Execute the help
|
||||
virtual void execute(const argList& args, const fvMesh& mesh) = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,65 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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 "helpType.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::helpType> Foam::helpType::New
|
||||
(
|
||||
const word& helpTypeName
|
||||
)
|
||||
{
|
||||
Info<< "Selecting helpType " << helpTypeName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(helpTypeName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
// special treatment for -help
|
||||
// exit without stack trace
|
||||
if (helpTypeName == "-help")
|
||||
{
|
||||
FatalErrorIn("helpType::New()")
|
||||
<< "Valid helpType selections are:" << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc() << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("helpType::New()")
|
||||
<< "Unknown helpType type " << helpTypeName << nl
|
||||
<< "Valid helpType selections are:" << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc() << nl
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
return autoPtr<helpType>(cstrIter()());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -3,7 +3,8 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
@ -11,4 +12,5 @@ EXE_LIBS = \
|
||||
-lgenericPatchFields \
|
||||
-ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lmetisDecomp -lscotchDecomp \
|
||||
-llagrangian \
|
||||
-lmeshTools
|
||||
-lmeshTools \
|
||||
-lregionModels
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,13 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude
|
||||
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lgenericPatchFields \
|
||||
-llagrangian \
|
||||
-lmeshTools \
|
||||
-lreconstruct
|
||||
-lreconstruct \
|
||||
-lregionModels
|
||||
|
||||
@ -25,7 +25,7 @@ Application
|
||||
reconstructPar
|
||||
|
||||
Description
|
||||
Reconstructs a mesh and fields of a case that is decomposed for parallel
|
||||
Reconstructs fields of a case that is decomposed for parallel
|
||||
execution of OpenFOAM.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -36,6 +36,7 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "IOobjectList.H"
|
||||
#include "processorMeshes.H"
|
||||
#include "regionProperties.H"
|
||||
#include "fvFieldReconstructor.H"
|
||||
#include "pointFieldReconstructor.H"
|
||||
#include "reconstructLagrangian.H"
|
||||
@ -44,11 +45,21 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Reconstruct fields of a parallel case"
|
||||
);
|
||||
|
||||
// enable -constant ... if someone really wants it
|
||||
// enable -zeroTime to prevent accidentally trashing the initial fields
|
||||
timeSelector::addOptions(true, true);
|
||||
argList::noParallel();
|
||||
# include "addRegionOption.H"
|
||||
argList::addBoolOption
|
||||
(
|
||||
"allRegions",
|
||||
"operate on all regions in regionProperties"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"fields",
|
||||
@ -101,7 +112,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
const bool newTimes = args.optionFound("newTimes");
|
||||
const bool newTimes = args.optionFound("newTimes");
|
||||
const bool allRegions = args.optionFound("allRegions");
|
||||
|
||||
|
||||
// determine the processor count directly
|
||||
@ -159,414 +171,487 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
|
||||
# include "createNamedMesh.H"
|
||||
word regionDir = word::null;
|
||||
if (regionName != fvMesh::defaultRegion)
|
||||
{
|
||||
regionDir = regionName;
|
||||
}
|
||||
|
||||
// Set all times on processor meshes equal to reconstructed mesh
|
||||
forAll(databases, procI)
|
||||
{
|
||||
databases[procI].setTime(runTime.timeName(), runTime.timeIndex());
|
||||
}
|
||||
|
||||
// Read all meshes and addressing to reconstructed mesh
|
||||
processorMeshes procMeshes(databases, regionName);
|
||||
|
||||
|
||||
// check face addressing for meshes that have been decomposed
|
||||
// with a very old foam version
|
||||
# include "checkFaceAddressingComp.H"
|
||||
|
||||
// Loop over all times
|
||||
forAll(timeDirs, timeI)
|
||||
wordList regionNames;
|
||||
wordList regionDirs;
|
||||
if (allRegions)
|
||||
{
|
||||
if (newTimes)
|
||||
Info<< "Reconstructing for all regions in regionProperties" << nl
|
||||
<< endl;
|
||||
regionProperties rp(runTime);
|
||||
forAllConstIter(HashTable<wordList>, rp, iter)
|
||||
{
|
||||
// Compare on timeName, not value
|
||||
bool foundTime = false;
|
||||
forAll(masterTimeDirs, i)
|
||||
const wordList& regions = iter();
|
||||
forAll(regions, i)
|
||||
{
|
||||
if (masterTimeDirs[i].name() == timeDirs[timeI].name())
|
||||
if (findIndex(regionNames, regions[i]) == -1)
|
||||
{
|
||||
foundTime = true;
|
||||
break;
|
||||
regionNames.append(regions[i]);
|
||||
}
|
||||
}
|
||||
if (foundTime)
|
||||
}
|
||||
regionDirs = regionNames;
|
||||
}
|
||||
else
|
||||
{
|
||||
word regionName;
|
||||
if (args.optionReadIfPresent("region", regionName))
|
||||
{
|
||||
regionNames = wordList(1, regionName);
|
||||
regionDirs = regionNames;
|
||||
}
|
||||
else
|
||||
{
|
||||
regionNames = wordList(1, fvMesh::defaultRegion);
|
||||
regionDirs = wordList(1, word::null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
forAll(regionNames, regionI)
|
||||
{
|
||||
const word& regionName = regionNames[regionI];
|
||||
const word& regionDir = regionDirs[regionI];
|
||||
|
||||
Info<< "\n\nReconstructing fields for mesh " << regionName << nl
|
||||
<< endl;
|
||||
|
||||
fvMesh mesh
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
regionName,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// Read all meshes and addressing to reconstructed mesh
|
||||
processorMeshes procMeshes(databases, regionName);
|
||||
|
||||
|
||||
// check face addressing for meshes that have been decomposed
|
||||
// with a very old foam version
|
||||
# include "checkFaceAddressingComp.H"
|
||||
|
||||
// Loop over all times
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
if (newTimes)
|
||||
{
|
||||
Info<< "Skipping time " << timeDirs[timeI].name()
|
||||
<< endl << endl;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Set time for global database
|
||||
runTime.setTime(timeDirs[timeI], timeI);
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << endl << endl;
|
||||
|
||||
// Set time for all databases
|
||||
forAll(databases, procI)
|
||||
{
|
||||
databases[procI].setTime(timeDirs[timeI], timeI);
|
||||
}
|
||||
|
||||
// Check if any new meshes need to be read.
|
||||
fvMesh::readUpdateState meshStat = mesh.readUpdate();
|
||||
|
||||
fvMesh::readUpdateState procStat = procMeshes.readUpdate();
|
||||
|
||||
if (procStat == fvMesh::POINTS_MOVED)
|
||||
{
|
||||
// Reconstruct the points for moving mesh cases and write them out
|
||||
procMeshes.reconstructPoints(mesh);
|
||||
}
|
||||
else if (meshStat != procStat)
|
||||
{
|
||||
WarningIn(args.executable())
|
||||
<< "readUpdate for the reconstructed mesh:" << meshStat << nl
|
||||
<< "readUpdate for the processor meshes :" << procStat << nl
|
||||
<< "These should be equal or your addressing"
|
||||
<< " might be incorrect."
|
||||
<< " Please check your time directories for any "
|
||||
<< "mesh directories." << endl;
|
||||
}
|
||||
|
||||
|
||||
// Get list of objects from processor0 database
|
||||
IOobjectList objects(procMeshes.meshes()[0], databases[0].timeName());
|
||||
|
||||
{
|
||||
// If there are any FV fields, reconstruct them
|
||||
Info<< "Reconstructing FV fields" << nl << endl;
|
||||
|
||||
fvFieldReconstructor fvReconstructor
|
||||
(
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
procMeshes.faceProcAddressing(),
|
||||
procMeshes.cellProcAddressing(),
|
||||
procMeshes.boundaryProcAddressing()
|
||||
);
|
||||
|
||||
fvReconstructor.reconstructFvVolumeInternalFields<scalar>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeInternalFields<vector>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeInternalFields<sphericalTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeInternalFields<symmTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeInternalFields<tensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
|
||||
fvReconstructor.reconstructFvVolumeFields<scalar>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeFields<vector>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeFields<sphericalTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeFields<symmTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeFields<tensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
|
||||
fvReconstructor.reconstructFvSurfaceFields<scalar>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvSurfaceFields<vector>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvSurfaceFields<sphericalTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvSurfaceFields<symmTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvSurfaceFields<tensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
|
||||
if (fvReconstructor.nReconstructed() == 0)
|
||||
{
|
||||
Info<< "No FV fields" << nl << endl;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
Info<< "Reconstructing point fields" << nl << endl;
|
||||
|
||||
const pointMesh& pMesh = pointMesh::New(mesh);
|
||||
PtrList<pointMesh> pMeshes(procMeshes.meshes().size());
|
||||
|
||||
forAll(pMeshes, procI)
|
||||
{
|
||||
pMeshes.set(procI, new pointMesh(procMeshes.meshes()[procI]));
|
||||
// Compare on timeName, not value
|
||||
bool foundTime = false;
|
||||
forAll(masterTimeDirs, i)
|
||||
{
|
||||
if (masterTimeDirs[i].name() == timeDirs[timeI].name())
|
||||
{
|
||||
foundTime = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundTime)
|
||||
{
|
||||
Info<< "Skipping time " << timeDirs[timeI].name()
|
||||
<< endl << endl;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
pointFieldReconstructor pointReconstructor
|
||||
(
|
||||
pMesh,
|
||||
pMeshes,
|
||||
procMeshes.pointProcAddressing(),
|
||||
procMeshes.boundaryProcAddressing()
|
||||
);
|
||||
|
||||
pointReconstructor.reconstructFields<scalar>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
pointReconstructor.reconstructFields<vector>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
pointReconstructor.reconstructFields<sphericalTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
pointReconstructor.reconstructFields<symmTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
pointReconstructor.reconstructFields<tensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
// Set time for global database
|
||||
runTime.setTime(timeDirs[timeI], timeI);
|
||||
|
||||
if (pointReconstructor.nReconstructed() == 0)
|
||||
{
|
||||
Info<< "No point fields" << nl << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If there are any clouds, reconstruct them.
|
||||
// The problem is that a cloud of size zero will not get written so
|
||||
// in pass 1 we determine the cloud names and per cloud name the
|
||||
// fields. Note that the fields are stored as IOobjectList from
|
||||
// the first processor that has them. They are in pass2 only used
|
||||
// for name and type (scalar, vector etc).
|
||||
|
||||
if (!noLagrangian)
|
||||
{
|
||||
HashTable<IOobjectList> cloudObjects;
|
||||
Info<< "Time = " << runTime.timeName() << endl << endl;
|
||||
|
||||
// Set time for all databases
|
||||
forAll(databases, procI)
|
||||
{
|
||||
fileNameList cloudDirs
|
||||
databases[procI].setTime(timeDirs[timeI], timeI);
|
||||
}
|
||||
|
||||
// Check if any new meshes need to be read.
|
||||
fvMesh::readUpdateState meshStat = mesh.readUpdate();
|
||||
|
||||
fvMesh::readUpdateState procStat = procMeshes.readUpdate();
|
||||
|
||||
if (procStat == fvMesh::POINTS_MOVED)
|
||||
{
|
||||
// Reconstruct the points for moving mesh cases and write
|
||||
// them out
|
||||
procMeshes.reconstructPoints(mesh);
|
||||
}
|
||||
else if (meshStat != procStat)
|
||||
{
|
||||
WarningIn(args.executable())
|
||||
<< "readUpdate for the reconstructed mesh:"
|
||||
<< meshStat << nl
|
||||
<< "readUpdate for the processor meshes :"
|
||||
<< procStat << nl
|
||||
<< "These should be equal or your addressing"
|
||||
<< " might be incorrect."
|
||||
<< " Please check your time directories for any "
|
||||
<< "mesh directories." << endl;
|
||||
}
|
||||
|
||||
|
||||
// Get list of objects from processor0 database
|
||||
IOobjectList objects
|
||||
(
|
||||
procMeshes.meshes()[0],
|
||||
databases[0].timeName()
|
||||
);
|
||||
|
||||
{
|
||||
// If there are any FV fields, reconstruct them
|
||||
Info<< "Reconstructing FV fields" << nl << endl;
|
||||
|
||||
fvFieldReconstructor fvReconstructor
|
||||
(
|
||||
readDir
|
||||
(
|
||||
databases[procI].timePath() / regionDir / cloud::prefix,
|
||||
fileName::DIRECTORY
|
||||
)
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
procMeshes.faceProcAddressing(),
|
||||
procMeshes.cellProcAddressing(),
|
||||
procMeshes.boundaryProcAddressing()
|
||||
);
|
||||
|
||||
forAll(cloudDirs, i)
|
||||
fvReconstructor.reconstructFvVolumeInternalFields<scalar>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeInternalFields<vector>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeInternalFields
|
||||
<sphericalTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeInternalFields<symmTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeInternalFields<tensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
|
||||
fvReconstructor.reconstructFvVolumeFields<scalar>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeFields<vector>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeFields<sphericalTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeFields<symmTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvVolumeFields<tensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
|
||||
fvReconstructor.reconstructFvSurfaceFields<scalar>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvSurfaceFields<vector>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvSurfaceFields<sphericalTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvSurfaceFields<symmTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
fvReconstructor.reconstructFvSurfaceFields<tensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
|
||||
if (fvReconstructor.nReconstructed() == 0)
|
||||
{
|
||||
// Check if we already have cloud objects for this cloudname
|
||||
HashTable<IOobjectList>::const_iterator iter =
|
||||
cloudObjects.find(cloudDirs[i]);
|
||||
Info<< "No FV fields" << nl << endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (iter == cloudObjects.end())
|
||||
{
|
||||
// Do local scan for valid cloud objects
|
||||
IOobjectList sprayObjs
|
||||
{
|
||||
Info<< "Reconstructing point fields" << nl << endl;
|
||||
|
||||
const pointMesh& pMesh = pointMesh::New(mesh);
|
||||
PtrList<pointMesh> pMeshes(procMeshes.meshes().size());
|
||||
|
||||
forAll(pMeshes, procI)
|
||||
{
|
||||
pMeshes.set
|
||||
(
|
||||
procI,
|
||||
new pointMesh(procMeshes.meshes()[procI])
|
||||
);
|
||||
}
|
||||
|
||||
pointFieldReconstructor pointReconstructor
|
||||
(
|
||||
pMesh,
|
||||
pMeshes,
|
||||
procMeshes.pointProcAddressing(),
|
||||
procMeshes.boundaryProcAddressing()
|
||||
);
|
||||
|
||||
pointReconstructor.reconstructFields<scalar>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
pointReconstructor.reconstructFields<vector>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
pointReconstructor.reconstructFields<sphericalTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
pointReconstructor.reconstructFields<symmTensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
pointReconstructor.reconstructFields<tensor>
|
||||
(
|
||||
objects,
|
||||
selectedFields
|
||||
);
|
||||
|
||||
if (pointReconstructor.nReconstructed() == 0)
|
||||
{
|
||||
Info<< "No point fields" << nl << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If there are any clouds, reconstruct them.
|
||||
// The problem is that a cloud of size zero will not get written so
|
||||
// in pass 1 we determine the cloud names and per cloud name the
|
||||
// fields. Note that the fields are stored as IOobjectList from
|
||||
// the first processor that has them. They are in pass2 only used
|
||||
// for name and type (scalar, vector etc).
|
||||
|
||||
if (!noLagrangian)
|
||||
{
|
||||
HashTable<IOobjectList> cloudObjects;
|
||||
|
||||
forAll(databases, procI)
|
||||
{
|
||||
fileNameList cloudDirs
|
||||
(
|
||||
readDir
|
||||
(
|
||||
procMeshes.meshes()[procI],
|
||||
databases[procI].timeName(),
|
||||
cloud::prefix/cloudDirs[i]
|
||||
);
|
||||
databases[procI].timePath()
|
||||
/ regionDir
|
||||
/ cloud::prefix,
|
||||
fileName::DIRECTORY
|
||||
)
|
||||
);
|
||||
|
||||
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
||||
forAll(cloudDirs, i)
|
||||
{
|
||||
// Check if we already have cloud objects for this
|
||||
// cloudname
|
||||
HashTable<IOobjectList>::const_iterator iter =
|
||||
cloudObjects.find(cloudDirs[i]);
|
||||
|
||||
if (positionsPtr)
|
||||
if (iter == cloudObjects.end())
|
||||
{
|
||||
cloudObjects.insert(cloudDirs[i], sprayObjs);
|
||||
// Do local scan for valid cloud objects
|
||||
IOobjectList sprayObjs
|
||||
(
|
||||
procMeshes.meshes()[procI],
|
||||
databases[procI].timeName(),
|
||||
cloud::prefix/cloudDirs[i]
|
||||
);
|
||||
|
||||
IOobject* positionsPtr = sprayObjs.lookup
|
||||
(
|
||||
"positions"
|
||||
);
|
||||
|
||||
if (positionsPtr)
|
||||
{
|
||||
cloudObjects.insert(cloudDirs[i], sprayObjs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (cloudObjects.size())
|
||||
{
|
||||
// Pass2: reconstruct the cloud
|
||||
forAllConstIter(HashTable<IOobjectList>, cloudObjects, iter)
|
||||
if (cloudObjects.size())
|
||||
{
|
||||
const word cloudName = string::validate<word>(iter.key());
|
||||
// Pass2: reconstruct the cloud
|
||||
forAllConstIter(HashTable<IOobjectList>, cloudObjects, iter)
|
||||
{
|
||||
const word cloudName = string::validate<word>
|
||||
(
|
||||
iter.key()
|
||||
);
|
||||
|
||||
// Objects (on arbitrary processor)
|
||||
const IOobjectList& sprayObjs = iter();
|
||||
// Objects (on arbitrary processor)
|
||||
const IOobjectList& sprayObjs = iter();
|
||||
|
||||
Info<< "Reconstructing lagrangian fields for cloud "
|
||||
<< cloudName << nl << endl;
|
||||
Info<< "Reconstructing lagrangian fields for cloud "
|
||||
<< cloudName << nl << endl;
|
||||
|
||||
reconstructLagrangianPositions
|
||||
(
|
||||
mesh,
|
||||
cloudName,
|
||||
procMeshes.meshes(),
|
||||
procMeshes.faceProcAddressing(),
|
||||
procMeshes.cellProcAddressing()
|
||||
);
|
||||
reconstructLagrangianFields<label>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<label>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFields<scalar>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<scalar>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFields<vector>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<vector>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFields<sphericalTensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<sphericalTensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFields<symmTensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<symmTensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFields<tensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<tensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianPositions
|
||||
(
|
||||
mesh,
|
||||
cloudName,
|
||||
procMeshes.meshes(),
|
||||
procMeshes.faceProcAddressing(),
|
||||
procMeshes.cellProcAddressing()
|
||||
);
|
||||
reconstructLagrangianFields<label>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<label>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFields<scalar>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<scalar>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFields<vector>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<vector>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFields<sphericalTensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<sphericalTensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFields<symmTensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<symmTensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFields<tensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
reconstructLagrangianFieldFields<tensor>
|
||||
(
|
||||
cloudName,
|
||||
mesh,
|
||||
procMeshes.meshes(),
|
||||
sprayObjs,
|
||||
selectedLagrangianFields
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "No lagrangian fields" << nl << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "No lagrangian fields" << nl << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If there are any "uniform" directories copy them from
|
||||
// the master processor
|
||||
|
||||
// If there are any "uniform" directories copy them from
|
||||
// the master processor
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
fileName uniformDir0 = databases[0].timePath()/"uniform";
|
||||
if (isDir(uniformDir0))
|
||||
{
|
||||
|
||||
@ -107,7 +107,6 @@
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Use vtkPolyhedron instead of decomposing polyhedra.
|
||||
!!Actually uses vtkConvexPointSet until this is properly supported in VTK!!
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
@ -154,6 +153,20 @@
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Show Groups Only check-box -->
|
||||
<IntVectorProperty
|
||||
name="UiShowGroupsOnly"
|
||||
command="SetShowGroupsOnly"
|
||||
number_of_elements="1"
|
||||
default_values="0"
|
||||
is_internal="1"
|
||||
animateable="0">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Show groups only
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Force GUI update check box -->
|
||||
<IntVectorProperty
|
||||
name="UpdateGUI"
|
||||
@ -193,7 +206,8 @@
|
||||
</RequiredProperties>
|
||||
</ArraySelectionDomain>
|
||||
<Documentation>
|
||||
This property contains a list of the mesh parts (patches, sets, zones).
|
||||
This property contains a list of the mesh parts
|
||||
(patches, groups, sets, zones).
|
||||
</Documentation>
|
||||
</StringVectorProperty>
|
||||
|
||||
@ -281,6 +295,7 @@
|
||||
<Property name="UiZeroTime" show="0"/>
|
||||
<Property name="UiRefresh" show="0"/>
|
||||
<Property name="UiShowPatchNames" show="0"/>
|
||||
<Property name="UiShowGroupsOnly" show="0"/>
|
||||
<Property name="UiIncludeSets" show="0"/>
|
||||
<Property name="UiIncludeZones" show="0"/>
|
||||
</Hints>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -109,7 +109,7 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
||||
|
||||
QFrame* hline1 = new QFrame(this);
|
||||
hline1->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
||||
form->addWidget(hline1, 1, 0, 1, 2);
|
||||
form->addWidget(hline1, 1, 0, 1, 3);
|
||||
|
||||
// checkbox for caching mesh
|
||||
if ((prop = this->proxy()->GetProperty("UiCacheMesh")) != 0)
|
||||
@ -166,6 +166,34 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
||||
}
|
||||
|
||||
|
||||
// checkbox for Groups Only
|
||||
if ((prop = this->proxy()->GetProperty("UiShowGroupsOnly")) != 0)
|
||||
{
|
||||
// immediate update on the Server Manager side
|
||||
prop->SetImmediateUpdate(true);
|
||||
|
||||
ShowGroupsOnly_ = new QCheckBox("Groups Only");
|
||||
ShowGroupsOnly_->setChecked
|
||||
(
|
||||
vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
|
||||
);
|
||||
ShowGroupsOnly_->setToolTip
|
||||
(
|
||||
"Show patchGroups only."
|
||||
);
|
||||
|
||||
// row/col 2, 2
|
||||
form->addWidget(ShowGroupsOnly_, 2, 2, Qt::AlignLeft);
|
||||
connect
|
||||
(
|
||||
ShowGroupsOnly_,
|
||||
SIGNAL(stateChanged(int)),
|
||||
this,
|
||||
SLOT(ShowGroupsOnlyToggled())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// checkbox for include sets
|
||||
if ((prop = this->proxy()->GetProperty("UiIncludeSets")) != 0)
|
||||
{
|
||||
@ -278,7 +306,7 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
||||
|
||||
QFrame* hline2 = new QFrame(this);
|
||||
hline2->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
||||
form->addWidget(hline2, 5, 0, 1, 2);
|
||||
form->addWidget(hline2, 5, 0, 1, 3);
|
||||
}
|
||||
|
||||
|
||||
@ -336,6 +364,22 @@ void pqPV3FoamReaderPanel::ShowPatchNamesToggled()
|
||||
}
|
||||
|
||||
|
||||
void pqPV3FoamReaderPanel::ShowGroupsOnlyToggled()
|
||||
{
|
||||
vtkSMProperty* prop;
|
||||
|
||||
vtkSMIntVectorProperty::SafeDownCast
|
||||
(
|
||||
this->proxy()->GetProperty("UiShowGroupsOnly")
|
||||
)->SetElement(0, ShowGroupsOnly_->isChecked());
|
||||
|
||||
if ((prop = this->proxy()->GetProperty("PartArrayStatus")) != 0)
|
||||
{
|
||||
this->proxy()->UpdatePropertyInformation(prop);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pqPV3FoamReaderPanel::IncludeSetsToggled()
|
||||
{
|
||||
vtkSMProperty* prop;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -71,6 +71,9 @@ class pqPV3FoamReaderPanel
|
||||
//- Show Patch Names checkbox
|
||||
QCheckBox* ShowPatchNames_;
|
||||
|
||||
//- Show Groups Only checkbox
|
||||
QCheckBox* ShowGroupsOnly_;
|
||||
|
||||
//- IncludeSets checkbox
|
||||
QCheckBox* IncludeSets_;
|
||||
|
||||
@ -90,6 +93,7 @@ protected slots:
|
||||
void ZeroTimeToggled();
|
||||
void RefreshPressed();
|
||||
void ShowPatchNamesToggled();
|
||||
void ShowGroupsOnlyToggled();
|
||||
void IncludeSetsToggled();
|
||||
void IncludeZonesToggled();
|
||||
void InterpolateVolFieldsToggled();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -85,6 +85,7 @@ vtkPV3FoamReader::vtkPV3FoamReader()
|
||||
IncludeSets = 0;
|
||||
IncludeZones = 0;
|
||||
ShowPatchNames = 0;
|
||||
ShowGroupsOnly = 0;
|
||||
InterpolateVolFields = 1;
|
||||
|
||||
UpdateGUI = 0;
|
||||
@ -463,6 +464,19 @@ void vtkPV3FoamReader::SetShowPatchNames(int val)
|
||||
}
|
||||
|
||||
|
||||
void vtkPV3FoamReader::SetShowGroupsOnly(int val)
|
||||
{
|
||||
if (ShowGroupsOnly != val)
|
||||
{
|
||||
ShowGroupsOnly = val;
|
||||
if (foamData_)
|
||||
{
|
||||
foamData_->updateInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void vtkPV3FoamReader::updatePatchNamesView(const bool show)
|
||||
{
|
||||
pqApplicationCore* appCore = pqApplicationCore::instance();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -121,6 +121,11 @@ public:
|
||||
virtual void SetShowPatchNames(int);
|
||||
vtkGetMacro(ShowPatchNames, int);
|
||||
|
||||
// Description:
|
||||
// OpenFOAM display patchGroups
|
||||
virtual void SetShowGroupsOnly(int);
|
||||
vtkGetMacro(ShowGroupsOnly, int);
|
||||
|
||||
// Description:
|
||||
// OpenFOAM volField interpolation
|
||||
vtkSetMacro(InterpolateVolFields, int);
|
||||
@ -231,6 +236,7 @@ private:
|
||||
int IncludeSets;
|
||||
int IncludeZones;
|
||||
int ShowPatchNames;
|
||||
int ShowGroupsOnly;
|
||||
int InterpolateVolFields;
|
||||
|
||||
//- Dummy variable/switch to invoke a reader update
|
||||
|
||||
@ -2,7 +2,6 @@ vtkPV3Foam.C
|
||||
vtkPV3FoamFields.C
|
||||
vtkPV3FoamMesh.C
|
||||
vtkPV3FoamMeshLagrangian.C
|
||||
vtkPV3FoamMeshPatch.C
|
||||
vtkPV3FoamMeshSet.C
|
||||
vtkPV3FoamMeshVolume.C
|
||||
vtkPV3FoamMeshZone.C
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,7 +33,7 @@ SourceFiles
|
||||
vtkPV3FoamFields.C
|
||||
vtkPV3FoamMesh.C
|
||||
vtkPV3FoamMeshLagrangian.C
|
||||
vtkPV3FoamMeshPatch.C
|
||||
vtkPV3FoamTemplates.C
|
||||
vtkPV3FoamMeshSet.C
|
||||
vtkPV3FoamMeshVolume.C
|
||||
vtkPV3FoamMeshZone.C
|
||||
@ -443,7 +443,8 @@ class vtkPV3Foam
|
||||
);
|
||||
|
||||
//- Add patch mesh
|
||||
vtkPolyData* patchVTKMesh(const polyPatch&);
|
||||
template<class PatchType>
|
||||
vtkPolyData* patchVTKMesh(const word& name, const PatchType&);
|
||||
|
||||
//- Add face zone mesh
|
||||
vtkPolyData* faceZoneVTKMesh
|
||||
@ -736,6 +737,12 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "vtkPV3FoamTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,6 +31,7 @@ License
|
||||
#include "pointSet.H"
|
||||
#include "fvMeshSubset.H"
|
||||
#include "vtkPV3FoamReader.h"
|
||||
#include "uindirectPrimitivePatch.H"
|
||||
|
||||
// VTK includes
|
||||
#include "vtkDataArraySelection.h"
|
||||
@ -171,21 +172,50 @@ void Foam::vtkPV3Foam::convertMeshPatches
|
||||
|
||||
for (int partId = range.start(); partId < range.end(); ++partId)
|
||||
{
|
||||
const word patchName = getPartName(partId);
|
||||
const label patchId = patches.findPatchID(patchName);
|
||||
|
||||
if (!partStatus_[partId] || patchId < 0)
|
||||
if (!partStatus_[partId])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const word patchName = getPartName(partId);
|
||||
|
||||
labelHashSet patchIds(patches.patchSet(List<wordRe>(1, patchName)));
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Creating VTK mesh for patch[" << patchId <<"] "
|
||||
Info<< "Creating VTK mesh for patches [" << patchIds <<"] "
|
||||
<< patchName << endl;
|
||||
}
|
||||
|
||||
vtkPolyData* vtkmesh = patchVTKMesh(patches[patchId]);
|
||||
vtkPolyData* vtkmesh = NULL;
|
||||
if (patchIds.size() == 1)
|
||||
{
|
||||
vtkmesh = patchVTKMesh(patchName, patches[patchIds.begin().key()]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Patch group. Collect patch faces.
|
||||
label sz = 0;
|
||||
forAllConstIter(labelHashSet, patchIds, iter)
|
||||
{
|
||||
sz += patches[iter.key()].size();
|
||||
}
|
||||
labelList meshFaceLabels(sz);
|
||||
sz = 0;
|
||||
forAllConstIter(labelHashSet, patchIds, iter)
|
||||
{
|
||||
const polyPatch& pp = patches[iter.key()];
|
||||
forAll(pp, i)
|
||||
{
|
||||
meshFaceLabels[sz++] = pp.start()+i;
|
||||
}
|
||||
}
|
||||
UIndirectList<face> fcs(mesh.faces(), meshFaceLabels);
|
||||
uindirectPrimitivePatch pp(fcs, mesh.points());
|
||||
|
||||
vtkmesh = patchVTKMesh(patchName, pp);
|
||||
}
|
||||
|
||||
|
||||
if (vtkmesh)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,13 +37,18 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
vtkPolyData* Foam::vtkPV3Foam::patchVTKMesh(const polyPatch& p)
|
||||
template<class PatchType>
|
||||
vtkPolyData* Foam::vtkPV3Foam::patchVTKMesh
|
||||
(
|
||||
const word& name,
|
||||
const PatchType& p
|
||||
)
|
||||
{
|
||||
vtkPolyData* vtkmesh = vtkPolyData::New();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "<beg> Foam::vtkPV3Foam::patchVTKMesh - " << p.name() << endl;
|
||||
Info<< "<beg> Foam::vtkPV3Foam::patchVTKMesh - " << name << endl;
|
||||
printMemory();
|
||||
}
|
||||
|
||||
@ -83,7 +88,7 @@ vtkPolyData* Foam::vtkPV3Foam::patchVTKMesh(const polyPatch& p)
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "<end> Foam::vtkPV3Foam::patchVTKMesh - " << p.name() << endl;
|
||||
Info<< "<end> Foam::vtkPV3Foam::patchVTKMesh - " << name << endl;
|
||||
printMemory();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -241,7 +241,6 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
||||
{
|
||||
const polyBoundaryMesh& patches = meshPtr_->boundaryMesh();
|
||||
const HashTable<labelList, word>& groups = patches.groupPatchIDs();
|
||||
|
||||
const wordList allPatchNames = patches.names();
|
||||
|
||||
// Add patch groups
|
||||
@ -273,13 +272,19 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
||||
|
||||
if (enabledEntriesSet.found(vtkGrpName))
|
||||
{
|
||||
forAll(patchIDs, i)
|
||||
if (!reader_->GetShowGroupsOnly())
|
||||
{
|
||||
const polyPatch& pp = patches[patchIDs[i]];
|
||||
string vtkPatchName = pp.name() + " - patch";
|
||||
enabledEntriesSet.insert(vtkPatchName);
|
||||
enabledEntriesSet.erase(vtkGrpName);
|
||||
forAll(patchIDs, i)
|
||||
{
|
||||
const polyPatch& pp = patches[patchIDs[i]];
|
||||
if (pp.size())
|
||||
{
|
||||
string vtkPatchName = pp.name() + " - patch";
|
||||
enabledEntriesSet.insert(vtkPatchName);
|
||||
}
|
||||
}
|
||||
}
|
||||
enabledEntriesSet.erase(vtkGrpName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -288,19 +293,22 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
||||
// Add patches
|
||||
// ~~~~~~~~~~~
|
||||
|
||||
forAll(patches, patchI)
|
||||
if (!reader_->GetShowGroupsOnly())
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
if (pp.size())
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
// Add patch to GUI list
|
||||
arraySelection->AddArray
|
||||
(
|
||||
(pp.name() + " - patch").c_str()
|
||||
);
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
++nPatches;
|
||||
if (pp.size())
|
||||
{
|
||||
// Add patch to GUI list
|
||||
arraySelection->AddArray
|
||||
(
|
||||
(pp.name() + " - patch").c_str()
|
||||
);
|
||||
|
||||
++nPatches;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -356,6 +364,7 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
||||
|
||||
wordList groupNames;
|
||||
patchDict.readIfPresent("inGroups", groupNames);
|
||||
|
||||
forAll(groupNames, groupI)
|
||||
{
|
||||
HashTable<labelList, word>::iterator iter = groups.find
|
||||
@ -394,20 +403,25 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
||||
if (nFaces)
|
||||
{
|
||||
string vtkGrpName = groupName + " - group";
|
||||
|
||||
arraySelection->AddArray(vtkGrpName.c_str());
|
||||
|
||||
++nPatches;
|
||||
|
||||
if (enabledEntriesSet.found(vtkGrpName))
|
||||
{
|
||||
forAll(patchIDs, i)
|
||||
if (!reader_->GetShowGroupsOnly())
|
||||
{
|
||||
string vtkPatchName =
|
||||
names[patchIDs[i]] + " - patch";
|
||||
enabledEntriesSet.insert(vtkPatchName);
|
||||
enabledEntriesSet.erase(vtkGrpName);
|
||||
forAll(patchIDs, i)
|
||||
{
|
||||
if (sizes[patchIDs[i]])
|
||||
{
|
||||
string vtkPatchName =
|
||||
names[patchIDs[i]] + " - patch";
|
||||
enabledEntriesSet.insert(vtkPatchName);
|
||||
}
|
||||
}
|
||||
}
|
||||
enabledEntriesSet.erase(vtkGrpName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -416,17 +430,20 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
||||
// Add (non-zero) patches to the list of mesh parts
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
forAll(names, patchI)
|
||||
if (!reader_->GetShowGroupsOnly())
|
||||
{
|
||||
// Valid patch if nFace > 0 - add patch to GUI list
|
||||
if (sizes[patchI])
|
||||
forAll(names, patchI)
|
||||
{
|
||||
arraySelection->AddArray
|
||||
(
|
||||
(names[patchI] + " - patch").c_str()
|
||||
);
|
||||
// Valid patch if nFace > 0 - add patch to GUI list
|
||||
if (sizes[patchI])
|
||||
{
|
||||
arraySelection->AddArray
|
||||
(
|
||||
(names[patchI] + " - patch").c_str()
|
||||
);
|
||||
|
||||
++nPatches;
|
||||
++nPatches;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,7 +54,8 @@ then
|
||||
# ;;
|
||||
esac
|
||||
|
||||
awk -f $awkScript $1 | \
|
||||
awk -f $WM_PROJECT_DIR/bin/tools/doxyFilter-table.awk $1 | \
|
||||
awk -f $awkScript | \
|
||||
sed -f $WM_PROJECT_DIR/bin/tools/doxyFilter.sed \
|
||||
-e s@%filePath%@$filePath@g \
|
||||
-e s@%fileName%@$fileName@g \
|
||||
|
||||
135
bin/tools/doxyFilter-table.awk
Normal file
135
bin/tools/doxyFilter-table.awk
Normal file
@ -0,0 +1,135 @@
|
||||
BEGIN {
|
||||
FS = "|";
|
||||
data = "";
|
||||
flag = 0;
|
||||
firstRow = 0;
|
||||
}
|
||||
|
||||
|
||||
/\\table/ {
|
||||
flag = 1;
|
||||
firstRow = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
/\\endtable/ {
|
||||
if (data != "")
|
||||
{
|
||||
printf "<table class=\"OFTable\">\n";
|
||||
printf data;
|
||||
printf "</table>\n";
|
||||
}
|
||||
|
||||
data = "";
|
||||
flag = 0;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
/\\vartable/ {
|
||||
flag = 2;
|
||||
firstRow = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
/\\endvartable/ {
|
||||
if (data != "")
|
||||
{
|
||||
printf "<table border="0">\n";
|
||||
printf data;
|
||||
printf "</table>\n";
|
||||
}
|
||||
|
||||
data = "";
|
||||
flag = 0;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
/\\plaintable/ {
|
||||
flag = 3;
|
||||
firstRow = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
/\\endplaintable/ {
|
||||
if (data != "")
|
||||
{
|
||||
printf "<table border="0">\n";
|
||||
printf data;
|
||||
printf "</table>\n";
|
||||
}
|
||||
|
||||
data = "";
|
||||
flag = 0;
|
||||
next;
|
||||
}
|
||||
|
||||
{
|
||||
if (flag > 0)
|
||||
{
|
||||
data = (data "<tr>\n");
|
||||
if (flag == 1)
|
||||
{
|
||||
for (i = 0; i <= NF; i++)
|
||||
{
|
||||
if ((i != 0) && (firstRow == 1))
|
||||
{
|
||||
data = (data " <th align=\"center\"><b>"$i"</b></th>\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i == 1)
|
||||
{
|
||||
data = (data " <td>\\c "$i"</td>\n");
|
||||
}
|
||||
else if (i > 1)
|
||||
{
|
||||
data = (data " <td>"$i"</td>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (flag == 2)
|
||||
{
|
||||
for (i = 0; i <= NF; i++)
|
||||
{
|
||||
if (i == 1)
|
||||
{
|
||||
data = (data " <td style=\"padding-left: 10px\">\\f$"$i"\\f$</td>\n");
|
||||
data = (data " <td style=\"padding-left: 10px; padding-right: 10px;\">=</td>\n");
|
||||
}
|
||||
else if (i > 1)
|
||||
{
|
||||
data = (data " <td>"$i"</td>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (flag == 3)
|
||||
{
|
||||
for (i = 0; i <= NF; i++)
|
||||
{
|
||||
if (i == 1)
|
||||
{
|
||||
data = (data " <td style=\"padding-left: 10px\">"$i"</td>\n");
|
||||
data = (data " <td style=\"padding-left: 10px; padding-right: 10px;\">:</td>\n");
|
||||
}
|
||||
else if (i > 1)
|
||||
{
|
||||
data = (data " <td>"$i"</td>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
data = (data "</tr>\n");
|
||||
firstRow = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
print $0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -64,6 +64,17 @@ s/^ /\\class /
|
||||
}
|
||||
|
||||
|
||||
# Group
|
||||
# groupName
|
||||
# =>
|
||||
# \ingroup namespaceName
|
||||
#
|
||||
/^Group *$/,/^[^ ]/{
|
||||
s/^Group//
|
||||
s/^ /\\ingroup /
|
||||
}
|
||||
|
||||
|
||||
# Namespace
|
||||
# namespaceName
|
||||
# =>
|
||||
@ -150,6 +161,13 @@ s? *\([a-zA-Z0-9]*\.[a-zA-Z]*\)? <li><a href="%dirName%/\1">\1</a></li>?
|
||||
|
||||
s/.*\*\//\*\//
|
||||
|
||||
|
||||
# convert /heading in source files to bold font and add some space
|
||||
s#\\heading \(.*\)#<br><b>\1</b>#g
|
||||
|
||||
# add a linebreak
|
||||
s#\\linebreak#<br>#g
|
||||
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@ -608,7 +608,8 @@ INPUT_ENCODING = UTF-8
|
||||
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
|
||||
|
||||
FILE_PATTERNS = *.H \
|
||||
*.C
|
||||
*.C \
|
||||
*.dox
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
# should be searched for input files as well. Possible values are YES and NO.
|
||||
|
||||
@ -61,3 +61,19 @@ tr.memlist
|
||||
margin-top: 0px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.OFTable {
|
||||
width: 100%;
|
||||
border: 1px solid rgb(175,175,175);
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
/* background-color: #F0F0F0; */
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.OFTable th {
|
||||
padding: 5px;
|
||||
border-bottom: 2px solid rgb(175,175,175);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -73,18 +73,18 @@ extern "C"
|
||||
makeRemovablePatchTypeField
|
||||
(
|
||||
fvPatch${FieldType},
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
);
|
||||
|
||||
|
||||
const char* const ${typeName}FixedValueFvPatch${FieldType}::SHA1sum =
|
||||
const char* const ${typeName}MixedValueFvPatch${FieldType}::SHA1sum =
|
||||
"${SHA1sum}";
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||
@ -100,10 +100,10 @@ ${typeName}FixedValueFvPatch${FieldType}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}& ptf,
|
||||
const ${typeName}MixedValueFvPatch${FieldType}& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
@ -119,8 +119,8 @@ ${typeName}FixedValueFvPatch${FieldType}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||
@ -137,10 +137,10 @@ ${typeName}FixedValueFvPatch${FieldType}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}& ptf
|
||||
const ${typeName}MixedValueFvPatch${FieldType}& ptf
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<${TemplateType}>(ptf)
|
||||
@ -153,10 +153,10 @@ ${typeName}FixedValueFvPatch${FieldType}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}& ptf,
|
||||
const ${typeName}MixedValueFvPatch${FieldType}& ptf,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||
)
|
||||
:
|
||||
@ -172,8 +172,8 @@ ${typeName}FixedValueFvPatch${FieldType}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
~${typeName}FixedValueFvPatch${FieldType}()
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
~${typeName}MixedValueFvPatch${FieldType}()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
@ -184,7 +184,7 @@ ${typeName}FixedValueFvPatch${FieldType}::
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void ${typeName}FixedValueFvPatch${FieldType}::updateCoeffs()
|
||||
void ${typeName}MixedValueFvPatch${FieldType}::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,10 +43,10 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
A templated FixedValueFvPatch
|
||||
A templated MixedValueFvPatchField
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class ${typeName}FixedValueFvPatch${FieldType}
|
||||
class ${typeName}MixedValueFvPatch${FieldType}
|
||||
:
|
||||
public mixedFvPatchField<${TemplateType}>
|
||||
{
|
||||
@ -62,14 +62,14 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&,
|
||||
@ -77,18 +77,18 @@ public:
|
||||
);
|
||||
|
||||
//- Construct by mapping a copy onto a new patch
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}&,
|
||||
const ${typeName}MixedValueFvPatch${FieldType}&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}&
|
||||
const ${typeName}MixedValueFvPatch${FieldType}&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
@ -96,14 +96,14 @@ public:
|
||||
{
|
||||
return tmp< fvPatch${FieldType} >
|
||||
(
|
||||
new ${typeName}FixedValueFvPatch${FieldType}(*this)
|
||||
new ${typeName}MixedValueFvPatch${FieldType}(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}&,
|
||||
const ${typeName}MixedValueFvPatch${FieldType}&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&
|
||||
);
|
||||
|
||||
@ -115,13 +115,13 @@ public:
|
||||
{
|
||||
return tmp< fvPatch${FieldType} >
|
||||
(
|
||||
new ${typeName}FixedValueFvPatch${FieldType}(*this, iF)
|
||||
new ${typeName}MixedValueFvPatch${FieldType}(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~${typeName}FixedValueFvPatch${FieldType}();
|
||||
virtual ~${typeName}MixedValueFvPatch${FieldType}();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
@ -151,15 +151,17 @@ setenv FOAM_LIBBIN $WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
|
||||
# external (ThirdParty) libraries
|
||||
setenv FOAM_EXT_LIBBIN $WM_THIRD_PARTY_DIR/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# site-specific directory
|
||||
if ( $?WM_PROJECT_SITE ) then
|
||||
set siteDir=$WM_PROJECT_SITE
|
||||
else
|
||||
set siteDir=$WM_PROJECT_INST_DIR/site
|
||||
endif
|
||||
|
||||
# shared site executables/libraries
|
||||
# similar naming convention as ~OpenFOAM expansion
|
||||
if ( $?WM_PROJECT_SITE ) then
|
||||
setenv FOAM_SITE_APPBIN $WM_PROJECT_SITE/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||
setenv FOAM_SITE_LIBBIN $WM_PROJECT_SITE/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||
else
|
||||
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||
endif
|
||||
setenv FOAM_SITE_APPBIN $siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||
setenv FOAM_SITE_LIBBIN $siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# user executables/libraries
|
||||
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
|
||||
@ -182,6 +184,15 @@ if ( -d "${WM_DIR}" ) setenv PATH ${WM_DIR}:${PATH}
|
||||
# add OpenFOAM scripts to the path
|
||||
setenv PATH ${WM_PROJECT_DIR}/bin:${PATH}
|
||||
|
||||
# add site-specific scripts to path - only if they exist
|
||||
if ( -d "$siteDir/bin" ) then # generic
|
||||
_foamAddPath "$siteDir/bin"
|
||||
endif
|
||||
if ( -d "$siteDir/$WM_PROJECT_VERSION/bin" ) then # version-specific
|
||||
_foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
|
||||
endif
|
||||
unset siteDir
|
||||
|
||||
_foamAddPath ${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN}
|
||||
# Make sure to pick up dummy versions of external libraries last
|
||||
_foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_EXT_LIBBIN}:${FOAM_LIBBIN}/dummy
|
||||
|
||||
@ -179,16 +179,13 @@ export FOAM_LIBBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
|
||||
# external (ThirdParty) libraries
|
||||
export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# site-specific directory
|
||||
siteDir="${WM_PROJECT_SITE:-$WM_PROJECT_INST_DIR/site}"
|
||||
|
||||
# shared site executables/libraries
|
||||
# similar naming convention as ~OpenFOAM expansion
|
||||
if [ -n "$WM_PROJECT_SITE" ]
|
||||
then
|
||||
export FOAM_SITE_APPBIN=$WM_PROJECT_SITE/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||
export FOAM_SITE_LIBBIN=$WM_PROJECT_SITE/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||
else
|
||||
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||
fi
|
||||
export FOAM_SITE_APPBIN=$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||
export FOAM_SITE_LIBBIN=$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# user executables/libraries
|
||||
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
|
||||
@ -211,6 +208,17 @@ export FOAM_RUN=$WM_PROJECT_USER_DIR/run
|
||||
# add OpenFOAM scripts to the path
|
||||
export PATH=$WM_PROJECT_DIR/bin:$PATH
|
||||
|
||||
# add site-specific scripts to path - only if they exist
|
||||
if [ -d "$siteDir/bin" ] # generic
|
||||
then
|
||||
_foamAddPath "$siteDir/bin"
|
||||
fi
|
||||
if [ -d "$siteDir/$WM_PROJECT_VERSION/bin" ] # version-specific
|
||||
then
|
||||
_foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
|
||||
fi
|
||||
unset siteDir
|
||||
|
||||
_foamAddPath $FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN
|
||||
# Make sure to pick up dummy versions of external libraries last
|
||||
_foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_EXT_LIBBIN:$FOAM_LIBBIN/dummy
|
||||
@ -232,6 +240,12 @@ fi
|
||||
case "${foamCompiler}" in
|
||||
OpenFOAM | ThirdParty)
|
||||
case "$WM_COMPILER" in
|
||||
Gcc463)
|
||||
gcc_version=gcc-4.6.3
|
||||
gmp_version=gmp-5.0.2
|
||||
mpfr_version=mpfr-3.0.1
|
||||
mpc_version=mpc-0.9
|
||||
;;
|
||||
Gcc | Gcc++0x | Gcc46 | Gcc46++0x)
|
||||
gcc_version=gcc-4.6.1
|
||||
gmp_version=gmp-5.0.4
|
||||
|
||||
@ -989,7 +989,7 @@ DimensionSets
|
||||
|
||||
// Set of units used for printing. Can be any basic or derived
|
||||
// but not scaled (only supported for dimensionedScalar, etc)
|
||||
printUnits (kg m s K mol A Cd);
|
||||
writeUnits (kg m s K mol A Cd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -67,7 +67,6 @@ turbulenceModels/Allwmake $*
|
||||
wmake $makeType combustionModels
|
||||
regionModels/Allwmake $*
|
||||
lagrangian/Allwmake $*
|
||||
postProcessing/Allwmake $*
|
||||
mesh/Allwmake $*
|
||||
|
||||
fvAgglomerationMethods/Allwmake $*
|
||||
@ -77,4 +76,6 @@ wmake $makeType engine
|
||||
|
||||
wmake $makeType fieldSources
|
||||
|
||||
postProcessing/Allwmake $*
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,11 +104,8 @@ Foam::functionEntries::codeStream::getFunction
|
||||
|
||||
// codeName: codeStream + _<sha1>
|
||||
// codeDir : _<sha1>
|
||||
dynamicCode dynCode
|
||||
(
|
||||
"codeStream" + context.sha1().str(true),
|
||||
context.sha1().str(true)
|
||||
);
|
||||
std::string sha1Str(context.sha1().str(true));
|
||||
dynamicCode dynCode("codeStream" + sha1Str, sha1Str);
|
||||
|
||||
// Load library if not already loaded
|
||||
// Version information is encoded in the libPath (encoded with the SHA1)
|
||||
|
||||
@ -29,12 +29,12 @@ Description
|
||||
generate the entry itself. So
|
||||
- codeStream reads three entries: 'code', 'codeInclude' (optional),
|
||||
'codeOptions' (optional)
|
||||
and uses those to generate library sources inside \f codeStream/
|
||||
and uses those to generate library sources inside \c codeStream/
|
||||
- these get compiled using 'wmake libso'
|
||||
- the resulting library is loaded in executed with as arguments
|
||||
\code
|
||||
(const dictionary& dict, Ostream& os)
|
||||
\endcode
|
||||
\endcode
|
||||
where the dictionary is the current dictionary.
|
||||
- the code has to write into Ostream which is then used to construct
|
||||
the actual dictionary entry.
|
||||
@ -77,12 +77,12 @@ Description
|
||||
\c \$ and \c ~ sequences)
|
||||
|
||||
Note
|
||||
The code to be compiled is stored under the local \f codeStream directory
|
||||
The code to be compiled is stored under the local \c codeStream directory
|
||||
with a subdirectory name corresponding to the SHA1 of the contents.
|
||||
|
||||
The corresponding library code is located under the local
|
||||
\f codeStream/platforms/$WM_OPTIONS/lib directory in a library
|
||||
\f libcodeStream_SHA1.so
|
||||
\c codeStream/platforms/$WM_OPTIONS/lib directory in a library
|
||||
\c libcodeStream_SHA1.so
|
||||
|
||||
SourceFiles
|
||||
codeStream.C
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,7 +104,7 @@ protected:
|
||||
virtual void prepare
|
||||
(
|
||||
dynamicCode&,
|
||||
const dynamicCodeContext &
|
||||
const dynamicCodeContext&
|
||||
) const = 0;
|
||||
|
||||
// Return a description (type + name) for the output
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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/>.
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
\defgroup grpFunctionObjects Function objects
|
||||
@{
|
||||
This group contains function objects
|
||||
@}
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -26,7 +26,7 @@ Class
|
||||
|
||||
Description
|
||||
Extract command arguments and options from the supplied
|
||||
\a argc and @a argv parameters.
|
||||
\a argc and \a argv parameters.
|
||||
|
||||
Sequences with "(" ... ")" are transformed into a stringList.
|
||||
For example,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -21,6 +21,8 @@ License
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
\mainpage OpenFOAM®: open source CFD
|
||||
|
||||
\section about About OpenFOAM
|
||||
@ -34,4 +36,29 @@ License
|
||||
turbulence and heat transfer, to solid dynamics and electromagnetics.
|
||||
<a href="http://www.openfoam.org/features">More ...</a>
|
||||
|
||||
|
||||
\section layout Code Layout
|
||||
|
||||
The OpenFOAM source code comprises of four main components:
|
||||
- src:
|
||||
the core OpenFOAM source code
|
||||
|
||||
- applications:
|
||||
collections of library functionality wrapped up into applications,
|
||||
such as solvers and utilities
|
||||
|
||||
- tutorials:
|
||||
a suite of test cases that highlight a broad cross-section of
|
||||
OpenFOAM's capabilities
|
||||
|
||||
- doc:
|
||||
supporting documentation
|
||||
|
||||
|
||||
\section usingTheCode Using the code
|
||||
|
||||
- \subpage pagePostProcessing
|
||||
- \subpage pageBoundaryConditions
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -102,8 +102,7 @@ singleStepCombustion<CombThermoType, ThermoType>::~singleStepCombustion()
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
singleStepCombustion<CombThermoType, ThermoType>::R
|
||||
tmp<fvScalarMatrix> singleStepCombustion<CombThermoType, ThermoType>::R
|
||||
(
|
||||
volScalarField& Y
|
||||
) const
|
||||
@ -131,8 +130,8 @@ singleStepCombustion<CombThermoType, ThermoType>::R
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
singleStepCombustion< CombThermoType, ThermoType>::Sh() const
|
||||
tmp<volScalarField>
|
||||
singleStepCombustion<CombThermoType, ThermoType>::Sh() const
|
||||
{
|
||||
const label fuelI = singleMixturePtr_->fuelIndex();
|
||||
volScalarField& YFuel =
|
||||
@ -143,8 +142,8 @@ singleStepCombustion< CombThermoType, ThermoType>::Sh() const
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
singleStepCombustion< CombThermoType, ThermoType>::dQ() const
|
||||
tmp<volScalarField>
|
||||
singleStepCombustion<CombThermoType, ThermoType>::dQ() const
|
||||
{
|
||||
tmp<volScalarField> tdQ
|
||||
(
|
||||
@ -175,7 +174,7 @@ singleStepCombustion< CombThermoType, ThermoType>::dQ() const
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
bool singleStepCombustion< CombThermoType, ThermoType>::read()
|
||||
bool singleStepCombustion<CombThermoType, ThermoType>::read()
|
||||
{
|
||||
if (CombThermoType::read())
|
||||
{
|
||||
|
||||
@ -62,6 +62,22 @@ Foam::basicSourceList::basicSourceList
|
||||
PtrList<basicSource>(),
|
||||
mesh_(mesh),
|
||||
checkTimeIndex_(mesh_.time().startTimeIndex() + 2)
|
||||
{
|
||||
reset(dict);
|
||||
}
|
||||
|
||||
|
||||
Foam::basicSourceList::basicSourceList(const fvMesh& mesh)
|
||||
:
|
||||
PtrList<basicSource>(),
|
||||
mesh_(mesh),
|
||||
checkTimeIndex_(mesh_.time().startTimeIndex() + 2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::basicSourceList::reset(const dictionary& dict)
|
||||
{
|
||||
label count = 0;
|
||||
forAllConstIter(dictionary, dict, iter)
|
||||
@ -85,15 +101,13 @@ Foam::basicSourceList::basicSourceList
|
||||
this->set
|
||||
(
|
||||
i++,
|
||||
basicSource::New(name, sourceDict, mesh)
|
||||
basicSource::New(name, sourceDict, mesh_)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::basicSourceList::read(const dictionary& dict)
|
||||
{
|
||||
checkTimeIndex_ = mesh_.time().timeIndex() + 2;
|
||||
|
||||
@ -84,7 +84,10 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components with list of field names
|
||||
//- Construct null
|
||||
basicSourceList(const fvMesh& mesh);
|
||||
|
||||
//- Construct from mesh and dictionary
|
||||
basicSourceList(const fvMesh& mesh, const dictionary& dict);
|
||||
|
||||
|
||||
@ -95,6 +98,9 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Reset the source list
|
||||
void reset(const dictionary& dict);
|
||||
|
||||
//- Correct
|
||||
template<class Type>
|
||||
void correct(GeometricField<Type, fvPatchField, volMesh>& fld);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,19 +25,23 @@ Class
|
||||
Foam::explicitSetValue
|
||||
|
||||
Description
|
||||
Explicit set values on fields.
|
||||
Set values field values explicity.
|
||||
|
||||
Sources described by:
|
||||
|
||||
<Type>ExplicitSetValueCoeffs
|
||||
\verbatim
|
||||
<Type>ExplicitSetValueCoeffs
|
||||
{
|
||||
injectionRate
|
||||
{
|
||||
injectionRate
|
||||
{
|
||||
k 30.7;
|
||||
epsilon 1.5;
|
||||
}
|
||||
k 30.7;
|
||||
epsilon 1.5;
|
||||
}
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::basicSource
|
||||
|
||||
SourceFiles
|
||||
explicitSetValue.C
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,20 +29,24 @@ Description
|
||||
|
||||
Sources described by:
|
||||
|
||||
<Type>ExplicitSourceCoeffs
|
||||
\verbatim
|
||||
<Type>ExplicitSourceCoeffs
|
||||
{
|
||||
volumeMode absolute; // specific
|
||||
injectionRate
|
||||
{
|
||||
volumeMode absolute; // specific
|
||||
injectionRate
|
||||
{
|
||||
k 30.7;
|
||||
epsilon 1.5;
|
||||
}
|
||||
k 30.7;
|
||||
epsilon 1.5;
|
||||
}
|
||||
}
|
||||
\verbatim
|
||||
|
||||
If volumeMode =
|
||||
- absolute: values are given as <quantity>
|
||||
- specific: values are given as <quantity>/m3
|
||||
Valid options for the \c volumeMode entry include:
|
||||
- absolute: values are given as \<quantity\>
|
||||
- specific: values are given as \<quantity\>/m3
|
||||
|
||||
SeeAlso
|
||||
Foam::basicSource
|
||||
|
||||
SourceFiles
|
||||
ExplicitSource.C
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,8 +25,43 @@ Class
|
||||
Foam::SRFVelocityFvPatchVectorField
|
||||
|
||||
Description
|
||||
Freestream velocity patch to be used with SRF model
|
||||
to apply the appropriate rotation transformation in time and space.
|
||||
Freestream velocity condition to be used in conjunction with the single
|
||||
rotating frame (SRF) model (see: SRFModel class)
|
||||
|
||||
Given the free stream velocity in the absolute frame, the condition
|
||||
applies the appropriate rotation transformation in time and space to
|
||||
determine the local velocity using:
|
||||
|
||||
\f[
|
||||
U_p = cos(\theta)*U_{Inf} + sin(theta) (n^UInf) - U_{p,srf}
|
||||
\f]
|
||||
|
||||
where
|
||||
\vartable
|
||||
U_p = patch velocity [m/s]
|
||||
U_{Inf} = free stream velocity in the absolute frame [m/s]
|
||||
theta = swept angle [rad]
|
||||
n = axis direction of the SRF
|
||||
U_{p,srf} = SRF velocity of the patch
|
||||
\endvartable
|
||||
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
UInf | free stream velocity | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type SRFFreestreamVelocity;
|
||||
UInf (0 0 0);
|
||||
value uniform (0 0 0); // optional value entry
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
SRFVelocityFvPatchVectorField.C
|
||||
@ -44,7 +79,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class SRFFreestreamVelocityFvPatchVectorField Declaration
|
||||
Class SRFFreestreamVelocityFvPatchVectorField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class SRFFreestreamVelocityFvPatchVectorField
|
||||
@ -53,7 +88,7 @@ class SRFFreestreamVelocityFvPatchVectorField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Velocity of the free stream in the absolute frame
|
||||
//- Velocity of the free stream in the absolute frame [m/s]
|
||||
vector UInf_;
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,61 @@ License
|
||||
Class
|
||||
Foam::SRFVelocityFvPatchVectorField
|
||||
|
||||
Group
|
||||
grpInletBoundaryConditions grpWallBoundaryConditions
|
||||
|
||||
Description
|
||||
Velocity patch to be used with SRF model
|
||||
Velocity condition to be used in conjunction with the single
|
||||
rotating frame (SRF) model (see: SRFModel class)
|
||||
|
||||
Given the free stream velocity in the absolute frame, the condition
|
||||
applies the appropriate rotation transformation in time and space to
|
||||
determine the local velocity.
|
||||
|
||||
The optional \c relative flag switches the behaviour of the patch
|
||||
such that:
|
||||
|
||||
- relative = yes: inlet velocity applied 'as is':
|
||||
|
||||
\f[
|
||||
U_p = U_{in}
|
||||
\f]
|
||||
|
||||
- relative = no : SRF velocity is subtracted from the inlet velocity:
|
||||
|
||||
\f[
|
||||
U_p = U_{in} - U_{p,srf}
|
||||
\f]
|
||||
|
||||
where
|
||||
\vartable
|
||||
U_p = patch velocity [m/s]
|
||||
U_{in} = user-specified inlet velocity
|
||||
U_{p,srf} = SRF velocity
|
||||
\endvartable
|
||||
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
relative | relative motion to the SRF? | yes |
|
||||
inletValue | inlet velocity | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type SRFVelocity;
|
||||
relative yes;
|
||||
inletValue uniform (0 0 0);
|
||||
value uniform (0 0 0); // initial value
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::fixedValueFvPatchField
|
||||
|
||||
SourceFiles
|
||||
SRFVelocityFvPatchVectorField.C
|
||||
@ -57,7 +110,7 @@ class SRFVelocityFvPatchVectorField
|
||||
//- Is the supplied inlet value relative to the SRF
|
||||
Switch relative_;
|
||||
|
||||
//- Inlet value
|
||||
//- Inlet value [m/s]
|
||||
vectorField inletValue_;
|
||||
|
||||
|
||||
|
||||
@ -165,6 +165,12 @@ void Foam::solutionControl::storePrevIterFields() const
|
||||
|
||||
Foam::solutionControl::solutionControl(fvMesh& mesh, const word& algorithmName)
|
||||
:
|
||||
IOobject
|
||||
(
|
||||
"solutionControl",
|
||||
mesh.time().timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh_(mesh),
|
||||
residualControl_(),
|
||||
algorithmName_(algorithmName),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -44,6 +44,8 @@ namespace Foam
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class solutionControl
|
||||
:
|
||||
public IOobject
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@ -24,6 +24,9 @@ License
|
||||
Class
|
||||
Foam::basicSymmetryFvPatchField
|
||||
|
||||
Group
|
||||
grpConstraintBoundaryConditions
|
||||
|
||||
Description
|
||||
A symmetry patch
|
||||
|
||||
|
||||
@ -28,19 +28,17 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
template<class Type>
|
||||
const word& fvPatchField<Type>::calculatedType()
|
||||
const Foam::word& Foam::fvPatchField<Type>::calculatedType()
|
||||
{
|
||||
return calculatedFvPatchField<Type>::typeName;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
@ -51,7 +49,7 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
(
|
||||
const calculatedFvPatchField<Type>& ptf,
|
||||
const fvPatch& p,
|
||||
@ -64,7 +62,7 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
@ -77,7 +75,7 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
(
|
||||
const calculatedFvPatchField<Type>& ptf
|
||||
)
|
||||
@ -87,7 +85,7 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
(
|
||||
const calculatedFvPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
@ -98,7 +96,8 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
||||
Foam::tmp<Foam::fvPatchField<Type> >
|
||||
Foam::fvPatchField<Type>::NewCalculatedType
|
||||
(
|
||||
const fvPatch& p
|
||||
)
|
||||
@ -130,7 +129,7 @@ tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
||||
|
||||
template<class Type>
|
||||
template<class Type2>
|
||||
tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
||||
Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::NewCalculatedType
|
||||
(
|
||||
const fvPatchField<Type2>& pf
|
||||
)
|
||||
@ -142,7 +141,8 @@ tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > calculatedFvPatchField<Type>::valueInternalCoeffs
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::calculatedFvPatchField<Type>::valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
@ -165,7 +165,8 @@ tmp<Field<Type> > calculatedFvPatchField<Type>::valueInternalCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > calculatedFvPatchField<Type>::valueBoundaryCoeffs
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::calculatedFvPatchField<Type>::valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
@ -186,8 +187,10 @@ tmp<Field<Type> > calculatedFvPatchField<Type>::valueBoundaryCoeffs
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > calculatedFvPatchField<Type>::gradientInternalCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::calculatedFvPatchField<Type>::gradientInternalCoeffs() const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
@ -206,8 +209,10 @@ tmp<Field<Type> > calculatedFvPatchField<Type>::gradientInternalCoeffs() const
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
@ -227,17 +232,12 @@ tmp<Field<Type> > calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
}
|
||||
|
||||
|
||||
// Write
|
||||
template<class Type>
|
||||
void calculatedFvPatchField<Type>::write(Ostream& os) const
|
||||
void Foam::calculatedFvPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<Type>::write(os);
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,24 @@ License
|
||||
Class
|
||||
Foam::calculatedFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::calculatedFvPatchField
|
||||
This boundary condition is not designed to be evaluated; it is assmued
|
||||
that the value is assigned via field assignment, and not via a call to
|
||||
e.g. \c updateCoeffs or \c evaluate.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type calculated;
|
||||
value uniform (0 0 0); // optional value entry
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
calculatedFvPatchField.C
|
||||
@ -43,7 +59,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class calculatedFvPatch Declaration
|
||||
Class calculatedFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -24,8 +24,11 @@ License
|
||||
Class
|
||||
Foam::coupledFvPatchField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::coupledFvPatchField
|
||||
Abstract base class for coupled patches.
|
||||
|
||||
SourceFiles
|
||||
coupledFvPatchField.C
|
||||
@ -45,7 +48,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class coupledFvPatch Declaration
|
||||
Class coupledFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,11 @@ License
|
||||
Class
|
||||
Foam::directionMixedFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::directionMixedFvPatchField
|
||||
Base class for direction-mixed boundary conditions.
|
||||
|
||||
SourceFiles
|
||||
directionMixedFvPatchField.C
|
||||
@ -43,7 +46,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class directionMixedFvPatch Declaration
|
||||
Class directionMixedFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,40 @@ License
|
||||
Class
|
||||
Foam::fixedGradientFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::fixedGradientFvPatchField
|
||||
This boundary condition supplies a fixed gradient condition, such that
|
||||
the patch values are calculated using:
|
||||
|
||||
\f[
|
||||
x_p = x_c + \frac{\nabla(x)}{\Delta}
|
||||
\f]
|
||||
|
||||
where
|
||||
\vartable
|
||||
x_p | patch values
|
||||
x_c | internal field values
|
||||
\nabla(x)| gradient (user-specified)
|
||||
\Delta | inverse distance from patch face centre to cell centre
|
||||
\endvartable
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
gradient | gradient | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type fixedGradient;
|
||||
gradient uniform 0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
fixedGradientFvPatchField.C
|
||||
@ -43,7 +75,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedGradientFvPatch Declaration
|
||||
Class fixedGradientFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,28 @@ License
|
||||
Class
|
||||
Foam::fixedValueFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::fixedValueFvPatchField
|
||||
This boundary condition supplies a fixed value constraint, and is the base
|
||||
class for a number of other boundary conditions.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
value | values | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0; // example for scalar field usage
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
fixedValueFvPatchField.C
|
||||
@ -43,7 +63,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedValueFvPatch Declaration
|
||||
Class fixedValueFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,45 @@ License
|
||||
Class
|
||||
Foam::mixedFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::mixedFvPatchField
|
||||
This boundary condition provides a base class for 'mixed' type boundary
|
||||
conditions, i.e. conditions that mix fixed value and patch-normal gradient
|
||||
conditions.
|
||||
|
||||
The respective contributions from each is determined by a weight field:
|
||||
|
||||
\f[
|
||||
x_p = w x_p + (1-w) \left(x_c + \frac{\nabla_\perp x}{\Delta}\right)
|
||||
\f]
|
||||
|
||||
where
|
||||
\vartable
|
||||
x_p | patch values
|
||||
x_c | patch internal cell values
|
||||
w | weight field
|
||||
\Delta| inverse distance from face centre to internal cell centre
|
||||
w | weighting (0-1)
|
||||
\endvartable
|
||||
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
valueFraction | weight field | yes |
|
||||
refValue | fixed value | yes |
|
||||
refGrad | patch normal gradient | yes |
|
||||
\endtable
|
||||
|
||||
Note
|
||||
This condition is not usually applied directly; instead, use a derived
|
||||
mixed condition such as \c inletOutlet
|
||||
|
||||
SeeAlso
|
||||
Foam::inletOutletFvPatchField
|
||||
|
||||
SourceFiles
|
||||
mixedFvPatchField.C
|
||||
@ -43,7 +80,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class mixedFvPatch Declaration
|
||||
Class mixedFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -24,6 +24,9 @@ License
|
||||
Class
|
||||
Foam::slicedFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Specialization of fvPatchField which creates the underlying
|
||||
fvPatchField as a slice of the given complete field.
|
||||
@ -33,6 +36,9 @@ Description
|
||||
|
||||
Should only used as a template argument for SlicedGeometricField.
|
||||
|
||||
SeeAlso
|
||||
Foam::fvPatchField
|
||||
|
||||
SourceFiles
|
||||
slicedFvPatchField.C
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,6 +24,9 @@ License
|
||||
Class
|
||||
Foam::transformFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::transformFvPatchField
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,22 @@ License
|
||||
Class
|
||||
Foam::zeroGradientFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::zeroGradientFvPatchField
|
||||
This boundary condition applies a zero-gradient condition from the patch
|
||||
internal field onto the patch faces.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
zeroGradientFvPatchField.C
|
||||
@ -43,7 +57,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class zeroGradientFvPatch Declaration
|
||||
Class zeroGradientFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -24,8 +24,27 @@ License
|
||||
Class
|
||||
Foam::cyclicFvPatchField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::cyclicFvPatchField
|
||||
This boundary condition enforces a cyclic condition between a pair of
|
||||
boundaries.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
Note
|
||||
The patches must be topologically similar, i.e. if the owner patch is
|
||||
transformed to the neighbour patch, the patches should be identical (or
|
||||
very similar).
|
||||
|
||||
SourceFiles
|
||||
cyclicFvPatchField.C
|
||||
@ -45,7 +64,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class cyclicFvPatch Declaration
|
||||
Class cyclicFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -24,8 +24,31 @@ License
|
||||
Class
|
||||
Foam::cyclicAMIFvPatchField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::cyclicAMIFvPatchField
|
||||
This boundary condition enforces a cyclic condition between a pair of
|
||||
boundaries, whereby communication between the patches is performed using
|
||||
an arbitrary mesh interface (AMI) interpolation.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type cyclicAMI;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
Note
|
||||
The outer boundary of the patch pairs must be similar, i.e. if the owner
|
||||
patch is transformed to the neighbour patch, the outer perimiter of each
|
||||
patch should be identical (or very similar).
|
||||
|
||||
SeeAlso
|
||||
Foam::AMIInterpolation
|
||||
|
||||
SourceFiles
|
||||
cyclicAMIFvPatchField.C
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,15 +25,10 @@ License
|
||||
|
||||
#include "cyclicSlipFvPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
Foam::cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
@ -44,7 +39,7 @@ cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
Foam::cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
(
|
||||
const cyclicSlipFvPatchField<Type>& ptf,
|
||||
const fvPatch& p,
|
||||
@ -57,7 +52,7 @@ cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
Foam::cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
@ -69,7 +64,7 @@ cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
Foam::cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
(
|
||||
const cyclicSlipFvPatchField<Type>& ptf
|
||||
)
|
||||
@ -79,7 +74,7 @@ cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
Foam::cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
(
|
||||
const cyclicSlipFvPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
@ -89,8 +84,4 @@ cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,25 @@ License
|
||||
Class
|
||||
Foam::cyclicSlipFvPatchField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::cyclicSlipFvPatchField
|
||||
This boundary condition is a light wrapper around the cyclicFvPatchField
|
||||
condition, providing no new functionality.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type cyclicSlip;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::cyclicFvPatchField
|
||||
|
||||
SourceFiles
|
||||
cyclicSlipFvPatchField.C
|
||||
@ -44,7 +61,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class cyclicSlipFvPatch Declaration
|
||||
Class cyclicSlipFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -52,7 +69,6 @@ class cyclicSlipFvPatchField
|
||||
:
|
||||
public cyclicFvPatchField<Type>
|
||||
{
|
||||
// Private data
|
||||
|
||||
public:
|
||||
|
||||
@ -119,7 +135,6 @@ public:
|
||||
new cyclicSlipFvPatchField<Type>(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,24 @@ License
|
||||
Class
|
||||
Foam::emptyFvPatchField
|
||||
|
||||
Group
|
||||
grpConstraintBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::emptyFvPatchField
|
||||
This boundary condition provides an 'empty' condition for reduced
|
||||
dimensions cases, i.e. 1- and 2-D geometries. Apply this condition to
|
||||
patches whose normal is aligned to geometric directions that do not
|
||||
constitue solution directions.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
emptyFvPatchField.C
|
||||
@ -44,7 +60,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class emptyFvPatch Declaration
|
||||
Class emptyFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -24,8 +24,15 @@ License
|
||||
Class
|
||||
Foam::jumpCyclicFvPatchField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::jumpCyclicFvPatchField
|
||||
This boundary condition provides a base class for coupled-cyclic
|
||||
conditions with a specified 'jump' (or offset) between the values
|
||||
|
||||
SeeAlso
|
||||
Foam::cyclicFvPatchField
|
||||
|
||||
SourceFiles
|
||||
jumpCyclicFvPatchField.C
|
||||
@ -43,7 +50,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class cyclicFvPatch Declaration
|
||||
Class jumpCyclicFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,11 +24,18 @@ License
|
||||
Class
|
||||
Foam::nonuniformTransformCyclicFvPatchField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::nonuniformTransformCyclicFvPatchField
|
||||
This boundary condition enforces a cyclic condition between a pair of
|
||||
boundaries, incorporating a non-uniform transformation.
|
||||
|
||||
SourceFiles
|
||||
nonuniformTransformCyclicFvPatchField.C
|
||||
nonuniformTransformCyclicFvPatchFields.H
|
||||
nonuniformTransformCyclicFvPatchFields.C
|
||||
nonuniformTransformCyclicFvPatchFieldsFwd.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,21 @@ License
|
||||
Class
|
||||
Foam::processorFvPatchField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::processorFvPatchField
|
||||
This boundary condition enables processor communication across patches.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type processor;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
processorFvPatchField.C
|
||||
@ -45,7 +58,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class processorFvPatch Declaration
|
||||
Class processorFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -24,11 +24,31 @@ License
|
||||
Class
|
||||
Foam::processorCyclicFvPatchField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::processorCyclicFvPatchField
|
||||
This boundary condition enables processor communication across cyclic
|
||||
patches.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type processor;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::processorFvPatchField
|
||||
|
||||
SourceFiles
|
||||
processorCyclicFvPatchField.C
|
||||
processorCyclicFvPatchFields.H
|
||||
processorCyclicFvPatchFields.C
|
||||
processorCyclicFvPatchFieldsFwd.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -44,7 +64,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class processorCyclicFvPatch Declaration
|
||||
Class processorCyclicFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -24,11 +24,27 @@ License
|
||||
Class
|
||||
Foam::symmetryFvPatchField
|
||||
|
||||
Group
|
||||
grpConstraintBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::symmetryFvPatchField
|
||||
This boundary condition enforces a symmetry constraint
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
symmetryFvPatchField.C
|
||||
symmetryFvPatchFields.C
|
||||
symmetryFvPatchFields.H
|
||||
symmetryFvPatchFieldsFwd.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -44,7 +60,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class symmetryFvPatch Declaration
|
||||
Class symmetryFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,25 @@ License
|
||||
Class
|
||||
Foam::wedgeFvPatchField
|
||||
|
||||
Group
|
||||
grpConstraintBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::wedgeFvPatchField
|
||||
This boundary condition is similar to the cyclic condition, except that
|
||||
it is applied to 2-D geometries.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::cyclicFvPatchField
|
||||
|
||||
SourceFiles
|
||||
wedgeFvPatchField.C
|
||||
@ -44,7 +61,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class wedgeFvPatch Declaration
|
||||
Class wedgeFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -292,6 +292,7 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs()
|
||||
void Foam::activeBaffleVelocityFvPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchVectorField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "p", "p", pName_);
|
||||
os.writeKeyword("cyclicPatch")
|
||||
<< cyclicPatchName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("orientation")
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,8 +24,65 @@ License
|
||||
Class
|
||||
Foam::activeBaffleVelocityFvPatchVectorField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Boundary condition that modifies mesh areas based on velocity.
|
||||
This velocity boundary condition simulates the opening of a baffle due
|
||||
to local flow conditions, by merging the behaviours of wall and cyclic
|
||||
conditions. The baffle joins two mesh regions, where the open fraction
|
||||
determines the interpolation weights applied to each cyclic- and
|
||||
neighbour-patch contribution.
|
||||
|
||||
We determine whether the baffle is opening or closing from the sign of
|
||||
the net force across the baffle, from which the baffle open fraction is
|
||||
updated using:
|
||||
|
||||
\f[
|
||||
x = x_{old} + sign(F_{net})\frac{dt}{DT}
|
||||
\f]
|
||||
|
||||
where
|
||||
|
||||
\vartable
|
||||
x | baffle open fraction [0-1]
|
||||
x_{old} | baffle open fraction on previous evaluation
|
||||
dt | simulation time step
|
||||
DT | time taken to open the baffle
|
||||
F_{net} | net force across the baffle
|
||||
\endvartable
|
||||
|
||||
The open fraction is then applied to scale the patch areas.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
p | pressure field name | no | p
|
||||
cyclicPatch | cylclic patch name | yes |
|
||||
orientation | 1 or -1 used to switch flow direction | yes|
|
||||
openFraction | current opatch open fraction [0-1]| yes |
|
||||
openingTime | time taken to open the baffle | yes |
|
||||
maxOpenFractionDelta | max open fraction change per timestep | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type activeBaffleVelocity;
|
||||
p p;
|
||||
cyclicPatch cyclic1;
|
||||
orientation 1;
|
||||
openFraction 0.2;
|
||||
openingTime 5.0;
|
||||
maxOpenFractionDelta 0.1;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::fixedValueFvPatchField
|
||||
Foam::cyclicFvPatchField
|
||||
|
||||
SourceFiles
|
||||
activeBaffleVelocityFvPatchVectorField.C
|
||||
@ -44,7 +101,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class activeBaffleVelocityFvPatch Declaration
|
||||
Class activeBaffleVelocityFvPatchVectorField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class activeBaffleVelocityFvPatchVectorField
|
||||
@ -163,17 +220,10 @@ public:
|
||||
// Mapping functions
|
||||
|
||||
//- Map (and resize as needed) from self given a mapping object
|
||||
virtual void autoMap
|
||||
(
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
virtual void autoMap(const fvPatchFieldMapper&);
|
||||
|
||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||
virtual void rmap
|
||||
(
|
||||
const fvPatchVectorField&,
|
||||
const labelList&
|
||||
);
|
||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
||||
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
|
||||
@ -92,7 +92,7 @@ activePressureForceBaffleVelocityFvPatchVectorField
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
pName_("p"),
|
||||
pName_(dict.lookupOrDefault<word>("p", "p")),
|
||||
cyclicPatchName_(dict.lookup("cyclicPatch")),
|
||||
cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)),
|
||||
orientation_(readLabel(dict.lookup("orientation"))),
|
||||
@ -278,6 +278,8 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
|
||||
{
|
||||
valueDiff -=p[nbrFaceCells[facei]]*mag(initCyclicSf_[facei]);
|
||||
}
|
||||
|
||||
Info<< "Force difference = " << valueDiff << endl;
|
||||
}
|
||||
else //pressure based
|
||||
{
|
||||
@ -290,6 +292,8 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
|
||||
{
|
||||
valueDiff -= p[nbrFaceCells[facei]];
|
||||
}
|
||||
|
||||
Info<< "Pressure difference = " << valueDiff << endl;
|
||||
}
|
||||
|
||||
if ((mag(valueDiff) > mag(minThresholdValue_) || baffleActivated_))
|
||||
@ -316,7 +320,6 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
|
||||
}
|
||||
|
||||
Info<< "Open fraction = " << openFraction_ << endl;
|
||||
Info<< "Pressure difference = " << valueDiff << endl;
|
||||
|
||||
vectorField::subField Sfw = patch().patch().faceAreas();
|
||||
vectorField newSfw((1 - openFraction_)*initWallSf_);
|
||||
@ -351,6 +354,7 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::
|
||||
write(Ostream& os) const
|
||||
{
|
||||
fvPatchVectorField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "p", "p", pName_);
|
||||
os.writeKeyword("cyclicPatch")
|
||||
<< cyclicPatchName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("orientation")
|
||||
@ -361,8 +365,6 @@ write(Ostream& os) const
|
||||
<< maxOpenFractionDelta_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("openFraction")
|
||||
<< openFraction_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("p")
|
||||
<< pName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("minThresholdValue")
|
||||
<< minThresholdValue_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("forceBased")
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,12 +24,64 @@ License
|
||||
Class
|
||||
Foam::activePressureForceBaffleVelocityFvPatchVectorField
|
||||
|
||||
Description
|
||||
Bounday which emulates the operation of a release pressure panel.
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
The boundary condition modifies mesh areas based on difference
|
||||
of pressure or force face beween both sides of the panel. Once opened the
|
||||
panel continues to open at a fixed rate.
|
||||
Description
|
||||
This boundary condition is applied to the flow velocity, to simulate the
|
||||
opening of a baffle due to local flow conditions, by merging the behaviours
|
||||
of wall and cyclic conditions.
|
||||
|
||||
The baffle joins two mesh regions, where the open fraction determines
|
||||
the interpolation weights applied to each cyclic- and neighbour-patch
|
||||
contribution.
|
||||
|
||||
Once opened the baffle continues to open at a fixed rate using
|
||||
|
||||
\f[
|
||||
x = x_{old} + \frac{dt}{DT}
|
||||
\f]
|
||||
|
||||
where
|
||||
|
||||
\vartable
|
||||
x | baffle open fraction [0-1]
|
||||
x_{old} | baffle open fraction on previous evaluation
|
||||
dt | simulation time step
|
||||
DT | time taken to open the baffle
|
||||
\endvartable
|
||||
|
||||
The open fraction is then applied to scale the patch areas.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
p | pressure field name | no | p
|
||||
cyclicPatch | cylclic patch name | yes |
|
||||
orientation | 1 or -1 used to switch flow direction | yes|
|
||||
openFraction | current opatch open fraction [0-1]| yes |
|
||||
openingTime | time taken to open the baffle | yes |
|
||||
maxOpenFractionDelta | max open fraction change per timestep | yes |
|
||||
minThresholdValue | minimum open fraction for activation | yes |
|
||||
forceBased | force (true) or pressure-based (false) activation | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type activePressureForceBaffleVelocity;
|
||||
p p;
|
||||
cyclicPatch cyclic1;
|
||||
orientation 1;
|
||||
openFraction 0.2;
|
||||
openingTime 5.0;
|
||||
maxOpenFractionDelta 0.1;
|
||||
minThresholdValue 0.01;
|
||||
forceBased false;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
activePressureForceBaffleVelocityFvPatchVectorField.C
|
||||
@ -48,7 +100,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class activePressureForceBaffleVelocityFvPatch Declaration
|
||||
Class activePressureForceBaffleVelocityFvPatchVectorField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class activePressureForceBaffleVelocityFvPatchVectorField
|
||||
@ -102,6 +154,7 @@ class activePressureForceBaffleVelocityFvPatchVectorField
|
||||
//- Baffle is activated
|
||||
bool baffleActivated_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
|
||||
@ -24,37 +24,53 @@ License
|
||||
Class
|
||||
Foam::advectiveFvPatchField
|
||||
|
||||
Group
|
||||
grpOutletBoundaryConditions
|
||||
|
||||
Description
|
||||
Advective outflow boundary condition based on solving DDt(psi, U) = 0
|
||||
at the boundary.
|
||||
This boundary condition provides an advective outflow condition, based on
|
||||
solving DDt(psi, U) = 0 at the boundary.
|
||||
|
||||
The standard (Euler, backward, CrankNicholson) time schemes are
|
||||
supported. Additionally an optional mechanism to relax the value at
|
||||
the boundary to a specified far-field value is provided which is
|
||||
switched on by specifying the relaxation length-scale lInf and the
|
||||
far-field value fieldInf.
|
||||
switched on by specifying the relaxation length-scale \c lInf and the
|
||||
far-field value \c fieldInf.
|
||||
|
||||
The flow/wave speed at the outlet is provided by the virtual function
|
||||
advectionSpeed() the default implementation of which requires the name of
|
||||
the flux field (phi) and optionally the density (rho) if the mass-flux
|
||||
rather than the volumetric-flux is given.
|
||||
\verbatim
|
||||
outlet
|
||||
{
|
||||
type advective;
|
||||
phi phi;
|
||||
// rho rho; // Not needed, phi volumetric
|
||||
// fieldInf 1e5; // Optional
|
||||
// lInf 0.1; // Optional
|
||||
}
|
||||
\endverbatim
|
||||
the flux field \c (phi) and optionally the density \c (rho) if the
|
||||
mass-flux rather than the volumetric-flux is given.
|
||||
|
||||
The flow/wave speed at the outlet can be changed by deriving a specialised
|
||||
BC from this class and overriding advectionSpeed() e.g. in
|
||||
BC from this class and over-riding advectionSpeed() e.g. in
|
||||
waveTransmissiveFvPatchField the advectionSpeed() calculates and returns
|
||||
the flow-speed plus the acoustic wave speed creating an acoustic wave
|
||||
transmissive boundary condition.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
phi | flux field name | no | phi
|
||||
rho | density field name | no | rho
|
||||
fieldInf | value of field beyond patch | no |
|
||||
lInf | distance beyond patch for \c fieldInf | no |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type advective;
|
||||
phi phi;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
Note
|
||||
If \c lInf is specified, \c fieldInf will be required; \c rho is only
|
||||
required in the case of a mass-based flux.
|
||||
|
||||
SourceFiles
|
||||
advectiveFvPatchField.C
|
||||
|
||||
@ -71,7 +87,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class advectiveFvPatch Declaration
|
||||
Class advectiveFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,11 +24,58 @@ License
|
||||
Class
|
||||
Foam::buoyantPressureFvPatchScalarField
|
||||
|
||||
Description
|
||||
Set the pressure gradient boundary condition appropriately for buoyant flow.
|
||||
Group
|
||||
grpGenericBoundaryConditions grpWallBoundaryConditions
|
||||
|
||||
If the variable name is "pd" assume it is p - rho*g.h and set the gradient
|
||||
appropriately. Otherwise assume the variable is the static pressure.
|
||||
Description
|
||||
This boundary condition sets the pressure gradient appropriately for
|
||||
buoyant flow.
|
||||
|
||||
If the variable name is one of:
|
||||
- \c pd
|
||||
- \c p_rgh
|
||||
- \c ph_rgh
|
||||
we assume that the pressure variable is \f$p - \rho(g \cdot h)\f$ and the
|
||||
gradient set using:
|
||||
\f[
|
||||
\nabla(p) = -\nabla_\perp(\rho)(g \cdot h)
|
||||
\f]
|
||||
|
||||
where
|
||||
|
||||
\vartable
|
||||
\rho | density [kg/m3]
|
||||
g | acceleration due to gravity [m/s2]
|
||||
h | patch face centres [m]
|
||||
\endvartable
|
||||
|
||||
Otherwise we assume that it is the static pressure, and the gradient
|
||||
calculated using:
|
||||
\f[
|
||||
\nabla(p) = \rho(g \cdot n)
|
||||
\f]
|
||||
|
||||
where
|
||||
\vartable
|
||||
n | patch face normal vectors
|
||||
\endvartable
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
rho | density field name | no | rho
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type buoyantPressure;
|
||||
rho rho;
|
||||
value uniform 0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
buoyantPressureFvPatchScalarField.C
|
||||
@ -47,7 +94,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class buoyantPressureFvPatch Declaration
|
||||
Class buoyantPressureFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class buoyantPressureFvPatchScalarField
|
||||
|
||||
@ -24,41 +24,46 @@ License
|
||||
Class
|
||||
Foam::codedFixedValueFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Constructs on-the-fly a new boundary condition (derived from
|
||||
fixedValueFvPatchField) which is then used to evaluate.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example:
|
||||
\verbatim
|
||||
movingWall
|
||||
{
|
||||
type codedFixedValue;
|
||||
value uniform 0;
|
||||
redirectType rampedFixedValue; // name of generated bc
|
||||
myPatch
|
||||
{
|
||||
type codedFixedValue;
|
||||
value uniform 0;
|
||||
redirectType rampedFixedValue; // name of generated BC
|
||||
|
||||
code
|
||||
#{
|
||||
operator==(min(10, 0.1*this->db().time().value()));
|
||||
#};
|
||||
code
|
||||
#{
|
||||
operator==(min(10, 0.1*this->db().time().value()));
|
||||
#};
|
||||
|
||||
//codeInclude
|
||||
//#{
|
||||
// #include "fvCFD.H"
|
||||
//#};
|
||||
//codeInclude
|
||||
//#{
|
||||
// #include "fvCFD.H"
|
||||
//#};
|
||||
|
||||
//codeOptions
|
||||
//#{
|
||||
// -I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
//#};
|
||||
}
|
||||
//codeOptions
|
||||
//#{
|
||||
// -I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
//#};
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
A special form is if the 'code' section is not supplied. In this case
|
||||
the code gets read from a (runTimeModifiable!) dictionary system/codeDict
|
||||
which would have a corresponding entry
|
||||
the code is read from a (runTimeModifiable!) dictionary system/codeDict
|
||||
which would have a corresponding entry:
|
||||
|
||||
\verbatim
|
||||
rampedFixedValue
|
||||
myPatch
|
||||
{
|
||||
code
|
||||
#{
|
||||
@ -68,7 +73,8 @@ Description
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::dynamicCode and Foam::functionEntries::codeStream
|
||||
Foam::dynamicCode
|
||||
Foam::functionEntries::codeStream
|
||||
|
||||
SourceFiles
|
||||
codedFixedValueFvPatchField.C
|
||||
@ -92,7 +98,7 @@ class dynamicCodeContext;
|
||||
class IOdictionary;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class codedFixedValueFvPatch Declaration
|
||||
Class codedFixedValueFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -110,6 +116,7 @@ class codedFixedValueFvPatchField
|
||||
|
||||
mutable autoPtr<fvPatchField<Type> > redirectPatchFieldPtr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
const IOdictionary& dict() const;
|
||||
@ -132,6 +139,7 @@ class codedFixedValueFvPatchField
|
||||
// Get the dictionary to initialize the codeContext
|
||||
virtual const dictionary& codeDict() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
@ -209,8 +217,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Get reference to the underlying patch
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,35 +24,42 @@ License
|
||||
Class
|
||||
Foam::codedMixedFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Constructs on-the-fly a new boundary condition (derived from
|
||||
mixedFvPatchField) which is then used to evaluate.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example:
|
||||
\verbatim
|
||||
movingWall
|
||||
{
|
||||
type codedMixed;
|
||||
value uniform 0;
|
||||
redirectType rampedMixed; // name of generated bc
|
||||
myPatch
|
||||
{
|
||||
type codedMixed;
|
||||
value uniform 0;
|
||||
redirectType rampedMixed; // name of generated BC
|
||||
|
||||
code
|
||||
#{
|
||||
this->refValue() = min(10, 0.1*this->db().time().value());
|
||||
this->refGrad() = vector::zero;
|
||||
this->valueFraction() = 1.0;
|
||||
#};
|
||||
code
|
||||
#{
|
||||
this->refValue() =
|
||||
vector(1, 0, 0)
|
||||
*min(10, 0.1*this->db().time().value());
|
||||
this->refGrad() = vector::zero;
|
||||
this->valueFraction() = 1.0;
|
||||
#};
|
||||
|
||||
//codeInclude
|
||||
//#{
|
||||
// #include "fvCFD.H"
|
||||
//#};
|
||||
//codeInclude
|
||||
//#{
|
||||
// #include "fvCFD.H"
|
||||
//#};
|
||||
|
||||
//codeOptions
|
||||
//#{
|
||||
// -I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
//#};
|
||||
}
|
||||
//codeOptions
|
||||
//#{
|
||||
// -I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
//#};
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
A special form is if the 'code' section is not supplied. In this case
|
||||
@ -60,19 +67,20 @@ Description
|
||||
which would have a corresponding entry
|
||||
|
||||
\verbatim
|
||||
rampedMixed
|
||||
{
|
||||
code
|
||||
#{
|
||||
this->refValue() = min(10, 0.1*this->db().time().value());
|
||||
this->refGrad() = vector::zero;
|
||||
this->valueFraction() = 1.0;
|
||||
#};
|
||||
}
|
||||
myPatch
|
||||
{
|
||||
code
|
||||
#{
|
||||
this->refValue() = min(10, 0.1*this->db().time().value());
|
||||
this->refGrad() = vector::zero;
|
||||
this->valueFraction() = 1.0;
|
||||
#};
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::dynamicCode and Foam::functionEntries::codeStream
|
||||
Foam::dynamicCode
|
||||
Foam::functionEntries::codeStream
|
||||
|
||||
SourceFiles
|
||||
codedMixedFvPatchField.C
|
||||
@ -96,7 +104,7 @@ class dynamicCodeContext;
|
||||
class IOdictionary;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class codedMixedFvPatch Declaration
|
||||
Class codedMixedFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -114,6 +122,7 @@ class codedMixedFvPatchField
|
||||
|
||||
mutable autoPtr<mixedFvPatchField<Type> > redirectPatchFieldPtr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
const IOdictionary& dict() const;
|
||||
@ -136,6 +145,7 @@ class codedMixedFvPatchField
|
||||
// Get the dictionary to initialize the codeContext
|
||||
virtual const dictionary& codeDict() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
@ -213,8 +223,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Get reference to the underlying patchField
|
||||
|
||||
@ -2,16 +2,16 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 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 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
|
||||
@ -19,19 +19,33 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::cylindricalInletVelocityFvPatchVectorField
|
||||
|
||||
Group
|
||||
grpInletBoundaryConditions
|
||||
|
||||
Description
|
||||
Describes an inlet vector boundary condition in cylindrical coordinates
|
||||
given a central axis, central point, rpm, axial and radial velocity.
|
||||
This boundary condition describes an inlet vector boundary condition in
|
||||
cylindrical co-ordinates given a central axis, central point, rpm, axial
|
||||
and radial velocity.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
axis | axis of rotation | yes |
|
||||
centre | centre of rotation | yes |
|
||||
axialVelocity | axial velocity profile [m/s] | yes |
|
||||
radialVelocity | radial velocity profile [m/s] | yes |
|
||||
rpm | rotational speed (revolutions per minute) | yes|
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
inlet
|
||||
myPatch
|
||||
{
|
||||
type cylindricalInletVelocity;
|
||||
axis (0 0 1);
|
||||
@ -42,9 +56,14 @@ Description
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
The axialVelocity, radialVelocity and rpm entries are DataEntry types, able
|
||||
to describe time varying functions. The example above gives the usage for
|
||||
supplying constant values.
|
||||
Note
|
||||
The \c axialVelocity, \c radialVelocity and \c rpm entries are DataEntry
|
||||
types, able to describe time varying functions. The example above gives
|
||||
the usage for supplying constant values.
|
||||
|
||||
SeeAlso
|
||||
Foam::fixedValueFvPatchField
|
||||
Foam::DataEntry
|
||||
|
||||
SourceFiles
|
||||
cylindricalInletVelocityFvPatchVectorField.C
|
||||
|
||||
@ -24,47 +24,59 @@ License
|
||||
Class
|
||||
Foam::fanFvPatchField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Jump boundary condition. Operates on cyclic. Jump specified as a DataEntry.
|
||||
(table, fileTable, csv etc.)
|
||||
This boundary condition provides a jump condition, using the \c cyclic
|
||||
condition as a base.
|
||||
|
||||
The jump is specified as a \c DataEntry type, to enable the use of, e.g.
|
||||
contant, polynomial, table values.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
patchType | underlying patch type should be \c cyclic| yes |
|
||||
jump | current jump value | yes |
|
||||
jumpTable | jump data, e.g. \c csvFile | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
fan_half0
|
||||
myPatch
|
||||
{
|
||||
type fan;
|
||||
patchType cyclic;
|
||||
jump uniform 0;
|
||||
jumpTable csvFile;
|
||||
csvFileCoeffs
|
||||
{
|
||||
type fan;
|
||||
patchType cyclic;
|
||||
jump uniform 0;
|
||||
jumpTable csvFile;
|
||||
csvFileCoeffs
|
||||
{
|
||||
hasHeaderLine 1;
|
||||
refColumn 0;
|
||||
componentColumns 1(1);
|
||||
separator ",";
|
||||
fileName "$FOAM_CASE/constant/pressureVsU";
|
||||
}
|
||||
value uniform 0;
|
||||
hasHeaderLine 1;
|
||||
refColumn 0;
|
||||
componentColumns 1(1);
|
||||
separator ",";
|
||||
fileName "$FOAM_CASE/constant/pressureVsU";
|
||||
}
|
||||
value uniform 0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
The above example shows the use of a comma separated (CSV) file to specify
|
||||
the jump condition.
|
||||
|
||||
Backwards compatibility: if the 'f' keyword is detected it assumes
|
||||
it is a power of the flowrate.
|
||||
Note
|
||||
The underlying \c patchType should be set to \c cyclic
|
||||
|
||||
\verbatim
|
||||
fan_half0
|
||||
{
|
||||
type fan;
|
||||
patchType cyclic;
|
||||
jump uniform 0;
|
||||
f 2(100 -0.1);
|
||||
value uniform 0;
|
||||
}
|
||||
\endverbatim
|
||||
SeeAlso
|
||||
Foam::DataEntry
|
||||
|
||||
SourceFiles
|
||||
fanFvPatchField.C
|
||||
fanFvPatchFields.H
|
||||
fanFvPatchFields.C
|
||||
fanFvPatchFieldsFwd.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,43 +24,53 @@ License
|
||||
Class
|
||||
Foam::fanPressureFvPatchScalarField
|
||||
|
||||
Description
|
||||
Assigns pressure inlet or outlet total pressure condition for a fan.
|
||||
Group
|
||||
grpInletBoundaryConditions grpOutletBoundaryConditions
|
||||
|
||||
User specifies:
|
||||
- pressure drop vs volumetric flow rate table (fan curve) file name;
|
||||
- direction of normal flow through the fan, in or out;
|
||||
- total pressure of the environment.
|
||||
Description
|
||||
This boundary condition can be applied to assign either a pressure inlet
|
||||
or outlet total pressure condition for a fan.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
fileName | fan curve file name | yes |
|
||||
outOfBounds | out of bounds handling | yes |
|
||||
direction | direction of flow through fan [in/out] | yes |
|
||||
p0 | environmental total pressure | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
inlet
|
||||
{
|
||||
type fanPressure;
|
||||
fileName "fanCurve"; // Fan curve file name
|
||||
outOfBounds clamp; // (error|warn|clamp|repeat)
|
||||
direction in; // Direction of flow through fan
|
||||
p0 uniform 0; // Environmental total pressure
|
||||
value uniform 0; // Initial pressure
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fanPressure;
|
||||
fileName "fanCurve";
|
||||
outOfBounds clamp;
|
||||
direction in;
|
||||
p0 uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fanPressure;
|
||||
fileName "fanCurve"; // Fan curve file name
|
||||
outOfBounds clamp; // (error|warn|clamp|repeat)
|
||||
direction out; // Direction of flow through fan
|
||||
p0 uniform 0; // Environmental total pressure
|
||||
value uniform 0; // Initial pressure
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type fanPressure;
|
||||
fileName "fanCurve";
|
||||
outOfBounds clamp;
|
||||
direction out;
|
||||
p0 uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
See Also
|
||||
Foam::totalPressureFvPatchScalarField and
|
||||
Foam::fanFvPatchField
|
||||
Foam::totalPressureFvPatchScalarField
|
||||
Foam::interpolationTable
|
||||
|
||||
SourceFiles
|
||||
fanPressureFvPatchScalarField.C
|
||||
fanPressureFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -93,8 +103,10 @@ public:
|
||||
ffdOut
|
||||
};
|
||||
|
||||
//- Fan flow directions names
|
||||
static const NamedEnum<fanFlowDirection, 2> fanFlowDirectionNames_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
@ -24,15 +24,53 @@ License
|
||||
Class
|
||||
Foam::fixedFluxPressureFvPatchScalarField
|
||||
|
||||
Group
|
||||
grpOutletBoundaryConditions
|
||||
|
||||
Description
|
||||
Adjusts the pressure gradient such that the flux on the boundary is that
|
||||
specified by the velocity boundary condition.
|
||||
This boundary condition adjusts the pressure gradient such that the flux
|
||||
on the boundary is that specified by the velocity boundary condition.
|
||||
|
||||
The predicted flux to be compensated by the pressure gradient is evaluated
|
||||
as (phi - phiHbyA), both of which are looked-up from the database as is
|
||||
the pressure diffusivity Dp used to calculate the gradient.
|
||||
as \f$(\phi - \phi_{H/A})\f$, both of which are looked-up from the database,
|
||||
as is the pressure diffusivity used to calculate the gradient using:
|
||||
|
||||
The names of the phi, phiHbyA and Dp fields may be optionally specified.
|
||||
\f[
|
||||
\nabla(p) = \frac{\phi_{H/A} - \phi}{|Sf| D_p}
|
||||
\f]
|
||||
|
||||
where
|
||||
|
||||
\vartable
|
||||
phi | flux
|
||||
D_p | pressure diffusivity
|
||||
Sf | patch face areas [m2]
|
||||
\endvartable
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
phiHbyA | name of predicted flux field | no | phiHbyA
|
||||
phi | name of flux field | no | phi
|
||||
rho | name of density field | no | rho
|
||||
Dp | name of pressure diffusivity field | no | Dp
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
phiHbyA phiHbyA;
|
||||
phi phi;
|
||||
rho rho;
|
||||
Dp Dp;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::fixedGradientFvPatchField
|
||||
|
||||
SourceFiles
|
||||
fixedFluxPressureFvPatchScalarField.C
|
||||
@ -52,7 +90,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedFluxPressureFvPatch Declaration
|
||||
Class fixedFluxPressureFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class fixedFluxPressureFvPatchScalarField
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,11 +24,33 @@ License
|
||||
Class
|
||||
Foam::fixedInternalValueFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Boundary condition providing mechanism to set boundary (cell) values
|
||||
directly into a matrix, i.e. to set a constraint condition. Default
|
||||
This boundary condition provides a mechanism to set boundary (cell) values
|
||||
directly into a matrix, i.e. to set a constraint condition. Default
|
||||
behaviour is to act as a zero gradient condition.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type fixedInternalValue;
|
||||
value uniform 0; // place holder
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
Note
|
||||
This is used as a base for conditions such as the turbulence \c epsilon
|
||||
wall function, which applies a near-wall constraint for high Reynolds
|
||||
number flows.
|
||||
|
||||
SeeAlso
|
||||
Foam::epsilonWallFunctionFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
fixedInternalValueFvPatchField.C
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,9 +24,19 @@ License
|
||||
Class
|
||||
Foam::fixedJumpFvPatchField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
Base class for "jump" of a field<type>
|
||||
|
||||
Note
|
||||
not used directly
|
||||
|
||||
SeeAlso
|
||||
Foam::fanFvPatchScalarField
|
||||
Foam::fanPressureFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
fixedJumpFvPatchField.C
|
||||
|
||||
@ -62,7 +72,6 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
|
||||
@ -24,9 +24,31 @@ License
|
||||
Class
|
||||
Foam::fixedMeanFvPatchField
|
||||
|
||||
Group
|
||||
grpGenericBoundaryConditions
|
||||
|
||||
Description
|
||||
Extrapolates field to the patch using the near-cell values and adjusts
|
||||
the distribution to match the specified meanValue.
|
||||
This boundary condition extrapolates field to the patch using the near-cell
|
||||
values and adjusts the distribution to match the specified mean value.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
meanValue | mean value | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type fixedMean;
|
||||
meanValue 1.0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::fixedValueFvPatchField
|
||||
|
||||
SourceFiles
|
||||
fixedMeanFvPatchField.C
|
||||
@ -44,7 +66,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedMeanFvPatch Declaration
|
||||
Class fixedMeanFvPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user