mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
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
|
||||||
@ -21,50 +21,47 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Application
|
||||||
|
foamHelp
|
||||||
|
|
||||||
|
Description
|
||||||
|
Top level wrapper utility around foam help utilities
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "basicThermo.H"
|
#include "fvCFD.H"
|
||||||
|
#include "helpType.H"
|
||||||
|
|
||||||
|
using namespace Foam;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::autoPtr<Foam::basicThermo> Foam::basicThermo::New
|
int main(int argc, char *argv[])
|
||||||
(
|
|
||||||
const fvMesh& mesh
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// get model name, but do not register the dictionary
|
#include "addRegionOption.H"
|
||||||
// otherwise it is registered in the database twice
|
if (argc < 2)
|
||||||
const word modelType
|
|
||||||
(
|
|
||||||
IOdictionary
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"thermophysicalProperties",
|
|
||||||
mesh.time().constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
).lookup("thermoType")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Selecting thermodynamics package " << modelType << endl;
|
|
||||||
|
|
||||||
fvMeshConstructorTable::iterator cstrIter =
|
|
||||||
fvMeshConstructorTablePtr_->find(modelType);
|
|
||||||
|
|
||||||
if (cstrIter == fvMeshConstructorTablePtr_->end())
|
|
||||||
{
|
{
|
||||||
FatalErrorIn("basicThermo::New(const fvMesh&)")
|
FatalError
|
||||||
<< "Unknown basicThermo type " << modelType << nl << nl
|
<< "No help utility has been supplied" << nl
|
||||||
<< "Valid basicThermo types are:" << nl
|
|
||||||
<< fvMeshConstructorTablePtr_->sortedToc() << nl
|
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<basicThermo>(cstrIter()(mesh));
|
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
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,49 +23,42 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "rhoThermo.H"
|
#include "helpType.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::autoPtr<Foam::rhoThermo> Foam::rhoThermo::New
|
Foam::autoPtr<Foam::helpType> Foam::helpType::New
|
||||||
(
|
(
|
||||||
const fvMesh& mesh
|
const word& helpTypeName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// get model name, but do not register the dictionary
|
Info<< "Selecting helpType " << helpTypeName << endl;
|
||||||
// otherwise it is registered in the database twice
|
|
||||||
const word modelType
|
|
||||||
(
|
|
||||||
IOdictionary
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"thermophysicalProperties",
|
|
||||||
mesh.time().constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
).lookup("thermoType")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Selecting thermodynamics package " << modelType << endl;
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
|
dictionaryConstructorTablePtr_->find(helpTypeName);
|
||||||
|
|
||||||
fvMeshConstructorTable::iterator cstrIter =
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
fvMeshConstructorTablePtr_->find(modelType);
|
|
||||||
|
|
||||||
if (cstrIter == fvMeshConstructorTablePtr_->end())
|
|
||||||
{
|
{
|
||||||
FatalErrorIn("rhoThermo::New(const fvMesh&)")
|
// special treatment for -help
|
||||||
<< "Unknown rhoThermo type "
|
// exit without stack trace
|
||||||
<< modelType << nl << nl
|
if (helpTypeName == "-help")
|
||||||
<< "Valid rhoThermo types are:" << nl
|
{
|
||||||
<< fvMeshConstructorTablePtr_->sortedToc() << nl
|
FatalErrorIn("helpType::New()")
|
||||||
<< exit(FatalError);
|
<< "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<rhoThermo>(cstrIter()(mesh));
|
return autoPtr<helpType>(cstrIter()());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -62,6 +62,9 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
QGridLayout* form = new QGridLayout();
|
QGridLayout* form = new QGridLayout();
|
||||||
this->PanelLayout->addLayout(form, 0, 0, 1, -1);
|
this->PanelLayout->addLayout(form, 0, 0, 1, -1);
|
||||||
|
|
||||||
|
// ROW 0
|
||||||
|
// ~~~~~
|
||||||
|
|
||||||
vtkSMProperty* prop = 0;
|
vtkSMProperty* prop = 0;
|
||||||
|
|
||||||
// refresh button for updating times/fields
|
// refresh button for updating times/fields
|
||||||
@ -107,10 +110,16 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ROW 1
|
||||||
|
// ~~~~~
|
||||||
|
|
||||||
QFrame* hline1 = new QFrame(this);
|
QFrame* hline1 = new QFrame(this);
|
||||||
hline1->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
hline1->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
||||||
form->addWidget(hline1, 1, 0, 1, 3);
|
form->addWidget(hline1, 1, 0, 1, 3);
|
||||||
|
|
||||||
|
// ROW 2
|
||||||
|
// ~~~~~
|
||||||
|
|
||||||
// checkbox for caching mesh
|
// checkbox for caching mesh
|
||||||
if ((prop = this->proxy()->GetProperty("UiCacheMesh")) != 0)
|
if ((prop = this->proxy()->GetProperty("UiCacheMesh")) != 0)
|
||||||
{
|
{
|
||||||
@ -137,62 +146,10 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cell 2,1 empty
|
||||||
|
|
||||||
// checkbox for patch names
|
// ROW 3
|
||||||
if ((prop = this->proxy()->GetProperty("UiShowPatchNames")) != 0)
|
// ~~~~~
|
||||||
{
|
|
||||||
// immediate update on the Server Manager side
|
|
||||||
prop->SetImmediateUpdate(true);
|
|
||||||
|
|
||||||
ShowPatchNames_ = new QCheckBox("Patch Names");
|
|
||||||
ShowPatchNames_->setChecked
|
|
||||||
(
|
|
||||||
vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
|
|
||||||
);
|
|
||||||
ShowPatchNames_->setToolTip
|
|
||||||
(
|
|
||||||
"Show patch names in render window."
|
|
||||||
);
|
|
||||||
|
|
||||||
// row/col 0,1
|
|
||||||
form->addWidget(ShowPatchNames_, 2, 1, Qt::AlignLeft);
|
|
||||||
connect
|
|
||||||
(
|
|
||||||
ShowPatchNames_,
|
|
||||||
SIGNAL(stateChanged(int)),
|
|
||||||
this,
|
|
||||||
SLOT(ShowPatchNamesToggled())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 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
|
// checkbox for include sets
|
||||||
if ((prop = this->proxy()->GetProperty("UiIncludeSets")) != 0)
|
if ((prop = this->proxy()->GetProperty("UiIncludeSets")) != 0)
|
||||||
@ -221,6 +178,36 @@ 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_, 3, 1, Qt::AlignLeft);
|
||||||
|
connect
|
||||||
|
(
|
||||||
|
ShowGroupsOnly_,
|
||||||
|
SIGNAL(stateChanged(int)),
|
||||||
|
this,
|
||||||
|
SLOT(ShowGroupsOnlyToggled())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ROW 4
|
||||||
|
// ~~~~~
|
||||||
|
|
||||||
// checkbox for include zones
|
// checkbox for include zones
|
||||||
if ((prop = this->proxy()->GetProperty("UiIncludeZones")) != 0)
|
if ((prop = this->proxy()->GetProperty("UiIncludeZones")) != 0)
|
||||||
@ -240,7 +227,7 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
);
|
);
|
||||||
|
|
||||||
// row/col 1,1
|
// row/col 1,1
|
||||||
form->addWidget(IncludeZones_, 3, 1, Qt::AlignLeft);
|
form->addWidget(IncludeZones_, 4, 0, Qt::AlignLeft);
|
||||||
connect
|
connect
|
||||||
(
|
(
|
||||||
IncludeZones_,
|
IncludeZones_,
|
||||||
@ -250,6 +237,43 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// checkbox for patch names
|
||||||
|
if ((prop = this->proxy()->GetProperty("UiShowPatchNames")) != 0)
|
||||||
|
{
|
||||||
|
// immediate update on the Server Manager side
|
||||||
|
prop->SetImmediateUpdate(true);
|
||||||
|
|
||||||
|
ShowPatchNames_ = new QCheckBox("Patch Names");
|
||||||
|
ShowPatchNames_->setChecked
|
||||||
|
(
|
||||||
|
vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
|
||||||
|
);
|
||||||
|
ShowPatchNames_->setToolTip
|
||||||
|
(
|
||||||
|
"Show patch names in render window."
|
||||||
|
);
|
||||||
|
|
||||||
|
// row/col 0,1
|
||||||
|
form->addWidget(ShowPatchNames_, 4, 1, Qt::AlignLeft);
|
||||||
|
connect
|
||||||
|
(
|
||||||
|
ShowPatchNames_,
|
||||||
|
SIGNAL(stateChanged(int)),
|
||||||
|
this,
|
||||||
|
SLOT(ShowPatchNamesToggled())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ROW 5
|
||||||
|
// ~~~~~
|
||||||
|
|
||||||
|
QFrame* hline2 = new QFrame(this);
|
||||||
|
hline2->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
||||||
|
form->addWidget(hline2, 5, 0, 1, 3);
|
||||||
|
|
||||||
|
// ROW 6
|
||||||
|
// ~~~~~
|
||||||
|
|
||||||
// checkbox for vol field interpolation
|
// checkbox for vol field interpolation
|
||||||
if ((prop = this->proxy()->GetProperty("UiInterpolateVolFields")) != 0)
|
if ((prop = this->proxy()->GetProperty("UiInterpolateVolFields")) != 0)
|
||||||
{
|
{
|
||||||
@ -267,7 +291,7 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
);
|
);
|
||||||
|
|
||||||
// row/col 1,1
|
// row/col 1,1
|
||||||
form->addWidget(InterpolateVolFields_, 4, 0, Qt::AlignLeft);
|
form->addWidget(InterpolateVolFields_, 6, 0, Qt::AlignLeft);
|
||||||
connect
|
connect
|
||||||
(
|
(
|
||||||
InterpolateVolFields_,
|
InterpolateVolFields_,
|
||||||
@ -294,7 +318,7 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
);
|
);
|
||||||
|
|
||||||
// row/col 1,1
|
// row/col 1,1
|
||||||
form->addWidget(ExtrapolatePatches_, 4, 1, Qt::AlignLeft);
|
form->addWidget(ExtrapolatePatches_, 6, 1, Qt::AlignLeft);
|
||||||
connect
|
connect
|
||||||
(
|
(
|
||||||
ExtrapolatePatches_,
|
ExtrapolatePatches_,
|
||||||
@ -304,9 +328,12 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
QFrame* hline2 = new QFrame(this);
|
// ROW 7
|
||||||
hline2->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
// ~~~~~
|
||||||
form->addWidget(hline2, 5, 0, 1, 3);
|
|
||||||
|
QFrame* hline3 = new QFrame(this);
|
||||||
|
hline3->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
||||||
|
form->addWidget(hline3, 7, 0, 1, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,8 @@ then
|
|||||||
# ;;
|
# ;;
|
||||||
esac
|
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 \
|
sed -f $WM_PROJECT_DIR/bin/tools/doxyFilter.sed \
|
||||||
-e s@%filePath%@$filePath@g \
|
-e s@%filePath%@$filePath@g \
|
||||||
-e s@%fileName%@$fileName@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
|
# Namespace
|
||||||
# namespaceName
|
# namespaceName
|
||||||
# =>
|
# =>
|
||||||
@ -150,6 +161,13 @@ s? *\([a-zA-Z0-9]*\.[a-zA-Z]*\)? <li><a href="%dirName%/\1">\1</a></li>?
|
|||||||
|
|
||||||
s/.*\*\//\*\//
|
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
|
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
|
||||||
|
|
||||||
FILE_PATTERNS = *.H \
|
FILE_PATTERNS = *.H \
|
||||||
*.C
|
*.C \
|
||||||
|
*.dox
|
||||||
|
|
||||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
# 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.
|
# should be searched for input files as well. Possible values are YES and NO.
|
||||||
|
|||||||
@ -61,3 +61,19 @@ tr.memlist
|
|||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
width: 200px;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -29,12 +29,12 @@ Description
|
|||||||
generate the entry itself. So
|
generate the entry itself. So
|
||||||
- codeStream reads three entries: 'code', 'codeInclude' (optional),
|
- codeStream reads three entries: 'code', 'codeInclude' (optional),
|
||||||
'codeOptions' (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'
|
- these get compiled using 'wmake libso'
|
||||||
- the resulting library is loaded in executed with as arguments
|
- the resulting library is loaded in executed with as arguments
|
||||||
\code
|
\code
|
||||||
(const dictionary& dict, Ostream& os)
|
(const dictionary& dict, Ostream& os)
|
||||||
\endcode
|
\endcode
|
||||||
where the dictionary is the current dictionary.
|
where the dictionary is the current dictionary.
|
||||||
- the code has to write into Ostream which is then used to construct
|
- the code has to write into Ostream which is then used to construct
|
||||||
the actual dictionary entry.
|
the actual dictionary entry.
|
||||||
@ -77,12 +77,12 @@ Description
|
|||||||
\c \$ and \c ~ sequences)
|
\c \$ and \c ~ sequences)
|
||||||
|
|
||||||
Note
|
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.
|
with a subdirectory name corresponding to the SHA1 of the contents.
|
||||||
|
|
||||||
The corresponding library code is located under the local
|
The corresponding library code is located under the local
|
||||||
\f codeStream/platforms/$WM_OPTIONS/lib directory in a library
|
\c codeStream/platforms/$WM_OPTIONS/lib directory in a library
|
||||||
\f libcodeStream_SHA1.so
|
\c libcodeStream_SHA1.so
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
codeStream.C
|
codeStream.C
|
||||||
|
|||||||
@ -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
|
Description
|
||||||
Extract command arguments and options from the supplied
|
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.
|
Sequences with "(" ... ")" are transformed into a stringList.
|
||||||
For example,
|
For example,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -21,6 +21,8 @@ License
|
|||||||
You should have received a copy of the GNU General Public License along with
|
You should have received a copy of the GNU General Public License along with
|
||||||
OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
\mainpage OpenFOAM®: open source CFD
|
\mainpage OpenFOAM®: open source CFD
|
||||||
|
|
||||||
\section about About OpenFOAM
|
\section about About OpenFOAM
|
||||||
@ -34,4 +36,29 @@ License
|
|||||||
turbulence and heat transfer, to solid dynamics and electromagnetics.
|
turbulence and heat transfer, to solid dynamics and electromagnetics.
|
||||||
<a href="http://www.openfoam.org/features">More ...</a>
|
<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
|
||||||
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -37,4 +37,42 @@ namespace Foam
|
|||||||
defineTemplateTypeNameAndDebugWithName(wordListIOList, "wordListList", 0);
|
defineTemplateTypeNameAndDebugWithName(wordListIOList, "wordListList", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::printTable(const List<wordList>& wll, Ostream& os)
|
||||||
|
{
|
||||||
|
if (!wll.size()) return;
|
||||||
|
|
||||||
|
// Find the maximum word length for each column
|
||||||
|
List<string::size_type> columnWidth(wll[0].size(), string::size_type(0));
|
||||||
|
forAll(columnWidth, j)
|
||||||
|
{
|
||||||
|
forAll(wll, i)
|
||||||
|
{
|
||||||
|
columnWidth[j] = max(columnWidth[j], wll[i][j].size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Print the rows adding spacing for the columns
|
||||||
|
forAll(wll, i)
|
||||||
|
{
|
||||||
|
forAll(wll[i], j)
|
||||||
|
{
|
||||||
|
os << wll[i][j];
|
||||||
|
for
|
||||||
|
(
|
||||||
|
string::size_type k=0;
|
||||||
|
k<columnWidth[j] - wll[i][j].size() + 2;
|
||||||
|
k++
|
||||||
|
)
|
||||||
|
{
|
||||||
|
os << ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
os << nl;
|
||||||
|
|
||||||
|
if (i == 0) os << nl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -41,6 +41,9 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
typedef IOList<word> wordIOList;
|
typedef IOList<word> wordIOList;
|
||||||
typedef IOList<wordList> wordListIOList;
|
typedef IOList<wordList> wordListIOList;
|
||||||
|
|
||||||
|
// Print word list list as a table
|
||||||
|
void printTable(const List<wordList>&, Ostream&);
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -102,8 +102,7 @@ singleStepCombustion<CombThermoType, ThermoType>::~singleStepCombustion()
|
|||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class CombThermoType, class ThermoType>
|
||||||
Foam::tmp<Foam::fvScalarMatrix>
|
tmp<fvScalarMatrix> singleStepCombustion<CombThermoType, ThermoType>::R
|
||||||
singleStepCombustion<CombThermoType, ThermoType>::R
|
|
||||||
(
|
(
|
||||||
volScalarField& Y
|
volScalarField& Y
|
||||||
) const
|
) const
|
||||||
@ -131,8 +130,8 @@ singleStepCombustion<CombThermoType, ThermoType>::R
|
|||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class CombThermoType, class ThermoType>
|
||||||
Foam::tmp<Foam::volScalarField>
|
tmp<volScalarField>
|
||||||
singleStepCombustion< CombThermoType, ThermoType>::Sh() const
|
singleStepCombustion<CombThermoType, ThermoType>::Sh() const
|
||||||
{
|
{
|
||||||
const label fuelI = singleMixturePtr_->fuelIndex();
|
const label fuelI = singleMixturePtr_->fuelIndex();
|
||||||
volScalarField& YFuel =
|
volScalarField& YFuel =
|
||||||
@ -143,8 +142,8 @@ singleStepCombustion< CombThermoType, ThermoType>::Sh() const
|
|||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class CombThermoType, class ThermoType>
|
||||||
Foam::tmp<Foam::volScalarField>
|
tmp<volScalarField>
|
||||||
singleStepCombustion< CombThermoType, ThermoType>::dQ() const
|
singleStepCombustion<CombThermoType, ThermoType>::dQ() const
|
||||||
{
|
{
|
||||||
tmp<volScalarField> tdQ
|
tmp<volScalarField> tdQ
|
||||||
(
|
(
|
||||||
@ -175,7 +174,7 @@ singleStepCombustion< CombThermoType, ThermoType>::dQ() const
|
|||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class CombThermoType, class ThermoType>
|
||||||
bool singleStepCombustion< CombThermoType, ThermoType>::read()
|
bool singleStepCombustion<CombThermoType, ThermoType>::read()
|
||||||
{
|
{
|
||||||
if (CombThermoType::read())
|
if (CombThermoType::read())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,19 +25,23 @@ Class
|
|||||||
Foam::explicitSetValue
|
Foam::explicitSetValue
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Explicit set values on fields.
|
Set values field values explicity.
|
||||||
|
|
||||||
Sources described by:
|
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
|
SourceFiles
|
||||||
explicitSetValue.C
|
explicitSetValue.C
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,20 +29,24 @@ Description
|
|||||||
|
|
||||||
Sources described by:
|
Sources described by:
|
||||||
|
|
||||||
<Type>ExplicitSourceCoeffs
|
\verbatim
|
||||||
|
<Type>ExplicitSourceCoeffs
|
||||||
|
{
|
||||||
|
volumeMode absolute; // specific
|
||||||
|
injectionRate
|
||||||
{
|
{
|
||||||
volumeMode absolute; // specific
|
k 30.7;
|
||||||
injectionRate
|
epsilon 1.5;
|
||||||
{
|
|
||||||
k 30.7;
|
|
||||||
epsilon 1.5;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
\verbatim
|
||||||
|
|
||||||
If volumeMode =
|
Valid options for the \c volumeMode entry include:
|
||||||
- absolute: values are given as <quantity>
|
- absolute: values are given as \<quantity\>
|
||||||
- specific: values are given as <quantity>/m3
|
- specific: values are given as \<quantity\>/m3
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::basicSource
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
ExplicitSource.C
|
ExplicitSource.C
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,8 +25,43 @@ Class
|
|||||||
Foam::SRFVelocityFvPatchVectorField
|
Foam::SRFVelocityFvPatchVectorField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Freestream velocity patch to be used with SRF model
|
Freestream velocity condition to be used in conjunction with the single
|
||||||
to apply the appropriate rotation transformation in time and space.
|
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
|
SourceFiles
|
||||||
SRFVelocityFvPatchVectorField.C
|
SRFVelocityFvPatchVectorField.C
|
||||||
@ -44,7 +79,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class SRFFreestreamVelocityFvPatchVectorField Declaration
|
Class SRFFreestreamVelocityFvPatchVectorField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class SRFFreestreamVelocityFvPatchVectorField
|
class SRFFreestreamVelocityFvPatchVectorField
|
||||||
@ -53,7 +88,7 @@ class SRFFreestreamVelocityFvPatchVectorField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Velocity of the free stream in the absolute frame
|
//- Velocity of the free stream in the absolute frame [m/s]
|
||||||
vector UInf_;
|
vector UInf_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,61 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::SRFVelocityFvPatchVectorField
|
Foam::SRFVelocityFvPatchVectorField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions grpWallBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
SRFVelocityFvPatchVectorField.C
|
SRFVelocityFvPatchVectorField.C
|
||||||
@ -57,7 +110,7 @@ class SRFVelocityFvPatchVectorField
|
|||||||
//- Is the supplied inlet value relative to the SRF
|
//- Is the supplied inlet value relative to the SRF
|
||||||
Switch relative_;
|
Switch relative_;
|
||||||
|
|
||||||
//- Inlet value
|
//- Inlet value [m/s]
|
||||||
vectorField inletValue_;
|
vectorField inletValue_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -165,6 +165,12 @@ void Foam::solutionControl::storePrevIterFields() const
|
|||||||
|
|
||||||
Foam::solutionControl::solutionControl(fvMesh& mesh, const word& algorithmName)
|
Foam::solutionControl::solutionControl(fvMesh& mesh, const word& algorithmName)
|
||||||
:
|
:
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"solutionControl",
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
residualControl_(),
|
residualControl_(),
|
||||||
algorithmName_(algorithmName),
|
algorithmName_(algorithmName),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -44,6 +44,8 @@ namespace Foam
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class solutionControl
|
class solutionControl
|
||||||
|
:
|
||||||
|
public IOobject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,9 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::basicSymmetryFvPatchField
|
Foam::basicSymmetryFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpConstraintBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A symmetry patch
|
A symmetry patch
|
||||||
|
|
||||||
|
|||||||
@ -28,19 +28,17 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
const word& fvPatchField<Type>::calculatedType()
|
const Foam::word& Foam::fvPatchField<Type>::calculatedType()
|
||||||
{
|
{
|
||||||
return calculatedFvPatchField<Type>::typeName;
|
return calculatedFvPatchField<Type>::typeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
calculatedFvPatchField<Type>::calculatedFvPatchField
|
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
@ -51,7 +49,7 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
calculatedFvPatchField<Type>::calculatedFvPatchField
|
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||||
(
|
(
|
||||||
const calculatedFvPatchField<Type>& ptf,
|
const calculatedFvPatchField<Type>& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
@ -64,7 +62,7 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
calculatedFvPatchField<Type>::calculatedFvPatchField
|
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
@ -77,7 +75,7 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
calculatedFvPatchField<Type>::calculatedFvPatchField
|
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||||
(
|
(
|
||||||
const calculatedFvPatchField<Type>& ptf
|
const calculatedFvPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -87,7 +85,7 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
calculatedFvPatchField<Type>::calculatedFvPatchField
|
Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
||||||
(
|
(
|
||||||
const calculatedFvPatchField<Type>& ptf,
|
const calculatedFvPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
@ -98,7 +96,8 @@ calculatedFvPatchField<Type>::calculatedFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
Foam::tmp<Foam::fvPatchField<Type> >
|
||||||
|
Foam::fvPatchField<Type>::NewCalculatedType
|
||||||
(
|
(
|
||||||
const fvPatch& p
|
const fvPatch& p
|
||||||
)
|
)
|
||||||
@ -130,7 +129,7 @@ tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
|||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class Type2>
|
template<class Type2>
|
||||||
tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::NewCalculatedType
|
||||||
(
|
(
|
||||||
const fvPatchField<Type2>& pf
|
const fvPatchField<Type2>& pf
|
||||||
)
|
)
|
||||||
@ -142,7 +141,8 @@ tmp<fvPatchField<Type> > fvPatchField<Type>::NewCalculatedType
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > calculatedFvPatchField<Type>::valueInternalCoeffs
|
Foam::tmp<Foam::Field<Type> >
|
||||||
|
Foam::calculatedFvPatchField<Type>::valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
@ -165,7 +165,8 @@ tmp<Field<Type> > calculatedFvPatchField<Type>::valueInternalCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > calculatedFvPatchField<Type>::valueBoundaryCoeffs
|
Foam::tmp<Foam::Field<Type> >
|
||||||
|
Foam::calculatedFvPatchField<Type>::valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
@ -186,8 +187,10 @@ tmp<Field<Type> > calculatedFvPatchField<Type>::valueBoundaryCoeffs
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > calculatedFvPatchField<Type>::gradientInternalCoeffs() const
|
Foam::tmp<Foam::Field<Type> >
|
||||||
|
Foam::calculatedFvPatchField<Type>::gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
@ -206,8 +209,10 @@ tmp<Field<Type> > calculatedFvPatchField<Type>::gradientInternalCoeffs() const
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
|
Foam::tmp<Foam::Field<Type> >
|
||||||
|
Foam::calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
@ -227,17 +232,12 @@ tmp<Field<Type> > calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Write
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void calculatedFvPatchField<Type>::write(Ostream& os) const
|
void Foam::calculatedFvPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::write(os);
|
fvPatchField<Type>::write(os);
|
||||||
this->writeEntry("value", os);
|
this->writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,24 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::calculatedFvPatchField
|
Foam::calculatedFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
calculatedFvPatchField.C
|
calculatedFvPatchField.C
|
||||||
@ -43,7 +59,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class calculatedFvPatch Declaration
|
Class calculatedFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -24,8 +24,11 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::coupledFvPatchField
|
Foam::coupledFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::coupledFvPatchField
|
Abstract base class for coupled patches.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
coupledFvPatchField.C
|
coupledFvPatchField.C
|
||||||
@ -45,7 +48,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class coupledFvPatch Declaration
|
Class coupledFvPatch Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,11 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::directionMixedFvPatchField
|
Foam::directionMixedFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::directionMixedFvPatchField
|
Base class for direction-mixed boundary conditions.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
directionMixedFvPatchField.C
|
directionMixedFvPatchField.C
|
||||||
@ -43,7 +46,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class directionMixedFvPatch Declaration
|
Class directionMixedFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,40 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fixedGradientFvPatchField
|
Foam::fixedGradientFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
fixedGradientFvPatchField.C
|
fixedGradientFvPatchField.C
|
||||||
@ -43,7 +75,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fixedGradientFvPatch Declaration
|
Class fixedGradientFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,28 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fixedValueFvPatchField
|
Foam::fixedValueFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
fixedValueFvPatchField.C
|
fixedValueFvPatchField.C
|
||||||
@ -43,7 +63,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fixedValueFvPatch Declaration
|
Class fixedValueFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,45 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::mixedFvPatchField
|
Foam::mixedFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
mixedFvPatchField.C
|
mixedFvPatchField.C
|
||||||
@ -43,7 +80,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class mixedFvPatch Declaration
|
Class mixedFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -24,6 +24,9 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::slicedFvPatchField
|
Foam::slicedFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Specialization of fvPatchField which creates the underlying
|
Specialization of fvPatchField which creates the underlying
|
||||||
fvPatchField as a slice of the given complete field.
|
fvPatchField as a slice of the given complete field.
|
||||||
@ -33,6 +36,9 @@ Description
|
|||||||
|
|
||||||
Should only used as a template argument for SlicedGeometricField.
|
Should only used as a template argument for SlicedGeometricField.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::fvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
slicedFvPatchField.C
|
slicedFvPatchField.C
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,6 +24,9 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::transformFvPatchField
|
Foam::transformFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::transformFvPatchField
|
Foam::transformFvPatchField
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,22 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::zeroGradientFvPatchField
|
Foam::zeroGradientFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
zeroGradientFvPatchField.C
|
zeroGradientFvPatchField.C
|
||||||
@ -43,7 +57,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class zeroGradientFvPatch Declaration
|
Class zeroGradientFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -24,8 +24,27 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::cyclicFvPatchField
|
Foam::cyclicFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
cyclicFvPatchField.C
|
cyclicFvPatchField.C
|
||||||
@ -45,7 +64,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class cyclicFvPatch Declaration
|
Class cyclicFvPatch Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -24,8 +24,31 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::cyclicAMIFvPatchField
|
Foam::cyclicAMIFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
cyclicAMIFvPatchField.C
|
cyclicAMIFvPatchField.C
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,15 +25,10 @@ License
|
|||||||
|
|
||||||
#include "cyclicSlipFvPatchField.H"
|
#include "cyclicSlipFvPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
Foam::cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
@ -44,7 +39,7 @@ cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
Foam::cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||||
(
|
(
|
||||||
const cyclicSlipFvPatchField<Type>& ptf,
|
const cyclicSlipFvPatchField<Type>& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
@ -57,7 +52,7 @@ cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
Foam::cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
@ -69,7 +64,7 @@ cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
Foam::cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||||
(
|
(
|
||||||
const cyclicSlipFvPatchField<Type>& ptf
|
const cyclicSlipFvPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -79,7 +74,7 @@ cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
Foam::cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
|
||||||
(
|
(
|
||||||
const cyclicSlipFvPatchField<Type>& ptf,
|
const cyclicSlipFvPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, volMesh>& iF
|
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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,25 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::cyclicSlipFvPatchField
|
Foam::cyclicSlipFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
cyclicSlipFvPatchField.C
|
cyclicSlipFvPatchField.C
|
||||||
@ -44,7 +61,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class cyclicSlipFvPatch Declaration
|
Class cyclicSlipFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -52,7 +69,6 @@ class cyclicSlipFvPatchField
|
|||||||
:
|
:
|
||||||
public cyclicFvPatchField<Type>
|
public cyclicFvPatchField<Type>
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -119,7 +135,6 @@ public:
|
|||||||
new cyclicSlipFvPatchField<Type>(*this, iF)
|
new cyclicSlipFvPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,24 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::emptyFvPatchField
|
Foam::emptyFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpConstraintBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
emptyFvPatchField.C
|
emptyFvPatchField.C
|
||||||
@ -44,7 +60,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class emptyFvPatch Declaration
|
Class emptyFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -24,8 +24,15 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::jumpCyclicFvPatchField
|
Foam::jumpCyclicFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
jumpCyclicFvPatchField.C
|
jumpCyclicFvPatchField.C
|
||||||
@ -43,7 +50,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class cyclicFvPatch Declaration
|
Class jumpCyclicFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,11 +24,18 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::nonuniformTransformCyclicFvPatchField
|
Foam::nonuniformTransformCyclicFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::nonuniformTransformCyclicFvPatchField
|
This boundary condition enforces a cyclic condition between a pair of
|
||||||
|
boundaries, incorporating a non-uniform transformation.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
nonuniformTransformCyclicFvPatchField.C
|
nonuniformTransformCyclicFvPatchField.C
|
||||||
|
nonuniformTransformCyclicFvPatchFields.H
|
||||||
|
nonuniformTransformCyclicFvPatchFields.C
|
||||||
|
nonuniformTransformCyclicFvPatchFieldsFwd.H
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,21 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::processorFvPatchField
|
Foam::processorFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
processorFvPatchField.C
|
processorFvPatchField.C
|
||||||
@ -45,7 +58,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class processorFvPatch Declaration
|
Class processorFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -24,11 +24,31 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::processorCyclicFvPatchField
|
Foam::processorCyclicFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
processorCyclicFvPatchField.C
|
processorCyclicFvPatchField.C
|
||||||
|
processorCyclicFvPatchFields.H
|
||||||
|
processorCyclicFvPatchFields.C
|
||||||
|
processorCyclicFvPatchFieldsFwd.H
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -44,7 +64,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class processorCyclicFvPatch Declaration
|
Class processorCyclicFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -24,11 +24,27 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::symmetryFvPatchField
|
Foam::symmetryFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpConstraintBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
symmetryFvPatchField.C
|
symmetryFvPatchField.C
|
||||||
|
symmetryFvPatchFields.C
|
||||||
|
symmetryFvPatchFields.H
|
||||||
|
symmetryFvPatchFieldsFwd.H
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -44,7 +60,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class symmetryFvPatch Declaration
|
Class symmetryFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,25 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::wedgeFvPatchField
|
Foam::wedgeFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpConstraintBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
wedgeFvPatchField.C
|
wedgeFvPatchField.C
|
||||||
@ -44,7 +61,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class wedgeFvPatch Declaration
|
Class wedgeFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -292,6 +292,7 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
void Foam::activeBaffleVelocityFvPatchVectorField::write(Ostream& os) const
|
void Foam::activeBaffleVelocityFvPatchVectorField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
|
writeEntryIfDifferent<word>(os, "p", "p", pName_);
|
||||||
os.writeKeyword("cyclicPatch")
|
os.writeKeyword("cyclicPatch")
|
||||||
<< cyclicPatchName_ << token::END_STATEMENT << nl;
|
<< cyclicPatchName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("orientation")
|
os.writeKeyword("orientation")
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,65 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::activeBaffleVelocityFvPatchVectorField
|
Foam::activeBaffleVelocityFvPatchVectorField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
activeBaffleVelocityFvPatchVectorField.C
|
activeBaffleVelocityFvPatchVectorField.C
|
||||||
@ -44,7 +101,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class activeBaffleVelocityFvPatch Declaration
|
Class activeBaffleVelocityFvPatchVectorField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class activeBaffleVelocityFvPatchVectorField
|
class activeBaffleVelocityFvPatchVectorField
|
||||||
@ -163,17 +220,10 @@ public:
|
|||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
virtual void autoMap
|
virtual void autoMap(const fvPatchFieldMapper&);
|
||||||
(
|
|
||||||
const fvPatchFieldMapper&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||||
virtual void rmap
|
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
||||||
(
|
|
||||||
const fvPatchVectorField&,
|
|
||||||
const labelList&
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
|
|||||||
@ -92,7 +92,7 @@ activePressureForceBaffleVelocityFvPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchVectorField(p, iF),
|
fixedValueFvPatchVectorField(p, iF),
|
||||||
pName_("p"),
|
pName_(dict.lookupOrDefault<word>("p", "p")),
|
||||||
cyclicPatchName_(dict.lookup("cyclicPatch")),
|
cyclicPatchName_(dict.lookup("cyclicPatch")),
|
||||||
cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)),
|
cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)),
|
||||||
orientation_(readLabel(dict.lookup("orientation"))),
|
orientation_(readLabel(dict.lookup("orientation"))),
|
||||||
@ -278,6 +278,8 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
{
|
{
|
||||||
valueDiff -=p[nbrFaceCells[facei]]*mag(initCyclicSf_[facei]);
|
valueDiff -=p[nbrFaceCells[facei]]*mag(initCyclicSf_[facei]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info<< "Force difference = " << valueDiff << endl;
|
||||||
}
|
}
|
||||||
else //pressure based
|
else //pressure based
|
||||||
{
|
{
|
||||||
@ -290,6 +292,8 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
{
|
{
|
||||||
valueDiff -= p[nbrFaceCells[facei]];
|
valueDiff -= p[nbrFaceCells[facei]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info<< "Pressure difference = " << valueDiff << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mag(valueDiff) > mag(minThresholdValue_) || baffleActivated_))
|
if ((mag(valueDiff) > mag(minThresholdValue_) || baffleActivated_))
|
||||||
@ -316,7 +320,6 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Open fraction = " << openFraction_ << endl;
|
Info<< "Open fraction = " << openFraction_ << endl;
|
||||||
Info<< "Pressure difference = " << valueDiff << endl;
|
|
||||||
|
|
||||||
vectorField::subField Sfw = patch().patch().faceAreas();
|
vectorField::subField Sfw = patch().patch().faceAreas();
|
||||||
vectorField newSfw((1 - openFraction_)*initWallSf_);
|
vectorField newSfw((1 - openFraction_)*initWallSf_);
|
||||||
@ -351,6 +354,7 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::
|
|||||||
write(Ostream& os) const
|
write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
|
writeEntryIfDifferent<word>(os, "p", "p", pName_);
|
||||||
os.writeKeyword("cyclicPatch")
|
os.writeKeyword("cyclicPatch")
|
||||||
<< cyclicPatchName_ << token::END_STATEMENT << nl;
|
<< cyclicPatchName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("orientation")
|
os.writeKeyword("orientation")
|
||||||
@ -361,8 +365,6 @@ write(Ostream& os) const
|
|||||||
<< maxOpenFractionDelta_ << token::END_STATEMENT << nl;
|
<< maxOpenFractionDelta_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("openFraction")
|
os.writeKeyword("openFraction")
|
||||||
<< openFraction_ << token::END_STATEMENT << nl;
|
<< openFraction_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("p")
|
|
||||||
<< pName_ << token::END_STATEMENT << nl;
|
|
||||||
os.writeKeyword("minThresholdValue")
|
os.writeKeyword("minThresholdValue")
|
||||||
<< minThresholdValue_ << token::END_STATEMENT << nl;
|
<< minThresholdValue_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("forceBased")
|
os.writeKeyword("forceBased")
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,12 +24,64 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::activePressureForceBaffleVelocityFvPatchVectorField
|
Foam::activePressureForceBaffleVelocityFvPatchVectorField
|
||||||
|
|
||||||
Description
|
Group
|
||||||
Bounday which emulates the operation of a release pressure panel.
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
The boundary condition modifies mesh areas based on difference
|
Description
|
||||||
of pressure or force face beween both sides of the panel. Once opened the
|
This boundary condition is applied to the flow velocity, to simulate the
|
||||||
panel continues to open at a fixed rate.
|
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
|
SourceFiles
|
||||||
activePressureForceBaffleVelocityFvPatchVectorField.C
|
activePressureForceBaffleVelocityFvPatchVectorField.C
|
||||||
@ -48,7 +100,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class activePressureForceBaffleVelocityFvPatch Declaration
|
Class activePressureForceBaffleVelocityFvPatchVectorField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class activePressureForceBaffleVelocityFvPatchVectorField
|
class activePressureForceBaffleVelocityFvPatchVectorField
|
||||||
@ -102,6 +154,7 @@ class activePressureForceBaffleVelocityFvPatchVectorField
|
|||||||
//- Baffle is activated
|
//- Baffle is activated
|
||||||
bool baffleActivated_;
|
bool baffleActivated_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
|
|||||||
@ -24,37 +24,53 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::advectiveFvPatchField
|
Foam::advectiveFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpOutletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Advective outflow boundary condition based on solving DDt(psi, U) = 0
|
This boundary condition provides an advective outflow condition, based on
|
||||||
at the boundary.
|
solving DDt(psi, U) = 0 at the boundary.
|
||||||
|
|
||||||
The standard (Euler, backward, CrankNicholson) time schemes are
|
The standard (Euler, backward, CrankNicholson) time schemes are
|
||||||
supported. Additionally an optional mechanism to relax the value at
|
supported. Additionally an optional mechanism to relax the value at
|
||||||
the boundary to a specified far-field value is provided which is
|
the boundary to a specified far-field value is provided which is
|
||||||
switched on by specifying the relaxation length-scale lInf and the
|
switched on by specifying the relaxation length-scale \c lInf and the
|
||||||
far-field value fieldInf.
|
far-field value \c fieldInf.
|
||||||
|
|
||||||
The flow/wave speed at the outlet is provided by the virtual function
|
The flow/wave speed at the outlet is provided by the virtual function
|
||||||
advectionSpeed() the default implementation of which requires the name of
|
advectionSpeed() the default implementation of which requires the name of
|
||||||
the flux field (phi) and optionally the density (rho) if the mass-flux
|
the flux field \c (phi) and optionally the density \c (rho) if the
|
||||||
rather than the volumetric-flux is given.
|
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 flow/wave speed at the outlet can be changed by deriving a specialised
|
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
|
waveTransmissiveFvPatchField the advectionSpeed() calculates and returns
|
||||||
the flow-speed plus the acoustic wave speed creating an acoustic wave
|
the flow-speed plus the acoustic wave speed creating an acoustic wave
|
||||||
transmissive boundary condition.
|
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
|
SourceFiles
|
||||||
advectiveFvPatchField.C
|
advectiveFvPatchField.C
|
||||||
|
|
||||||
@ -71,7 +87,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class advectiveFvPatch Declaration
|
Class advectiveFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,11 +24,58 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::buoyantPressureFvPatchScalarField
|
Foam::buoyantPressureFvPatchScalarField
|
||||||
|
|
||||||
Description
|
Group
|
||||||
Set the pressure gradient boundary condition appropriately for buoyant flow.
|
grpGenericBoundaryConditions grpWallBoundaryConditions
|
||||||
|
|
||||||
If the variable name is "pd" assume it is p - rho*g.h and set the gradient
|
Description
|
||||||
appropriately. Otherwise assume the variable is the static pressure.
|
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
|
SourceFiles
|
||||||
buoyantPressureFvPatchScalarField.C
|
buoyantPressureFvPatchScalarField.C
|
||||||
@ -47,7 +94,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class buoyantPressureFvPatch Declaration
|
Class buoyantPressureFvPatchScalarField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class buoyantPressureFvPatchScalarField
|
class buoyantPressureFvPatchScalarField
|
||||||
|
|||||||
@ -24,41 +24,46 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::codedFixedValueFvPatchField
|
Foam::codedFixedValueFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Constructs on-the-fly a new boundary condition (derived from
|
Constructs on-the-fly a new boundary condition (derived from
|
||||||
fixedValueFvPatchField) which is then used to evaluate.
|
fixedValueFvPatchField) which is then used to evaluate.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
\verbatim
|
\verbatim
|
||||||
movingWall
|
myPatch
|
||||||
{
|
{
|
||||||
type codedFixedValue;
|
type codedFixedValue;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
redirectType rampedFixedValue; // name of generated bc
|
redirectType rampedFixedValue; // name of generated BC
|
||||||
|
|
||||||
code
|
code
|
||||||
#{
|
#{
|
||||||
operator==(min(10, 0.1*this->db().time().value()));
|
operator==(min(10, 0.1*this->db().time().value()));
|
||||||
#};
|
#};
|
||||||
|
|
||||||
//codeInclude
|
//codeInclude
|
||||||
//#{
|
//#{
|
||||||
// #include "fvCFD.H"
|
// #include "fvCFD.H"
|
||||||
//#};
|
//#};
|
||||||
|
|
||||||
//codeOptions
|
//codeOptions
|
||||||
//#{
|
//#{
|
||||||
// -I$(LIB_SRC)/finiteVolume/lnInclude
|
// -I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
//#};
|
//#};
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
A special form is if the 'code' section is not supplied. In this case
|
A special form is if the 'code' section is not supplied. In this case
|
||||||
the code gets read from a (runTimeModifiable!) dictionary system/codeDict
|
the code is read from a (runTimeModifiable!) dictionary system/codeDict
|
||||||
which would have a corresponding entry
|
which would have a corresponding entry:
|
||||||
|
|
||||||
\verbatim
|
\verbatim
|
||||||
rampedFixedValue
|
myPatch
|
||||||
{
|
{
|
||||||
code
|
code
|
||||||
#{
|
#{
|
||||||
@ -68,7 +73,8 @@ Description
|
|||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
SeeAlso
|
SeeAlso
|
||||||
Foam::dynamicCode and Foam::functionEntries::codeStream
|
Foam::dynamicCode
|
||||||
|
Foam::functionEntries::codeStream
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
codedFixedValueFvPatchField.C
|
codedFixedValueFvPatchField.C
|
||||||
@ -92,7 +98,7 @@ class dynamicCodeContext;
|
|||||||
class IOdictionary;
|
class IOdictionary;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class codedFixedValueFvPatch Declaration
|
Class codedFixedValueFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -110,6 +116,7 @@ class codedFixedValueFvPatchField
|
|||||||
|
|
||||||
mutable autoPtr<fvPatchField<Type> > redirectPatchFieldPtr_;
|
mutable autoPtr<fvPatchField<Type> > redirectPatchFieldPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
const IOdictionary& dict() const;
|
const IOdictionary& dict() const;
|
||||||
@ -132,6 +139,7 @@ class codedFixedValueFvPatchField
|
|||||||
// Get the dictionary to initialize the codeContext
|
// Get the dictionary to initialize the codeContext
|
||||||
virtual const dictionary& codeDict() const;
|
virtual const dictionary& codeDict() const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Static data members
|
// Static data members
|
||||||
@ -209,8 +217,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
//- Get reference to the underlying patch
|
//- Get reference to the underlying patch
|
||||||
|
|||||||
@ -24,41 +24,42 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::codedMixedFvPatchField
|
Foam::codedMixedFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Constructs on-the-fly a new boundary condition (derived from
|
Constructs on-the-fly a new boundary condition (derived from
|
||||||
mixedFvPatchField) which is then used to evaluate.
|
mixedFvPatchField) which is then used to evaluate.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
\verbatim
|
\verbatim
|
||||||
movingWall
|
myPatch
|
||||||
{
|
{
|
||||||
type codedMixed;
|
type codedMixed;
|
||||||
|
value uniform 0;
|
||||||
|
redirectType rampedMixed; // name of generated BC
|
||||||
|
|
||||||
refValue uniform (0 0 0);
|
code
|
||||||
refGradient uniform (0 0 0);
|
#{
|
||||||
valueFraction uniform 1;
|
this->refValue() =
|
||||||
|
vector(1, 0, 0)
|
||||||
|
*min(10, 0.1*this->db().time().value());
|
||||||
|
this->refGrad() = vector::zero;
|
||||||
|
this->valueFraction() = 1.0;
|
||||||
|
#};
|
||||||
|
|
||||||
redirectType rampedMixed; // name of generated bc
|
//codeInclude
|
||||||
|
//#{
|
||||||
|
// #include "fvCFD.H"
|
||||||
|
//#};
|
||||||
|
|
||||||
code
|
//codeOptions
|
||||||
#{
|
//#{
|
||||||
this->refValue() =
|
// -I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
vector(1, 0, 0)
|
//#};
|
||||||
*min(10, 0.1*this->db().time().value());
|
}
|
||||||
this->refGrad() = vector::zero;
|
|
||||||
this->valueFraction() = 1.0;
|
|
||||||
#};
|
|
||||||
|
|
||||||
//codeInclude
|
|
||||||
//#{
|
|
||||||
// #include "fvCFD.H"
|
|
||||||
//#};
|
|
||||||
|
|
||||||
//codeOptions
|
|
||||||
//#{
|
|
||||||
// -I$(LIB_SRC)/finiteVolume/lnInclude
|
|
||||||
//#};
|
|
||||||
}
|
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
A special form is if the 'code' section is not supplied. In this case
|
A special form is if the 'code' section is not supplied. In this case
|
||||||
@ -66,19 +67,20 @@ Description
|
|||||||
which would have a corresponding entry
|
which would have a corresponding entry
|
||||||
|
|
||||||
\verbatim
|
\verbatim
|
||||||
rampedMixed
|
myPatch
|
||||||
{
|
{
|
||||||
code
|
code
|
||||||
#{
|
#{
|
||||||
this->refValue() = min(10, 0.1*this->db().time().value());
|
this->refValue() = min(10, 0.1*this->db().time().value());
|
||||||
this->refGrad() = vector::zero;
|
this->refGrad() = vector::zero;
|
||||||
this->valueFraction() = 1.0;
|
this->valueFraction() = 1.0;
|
||||||
#};
|
#};
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
SeeAlso
|
SeeAlso
|
||||||
Foam::dynamicCode and Foam::functionEntries::codeStream
|
Foam::dynamicCode
|
||||||
|
Foam::functionEntries::codeStream
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
codedMixedFvPatchField.C
|
codedMixedFvPatchField.C
|
||||||
@ -102,7 +104,7 @@ class dynamicCodeContext;
|
|||||||
class IOdictionary;
|
class IOdictionary;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class codedMixedFvPatch Declaration
|
Class codedMixedFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -120,6 +122,7 @@ class codedMixedFvPatchField
|
|||||||
|
|
||||||
mutable autoPtr<mixedFvPatchField<Type> > redirectPatchFieldPtr_;
|
mutable autoPtr<mixedFvPatchField<Type> > redirectPatchFieldPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
const IOdictionary& dict() const;
|
const IOdictionary& dict() const;
|
||||||
@ -142,6 +145,7 @@ class codedMixedFvPatchField
|
|||||||
// Get the dictionary to initialize the codeContext
|
// Get the dictionary to initialize the codeContext
|
||||||
virtual const dictionary& codeDict() const;
|
virtual const dictionary& codeDict() const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Static data members
|
// Static data members
|
||||||
@ -219,8 +223,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
//- Get reference to the underlying patchField
|
//- Get reference to the underlying patchField
|
||||||
|
|||||||
@ -2,16 +2,16 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
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
|
under the terms of the GNU General Public License as published by
|
||||||
Free Software Foundation; either version 3 of the License, or (at your
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
@ -19,19 +19,33 @@ License
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::cylindricalInletVelocityFvPatchVectorField
|
Foam::cylindricalInletVelocityFvPatchVectorField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Describes an inlet vector boundary condition in cylindrical coordinates
|
This boundary condition describes an inlet vector boundary condition in
|
||||||
given a central axis, central point, rpm, axial and radial velocity.
|
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:
|
Example of the boundary condition specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
inlet
|
myPatch
|
||||||
{
|
{
|
||||||
type cylindricalInletVelocity;
|
type cylindricalInletVelocity;
|
||||||
axis (0 0 1);
|
axis (0 0 1);
|
||||||
@ -42,9 +56,14 @@ Description
|
|||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
The axialVelocity, radialVelocity and rpm entries are DataEntry types, able
|
Note
|
||||||
to describe time varying functions. The example above gives the usage for
|
The \c axialVelocity, \c radialVelocity and \c rpm entries are DataEntry
|
||||||
supplying constant values.
|
types, able to describe time varying functions. The example above gives
|
||||||
|
the usage for supplying constant values.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::fixedValueFvPatchField
|
||||||
|
Foam::DataEntry
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
cylindricalInletVelocityFvPatchVectorField.C
|
cylindricalInletVelocityFvPatchVectorField.C
|
||||||
|
|||||||
@ -24,47 +24,59 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fanFvPatchField
|
Foam::fanFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Jump boundary condition. Operates on cyclic. Jump specified as a DataEntry.
|
This boundary condition provides a jump condition, using the \c cyclic
|
||||||
(table, fileTable, csv etc.)
|
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:
|
Example of the boundary condition specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
fan_half0
|
myPatch
|
||||||
|
{
|
||||||
|
type fan;
|
||||||
|
patchType cyclic;
|
||||||
|
jump uniform 0;
|
||||||
|
jumpTable csvFile;
|
||||||
|
csvFileCoeffs
|
||||||
{
|
{
|
||||||
type fan;
|
hasHeaderLine 1;
|
||||||
patchType cyclic;
|
refColumn 0;
|
||||||
jump uniform 0;
|
componentColumns 1(1);
|
||||||
jumpTable csvFile;
|
separator ",";
|
||||||
csvFileCoeffs
|
fileName "$FOAM_CASE/constant/pressureVsU";
|
||||||
{
|
|
||||||
hasHeaderLine 1;
|
|
||||||
refColumn 0;
|
|
||||||
componentColumns 1(1);
|
|
||||||
separator ",";
|
|
||||||
fileName "$FOAM_CASE/constant/pressureVsU";
|
|
||||||
}
|
|
||||||
value uniform 0;
|
|
||||||
}
|
}
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
\endverbatim
|
\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
|
Note
|
||||||
it is a power of the flowrate.
|
The underlying \c patchType should be set to \c cyclic
|
||||||
|
|
||||||
\verbatim
|
SeeAlso
|
||||||
fan_half0
|
Foam::DataEntry
|
||||||
{
|
|
||||||
type fan;
|
|
||||||
patchType cyclic;
|
|
||||||
jump uniform 0;
|
|
||||||
f 2(100 -0.1);
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
\endverbatim
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fanFvPatchField.C
|
fanFvPatchField.C
|
||||||
|
fanFvPatchFields.H
|
||||||
|
fanFvPatchFields.C
|
||||||
|
fanFvPatchFieldsFwd.H
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,43 +24,53 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fanPressureFvPatchScalarField
|
Foam::fanPressureFvPatchScalarField
|
||||||
|
|
||||||
Description
|
Group
|
||||||
Assigns pressure inlet or outlet total pressure condition for a fan.
|
grpInletBoundaryConditions grpOutletBoundaryConditions
|
||||||
|
|
||||||
User specifies:
|
Description
|
||||||
- pressure drop vs volumetric flow rate table (fan curve) file name;
|
This boundary condition can be applied to assign either a pressure inlet
|
||||||
- direction of normal flow through the fan, in or out;
|
or outlet total pressure condition for a fan.
|
||||||
- total pressure of the environment.
|
|
||||||
|
\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:
|
Example of the boundary condition specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type fanPressure;
|
type fanPressure;
|
||||||
fileName "fanCurve"; // Fan curve file name
|
fileName "fanCurve";
|
||||||
outOfBounds clamp; // (error|warn|clamp|repeat)
|
outOfBounds clamp;
|
||||||
direction in; // Direction of flow through fan
|
direction in;
|
||||||
p0 uniform 0; // Environmental total pressure
|
p0 uniform 0;
|
||||||
value uniform 0; // Initial pressure
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type fanPressure;
|
type fanPressure;
|
||||||
fileName "fanCurve"; // Fan curve file name
|
fileName "fanCurve";
|
||||||
outOfBounds clamp; // (error|warn|clamp|repeat)
|
outOfBounds clamp;
|
||||||
direction out; // Direction of flow through fan
|
direction out;
|
||||||
p0 uniform 0; // Environmental total pressure
|
p0 uniform 0;
|
||||||
value uniform 0; // Initial pressure
|
value uniform 0;
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
Foam::totalPressureFvPatchScalarField and
|
Foam::fanFvPatchField
|
||||||
|
Foam::totalPressureFvPatchScalarField
|
||||||
Foam::interpolationTable
|
Foam::interpolationTable
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fanPressureFvPatchScalarField.C
|
fanPressureFvPatchScalarField.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -93,8 +103,10 @@ public:
|
|||||||
ffdOut
|
ffdOut
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//- Fan flow directions names
|
||||||
static const NamedEnum<fanFlowDirection, 2> fanFlowDirectionNames_;
|
static const NamedEnum<fanFlowDirection, 2> fanFlowDirectionNames_;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|||||||
@ -24,15 +24,53 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fixedFluxPressureFvPatchScalarField
|
Foam::fixedFluxPressureFvPatchScalarField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpOutletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Adjusts the pressure gradient such that the flux on the boundary is that
|
This boundary condition adjusts the pressure gradient such that the flux
|
||||||
specified by the velocity boundary condition.
|
on the boundary is that specified by the velocity boundary condition.
|
||||||
|
|
||||||
The predicted flux to be compensated by the pressure gradient is evaluated
|
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
|
as \f$(\phi - \phi_{H/A})\f$, both of which are looked-up from the database,
|
||||||
the pressure diffusivity Dp used to calculate the gradient.
|
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
|
SourceFiles
|
||||||
fixedFluxPressureFvPatchScalarField.C
|
fixedFluxPressureFvPatchScalarField.C
|
||||||
@ -52,7 +90,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fixedFluxPressureFvPatch Declaration
|
Class fixedFluxPressureFvPatchScalarField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class fixedFluxPressureFvPatchScalarField
|
class fixedFluxPressureFvPatchScalarField
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,11 +24,33 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fixedInternalValueFvPatchField
|
Foam::fixedInternalValueFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Boundary condition providing mechanism to set boundary (cell) values
|
This boundary condition provides a mechanism to set boundary (cell) values
|
||||||
directly into a matrix, i.e. to set a constraint condition. Default
|
directly into a matrix, i.e. to set a constraint condition. Default
|
||||||
behaviour is to act as a zero gradient condition.
|
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
|
SourceFiles
|
||||||
fixedInternalValueFvPatchField.C
|
fixedInternalValueFvPatchField.C
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,9 +24,19 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fixedJumpFvPatchField
|
Foam::fixedJumpFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Base class for "jump" of a field<type>
|
Base class for "jump" of a field<type>
|
||||||
|
|
||||||
|
Note
|
||||||
|
not used directly
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::fanFvPatchScalarField
|
||||||
|
Foam::fanPressureFvPatchScalarField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fixedJumpFvPatchField.C
|
fixedJumpFvPatchField.C
|
||||||
|
|
||||||
@ -62,7 +72,6 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from patch and internal field
|
//- Construct from patch and internal field
|
||||||
|
|||||||
@ -24,9 +24,31 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fixedMeanFvPatchField
|
Foam::fixedMeanFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Extrapolates field to the patch using the near-cell values and adjusts
|
This boundary condition extrapolates field to the patch using the near-cell
|
||||||
the distribution to match the specified meanValue.
|
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
|
SourceFiles
|
||||||
fixedMeanFvPatchField.C
|
fixedMeanFvPatchField.C
|
||||||
@ -44,7 +66,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fixedMeanFvPatch Declaration
|
Class fixedMeanFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,30 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fixedNormalSlipFvPatchField
|
Foam::fixedNormalSlipFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions grpWallBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::fixedNormalSlipFvPatchField
|
This boundary condition sets the patch-normal component to a fixed value.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
fixedValue | fixed value | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type fixedNormalSlip;
|
||||||
|
fixedValue uniform 0; // example entry for a scalar field
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::transformFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fixedNormalSlipFvPatchField.C
|
fixedNormalSlipFvPatchField.C
|
||||||
@ -43,7 +65,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fixedNormalSlipFvPatch Declaration
|
Class fixedNormalSlipFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,20 +24,50 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fixedPressureCompressibleDensityFvPatchScalarField
|
Foam::fixedPressureCompressibleDensityFvPatchScalarField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Calculate compressible density as a function of pressure and fluid
|
This boundary condition calculates a (liquid) compressible density as a
|
||||||
properties.
|
function of pressure and fluid properties:
|
||||||
|
|
||||||
|
\f[
|
||||||
|
\rho = \rho_{l,sat} + \psi_l*(p - p_{sat})
|
||||||
|
\f]
|
||||||
|
|
||||||
|
where
|
||||||
|
|
||||||
|
\vartable
|
||||||
|
\rho | density [kg/m3]
|
||||||
|
\rho_{l,sat} | saturation liquid density [kg/m3]
|
||||||
|
\psi_l | liquid compressibility
|
||||||
|
p | pressure [Pa]
|
||||||
|
p_{sat} | saturation pressure [Pa]
|
||||||
|
\endvartable
|
||||||
|
|
||||||
|
The variables \c rholSat, \c pSat and \c psil are retrieved from the
|
||||||
|
\c thermodynamicProperties dictionary.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
p | pressure field name | no | p
|
||||||
|
\endtable
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
inlet
|
myPatch
|
||||||
{
|
{
|
||||||
type fixedPressureCompressibleDensity;
|
type fixedPressureCompressibleDensity;
|
||||||
p p; // Name of static pressure field
|
p p;
|
||||||
value uniform 1; // Initial value
|
value uniform 1;
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::fixedValueFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fixedPressureCompressibleDensityFvPatchScalarField.C
|
fixedPressureCompressibleDensityFvPatchScalarField.C
|
||||||
|
|
||||||
|
|||||||
@ -24,37 +24,67 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::flowRateInletVelocityFvPatchVectorField
|
Foam::flowRateInletVelocityFvPatchVectorField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Describes a volumetric/mass flow normal vector boundary condition by its
|
This boundary condition provides a velocity boundary condition, derived
|
||||||
magnitude as an integral over its area.
|
from the flux (volumetric or mass-based), whose direction is assumed
|
||||||
|
to be normal to the patch.
|
||||||
|
|
||||||
Either specify 'volumetricFlowRate' or 'massFlowRate' (requires additional
|
For a mass-based flux:
|
||||||
'rho' or 'rhoInlet' entry).
|
- the flow rate should be provided in kg/s
|
||||||
|
- if \c rhoName is "none" the flow rate is in m3/s
|
||||||
|
- otherwise \c rhoName should correspond to the name of the density field
|
||||||
|
- if the density field cannot be found in the database, the user must
|
||||||
|
specify the inlet density using the \c rhoInlet entry
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
For a volumetric-based flux:
|
||||||
|
- the flow rate is in m3/s
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
massFlowRate | mass flow rate [kg/s] | no |
|
||||||
|
volumetricFlowRate | volumetric flow rate [m3/s]| no |
|
||||||
|
rhoInlet | inlet density | no |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification for a volumetric flow rate:
|
||||||
\verbatim
|
\verbatim
|
||||||
inlet
|
myPatch
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
volumetricFlowRate 0.2; // Volumetric [m3/s]
|
volumetricFlowRate 0.2;
|
||||||
|
value uniform (0 0 0); // placeholder
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
Example of the boundary condition specification for a mass flow rate:
|
||||||
\verbatim
|
\verbatim
|
||||||
inlet
|
myPatch
|
||||||
{
|
{
|
||||||
type flowRateInletVelocity;
|
type flowRateInletVelocity;
|
||||||
massFlowRate 0.2; // mass flow rate [kg/s]
|
massFlowRate 0.2;
|
||||||
rho rho; // rho [m3/s or kg/s]
|
rho rho;
|
||||||
rhoInlet 1.0 // uniform rho if no rho field registered
|
rhoInlet 1.0;
|
||||||
// (e.g. at startup)
|
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
The \c flowRate entry is a \c DataEntry type, meaning that it can be
|
||||||
|
specified as constant, a polynomial fuction of time, and ...
|
||||||
|
|
||||||
Note
|
Note
|
||||||
- The value is positive inwards
|
- \c rhoInlet is required for the case of a mass flow rate, where the
|
||||||
- May not work correctly for transonic inlets
|
density field is not available at start-up
|
||||||
- Strange behaviour with potentialFoam since the U equation is not solved
|
- the value is positive into the domain (as an inlet)
|
||||||
|
- may not work correctly for transonic inlets
|
||||||
|
- strange behaviour with potentialFoam since the U equation is not solved
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::DataEntry
|
||||||
|
Foam::fixedValueFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
flowRateInletVelocityFvPatchVectorField.C
|
flowRateInletVelocityFvPatchVectorField.C
|
||||||
@ -72,7 +102,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class flowRateInletVelocityFvPatch Declaration
|
Class flowRateInletVelocityFvPatchVectorField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class flowRateInletVelocityFvPatchVectorField
|
class flowRateInletVelocityFvPatchVectorField
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,8 +29,6 @@ License
|
|||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::fluxCorrectedVelocityFvPatchVectorField::
|
Foam::fluxCorrectedVelocityFvPatchVectorField::
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,11 +24,53 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::fluxCorrectedVelocityFvPatchVectorField
|
Foam::fluxCorrectedVelocityFvPatchVectorField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpOutletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Velocity outlet boundary condition for patches where the pressure is
|
This boundary condition provides a velocity outlet boundary condition for
|
||||||
specified. The outflow velocity is obtained by "zeroGradient" and then
|
patches where the pressure is specified. The outflow velocity is obtained
|
||||||
corrected from the flux. If reverse flow is possible or expected use
|
by "zeroGradient" and then corrected from the flux:
|
||||||
the "pressureInletOutletVelocityFvPatchVectorField" BC instead.
|
|
||||||
|
\f[
|
||||||
|
U_p = U_c - n*(n.U_c) + \frac{n*\phi_p}{|Sf|}
|
||||||
|
\f]
|
||||||
|
|
||||||
|
where
|
||||||
|
|
||||||
|
\vartable
|
||||||
|
U_p | velocity at the patch [m/s]
|
||||||
|
U_c | velocity in cells adjacent to the patch [m/s]
|
||||||
|
n | patch normal vectors
|
||||||
|
\phi_p | flux at the patch [m3/s or kg/s]
|
||||||
|
Sf | patch face area vectors [m2]
|
||||||
|
\endvartable
|
||||||
|
|
||||||
|
where
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phi | name of flux field | no | phi
|
||||||
|
rho | name of density field | no | rho
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type fluxCorrectedVelocity;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
If reverse flow is possible or expected use the
|
||||||
|
pressureInletOutletVelocity condition instead.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::zeroGradientFvPatchField
|
||||||
|
Foam::pressureInletOutletVelocityFvPatchVectorField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fluxCorrectedVelocityFvPatchVectorField.C
|
fluxCorrectedVelocityFvPatchVectorField.C
|
||||||
@ -47,7 +89,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fluxCorrectedVelocityFvPatch Declaration
|
Class fluxCorrectedVelocityFvPatchVectorField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class fluxCorrectedVelocityFvPatchVectorField
|
class fluxCorrectedVelocityFvPatchVectorField
|
||||||
@ -56,7 +98,10 @@ class fluxCorrectedVelocityFvPatchVectorField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
//- Name of flux field
|
||||||
word phiName_;
|
word phiName_;
|
||||||
|
|
||||||
|
//- Name of density field
|
||||||
word rhoName_;
|
word rhoName_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,34 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::freestreamFvPatchField
|
Foam::freestreamFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions grpOutletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::freestreamFvPatchField
|
This boundary condition provides a free-stream condition. It is a 'mixed'
|
||||||
|
condition derived from the \c inletOutlet condition, whereby the mode of
|
||||||
|
operation switches between fixed (free stream) value and zero gradient
|
||||||
|
based on the sign of the flux.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type freestream;
|
||||||
|
phi phi;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::mixedFvPatchField
|
||||||
|
Foam::inletOutletFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
freestreamFvPatchField.C
|
freestreamFvPatchField.C
|
||||||
@ -43,7 +69,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class freestreamFvPatch Declaration
|
Class freestreamFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,30 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::freestreamPressureFvPatchScalarField
|
Foam::freestreamPressureFvPatchScalarField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions grpOutletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::freestreamPressureFvPatchScalarField
|
This boundary condition provides a free-stream condition for pressure.
|
||||||
|
It is a zero-gradient condition that constrains the flux across the patch
|
||||||
|
based on the free-stream velocity.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type freestreamPressure;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
This condition is designed to operate with a freestream velocity condition
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::zeroGradientFvPatchField
|
||||||
|
Foam::freestreamFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
freestreamPressureFvPatchScalarField.C
|
freestreamPressureFvPatchScalarField.C
|
||||||
@ -44,7 +66,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class freestreamPressureFvPatch Declaration
|
Class freestreamPressureFvPatchScalarField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class freestreamPressureFvPatchScalarField
|
class freestreamPressureFvPatchScalarField
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,43 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::inletOutletFvPatchField
|
Foam::inletOutletFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpOutletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::inletOutletFvPatchField
|
This boundary condition provides a generic outflow condition, with
|
||||||
|
specified inflow for the case of return flow.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
inletValue | inlet value for reverse flow | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
phi phi;
|
||||||
|
inletValue uniform 0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
The mode of operation is determined by the sign of the flux across the
|
||||||
|
patch faces.
|
||||||
|
|
||||||
|
Note
|
||||||
|
Sign conventions:
|
||||||
|
- positive flux (out of domain): apply zero-gradient condition
|
||||||
|
- negative flux (into of domain): apply the user-specified fixed value
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::mixedFvPatchField
|
||||||
|
Foam::zeroGradientFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
inletOutletFvPatchField.C
|
inletOutletFvPatchField.C
|
||||||
@ -43,7 +78,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class inletOutletFvPatch Declaration
|
Class inletOutletFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,43 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::inletOutletTotalTemperatureFvPatchScalarField
|
Foam::inletOutletTotalTemperatureFvPatchScalarField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpOutletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::inletOutletTotalTemperatureFvPatchScalarField
|
This boundary condition provides an outflow condition for total
|
||||||
|
temperature for use with supersonic cases, where a user-specified
|
||||||
|
value is applied in the case of reverse flow.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
U | velocity field name | no | U
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
psi | compressibility field name | no | psi
|
||||||
|
gamma | heat capacity ration (Cp/Cv) | yes |
|
||||||
|
inletValue | reverse flow (inlet) value | yes |
|
||||||
|
T0 | static temperature [K] | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type inletOutletTotalTemperature;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
psi psi;
|
||||||
|
gamma gamma;
|
||||||
|
inletValue uniform 0;
|
||||||
|
T0 uniform 0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::inletOutletFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
inletOutletTotalTemperatureFvPatchScalarField.C
|
inletOutletTotalTemperatureFvPatchScalarField.C
|
||||||
@ -43,7 +78,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class inletOutletTotalTemperatureFvPatch Declaration
|
Class inletOutletTotalTemperatureFvPatchScalarField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class inletOutletTotalTemperatureFvPatchScalarField
|
class inletOutletTotalTemperatureFvPatchScalarField
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,11 +24,47 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::mappedFieldFvPatchField
|
Foam::mappedFieldFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Self-contained version of mapped. Does not use information on
|
This boundary condition provides a self-contained version of the \c mapped
|
||||||
patch, instead holds it locally (and possibly duplicate) so use
|
condition. It does not use information on the patch; instead it holds
|
||||||
normal mapped in preference and only use this if you cannot
|
thr data locally.
|
||||||
change the underlying patch type to mapped.
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
fieldName | name of field to be mapped | no | this field name
|
||||||
|
setAverage | flag to activate setting of average value | yes |
|
||||||
|
average | average value to apply if \c setAverage = yes | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type mappedField;
|
||||||
|
fieldName T; // optional field name
|
||||||
|
setAverage no; // apply an average value
|
||||||
|
average 0; // average to apply if setAverage
|
||||||
|
value uniform 0; // place holder
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
Since this condition can be applied on a per-field and per-patch basis,
|
||||||
|
it is possible to duplicate the mapping information. If possible, employ
|
||||||
|
the \c mapped condition in preference to avoid this situation, and only
|
||||||
|
employ this condition if it is not possible to change the underlying
|
||||||
|
geometric (poly) patch type to \c mapped.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::mappedPatchBase
|
||||||
|
Foam::mappedPolyPatch
|
||||||
|
Foam::mappedFvPatch
|
||||||
|
Foam::fixedValueFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
mappedFieldFvPatchField.C
|
mappedFieldFvPatchField.C
|
||||||
@ -48,7 +84,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class mappedFieldFvPatchField Declaration
|
Class mappedFieldFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,9 +24,42 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::mappedFixedInternalValueFvPatchField
|
Foam::mappedFixedInternalValueFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Recycles the boundary and internal values of a neighbour patch field to
|
This boundary condition maps the boundary and internal values of a
|
||||||
the boundary and internal values of *this.
|
neighbour patch field to the boundary and internal values of *this.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
fieldName | name of field to be mapped | no | this field name
|
||||||
|
setAverage | flag to activate setting of average value | yes |
|
||||||
|
average | average value to apply if \c setAverage = yes | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type mappedFixedInternalValue;
|
||||||
|
fieldName T;
|
||||||
|
setAverage no;
|
||||||
|
average 0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
This boundary condition can only be applied to patches that are of
|
||||||
|
the \c mappedPolyPatch type.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::mappedPatchBase
|
||||||
|
Foam::mappedPolyPatch
|
||||||
|
Foam::mappedFvPatch
|
||||||
|
Foam::mappedFixedValueFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
mappedFixedInternalValueFvPatchField.C
|
mappedFixedInternalValueFvPatchField.C
|
||||||
@ -44,7 +77,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class mappedFixedInternalValueFvPatchField Declaration
|
Class mappedFixedInternalValueFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,9 +24,43 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::mappedFixedPushedInternalValueFvPatchField
|
Foam::mappedFixedPushedInternalValueFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Recycles the boundary values of a neighbour patch field to the boundary
|
This boundary condition maps the boundary values of a neighbour patch
|
||||||
and internal values of *this.
|
field to the boundary and internal cell values of *this.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
fieldName | name of field to be mapped | no | this field name
|
||||||
|
setAverage | flag to activate setting of average value | yes |
|
||||||
|
average | average value to apply if \c setAverage = yes | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type mappedFixedPushedInternalValue;
|
||||||
|
fieldName T;
|
||||||
|
setAverage no;
|
||||||
|
average 0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
This boundary condition can only be applied to patches that are of
|
||||||
|
the \c mappedPolyPatch type.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::mappedPatchBase
|
||||||
|
Foam::mappedPolyPatch
|
||||||
|
Foam::mappedFvPatch
|
||||||
|
Foam::mappedFixedValueFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
mappedFixedPushedInternalValueFvPatchField.C
|
mappedFixedPushedInternalValueFvPatchField.C
|
||||||
@ -44,7 +78,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class mappedFixedPushedInternalValueFvPatchField Declaration
|
Class mappedFixedPushedInternalValueFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,27 +24,55 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::mappedFixedValueFvPatchField
|
Foam::mappedFixedValueFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Recycles the value at a set of cells or patch faces back to *this. Can not
|
This boundary condition maps the value at a set of cells or patch faces
|
||||||
sample internal faces (since volField not defined on faces).
|
back to *this.
|
||||||
|
|
||||||
mode = NEARESTCELL : sample nearest cell
|
The sample mode is set by the underlying mapping engine, provided by the
|
||||||
mode = NEARESTPATCHFACE : sample nearest face on selected patch
|
mappedPatchBase class.
|
||||||
mode = NEARESTFACE : sample nearest face on any patch. Note: does not
|
|
||||||
warn if nearest actually is on internal face!
|
\heading Patch usage
|
||||||
mode = NEARESTPATCHFACEAMI : sample nearest face on selected patch
|
|
||||||
patches can be non-conformal - method uses AMI interpolation
|
|
||||||
|
|
||||||
For NEARESTCELL you have to provide an 'interpolationScheme' entry
|
\table
|
||||||
which can be any one of the interpolation schemes (cell, cellPoint, etc.)
|
Property | Description | Required | Default value
|
||||||
In case of interpolation (so scheme != cell) the limitation is that
|
fieldName | name of field to be mapped | no | this field name
|
||||||
there is only one value per cell. So e.g. if you have a cell with two
|
setAverage | flag to activate setting of average value | yes |
|
||||||
boundary faces and both faces sample into the cell both faces will get
|
average | average value to apply if \c setAverage = yes | yes |
|
||||||
the same value.
|
interpolationScheme | type of interpolation scheme | no |
|
||||||
|
\endtable
|
||||||
|
|
||||||
See mappedPatchBase for options on sampling.
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type mapped;
|
||||||
|
fieldName T;
|
||||||
|
setAverage no;
|
||||||
|
average 0;
|
||||||
|
interpolationScheme cell;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
Optional 'fieldName' entry to supply a different filename
|
When employing the \c nearestCell sample mode, the user must also specify
|
||||||
|
the interpolation scheme using the \c interpolationScheme entry.
|
||||||
|
|
||||||
|
In case of interpolation (where scheme != cell) the limitation is that
|
||||||
|
there is only one value per cell. For example, if you have a cell with two
|
||||||
|
boundary faces and both faces sample into the cell, both faces will get the
|
||||||
|
same value.
|
||||||
|
|
||||||
|
Note
|
||||||
|
It is not possible to sample internal faces since volume fields are not
|
||||||
|
defined on faces.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::mappedPatchBase
|
||||||
|
Foam::interpolation
|
||||||
|
Foam::fixedValueFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
mappedFixedValueFvPatchField.C
|
mappedFixedValueFvPatchField.C
|
||||||
@ -63,7 +91,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class mappedFixedValueFvPatch Declaration
|
Class mappedFixedValueFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,31 +24,39 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::mappedFlowRateFvPatchVectorField
|
Foam::mappedFlowRateFvPatchVectorField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions grpCoupledBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Describes a volumetric/mass flow normal vector boundary condition by its
|
Describes a volumetric/mass flow normal vector boundary condition by its
|
||||||
magnitude as an integral over its area.
|
magnitude as an integral over its area.
|
||||||
|
|
||||||
The inlet mass flux is taken from the neighbor region.
|
The inlet mass flux is taken from the neighbour region.
|
||||||
|
|
||||||
phi is used to determine if the flow is compressible or incompressible.
|
|
||||||
|
|
||||||
The basis of the patch (volumetric or mass) is determined by the
|
The basis of the patch (volumetric or mass) is determined by the
|
||||||
dimensions of the flux, phi.
|
dimensions of the flux, phi. The current density is used to correct the
|
||||||
The current density is used to correct the velocity when applying the
|
velocity when applying the mass basis.
|
||||||
mass basis.
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
rho | density field name | no | rho
|
||||||
|
neigPhi | name of flux field on neighbour mesh | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
@verbatim
|
\verbatim
|
||||||
inlet
|
myPatch
|
||||||
{
|
{
|
||||||
type mappedFlowRate;
|
type mappedFlowRate;
|
||||||
phi phi;
|
phi phi;
|
||||||
rho rho;
|
rho rho;
|
||||||
neigPhi neigPhiName_; // Volumetric/mass flow rate
|
neigPhi phi;
|
||||||
// [m3/s or kg/s]
|
|
||||||
value uniform (0 0 0); // placeholder
|
value uniform (0 0 0); // placeholder
|
||||||
}
|
}
|
||||||
@endverbatim
|
\endverbatim
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
mappedFlowRateFvPatchVectorField.C
|
mappedFlowRateFvPatchVectorField.C
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,12 +24,42 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::mappedVelocityFluxFixedValueFvPatchField
|
Foam::mappedVelocityFluxFixedValueFvPatchField
|
||||||
|
|
||||||
Description
|
Group
|
||||||
Recycles the velocity and flux at a patch to this patch
|
grpInletBoundaryConditions grpCoupledBoundaryConditions
|
||||||
|
|
||||||
mode = NEARESTPATCHFACE : sample nearest face on selected patch
|
Description
|
||||||
mode = NEARESTFACE : sample nearest face on any patch. Note: does not
|
This boundary condition maps the velocity and flux from a neighbour patch
|
||||||
warn if nearest actually is on internal face!
|
to this patch
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type mappedVelocityFlux;
|
||||||
|
phi phi;
|
||||||
|
value uniform 0; // place holder
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
The underlying sample mode should be set to \c nearestPatchFace or
|
||||||
|
\c nearestFace
|
||||||
|
|
||||||
|
Note
|
||||||
|
This boundary condition can only be applied to patches that are of
|
||||||
|
the \c mappedPolyPatch type.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::mappedPatchBase
|
||||||
|
Foam::mappedPolyPatch
|
||||||
|
Foam::mappedFvPatch
|
||||||
|
Foam::fixedValueFvPatchVectorField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
mappedVelocityFluxFixedValueFvPatchField.C
|
mappedVelocityFluxFixedValueFvPatchField.C
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,35 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::movingWallVelocityFvPatchVectorField
|
Foam::movingWallVelocityFvPatchVectorField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpWallBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::movingWallVelocityFvPatchVectorField
|
This boundary condition provides a velocity condition for cases with
|
||||||
|
moving walls. In addition, it should also be applied to 'moving' walls
|
||||||
|
for moving reference frame (MRF) calculations.
|
||||||
|
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
U | velociy field name | no | U
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type movingWallVelocity;
|
||||||
|
U U;
|
||||||
|
value uniform 0; // initial value
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::fixedValueFvPatchVectorField
|
||||||
|
Foam::MRFZone
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
movingWallVelocityFvPatchVectorField.C
|
movingWallVelocityFvPatchVectorField.C
|
||||||
@ -44,7 +71,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class movingWallVelocityFvPatch Declaration
|
Class movingWallVelocityFvPatchVectorField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class movingWallVelocityFvPatchVectorField
|
class movingWallVelocityFvPatchVectorField
|
||||||
@ -125,7 +152,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
|
|||||||
@ -41,7 +41,8 @@ multiphaseFixedFluxPressureFvPatchScalarField
|
|||||||
fixedGradientFvPatchScalarField(p, iF),
|
fixedGradientFvPatchScalarField(p, iF),
|
||||||
phiHbyAName_("phiHbyA"),
|
phiHbyAName_("phiHbyA"),
|
||||||
phiName_("phi"),
|
phiName_("phi"),
|
||||||
rhoName_("rho")
|
rhoName_("rho"),
|
||||||
|
DpName_("Dp")
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -57,7 +58,8 @@ multiphaseFixedFluxPressureFvPatchScalarField
|
|||||||
fixedGradientFvPatchScalarField(ptf, p, iF, mapper),
|
fixedGradientFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
phiHbyAName_(ptf.phiHbyAName_),
|
phiHbyAName_(ptf.phiHbyAName_),
|
||||||
phiName_(ptf.phiName_),
|
phiName_(ptf.phiName_),
|
||||||
rhoName_(ptf.rhoName_)
|
rhoName_(ptf.rhoName_),
|
||||||
|
DpName_(ptf.DpName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -72,7 +74,8 @@ multiphaseFixedFluxPressureFvPatchScalarField
|
|||||||
fixedGradientFvPatchScalarField(p, iF),
|
fixedGradientFvPatchScalarField(p, iF),
|
||||||
phiHbyAName_(dict.lookupOrDefault<word>("phiHbyA", "phiHbyA")),
|
phiHbyAName_(dict.lookupOrDefault<word>("phiHbyA", "phiHbyA")),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
|
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||||
|
DpName_(dict.lookupOrDefault<word>("Dp", "Dp"))
|
||||||
{
|
{
|
||||||
if (dict.found("gradient"))
|
if (dict.found("gradient"))
|
||||||
{
|
{
|
||||||
@ -91,27 +94,29 @@ multiphaseFixedFluxPressureFvPatchScalarField
|
|||||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::
|
Foam::multiphaseFixedFluxPressureFvPatchScalarField::
|
||||||
multiphaseFixedFluxPressureFvPatchScalarField
|
multiphaseFixedFluxPressureFvPatchScalarField
|
||||||
(
|
(
|
||||||
const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf
|
const multiphaseFixedFluxPressureFvPatchScalarField& mfppsf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedGradientFvPatchScalarField(wbppsf),
|
fixedGradientFvPatchScalarField(mfppsf),
|
||||||
phiHbyAName_(wbppsf.phiHbyAName_),
|
phiHbyAName_(mfppsf.phiHbyAName_),
|
||||||
phiName_(wbppsf.phiName_),
|
phiName_(mfppsf.phiName_),
|
||||||
rhoName_(wbppsf.rhoName_)
|
rhoName_(mfppsf.rhoName_),
|
||||||
|
DpName_(mfppsf.DpName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::
|
Foam::multiphaseFixedFluxPressureFvPatchScalarField::
|
||||||
multiphaseFixedFluxPressureFvPatchScalarField
|
multiphaseFixedFluxPressureFvPatchScalarField
|
||||||
(
|
(
|
||||||
const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf,
|
const multiphaseFixedFluxPressureFvPatchScalarField& mfppsf,
|
||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedGradientFvPatchScalarField(wbppsf, iF),
|
fixedGradientFvPatchScalarField(mfppsf, iF),
|
||||||
phiHbyAName_(wbppsf.phiHbyAName_),
|
phiHbyAName_(mfppsf.phiHbyAName_),
|
||||||
phiName_(wbppsf.phiName_),
|
phiName_(mfppsf.phiName_),
|
||||||
rhoName_(wbppsf.rhoName_)
|
rhoName_(mfppsf.rhoName_),
|
||||||
|
DpName_(mfppsf.DpName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -155,7 +160,7 @@ void Foam::multiphaseFixedFluxPressureFvPatchScalarField::updateCoeffs()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const fvsPatchField<scalar>& Dpp =
|
const fvsPatchField<scalar>& Dpp =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>("Dp");
|
patch().lookupPatchField<surfaceScalarField, scalar>(DpName_);
|
||||||
|
|
||||||
gradient() = (phiHbyAp - phip)/patch().magSf()/Dpp;
|
gradient() = (phiHbyAp - phip)/patch().magSf()/Dpp;
|
||||||
|
|
||||||
@ -172,6 +177,7 @@ void Foam::multiphaseFixedFluxPressureFvPatchScalarField::write
|
|||||||
writeEntryIfDifferent<word>(os, "phiHbyA", "phiHbyA", phiHbyAName_);
|
writeEntryIfDifferent<word>(os, "phiHbyA", "phiHbyA", phiHbyAName_);
|
||||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||||
|
writeEntryIfDifferent<word>(os, "Dp", "Dp", DpName_);
|
||||||
gradient().writeEntry("gradient", os);
|
gradient().writeEntry("gradient", os);
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,15 +24,50 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField
|
Foam::multiphaseFixedFluxPressureFvPatchScalarField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpWallBoundaryConditions grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Adjusts the pressure gradient such that the flux on the boundary is that
|
This boundary condition adjusts the pressure gradient such that the flux
|
||||||
specified by the velocity boundary condition.
|
on the boundary is that specified by the velocity boundary condition.
|
||||||
|
|
||||||
The predicted flux to be compensated by the pressure gradient is evaluated
|
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
|
as \f$(\phi - \phi_{H/A})\f$, both of which are looked-up from the database,
|
||||||
the pressure diffusivity Dp used to calculate the gradient.
|
as is the pressure diffusivity Dp 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| Dp}
|
||||||
|
\f]
|
||||||
|
|
||||||
|
where
|
||||||
|
|
||||||
|
\vartable
|
||||||
|
\phi | flux
|
||||||
|
Dp | 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 multiphaseFixedFluxPressure;
|
||||||
|
phiHbyA phiHbyA;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
Dp Dp;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
multiphaseFixedFluxPressureFvPatchScalarField.C
|
multiphaseFixedFluxPressureFvPatchScalarField.C
|
||||||
@ -71,6 +106,9 @@ class multiphaseFixedFluxPressureFvPatchScalarField
|
|||||||
// if neccessary
|
// if neccessary
|
||||||
word rhoName_;
|
word rhoName_;
|
||||||
|
|
||||||
|
//- Name of the pressure diffusivity field
|
||||||
|
word DpName_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,26 +24,58 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::oscillatingFixedValueFvPatchField
|
Foam::oscillatingFixedValueFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Describes an oscillating boundary condition in terms of amplitude and
|
This boundary condition provides an oscillating condition in terms of
|
||||||
frequency.
|
amplitude and frequency.
|
||||||
|
|
||||||
|
/f[
|
||||||
|
x_p = (1 + a sin(\pi f t))x_{ref} + x_o
|
||||||
|
/f]
|
||||||
|
|
||||||
|
where
|
||||||
|
|
||||||
|
\vartable
|
||||||
|
x_p | patch values
|
||||||
|
x_{ref} | patch reference values
|
||||||
|
x_o | patch offset values
|
||||||
|
a | amplitude
|
||||||
|
f | frequency [1/s]
|
||||||
|
t | time [s]
|
||||||
|
\endvartable
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
refValue | reference value | yes |
|
||||||
|
offset | offset value | no | 0.0
|
||||||
|
amplitude | oscillation amplitude | yes |
|
||||||
|
frequency | oscillation frequency | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
inlet
|
myPatch
|
||||||
{
|
{
|
||||||
type oscillatingFixedValue;
|
type oscillatingFixedValue;
|
||||||
refValue uniform 5.0;
|
refValue uniform 5.0;
|
||||||
offset 0.0; // optional
|
offset 0.0;
|
||||||
amplitude constant 0.5;
|
amplitude constant 0.5;
|
||||||
frequency constant 10;
|
frequency constant 10;
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
The amplitude and frequency entries are DataEntry types, able to describe
|
The amplitude and frequency entries are DataEntry types, able to describe
|
||||||
time varying functions. The example above gives the usage for supplying
|
time varying functions. The example above gives the usage for supplying
|
||||||
constant values.
|
constant values.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::DataEntry
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
oscillatingFixedValueFvPatchField.C
|
oscillatingFixedValueFvPatchField.C
|
||||||
|
|
||||||
@ -62,7 +94,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class oscillatingFixedValueFvPatch Declaration
|
Class oscillatingFixedValueFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,39 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::outletInletFvPatchField
|
Foam::outletInletFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::outletInletFvPatchField
|
This boundary condition provides a generic inflow condition, with
|
||||||
|
specified outflow for the case of return flow.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
inletValue | inlet value | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type outletInlet;
|
||||||
|
phi phi; // name of flux field (default = phi)
|
||||||
|
outletValue uniform 0; // reverse flow (inlet) value
|
||||||
|
value uniform 0; // initial value
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
The mode of operation is determined by the sign of the flux across the
|
||||||
|
patch faces.
|
||||||
|
|
||||||
|
Note
|
||||||
|
Sign conventions:
|
||||||
|
- positive flux (out of domain): apply the user-specified fixed value
|
||||||
|
- negative flux (into of domain): apply zero-gradient condition
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
outletInletFvPatchField.C
|
outletInletFvPatchField.C
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,10 +24,35 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::outletMappedUniformInletFvPatchField
|
Foam::outletMappedUniformInletFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Averages the field over the "outlet" patch specified by name
|
This boundary conditon averages the field over the "outlet" patch specified
|
||||||
"outletPatchName" and applies this as the uniform value of the field
|
by name "outletPatchName" and applies this as the uniform value of the
|
||||||
over this patch.
|
field over this patch.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
outletPatchName | name of outlet patch | yes |
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type outletMappedUniformInlet;
|
||||||
|
outletPatchName aPatch;
|
||||||
|
phi phi;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::fixedValueFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
outletMappedUniformInletFvPatchField.C
|
outletMappedUniformInletFvPatchField.C
|
||||||
@ -45,7 +70,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class outletMappedUniformInletFvPatch Declaration
|
Class outletMappedUniformInletFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,8 +24,32 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::partialSlipFvPatchField
|
Foam::partialSlipFvPatchField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpWallBoundaryConditions grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::partialSlipFvPatchField
|
This boundary condition provides a partial slip condition. The amount of
|
||||||
|
slip is controlled by a user-supplied field.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
valueFraction | fraction od value used for boundary [0-1] | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type partialSlip;
|
||||||
|
valueFraction uniform 0.1;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::transformFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
partialSlipFvPatchField.C
|
partialSlipFvPatchField.C
|
||||||
@ -43,7 +67,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class partialSlipFvPatch Declaration
|
Class partialSlipFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,16 +24,55 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::phaseHydrostaticPressureFvPatchScalarField
|
Foam::phaseHydrostaticPressureFvPatchScalarField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpGenericBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Phase hydrostatic pressure boundary condition calculated as
|
This boundary condition provides a phase-based hydrostatic pressure
|
||||||
|
condition, calculated as:
|
||||||
|
|
||||||
pRefValue + rho*g.(x - pRefPoint)
|
\f[
|
||||||
|
p_{hyd} = p_{ref} + \rho g (x - x_{ref})
|
||||||
|
\f]
|
||||||
|
|
||||||
where rho is provided and assumed uniform
|
where
|
||||||
|
\vartable
|
||||||
|
p_{hyd} | hyrostatic pressure [Pa]
|
||||||
|
p_{ref} | reference pressure [Pa]
|
||||||
|
x_{ref} | reference point in Cartesian co-ordinates
|
||||||
|
\rho | density (assumed uniform)
|
||||||
|
g | acceleration due to gravity [m/s2]
|
||||||
|
\endtable
|
||||||
|
|
||||||
applied according to the phase-fraction field provided:
|
The values are assigned according to the phase-fraction field:
|
||||||
1 -> fix value to that provided
|
- 1: apply \$fp_{hyd}\$f
|
||||||
0 -> zero-gradient
|
- 0: apply a zero-gradient condition
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phaseName | phase field name | no | alpha
|
||||||
|
rho | density field name | no | rho
|
||||||
|
pRefValue | reference pressure [Pa] | yes |
|
||||||
|
pRefPoint | reference pressure location | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type phaseHydrostaticPressure;
|
||||||
|
phaseName alpha1;
|
||||||
|
rho rho;
|
||||||
|
pRefValue 1e5;
|
||||||
|
pRefPoint (0 0 0);
|
||||||
|
value uniform 0; // optional initial value
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::mixedFvPatchScalarField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
phaseHydrostaticPressureFvPatchScalarField.C
|
phaseHydrostaticPressureFvPatchScalarField.C
|
||||||
@ -51,7 +90,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class phaseHydrostaticPressureFvPatch Declaration
|
Class phaseHydrostaticPressureFvPatchScalarField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class phaseHydrostaticPressureFvPatchScalarField
|
class phaseHydrostaticPressureFvPatchScalarField
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,11 +24,44 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::pressureDirectedInletOutletVelocityFvPatchVectorField
|
Foam::pressureDirectedInletOutletVelocityFvPatchVectorField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions grpOutletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Velocity inlet/outlet boundary condition for pressure boundary where the
|
This velocity inlet/outlet boundary condition is applied to pressure
|
||||||
pressure is specified. zero-gradient is applied for outflow (as defined
|
boundaries where the pressure is specified. A zero-gradient condtion is
|
||||||
by the flux) and for inflow the velocity is obtained from the flux with
|
applied for outflow (as defined by the flux); for inflow, the velocity
|
||||||
the specified `inletDirection'.
|
is obtained from the flux with the specified inlet direction.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
rho | density field name | no | rho
|
||||||
|
inletDirection | inlet direction per patch face | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type pressureDirectedInletOutletVelocity;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
inletDirection uniform (1 0 0);
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
Sign conventions:
|
||||||
|
- positive flux (out of domain): apply zero-gradient condition
|
||||||
|
- negative flux (into of domain): derive from the flux with specified
|
||||||
|
direction
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::mixedFvPatchVectorField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
pressureDirectedInletOutletVelocityFvPatchVectorField.C
|
pressureDirectedInletOutletVelocityFvPatchVectorField.C
|
||||||
@ -47,7 +80,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class pressureDirectedInletOutletVelocityFvPatch Declaration
|
Class pressureDirectedInletOutletVelocityFvPatchVectorField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class pressureDirectedInletOutletVelocityFvPatchVectorField
|
class pressureDirectedInletOutletVelocityFvPatchVectorField
|
||||||
@ -56,8 +89,13 @@ class pressureDirectedInletOutletVelocityFvPatchVectorField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
//- Flux field name
|
||||||
word phiName_;
|
word phiName_;
|
||||||
|
|
||||||
|
//- Density field name
|
||||||
word rhoName_;
|
word rhoName_;
|
||||||
|
|
||||||
|
//- Inlet direction
|
||||||
vectorField inletDir_;
|
vectorField inletDir_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,12 +24,43 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::pressureDirectedInletVelocityFvPatchVectorField
|
Foam::pressureDirectedInletVelocityFvPatchVectorField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Velocity inlet boundary condition for patches where the pressure is
|
This velocity inlet boundary condition is applied to patches where the
|
||||||
specified. The inflow velocity is obtained from the flux with the
|
pressure is specified. The inflow velocity is obtained from the flux with
|
||||||
specified "inletDirection" direction. If reverse flow is possible or
|
the specified inlet direction" direction.
|
||||||
expected use the "pressureDirectedInletOutletVelocityFvPatchVectorField"
|
|
||||||
BC instead.
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
rho | density field name | no | rho
|
||||||
|
inletDirection | inlet direction per patch face | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type pressureDirectedInletVelocity;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
inletDirection uniform (1 0 0);
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
If reverse flow is possible or expected use the
|
||||||
|
pressureDirectedInletOutletVelocityFvPatchVectorField condition instead.
|
||||||
|
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::fixedValueFvPatchField
|
||||||
|
Foam::pressureDirectedInletOutletVelocityFvPatchVectorField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
pressureDirectedInletVelocityFvPatchVectorField.C
|
pressureDirectedInletVelocityFvPatchVectorField.C
|
||||||
@ -48,7 +79,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class pressureDirectedInletVelocityFvPatch Declaration
|
Class pressureDirectedInletVelocityFvPatchVectorField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class pressureDirectedInletVelocityFvPatchVectorField
|
class pressureDirectedInletVelocityFvPatchVectorField
|
||||||
@ -57,8 +88,13 @@ class pressureDirectedInletVelocityFvPatchVectorField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
//- Flux field name
|
||||||
word phiName_;
|
word phiName_;
|
||||||
|
|
||||||
|
//- Density field name
|
||||||
word rhoName_;
|
word rhoName_;
|
||||||
|
|
||||||
|
//- Inlet direction
|
||||||
vectorField inletDir_;
|
vectorField inletDir_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,13 +24,45 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::pressureInletOutletParSlipVelocityFvPatchVectorField
|
Foam::pressureInletOutletParSlipVelocityFvPatchVectorField
|
||||||
|
|
||||||
Description
|
Group
|
||||||
Velocity inlet/outlet boundary condition for pressure boundary where the
|
grpInletBoundaryConditions grpOutletBoundaryConditions
|
||||||
pressure is specified. zero-gradient is applied for outflow (as defined
|
|
||||||
by the flux) and for inflow the velocity is obtained from the flux with
|
|
||||||
the specified `inletDirection'.
|
|
||||||
|
|
||||||
Slip condition applied tangential to the patch.
|
Description
|
||||||
|
This velocity inlet/outlet boundary condition for pressure boundary where
|
||||||
|
the pressure is specified. A zero-gradient is applied for outflow (as
|
||||||
|
defined by the flux); for inflow, the velocity is obtained from the flux
|
||||||
|
with the specified inlet direction.
|
||||||
|
|
||||||
|
A slip condition is applied tangential to the patch.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
rho | density field name | no | rho
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type pressureInletOutletParSlipVelocity;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
Sign conventions:
|
||||||
|
- positive flux (out of domain): apply zero-gradient condition
|
||||||
|
- negative flux (into of domain): derive from the flux with specified
|
||||||
|
direction
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::mixedFvPatchVectorField
|
||||||
|
Foam::pressureDirectedInletOutletVelocityFvPatchVectorField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
pressureInletOutletParSlipVelocityFvPatchVectorField.C
|
pressureInletOutletParSlipVelocityFvPatchVectorField.C
|
||||||
@ -58,7 +90,10 @@ class pressureInletOutletParSlipVelocityFvPatchVectorField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
//- Flux field name
|
||||||
word phiName_;
|
word phiName_;
|
||||||
|
|
||||||
|
//- Density field name
|
||||||
word rhoName_;
|
word rhoName_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,11 +24,41 @@ License
|
|||||||
Class
|
Class
|
||||||
Foam::pressureInletOutletVelocityFvPatchVectorField
|
Foam::pressureInletOutletVelocityFvPatchVectorField
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpInletletBoundaryConditions grpOutletBoundaryConditions
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Velocity inlet/outlet boundary condition patches for where the pressure is
|
This velocity inlet/outlet boundary condition is applied to pressure
|
||||||
specified. zero-gradient is applied for outflow (as defined by the flux)
|
boundaries where the pressure is specified. A zero-gradient condtion is
|
||||||
and for inflow the velocity is obtained from the patch-face normal
|
applied for outflow (as defined by the flux); for inflow, the velocity is
|
||||||
component of the internal-cell value.
|
obtained from the patch-face normal component of the internal-cell value.
|
||||||
|
|
||||||
|
The tangential patch velocity can be optionally specified.
|
||||||
|
|
||||||
|
\heading Patch usage
|
||||||
|
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
phi | flux field name | no | phi
|
||||||
|
tangentialVelocity | tangential velocity field | no |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Example of the boundary condition specification:
|
||||||
|
\verbatim
|
||||||
|
myPatch
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
phi phi;
|
||||||
|
tangentialVelocity uniform (0 0 0);
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
Sign conventions:
|
||||||
|
- positive flux (out of domain): apply zero-gradient condition
|
||||||
|
- negative flux (into of domain): derive from the flux in the patch-normal
|
||||||
|
direction
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
pressureInletOutletVelocityFvPatchVectorField.C
|
pressureInletOutletVelocityFvPatchVectorField.C
|
||||||
@ -47,7 +77,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class pressureInletOutletVelocityFvPatch Declaration
|
Class pressureInletOutletVelocityFvPatchVectorField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class pressureInletOutletVelocityFvPatchVectorField
|
class pressureInletOutletVelocityFvPatchVectorField
|
||||||
@ -56,6 +86,7 @@ class pressureInletOutletVelocityFvPatchVectorField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
//- Flux field name
|
||||||
word phiName_;
|
word phiName_;
|
||||||
|
|
||||||
//- Optional tangential velocity component
|
//- Optional tangential velocity component
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user