ENH: Boundary condition doxygen documentation updates

This commit is contained in:
andy
2012-07-10 17:09:42 +01:00
parent fa7053bd27
commit 04f044c14c
85 changed files with 2314 additions and 620 deletions

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::basicSymmetryFvPatchField Foam::basicSymmetryFvPatchField
@ -30,6 +33,8 @@ Description
SourceFiles SourceFiles
basicSymmetryFvPatchField.C basicSymmetryFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef basicSymmetryFvPatchField_H #ifndef basicSymmetryFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::calculatedFvPatchField Foam::calculatedFvPatchField
@ -29,18 +32,22 @@ Description
that the value is assigned via field assignment, and not via a call to that the value is assigned via field assignment, and not via a call to
e.g. \c updateCoeffs or \c evaluate. e.g. \c updateCoeffs or \c evaluate.
/heading Patch usage
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type calculated; type calculated;
value uniform (0 0 0); // optional value entry value uniform (0 0 0); // optional value entry
} }
\endverbatim \endverbatim
SourceFiles SourceFiles
calculatedFvPatchField.C calculatedFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef calculatedFvPatchField_H #ifndef calculatedFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::coupledFvPatchField Foam::coupledFvPatchField
@ -30,6 +33,8 @@ Description
SourceFiles SourceFiles
coupledFvPatchField.C coupledFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef coupledFvPatchField_H #ifndef coupledFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::directionMixedFvPatchField Foam::directionMixedFvPatchField
@ -30,6 +33,8 @@ Description
SourceFiles SourceFiles
directionMixedFvPatchField.C directionMixedFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef directionMixedFvPatchField_H #ifndef directionMixedFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::fixedGradientFvPatchField Foam::fixedGradientFvPatchField
@ -33,23 +36,34 @@ Description
\f] \f]
where where
\var values = patch values /vartable
\var int = internal field values values | patch values
\var gradient = gradient (user-specified) int | internal field values
\var delta = inverse distance from patch face centre to cell centre gradient | 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type fixedGradient; type fixedGradient;
gradient uniform 0; gradient uniform 0;
} }
\endverbatim \endverbatim
SourceFiles SourceFiles
fixedGradientFvPatchField.C fixedGradientFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fixedGradientFvPatchField_H #ifndef fixedGradientFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::fixedValueFvPatchField Foam::fixedValueFvPatchField
@ -28,18 +31,27 @@ Description
This boundary condition supplies a fixed value constraint, and is the base This boundary condition supplies a fixed value constraint, and is the base
class for a number of other boundary conditions. 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type fixedValue; type fixedValue;
value uniform 0; // example for scalar field usage value uniform 0; // example for scalar field usage
} }
\endverbatim \endverbatim
SourceFiles SourceFiles
fixedValueFvPatchField.C fixedValueFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fixedValueFvPatchField_H #ifndef fixedValueFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::mixedFvPatchField Foam::mixedFvPatchField
@ -36,12 +39,14 @@ Description
\f] \f]
where where
\var x_p = patch values /vartable
\var x_c = patch internal cell values x_p | patch values
\var w = weight field, \c valueFraction_ x_c | patch internal cell values
\var A = fixed value, \c refValue_ w | weight field, \c valueFraction_
\var B = patch normal gradient, \c refGrad_ A | fixed value, \c refValue_
\var delta = inverse distance from face centre to internal cell centre B | patch normal gradient, \c refGrad_
delta | inverse distance from face centre to internal cell centre
/endvartable
\note \note
This condition is not usually applied directly; instead, use a derived This condition is not usually applied directly; instead, use a derived
@ -53,6 +58,8 @@ SeeAlso
SourceFiles SourceFiles
mixedFvPatchField.C mixedFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef mixedFvPatchField_H #ifndef mixedFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::slicedFvPatchField Foam::slicedFvPatchField
@ -33,9 +36,14 @@ 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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef slicedFvPatchField_H #ifndef slicedFvPatchField_H

View File

@ -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,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::transformFvPatchField Foam::transformFvPatchField
@ -30,6 +33,8 @@ Description
SourceFiles SourceFiles
transformFvPatchField.C transformFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef transformFvPatchField_H #ifndef transformFvPatchField_H

View File

@ -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,14 +21,29 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::zeroGradientFvPatchField Foam::zeroGradientFvPatchField
Description Description
Foam::zeroGradientFvPatchField This boundary condition appies 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 +58,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class zeroGradientFvPatch Declaration Class zeroGradientFvPatch Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::cyclicFvPatchField Foam::cyclicFvPatchField
@ -33,17 +36,21 @@ Description
transformed to the neighbour patch, the patches should be identical (or transformed to the neighbour patch, the patches should be identical (or
very similar). very similar).
/heading Patch usage
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type cyclic; type cyclic;
} }
\endverbatim \endverbatim
SourceFiles SourceFiles
cyclicFvPatchField.C cyclicFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef cyclicFvPatchField_H #ifndef cyclicFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::cyclicAMIFvPatchField Foam::cyclicAMIFvPatchField
@ -34,17 +37,24 @@ Description
patch is transformed to the neighbour patch, the outer perimiter of each patch is transformed to the neighbour patch, the outer perimiter of each
patch should be identical (or very similar). patch should be identical (or very similar).
/heading Patch usage
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type cyclicAMI; type cyclicAMI;
} }
\endverbatim \endverbatim
SeeAlso
Foam::AMIInterpolation
SourceFiles SourceFiles
cyclicAMIFvPatchField.C cyclicAMIFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef cyclicAMIFvPatchField_H #ifndef cyclicAMIFvPatchField_H

View File

@ -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,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::cyclicSlipFvPatchField Foam::cyclicSlipFvPatchField
@ -28,12 +31,14 @@ Description
This boundary condition is a light wrapper around the cyclicFvPatchField This boundary condition is a light wrapper around the cyclicFvPatchField
condition, providing no new functionality. condition, providing no new functionality.
/heading Patch usage
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type cyclicSlip; type cyclicSlip;
} }
\endverbatim \endverbatim
SeeAlso SeeAlso
@ -42,6 +47,8 @@ SeeAlso
SourceFiles SourceFiles
cyclicSlipFvPatchField.C cyclicSlipFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef cyclicSlipFvPatchField_H #ifndef cyclicSlipFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::emptyFvPatchField Foam::emptyFvPatchField
@ -30,17 +33,21 @@ Description
patches whose normal is aligned to geometric directions that do not patches whose normal is aligned to geometric directions that do not
constitue solution directions. constitue solution directions.
/heading Patch usage
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type empty; type empty;
} }
\endverbatim \endverbatim
SourceFiles SourceFiles
emptyFvPatchField.C emptyFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef emptyFvPatchField_H #ifndef emptyFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::jumpCyclicFvPatchField Foam::jumpCyclicFvPatchField
@ -34,6 +37,8 @@ SeeAlso
SourceFiles SourceFiles
jumpCyclicFvPatchField.C jumpCyclicFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef jumpCyclicFvPatchField_H #ifndef jumpCyclicFvPatchField_H

View File

@ -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,14 +21,23 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::nonuniformTransformCyclicFvPatchField Foam::nonuniformTransformCyclicFvPatchField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -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
@ -21,15 +21,30 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::processorFvPatchField Foam::processorFvPatchField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef processorFvPatchField_H #ifndef processorFvPatchField_H
@ -45,7 +60,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class processorFvPatch Declaration Class processorFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -21,14 +21,36 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::processorCyclicFvPatchField Foam::processorCyclicFvPatchField
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 +66,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class processorCyclicFvPatch Declaration Class processorCyclicFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -21,14 +21,31 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::symmetryFvPatchField Foam::symmetryFvPatchField
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 +61,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class symmetryFvPatch Declaration Class symmetryFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -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,15 +21,34 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::wedgeFvPatchField Foam::wedgeFvPatchField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef wedgeFvPatchField_H #ifndef wedgeFvPatchField_H
@ -44,7 +63,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class wedgeFvPatch Declaration Class wedgeFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -21,52 +21,74 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::activeBaffleVelocityFvPatchVectorField Foam::activeBaffleVelocityFvPatchVectorField
Description Description
This boundary condition is applied to the flow velocity, to simulate the This velocity boundary condition simulates the opening of a baffle due
opening of a baffle due to local flow conditions, by merging the behaviours to local flow conditions, by merging the behaviours of wall and cyclic
of wall and cyclic conditions. conditions. The baffle joins two mesh regions, where the open fraction
determines the interpolation weights applied to each cyclic- and
The baffle joins two mesh regions, where the open fraction determines neighbour-patch contribution.
the interpolation weights applied to each cyclic- and neighbour-patch
contribution.
We determine whether the baffle is opening or closing from the sign of 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 the net force across the baffle, from which the baffle open fraction is
updated using: updated using:
\f[ \f[
x = x_old + dt/DT*sign(F_net) x = x_{old} + sign(F_{net})\frac{dt}{DT}
\f] \f]
where where
\var x = baffle open fraction [0-1]
\var x_old = baffle open fraction on previous evaluation /vartable
\var dt = simulation time step x | baffle open fraction [0-1]
\var DT = time taken to open the baffle x_{old} | baffle open fraction on previous evaluation
\var F_net = net force across the baffle 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. 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type activeBaffleVelocity; type activeBaffleVelocity;
p p; // name of pressure field (default = p) p p;
cyclicPatch cyclic1; // name of cyclic patch cyclicPatch cyclic1;
orientation 1; // 1 or -1 used to switch flow direction orientation 1;
openFraction 0.2; // current opatch open fraction [0-1] openFraction 0.2;
openingTime 5.0; // time taken to open the baffle openingTime 5.0;
maxOpenFractionDelta 0.1; // max open fraction change/timestep maxOpenFractionDelta 0.1;
} }
\endverbatim \endverbatim
SeeAlso
Foam::fixedValueFvPatchField
Foam::cyclicFvPatchField
SourceFiles SourceFiles
activeBaffleVelocityFvPatchVectorField.C activeBaffleVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef activeBaffleVelocityFvPatchVectorField_H #ifndef activeBaffleVelocityFvPatchVectorField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::activePressureForceBaffleVelocityFvPatchVectorField Foam::activePressureForceBaffleVelocityFvPatchVectorField
@ -36,36 +39,55 @@ Description
Once opened the baffle continues to open at a fixed rate using Once opened the baffle continues to open at a fixed rate using
\f[ \f[
x = x_old + dt/DT x = x_{old} + \frac{dt}{DT}
\f] \f]
where where
\var x = baffle open fraction [0-1]
\var x_old = baffle open fraction on previous evaluation /vartable
\var dt = simulation time step x | baffle open fraction [0-1]
\var DT = time taken to open the baffle 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. 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type activePressureForceBaffleVelocity; type activePressureForceBaffleVelocity;
p p; // name of pressure field (default = p) p p;
cyclicPatch cyclic1; // name of cyclic patch cyclicPatch cyclic1;
orientation 1; // 1 or -1 used to switch flow direction orientation 1;
openFraction 0.2; // current opatch open fraction [0-1] openFraction 0.2;
openingTime 5.0; // time taken to open the baffle openingTime 5.0;
maxOpenFractionDelta 0.1; // max open fraction change/timestep maxOpenFractionDelta 0.1;
minThresholdValue 0.01; // minimum open fraction for activation minThresholdValue 0.01;
forceBased false; // force (true) or pressue (false) forceBased false;
} }
\endverbatim \endverbatim
SourceFiles SourceFiles
activePressureForceBaffleVelocityFvPatchVectorField.C activePressureForceBaffleVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef activePressureForceBaffleVelocityFvPatchVectorField_H #ifndef activePressureForceBaffleVelocityFvPatchVectorField_H

View File

@ -21,12 +21,15 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::advectiveFvPatchField Foam::advectiveFvPatchField
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
@ -38,16 +41,6 @@ Description
advectionSpeed() the default implementation of which requires the name of advectionSpeed() the default implementation of which requires the name of
the flux field \c (phi) and optionally the density \c (rho) if the the flux field \c (phi) and optionally the density \c (rho) if the
mass-flux rather than the volumetric-flux is given. mass-flux rather than the volumetric-flux is given.
\verbatim
myPatch
{
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 over-riding advectionSpeed() e.g. in BC from this class and over-riding advectionSpeed() e.g. in
@ -55,9 +48,37 @@ Description
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
\note
If \c lInf is specified, \c fieldInf will be required; \c rho is only
required in the case of a mass-based flux.
Example of the boundary condition specification:
\verbatim
myPatch
{
type advective;
phi phi;
// rho rho; // Not needed for volumetric-based flux
// fieldInf 1e5; // Optional
// lInf 0.1; // Optional
}
\endverbatim
SourceFiles SourceFiles
advectiveFvPatchField.C advectiveFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef advectiveFvPatchField_H #ifndef advectiveFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::buoyantPressureFvPatchScalarField Foam::buoyantPressureFvPatchScalarField
@ -29,41 +32,57 @@ Description
buoyant flow. buoyant flow.
If the variable name is one of: If the variable name is one of:
\li pd - \c pd
\li p_rgh - \c p_rgh
\li ph_rgh - \c ph_rgh
we assume that the pressure variable is \f$ p - rho*g.h\f$ and the gradient we assume that the pressure variable is \f$p - rho*g.h\f$ and the gradient
set using: set using:
\f[ \f[
grad(pressure) = -snGrad(rho)*(g.h) grad(pressure) = -snGrad(rho)*(g.h)
\f] \f]
where where
\var snGrad = surface-normal gradient operator
\var rho = density [kg/m3] /vartable
\var g = acceleration due to gravity [m/s2] snGrad | surface-normal gradient operator
\var h = patch face centres [m] rho | density [kg/m3]
g | acceleration due to gravity [m/s2]
h | patch face centres [m]
/endtable
Otherwise we assume that it is the static pressure, and the gradient Otherwise we assume that it is the static pressure, and the gradient
calculated using: calculated using:
\f[ \f[
grad(pressure) = rho*(g.n) grad(pressure) = rho*(g.n)
\f] \f]
where where
\var n = patch face normal vectors /vartable
n | patch face normal vectors
/endtable
/heading Patch usage
/table
Property | Description | Required | Default value
rho | density field name | no | rho
/endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type buoyantPressure; type buoyantPressure;
rho rho; // optional density field name (default = rho) rho rho;
value uniform 0; value uniform 0;
} }
\endverbatim \endverbatim
SourceFiles SourceFiles
buoyantPressureFvPatchScalarField.C buoyantPressureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef buoyantPressureFvPatchScalarFields_H #ifndef buoyantPressureFvPatchScalarFields_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::codedFixedValueFvPatchField Foam::codedFixedValueFvPatchField
@ -28,29 +31,31 @@ 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
@ -58,21 +63,24 @@ Description
which would have a corresponding entry: which would have a corresponding entry:
\verbatim \verbatim
rampedFixedValue myPatch
{ {
code code
#{ #{
operator==(min(10, 0.1*this->db().time().value())); operator==(min(10, 0.1*this->db().time().value()));
#}; #};
} }
\endverbatim \endverbatim
SeeAlso SeeAlso
Foam::dynamicCode and Foam::functionEntries::codeStream Foam::dynamicCode
Foam::functionEntries::codeStream
SourceFiles SourceFiles
codedFixedValueFvPatchField.C codedFixedValueFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef codedFixedValueFvPatchField_H #ifndef codedFixedValueFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::codedMixedFvPatchField Foam::codedMixedFvPatchField
@ -28,31 +31,33 @@ 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; value uniform 0;
redirectType rampedMixed; // name of generated BC redirectType rampedMixed; // name of generated BC
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;
#}; #};
//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
@ -60,23 +65,26 @@ 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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef codedMixedFvPatchField_H #ifndef codedMixedFvPatchField_H

View File

@ -22,6 +22,9 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\addtogroup boundaryConditions
@{
Class Class
Foam::cylindricalInletVelocityFvPatchVectorField Foam::cylindricalInletVelocityFvPatchVectorField
@ -30,9 +33,20 @@ Description
cylindrical co-ordinates given a central axis, central point, rpm, axial cylindrical co-ordinates given a central axis, central point, rpm, axial
and radial velocity. 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 | yes |
radialVelocity| radial velocity profile | 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);
@ -43,13 +57,20 @@ Description
} }
\endverbatim \endverbatim
\note
The \c axialVelocity, \c radialVelocity and \c rpm entries are DataEntry The \c axialVelocity, \c radialVelocity and \c rpm entries are DataEntry
types, able to describe time varying functions. The example above gives types, able to describe time varying functions. The example above gives
the usage for supplying constant values. the usage for supplying constant values.
SeeAlso
Foam::fixedValueFvPatchField
Foam::DataEntry
SourceFiles SourceFiles
cylindricalInletVelocityFvPatchVectorField.C cylindricalInletVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef cylindricalInletVelocityFvPatchVectorField_H #ifndef cylindricalInletVelocityFvPatchVectorField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::fanFvPatchField Foam::fanFvPatchField
@ -31,27 +34,37 @@ Description
The jump is specified as a \c DataEntry type, to enable the use of, e.g. The jump is specified as a \c DataEntry type, to enable the use of, e.g.
contant, polynomial, table values. 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
myPatch myPatch
{
type fan;
patchType cyclic;
jump uniform 0;
jumpTable csvFile;
csvFileCoeffs
{ {
type fan; hasHeaderLine 1;
patchType cyclic; // specify \c cyclic refColumn 0;
jump uniform 0; // current jump value componentColumns 1(1);
jumpTable csvFile; // jump specification 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 CSV file to specify the jump. The above example shows the use of a comma separated (CSV) file to specify
the jump condition.
\note \note
The underlying \c patchType should be set to \c cyclic The underlying \c patchType should be set to \c cyclic
@ -61,6 +74,10 @@ SeeAlso
SourceFiles SourceFiles
fanFvPatchField.C fanFvPatchField.C
fanFvPatchFields.H
fanFvPatchFields.C
fanFvPatchFieldsFwd.H
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::fixedFluxPressureFvPatchScalarField Foam::fixedFluxPressureFvPatchScalarField
@ -37,23 +40,41 @@ Description
\f] \f]
where where
\var Sf = patch face areas
/vartable
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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type externalWallHeatFluxTemperature; type externalWallHeatFluxTemperature;
phiHbyA phiHbyA; // predicted flux field (default = phiHbyA) phiHbyA phiHbyA;
phi phi; // flux field (default = phi) phi phi;
rho rho; // density field (default = rho) rho rho;
Dp Dp; // pressure diffusivity field (default = Dp) Dp Dp;
} }
\endverbatim \endverbatim
SeeAlso
Foam::fixedGradientFvPatchField
SourceFiles SourceFiles
fixedFluxPressureFvPatchScalarField.C fixedFluxPressureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fixedFluxPressureFvPatchScalarFields_H #ifndef fixedFluxPressureFvPatchScalarFields_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::fixedInternalValueFvPatchField Foam::fixedInternalValueFvPatchField
@ -29,15 +32,18 @@ Description
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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type fixedInternalValue; type fixedInternalValue;
vakue uniform 0; // place holder value uniform 0; // place holder
} }
\endverbatim \endverbatim
\note
This is used as a base for conditions such as the turbulence \c epsilon 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 wall function, which applies a near-wall constraint for high Reynolds
number flows. number flows.
@ -48,6 +54,8 @@ SeeAlso
SourceFiles SourceFiles
fixedInternalValueFvPatchField.C fixedInternalValueFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fixedInternalValueFvPatchField_H #ifndef fixedInternalValueFvPatchField_H

View File

@ -21,11 +21,17 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::fixedJumpFvPatchField Foam::fixedJumpFvPatchField
Description Description
Base class for "jump" of a field<type> - not used directly Base class for "jump" of a field<type>
\note
not used directly
SeeAlso SeeAlso
Foam::fanFvPatchScalarField Foam::fanFvPatchScalarField
@ -34,6 +40,8 @@ SeeAlso
SourceFiles SourceFiles
fixedJumpFvPatchField.C fixedJumpFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fixedJumpFvPatchField_H #ifndef fixedJumpFvPatchField_H

View File

@ -21,16 +21,40 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::fixedMeanFvPatchField Foam::fixedMeanFvPatchField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fixedMeanFvPatchField_H #ifndef fixedMeanFvPatchField_H
@ -44,7 +68,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class fixedMeanFvPatch Declaration Class fixedMeanFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -21,24 +21,39 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::fixedNormalSlipFvPatchField Foam::fixedNormalSlipFvPatchField
Description Description
This boundary condition sets the patch-normal component to a fixed value. 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type fixedNormalSlip; type fixedNormalSlip;
fixedValue uniform 0; // example entry for a scalar field fixedValue uniform 0; // example entry for a scalar field
} }
\endverbatim \endverbatim
SeeAlso
Foam::transformFvPatchField
SourceFiles SourceFiles
fixedNormalSlipFvPatchField.C fixedNormalSlipFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fixedNormalSlipFvPatchField_H #ifndef fixedNormalSlipFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::fixedPressureCompressibleDensityFvPatchScalarField Foam::fixedPressureCompressibleDensityFvPatchScalarField
@ -29,31 +32,47 @@ Description
function of pressure and fluid properties: function of pressure and fluid properties:
\f[ \f[
rho = rholSat + psil*(p - pSat) rho = rho_{l,sat} + psi_l*(p - p_{sat})
\f] \f]
where where
\var rho = density [kg/m3]
\var rholSat = saturation liquid density /vartable
\var p = pressure [Pa] rho | density [kg/m3]
\var pSat = saturation pressure [Pa] 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 The variables \c rholSat, \c pSat and \c psil are retrieved from the
\c thermodynamicProperties dictionary. \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
myPatch 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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fixedPressureCompressibleDensityFvPatchScalarField_H #ifndef fixedPressureCompressibleDensityFvPatchScalarField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::flowRateInletVelocityFvPatchVectorField Foam::flowRateInletVelocityFvPatchVectorField
@ -34,37 +37,47 @@ Description
\c rhoName entry. \c rhoName entry.
For a mass-based flux: For a mass-based flux:
\li if \c rhoName is a valid density field name, the flow rate is in kg/s - if \c rhoName is a valid density field name, the flow rate is in kg/s
\li if \c rhoName is "none" the flow rate is in m3/s - if \c rhoName is "none" the flow rate is in m3/s
For a volumetric-based flux: For a volumetric-based flux:
\li the flow rate is in m3/s - the flow rate is in m3/s
/heading Patch usage
/table
Property | Description | Required | Default value
flowRate | volumetric [m3/s] OR mass flow rate [kg/s] | yes |
/endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type flowRateInletVelocity; type flowRateInletVelocity;
flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s] flowRate 0.2;
rho rho; // none | rho [m3/s or kg/s] rho rho;
value uniform (0 0 0); // placeholder value uniform (0 0 0); // placeholder
} }
\endverbatim \endverbatim
The \c flowRate entry is a \c DataEntry type, meaning that it can be The \c flowRate entry is a \c DataEntry type, meaning that it can be
specified as constant, a polynomial fuction of time, and ... specified as constant, a polynomial fuction of time, and ...
\note \note
\li the value is positive into the domain (as an inlet) - the value is positive into the domain (as an inlet)
\li may not work correctly for transonic inlets - may not work correctly for transonic inlets
\li strange behaviour with potentialFoam since the U equation is not solved - strange behaviour with potentialFoam since the U equation is not solved
SeeAlso SeeAlso
Foam::DataEntry Foam::DataEntry
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
flowRateInletVelocityFvPatchVectorField.C flowRateInletVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef flowRateInletVelocityFvPatchVectorField_H #ifndef flowRateInletVelocityFvPatchVectorField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::fluxCorrectedVelocityFvPatchVectorField Foam::fluxCorrectedVelocityFvPatchVectorField
@ -30,24 +33,35 @@ Description
by "zeroGradient" and then corrected from the flux: by "zeroGradient" and then corrected from the flux:
\f[ \f[
Up = Uc - n*(n.Uc) + n*phi/mag(Sf) U_p = U_c - n*(n.U_c) + n*phi/mag(Sf)
\f] \f]
where where
\var Up = velocity at the patch [m/s]
\var Uc = velocity in cells adjacent to the patch [m/s] /vartable
\var n = patch normal vectors U_p | velocity at the patch [m/s]
\var phi = flux at the patch [m3/s or kg/s] U_c | velocity in cells adjacent to the patch [m/s]
\var Sf = patch face area vectors [m2] n | patch normal vectors
phi | 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type fluxCorrectedVelocity; type fluxCorrectedVelocity;
phi phi; // name of flux field (default = phi) phi phi;
rho rho; // name of density field (default = rho) rho rho;
} }
\endverbatim \endverbatim
\note \note
@ -61,6 +75,8 @@ SeeAlso
SourceFiles SourceFiles
fluxCorrectedVelocityFvPatchVectorField.C fluxCorrectedVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fluxCorrectedVelocityFvPatchVectorField_H #ifndef fluxCorrectedVelocityFvPatchVectorField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::freestreamFvPatchField Foam::freestreamFvPatchField
@ -30,13 +33,20 @@ Description
operation switches between fixed (free stream) value and zero gradient operation switches between fixed (free stream) value and zero gradient
based on the sign of the flux. 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type freestream; type freestream;
phi phi; // name of the flux field (default = phi) phi phi;
} }
\endverbatim \endverbatim
SeeAlso SeeAlso
@ -46,6 +56,8 @@ SeeAlso
SourceFiles SourceFiles
freestreamFvPatchField.C freestreamFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef freestreamFvPatchField_H #ifndef freestreamFvPatchField_H
@ -59,7 +71,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class freestreamFvPatchField Declaration Class freestreamFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::freestreamPressureFvPatchScalarField Foam::freestreamPressureFvPatchScalarField
@ -29,12 +32,14 @@ Description
It is a zero-gradient condition that constrains the flux across the patch It is a zero-gradient condition that constrains the flux across the patch
based on the free-stream velocity. based on the free-stream velocity.
/heading Patch usage
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type freestreamPressure; type freestreamPressure;
} }
\endverbatim \endverbatim
\note \note
@ -47,6 +52,8 @@ SeeAlso
SourceFiles SourceFiles
freestreamPressureFvPatchScalarField.C freestreamPressureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef freestreamPressureFvPatchScalarFields_H #ifndef freestreamPressureFvPatchScalarFields_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::inletOutletFvPatchField Foam::inletOutletFvPatchField
@ -28,22 +31,32 @@ Description
This boundary condition provides a generic outflow condition, with This boundary condition provides a generic outflow condition, with
specified inflow for the case of return flow. 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 | yes |
/endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type inletOutlet; type inletOutlet;
phi phi; // name of flux field (default = phi) phi phi; // name of flux field (default = phi)
inletValue uniform 0; // reverse flow (inlet) value inletValue uniform 0; // reverse flow (inlet) value
value uniform 0; // initial value value uniform 0; // initial value
} }
\endverbatim \endverbatim
The mode of operation is determined by the sign of the flux across the The mode of operation is determined by the sign of the flux across the
patch faces. patch faces.
\li positive flux (out of domain): apply zero-gradient condition \note
\li negative flux (into of domain): apply the user-specified fixed value Sign conventions:
- positive flux (out of domain): apply zero-gradient condition
- negative flux (into of domain): apply the user-specified fixed value
SeeAlso SeeAlso
Foam::mixedFvPatchField Foam::mixedFvPatchField
@ -52,6 +65,8 @@ SeeAlso
SourceFiles SourceFiles
inletOutletFvPatchField.C inletOutletFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef inletOutletFvPatchField_H #ifndef inletOutletFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::inletOutletTotalTemperatureFvPatchScalarField Foam::inletOutletTotalTemperatureFvPatchScalarField
@ -29,19 +32,31 @@ Description
temperature for use with supersonic cases, where a user-specified temperature for use with supersonic cases, where a user-specified
value is applied in the case of reverse flow. 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type inletOutletTotalTemperature; type inletOutletTotalTemperature;
U U; // velocity field (default = U) U U;
phi phi; // flux field (default = phi) phi phi;
psi psi; // compressiblility field (default = psi) psi psi;
gamma gamma; // heat capacity ratio gamma gamma;
inletValue uniform 0; // reverse flow (inlet) value inletValue uniform 0;
T0 uniform 0; // static temperature [K] T0 uniform 0;
value uniform 0; // initial value value uniform 0;
} }
\endverbatim \endverbatim
SeeAlso SeeAlso
@ -50,6 +65,8 @@ SeeAlso
SourceFiles SourceFiles
inletOutletTotalTemperatureFvPatchScalarField.C inletOutletTotalTemperatureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef inletOutletTotalTemperatureFvPatchScalarField_H #ifndef inletOutletTotalTemperatureFvPatchScalarField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::mappedFieldFvPatchField Foam::mappedFieldFvPatchField
@ -29,19 +32,27 @@ Description
condition. It does not use information on the patch; instead it holds condition. It does not use information on the patch; instead it holds
thr data locally. thr data locally.
/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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type mappedField; type mappedField;
fieldName T; // optional field name fieldName T; // optional field name
setAverage no; // apply an average value setAverage no; // apply an average value
average 0; // average to apply if setAverage average 0; // average to apply if setAverage
value uniform 0; // place holder value uniform 0; // place holder
} }
\endverbatim \endverbatim
\note \note
Since this condition can be applied on a per-field and per-patch basis, 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 it is possible to duplicate the mapping information. If possible, employ
@ -58,6 +69,8 @@ SeeAlso
SourceFiles SourceFiles
mappedFieldFvPatchField.C mappedFieldFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef mappedFieldFvPatchField_H #ifndef mappedFieldFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::mappedFixedInternalValueFvPatchField Foam::mappedFixedInternalValueFvPatchField
@ -28,15 +31,24 @@ Description
This boundary condition maps the boundary and internal values of a This boundary condition maps the boundary and internal values of a
neighbour patch field to 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 \verbatim
myPatch myPatch
{ {
type mappedFixedInternalValue; type mappedFixedInternalValue;
fieldName T; // optional field name fieldName T;
setAverage no; // apply an average value setAverage no;
average 0; // average to apply if setAverage average 0;
value uniform 0; // place holder value uniform 0;
} }
\endverbatim \endverbatim
\note \note
@ -52,6 +64,8 @@ SeeAlso
SourceFiles SourceFiles
mappedFixedInternalValueFvPatchField.C mappedFixedInternalValueFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef mappedFixedInternalValueFvPatchField_H #ifndef mappedFixedInternalValueFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::mappedFixedPushedInternalValueFvPatchField Foam::mappedFixedPushedInternalValueFvPatchField
@ -28,16 +31,25 @@ Description
This boundary condition maps the boundary values of a neighbour patch This boundary condition maps the boundary values of a neighbour patch
field to the boundary and internal cell 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type mappedFixedInternalValue; type mappedFixedInternalValue;
fieldName T; // optional field name fieldName T;
setAverage no; // apply an average value setAverage no;
average 0; // average to apply if setAverage average 0;
value uniform 0; // place holder value uniform 0;
} }
\endverbatim \endverbatim
\note \note
@ -53,6 +65,8 @@ SeeAlso
SourceFiles SourceFiles
mappedFixedPushedInternalValueFvPatchField.C mappedFixedPushedInternalValueFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef mappedFixedPushedInternalValueFvPatchField_H #ifndef mappedFixedPushedInternalValueFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::mappedFixedValueFvPatchField Foam::mappedFixedValueFvPatchField
@ -31,17 +34,27 @@ Description
The sample mode is set by the underlying mapping engine, provided by the The sample mode is set by the underlying mapping engine, provided by the
mappedPatchBase class. mappedPatchBase class.
/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 |
interpolationScheme | type of interpolation scheme | no |
/endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type mapped; type mapped;
fieldName T; // optional (alternative) field name fieldName T;
setAverage no; // apply an average value setAverage no;
average 0; // average to apply if setAverage average 0;
interpolationScheme cell; // optional interpolation scheme interpolationScheme cell;
value uniform 0; // place holder value uniform 0;
} }
\endverbatim \endverbatim
When employing the \c nearestCell sample mode, the user must also specify When employing the \c nearestCell sample mode, the user must also specify
@ -64,6 +77,8 @@ SeeAlso
SourceFiles SourceFiles
mappedFixedValueFvPatchField.C mappedFixedValueFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef mappedFixedValueFvPatchField_H #ifndef mappedFixedValueFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::mappedFlowRateFvPatchVectorField Foam::mappedFlowRateFvPatchVectorField
@ -28,14 +31,20 @@ 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
@ -44,8 +53,7 @@ Description
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
@ -53,6 +61,8 @@ Description
SourceFiles SourceFiles
mappedFlowRateFvPatchVectorField.C mappedFlowRateFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef mappedFlowRateFvPatchVectorField_H #ifndef mappedFlowRateFvPatchVectorField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::mappedVelocityFluxFixedValueFvPatchField Foam::mappedVelocityFluxFixedValueFvPatchField
@ -28,17 +31,25 @@ Description
This boundary condition maps the velocity and flux from a neighbour patch This boundary condition maps the velocity and flux from a neighbour patch
to this patch 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type mappedFixedInternalValue; type mappedFixedInternalValue;
phi phi; // name of flux field (default = phi) phi phi;
value uniform 0; // place holder value uniform 0; // place holder
} }
\endverbatim \endverbatim
The underlying sample mode should be set to nearestPatchFace or nearestFace The underlying sample mode should be set to \c nearestPatchFace or
\c nearestFace
\note \note
This boundary condition can only be applied to patches that are of This boundary condition can only be applied to patches that are of
@ -53,6 +64,8 @@ SeeAlso
SourceFiles SourceFiles
mappedVelocityFluxFixedValueFvPatchField.C mappedVelocityFluxFixedValueFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef mappedVelocityFluxFixedValueFvPatchField_H #ifndef mappedVelocityFluxFixedValueFvPatchField_H

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::movingWallVelocityFvPatchVectorField Foam::movingWallVelocityFvPatchVectorField
@ -29,14 +32,22 @@ Description
moving walls. In addition, it should also be applied to 'moving' walls moving walls. In addition, it should also be applied to 'moving' walls
for moving reference frame (MRF) calculations. 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: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type movingWallVelocity; type movingWallVelocity;
U U; // name of velocity field (default = U) U U;
value uniform 0; // initial value value uniform 0; // initial value
} }
\endverbatim \endverbatim
SeeAlso SeeAlso
@ -46,6 +57,8 @@ SeeAlso
SourceFiles SourceFiles
movingWallVelocityFvPatchVectorField.C movingWallVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef movingWallVelocityFvPatchVectorField_H #ifndef movingWallVelocityFvPatchVectorField_H

View File

@ -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);
} }

View File

@ -21,22 +21,57 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::multiphaseFixedFluxPressureFvPatchScalarField Foam::multiphaseFixedFluxPressureFvPatchScalarField
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 - phiHbyA)\f$, both of which are looked-up from the database, as
the pressure diffusivity Dp used to calculate the gradient. 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[
grad(pressure) = \frac{phiHbyA - phi}{mag(Sf)*Dp}
\f]
where
/vartable
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 externalWallHeatFluxTemperature;
phiHbyA phiHbyA;
phi phi;
rho rho;
Dp Dp;
}
\endverbatim
SourceFiles SourceFiles
multiphaseFixedFluxPressureFvPatchScalarField.C multiphaseFixedFluxPressureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef multiphaseFixedFluxPressureFvPatchScalarFields_H #ifndef multiphaseFixedFluxPressureFvPatchScalarFields_H
@ -71,6 +106,9 @@ class multiphaseFixedFluxPressureFvPatchScalarField
// if neccessary // if neccessary
word rhoName_; word rhoName_;
//- Name of the pressure diffusivity field
word DpName_;
public: public:

View File

@ -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,12 +21,40 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::oscillatingFixedValueFvPatchField Foam::oscillatingFixedValueFvPatchField
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; // optional
amplitude | oscillation amplitude | yes |
frequency | oscillation frequency | yes |
/endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
@ -34,19 +62,25 @@ Description
{ {
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef oscillatingFixedValueFvPatchField_H #ifndef oscillatingFixedValueFvPatchField_H
@ -62,7 +96,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class oscillatingFixedValueFvPatch Declaration Class oscillatingFixedValueFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -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,15 +21,48 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::outletInletFvPatchField Foam::outletInletFvPatchField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef outletInletFvPatchField_H #ifndef outletInletFvPatchField_H

View File

@ -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,17 +21,44 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::outletMappedUniformInletFvPatchField Foam::outletMappedUniformInletFvPatchField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef outletMappedUniformInletFvPatchField_H #ifndef outletMappedUniformInletFvPatchField_H
@ -45,7 +72,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class outletMappedUniformInletFvPatch Declaration Class outletMappedUniformInletFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -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,15 +21,41 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::partialSlipFvPatchField Foam::partialSlipFvPatchField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef partialSlipFvPatchField_H #ifndef partialSlipFvPatchField_H
@ -43,7 +69,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class partialSlipFvPatch Declaration Class partialSlipFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -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,23 +21,64 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::phaseHydrostaticPressureFvPatchScalarField Foam::phaseHydrostaticPressureFvPatchScalarField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef phaseHydrostaticPressureFvPatchScalarField_H #ifndef phaseHydrostaticPressureFvPatchScalarField_H
@ -51,7 +92,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class phaseHydrostaticPressureFvPatch Declaration Class phaseHydrostaticPressureFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class phaseHydrostaticPressureFvPatchScalarField class phaseHydrostaticPressureFvPatchScalarField

View File

@ -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,18 +21,53 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::pressureDirectedInletOutletVelocityFvPatchVectorField Foam::pressureDirectedInletOutletVelocityFvPatchVectorField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef pressureDirectedInletOutletVelocityFvPatchVectorField_H #ifndef pressureDirectedInletOutletVelocityFvPatchVectorField_H
@ -47,7 +82,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class pressureDirectedInletOutletVelocityFvPatch Declaration Class pressureDirectedInletOutletVelocityFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class pressureDirectedInletOutletVelocityFvPatchVectorField class pressureDirectedInletOutletVelocityFvPatchVectorField
@ -56,8 +91,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_;

View File

@ -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,19 +21,52 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::pressureDirectedInletVelocityFvPatchVectorField Foam::pressureDirectedInletVelocityFvPatchVectorField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef pressureDirectedInletVelocityFvPatchVectorField_H #ifndef pressureDirectedInletVelocityFvPatchVectorField_H
@ -48,7 +81,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class pressureDirectedInletVelocityFvPatch Declaration Class pressureDirectedInletVelocityFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class pressureDirectedInletVelocityFvPatchVectorField class pressureDirectedInletVelocityFvPatchVectorField
@ -57,8 +90,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_;

View File

@ -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,20 +21,54 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::pressureInletOutletParSlipVelocityFvPatchVectorField Foam::pressureInletOutletParSlipVelocityFvPatchVectorField
Description Description
Velocity inlet/outlet boundary condition for pressure boundary where the This velocity inlet/outlet boundary condition for pressure boundary where
pressure is specified. zero-gradient is applied for outflow (as defined the pressure is specified. A zero-gradient is applied for outflow (as
by the flux) and for inflow the velocity is obtained from the flux with defined by the flux); for inflow, the velocity is obtained from the flux
the specified `inletDirection'. with the specified inlet direction.
Slip condition applied tangential to the patch. 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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef pressureInletOutletParSlipVelocityFvPatchVectorField_H #ifndef pressureInletOutletParSlipVelocityFvPatchVectorField_H
@ -58,7 +92,10 @@ class pressureInletOutletParSlipVelocityFvPatchVectorField
{ {
// Private data // Private data
//- Flux field name
word phiName_; word phiName_;
//- Density field name
word rhoName_; word rhoName_;

View File

@ -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,18 +21,50 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::pressureInletOutletVelocityFvPatchVectorField Foam::pressureInletOutletVelocityFvPatchVectorField
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
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef pressureInletOutletVelocityFvPatchVectorField_H #ifndef pressureInletOutletVelocityFvPatchVectorField_H
@ -47,7 +79,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class pressureInletOutletVelocityFvPatch Declaration Class pressureInletOutletVelocityFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class pressureInletOutletVelocityFvPatchVectorField class pressureInletOutletVelocityFvPatchVectorField
@ -56,6 +88,7 @@ class pressureInletOutletVelocityFvPatchVectorField
{ {
// Private data // Private data
//- Flux field name
word phiName_; word phiName_;
//- Optional tangential velocity component //- Optional tangential velocity component

View File

@ -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,17 +21,34 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::pressureInletUniformVelocityFvPatchVectorField Foam::pressureInletUniformVelocityFvPatchVectorField
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 uniform inflow velocity is obtained by averaging the flux pressure is specified. The uniform inflow velocity is obtained by
over the patch and apply it in the direction normal to the patch faces. averaging the flux over the patch, and then applying it in the direction
normal to the patch faces.
/heading Patch usage
Example of the boundary condition specification:
\verbatim
myPatch
{
type pressureInletUniformVelocity;
value uniform 0;
}
\endverbatim
SourceFiles SourceFiles
pressureInletUniformVelocityFvPatchVectorField.C pressureInletUniformVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef pressureInletUniformVelocityFvPatchVectorField_H #ifndef pressureInletUniformVelocityFvPatchVectorField_H
@ -45,7 +62,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class pressureInletUniformVelocityFvPatch Declaration Class pressureInletUniformVelocityFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class pressureInletUniformVelocityFvPatchVectorField class pressureInletUniformVelocityFvPatchVectorField

View File

@ -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,18 +21,43 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::pressureInletVelocityFvPatchVectorField Foam::pressureInletVelocityFvPatchVectorField
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 a direction pressure is specified. The inflow velocity is obtained from the flux with
normal to the patch faces. If reverse flow is possible or expected use a direction normal to the patch faces.
the "pressureInletOutletVelocityFvPatchVectorField" BC instead.
/heading Patch usage
Example of the boundary condition specification:
\verbatim
myPatch
{
type pressureInletVelocity;
phi phi;
rho rho;
value uniform 0;
}
\endverbatim
\note
If reverse flow is possible or expected use
the pressureInletOutletVelocityFvPatchVectorField condition instead.
SeeAlso
Foam::fixedValueFvPatchField
Foam::pressureInletOutletVelocityFvPatchVectorField
SourceFiles SourceFiles
pressureInletVelocityFvPatchVectorField.C pressureInletVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef pressureInletVelocityFvPatchVectorField_H #ifndef pressureInletVelocityFvPatchVectorField_H
@ -47,7 +72,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class pressureInletVelocityFvPatch Declaration Class pressureInletVelocityFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class pressureInletVelocityFvPatchVectorField class pressureInletVelocityFvPatchVectorField
@ -56,7 +81,10 @@ class pressureInletVelocityFvPatchVectorField
{ {
// Private data // Private data
//- Flux field name
word phiName_; word phiName_;
//- Density field name
word rhoName_; word rhoName_;

View File

@ -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,18 +21,51 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::pressureNormalInletOutletVelocityFvPatchVectorField Foam::pressureNormalInletOutletVelocityFvPatchVectorField
Description Description
Velocity inlet/outlet boundary condition for patches where the pressure is This velocity inlet/outlet boundary condition is applied to patches where
specified. zero-gradient is applied for outflow (as defined by the flux) the pressure is specified. A zero-gradient condition is applied for
and for inflow the velocity is obtained from the flux with a direction outflow (as defined by the flux); for inflow, the velocity is obtained from
normal to the patch faces. the flux with a direction normal to the patch faces.
/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 pressureNormalInletOutletVelocity;
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 and patch-normal
direction
SeeAlso
Foam::mixedFvPatchVectorField
SourceFiles SourceFiles
pressureNormalInletOutletVelocityFvPatchVectorField.C pressureNormalInletOutletVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef pressureNormalInletOutletVelocityFvPatchVectorField_H #ifndef pressureNormalInletOutletVelocityFvPatchVectorField_H
@ -47,7 +80,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class pressureNormalInletOutletVelocityFvPatch Declaration Class pressureNormalInletOutletVelocityFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class pressureNormalInletOutletVelocityFvPatchVectorField class pressureNormalInletOutletVelocityFvPatchVectorField
@ -56,7 +89,10 @@ class pressureNormalInletOutletVelocityFvPatchVectorField
{ {
// Private data // Private data
//- Flux field name
word phiName_; word phiName_;
//- Density field name
word rhoName_; word rhoName_;

View File

@ -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,18 +21,55 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::rotatingPressureInletOutletVelocityFvPatchVectorField Foam::rotatingPressureInletOutletVelocityFvPatchVectorField
Description Description
Velocity inlet/outlet boundary condition in a rotating frame This velocity inlet/outlet boundary condition is applied to patches in a
for patches where the pressure is specified. zero-gradient is applied for rotating frame where the pressure is specified. A zero-gradient is applied
outflow (as defined by the flux) and for inflow the velocity is obtained for outflow (as defined by the flux); for inflow, the velocity is obtained
from the flux with a direction normal to the patch faces. from the flux with a direction normal to the patch faces.
/heading Patch usage
/table
Property | Description | Required | Default value
phi | flux field name | no | phi
tangentialVelocity | tangential velocity field | no |
omega | angular velocty of the frame [rad/s] | yes |
/endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type rotatingPressureInletOutletVelocity;
phi phi;
tangentialVelocity uniform (0 0 0);
omega 100;
}
\endverbatim
The \c omega entry is a DataEntry type, able to describe time varying
functions.
\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
SeeAlso
Foam::pressureInletOutletVelocityFvPatchVectorField
SourceFiles SourceFiles
rotatingPressureInletOutletVelocityFvPatchVectorField.C rotatingPressureInletOutletVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef rotatingPressureInletOutletVelocityFvPatchVectorField_H #ifndef rotatingPressureInletOutletVelocityFvPatchVectorField_H
@ -48,7 +85,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class rotatingPressureInletOutletVelocityFvPatch Declaration Class rotatingPressureInletOutletVelocityFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class rotatingPressureInletOutletVelocityFvPatchVectorField class rotatingPressureInletOutletVelocityFvPatchVectorField

View File

@ -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,15 +21,55 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::rotatingTotalPressureFvPatchScalarField Foam::rotatingTotalPressureFvPatchScalarField
Description Description
Foam::rotatingTotalPressureFvPatchScalarField This boundary condition provides a total pressure condition for patches
in a rotating frame.
/heading Patch usage
/table
Property | Description | Required | Default value
U | velocity field name | no | U
phi | flux field name | no | phi
rho | density field name | no | rho
psi | compressibility field name | no | psi
gamma | ratio of specific heats (Cp/Cv) | yes |
p0 | static pressure reference | yes |
omega | angular velocty of the frame [rad/s] | yes |
/endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type rotatingTotalPressure;
U U;
phi phi;
rho rho;
psi psi;
gamma 1.4;
p0 uniform 1e5;
omega 100;
}
\endverbatim
The \c omega entry is a DataEntry type, able to describe time varying
functions.
SeeAlso
Foam::totalPressureFvPatchScalarField
SourceFiles SourceFiles
rotatingTotalPressureFvPatchScalarField.C rotatingTotalPressureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef rotatingTotalPressureFvPatchScalarField_H #ifndef rotatingTotalPressureFvPatchScalarField_H
@ -44,7 +84,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class rotatingTotalPressureFvPatch Declaration Class rotatingTotalPressureFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class rotatingTotalPressureFvPatchScalarField class rotatingTotalPressureFvPatchScalarField

View File

@ -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,15 +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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::rotatingWallVelocityFvPatchVectorField Foam::rotatingWallVelocityFvPatchVectorField
Description Description
Foam::rotatingWallVelocityFvPatchVectorField This boundary condition provides a rotational velocity condition.
/heading Patch usage
/table
Property | Description | Required | Default value
origin | origin of rotation in Cartesian co-ordinates | yes|
axis | axis of rotation | yes |
omega | angular velocty of the frame [rad/s] | yes |
/endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type rotatingWallVelocity;
origin (0 0 0);
axis (0 0 1);
omega 100;
}
\endverbatim
The \c omega entry is a DataEntry type, able to describe time varying
functions.
SeeAlso
Foam::DataEntry
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
rotatingWallVelocityFvPatchVectorField.C rotatingWallVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef rotatingWallVelocityFvPatchVectorField_H #ifndef rotatingWallVelocityFvPatchVectorField_H
@ -44,7 +76,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class rotatingWallVelocityFvPatch Declaration Class rotatingWallVelocityFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class rotatingWallVelocityFvPatchVectorField class rotatingWallVelocityFvPatchVectorField

View File

@ -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,15 +21,30 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::slipFvPatchField Foam::slipFvPatchField
Description Description
Foam::slipFvPatchField This boundary condition provides a slip constraint.
/heading Patch usage
Example of the boundary condition specification:
\verbatim
myPatch
{
type slip;
}
\endverbatim
SourceFiles SourceFiles
slipFvPatchField.C slipFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef slipFvPatchField_H #ifndef slipFvPatchField_H
@ -43,7 +58,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class slipFvPatch Declaration Class slipFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -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,25 +21,52 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::supersonicFreestreamFvPatchVectorField Foam::supersonicFreestreamFvPatchVectorField
Description Description
Supersonic free stream condition. This boundary condition provides a supersonic free-stream condition.
Supersonic outflow is vented according to ??? - supersonic outflow is vented according to ???
- supersonic inflow is assumed to occur according to the Prandtl-Meyer
expansion process.
- subsonic outflow is applied via a zero-gradient condition from inside
the domain.
Supersonic inflow is assumed to occur according to the Prandtl-Meyer /heading Patch usage
expansion process.
Subsonic outflow is zero-gradiented from inside the domain. /table
Property | Description | Required | Default value
UInf | free-stream velocity | yes |
pInf | free-stream pressure | yes |
TInf | free-stream temperature | yes |
gamma | heat capacity ratio (cp/Cv) | yes |
/endtable
N.B. This boundary condition is ill-posed if the free-stream flow is Example of the boundary condition specification:
normal to the boundary. \verbatim
myPatch
{
type supersonicFreestream;
UInf 500;
pInf 1e4;
TInf 265;
gamma 1.4;
}
\endverbatim
\note
This boundary condition is ill-posed if the free-stream flow is normal
to the boundary.
SourceFiles SourceFiles
supersonicFreestreamFvPatchVectorField.C supersonicFreestreamFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef supersonicFreestreamFvPatchVectorFields_H #ifndef supersonicFreestreamFvPatchVectorFields_H
@ -54,7 +81,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class supersonicFreestreamFvPatch Declaration Class supersonicFreestreamFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class supersonicFreestreamFvPatchVectorField class supersonicFreestreamFvPatchVectorField

View File

@ -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,16 +21,44 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::surfaceNormalFixedValueFvPatchVectorField Foam::surfaceNormalFixedValueFvPatchVectorField
Description Description
Describes a surface normal vector boundary condition by its magnitude. This boundary condition provides a surface-normal vector boundary condition
Note: The value is positive for outward-pointing vectors by its magnitude.
/heading Patch usage
/table
Property | Description | Required | Default value
refValue | reference value | yes |
/endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type inletOutlet;
refValue -10; // 10 INTO the domain
}
\endverbatim
\note
Sign conventions:
- the value is positive for outward-pointing vectors
SeeAlso
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
surfaceNormalFixedValueFvPatchVectorField.C surfaceNormalFixedValueFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef surfaceNormalFixedValueFvPatchVectorField_H #ifndef surfaceNormalFixedValueFvPatchVectorField_H
@ -45,7 +73,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class surfaceNormalFixedValueFvPatch Declaration Class surfaceNormalFixedValueFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class surfaceNormalFixedValueFvPatchVectorField class surfaceNormalFixedValueFvPatchVectorField

View File

@ -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,39 +21,56 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::swirlFlowRateInletVelocityFvPatchVectorField Foam::swirlFlowRateInletVelocityFvPatchVectorField
Description Description
Describes a volumetric/mass flow normal vector boundary condition by its This boundary condition provides a volumetric- OR mass-flow normal vector
magnitude as an integral over its area with a swirl component determined boundary condition by its magnitude as an integral over its area with a
by the RPM swirl component determined by the angular speed, given in revolutions per
minute (RPM)
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
flowRate | flow rate profile | yes |
rpm | rotational speed profile | yes |
/endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
inlet myPatch
{ {
type swirlFlowRateInletVelocity; type swirlFlowRateInletVelocity;
flowRate constant 0.2; // Vol/mass flow rate [m3/s or kg/s] flowRate constant 0.2;
rpm constant 100; rpm constant 100;
} }
\endverbatim \endverbatim
The flowRate and rpm entries are DataEntry types, able to describe time \note
varying functions. The example above gives the usage for supplying - the \c flowRate and \c rpm entries are DataEntry types, able to describe
constant values. time varying functions. The example above gives the usage for supplying
constant values.
- the value is positive into the domain
Note SeeAlso
- The value is positive inwards Foam::fixedValueFvPatchField
SourceFiles SourceFiles
swirlFlowRateInletVelocityFvPatchVectorField.C swirlFlowRateInletVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef swirlFlowRateInletVelocityFvPatchVectorField_H #ifndef swirlFlowRateInletVelocityFvPatchVectorField_H
@ -67,7 +84,7 @@ SourceFiles
namespace Foam namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class swirlFlowRateInletVelocityFvPatchVectorField Declaration Class swirlFlowRateInletVelocityFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class swirlFlowRateInletVelocityFvPatchVectorField class swirlFlowRateInletVelocityFvPatchVectorField
@ -85,7 +102,7 @@ class swirlFlowRateInletVelocityFvPatchVectorField
//- Inlet integral flow rate //- Inlet integral flow rate
autoPtr<DataEntry<scalar> > flowRate_; autoPtr<DataEntry<scalar> > flowRate_;
//- RPM //- Angular speed in revolutions per minute (RPM)
autoPtr<DataEntry<scalar> > rpm_; autoPtr<DataEntry<scalar> > rpm_;

View File

@ -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,12 +21,15 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::syringePressureFvPatchScalarField Foam::syringePressureFvPatchScalarField
Description Description
Pressure boundary condition obtained from a 0-D model of the cylinder This boundary condition provides a pressure condition, obtained from a
of a syringe. zero-D model of the cylinder of a syringe.
The syringe cylinder is defined by its initial volume, piston area and The syringe cylinder is defined by its initial volume, piston area and
velocity profile specified by regions of constant acceleration, speed velocity profile specified by regions of constant acceleration, speed
@ -34,28 +37,49 @@ Description
pressure and compressibility which is assumed constant, i.e. isothermal pressure and compressibility which is assumed constant, i.e. isothermal
expansion/compression. expansion/compression.
/heading Patch usage
/table
Property | Description | Required | Default value
Ap | syringe piston area | yes |
Sp | syringe piston speed | yes |
VsI | initial syringe volume | yes |
tas | start of piston acceleration | yes |
tae | end of piston acceleration | yes |
tds | start of piston deceleration | yes |
tde | end of piston deceleration | yes |
psI | initial syringe pressure | yes |
psi | gas compressibility | yes |
ams | added (or removed) gas mass | yes |
/endtable
Example of the BC specification: Example of the BC specification:
\verbatim \verbatim
outlet myPatch
{ {
type syringePressure; type syringePressure;
Ap 1.388e-6; // syringe piston area Ap 1.388e-6; // syringe piston area
Sp 0.01; // syringe piston speed Sp 0.01; // syringe piston speed
VsI 1.388e-8; // Initial syringe volume VsI 1.388e-8; // Initial syringe volume
tas 0.001; // Start of piston acceleration tas 0.001; // Start of piston acceleration
tae 0.002; // End of piston acceleration tae 0.002; // End of piston acceleration
tds 0.005; // Start of piston deceleration tds 0.005; // Start of piston deceleration
tde 0.006; // end of piston deceleration tde 0.006; // end of piston deceleration
psI 1e5; // Initial syringe pressure psI 1e5; // Initial syringe pressure
psi 1e-5; // Gas compressibility psi 1e-5; // Gas compressibility
ams 0; // Added (or removed) gas mass ams 0; // Added (or removed) gas mass
// Initially 0 but used for restarting. value uniform 0 // Initially 0 but used for restarting
} }
\endverbatim \endverbatim
SeeAlso
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
syringePressureFvPatchScalarField.C syringePressureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef syringePressureFvPatchScalarField_H #ifndef syringePressureFvPatchScalarField_H
@ -69,7 +93,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class syringePressureFvPatch Declaration Class syringePressureFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class syringePressureFvPatchScalarField class syringePressureFvPatchScalarField
@ -115,7 +139,9 @@ class syringePressureFvPatchScalarField
label curTimeIndex_; label curTimeIndex_;
//- return the volume of the syringe at time t // Private Functions
//- Return the volume of the syringe at time t
scalar Vs(const scalar t) const; scalar Vs(const scalar t) const;

View File

@ -21,22 +21,52 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::temperatureJumpFvPatchScalarField Foam::temperatureJumpFvPatchScalarField
Description Description
Introduce a jump in temperature on a cycle patch This boundary condition provides a temperature jump condition across a
front coupled pair of cyclic patches.
The jump is specified as a \c DataEntry type, to enable the use of, e.g.
contant, polynomial, table values.
/heading Patch usage
/table
Property | Description | Required | Default value
patchType | underlying patch type should be \c cyclic| yes |
jump | current jump value | yes |
jumpTable | jump data, e.g. \c csvFile | yes |
/endtable
Example of the boundary condition specification:
\verbatim
myPatch
{ {
type temperatureJump; type temperatureJump;
patchType cyclic; patchType cyclic;
jumpTable constant 100; jumpTable constant 100;
value uniform 300; value uniform 300;
} }
\endverbatim
The above example shows the use of a constant jump condition.
\note
The underlying \c patchType should be set to \c cyclic
SeeAlso
Foam::fixedJumpFvPatchField
SourceFiles SourceFiles
temperatureJumpFvPatchScalarField.C temperatureJumpFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef temperatureJumpFvPatchScalarField_H #ifndef temperatureJumpFvPatchScalarField_H

View File

@ -21,44 +21,56 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::timeVaryingMappedFixedValueFvPatchField Foam::timeVaryingMappedFixedValueFvPatchField
Description Description
Foam::timeVaryingMappedFixedValueFvPatchField This boundary conditions interpolates the values from a set of supplied
points in space and time. Supplied data should be specified in
constant/boundaryData/<patchname> where:
- points : pointField with locations
- ddd : supplied values at time ddd
The points should be more or less on a plane since they get triangulated
in 2-D.
Interpolates from a set of supplied points in space and time. Supplied At startup, this condition generates the triangulation and performs a
data in constant/boundaryData/<patchname>: linear interpolation (triangle it is in and weights to the 3 vertices)
- points : pointField with locations for every face centre.
- ddd : supplied values at time ddd
Points need to be more or less on a plane since get triangulated in 2D.
At startup this bc does the triangulation and determines linear Values are interpolated linearly between times.
interpolation (triangle it is in and weights to the 3 vertices)
for every face centre. Interpolates linearly inbetween times.
@verbatim /heading Patch usage
inlet
{
type timeVaryingMappedFixedValue;
// Maintain average to that of the supplied values /table
setAverage false; Property | Description | Required | Default value
setAverage | flag to activate setting of average value | yes |
perturb | perturb points for regular geometries | no | 1e-5
fieldTableName | alternative field name to sample | no| this field name
/endtable
// Optional: change perturbation (default 1e-5) to avoid any ties /verbatim
// in triangulating regular geometries. myPatch
//perturb 0.0; {
type timeVaryingMappedFixedValue;
// Optional: use name instead of patchname for location of data setAverage false;
//fieldTableName samples; //perturb 0.0;
} //fieldTableName samples;
@endverbatim }
/endverbatim
\note
Switch on debug flag to have it dump the triangulation (in transformed Switch on debug flag to have it dump the triangulation (in transformed
space) and transform face centres. space) and transform face centres.
SeeAlso
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
timeVaryingMappedFixedValueFvPatchField.C timeVaryingMappedFixedValueFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -76,7 +88,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class timeVaryingMappedFixedValueFvPatch Declaration Class timeVaryingMappedFixedValueFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>
@ -119,6 +131,7 @@ class timeVaryingMappedFixedValueFvPatchField
//- If setAverage: end average value //- If setAverage: end average value
Type endAverage_; Type endAverage_;
public: public:
//- Runtime type information //- Runtime type information

View File

@ -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,14 +21,108 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::totalPressureFvPatchScalarField Foam::totalPressureFvPatchScalarField
Description Description
Foam::totalPressureFvPatchScalarField This boundary condition provides a total pressure condition. Four
variants are possible:
- incompressible subsonic:
\f[
p_T = p_0 + 0.5*|U|^2
\f]
where
/vartable
p_T | incompressible total pressure [m2/s2]
p_0 | incompressible reference pressure [m2/s2]
U | velocity
/endvartable
- compressible subsonic:
\f[
p_T = p_0 + 0.5*\rho*|U|^2
\f]
where
/vartable
p_T | total pressure [Pa]
p_0 | reference pressure [Pa]
\rho | density [kg/m3]
U | velocity
/endvartable
- compressible supersonic (\gamma > 1):
\f[
p_T = \frac{p_0}{(1 + 0.5*\psi*G)^{\frac{1}{G}}}
\f]
where
/vartable
p_T | total pressure [Pa]
p_0 | reference pressure [Pa]
\psi | compressibility [m2/s2]
G | coefficient given by \f$\frac{\gamma}{1-\gamma}\f$
/endvartable
- compressible transonic (\gamma <= 1):
\f[
p_T = \frac{p_0}{1 + 0.5*\psi*|U|^2}
\f]
where
/vartable
p_T | total pressure [Pa]
p_0 | reference pressure [Pa]
G | coefficient given by \f$\frac{\gamma}{1-\gamma}\f$
/endvartable
The modes of operation are set via the combination of \c phi, \c rho, and
\c psi entries:
/table
Mode | phi | rho | psi
incompressible subsonic | phi | none | none
compressible subsonic | phi | rho | none
compressible transonic | phi | none | psi
compressible supersonic | phi | none | psi
/endtable
/heading Patch usage
/table
Property | Description | Required | Default value
U | velocity field name | no | U
phi | flux field name | no | phi
rho | density field name | no | none
psi | compressibility field name | no | none
gamma | ratio of specific heats (Cp/Cv) | yes |
p0 | static pressure reference | yes |
/endtable
\note
The default boundary behaviour is for subsonic, incompressible flow.
Example of the boundary condition specification:
\verbatim
myPatch
{
type totalPressure;
U U;
phi phi;
rho none;
psi none;
gamma 1.4;
p0 uniform 1e5;
}
\endverbatim
SeeAlso
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
totalPressureFvPatchScalarField.C totalPressureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -43,7 +137,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class totalPressureFvPatch Declaration Class totalPressureFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class totalPressureFvPatchScalarField class totalPressureFvPatchScalarField

View File

@ -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,15 +21,41 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::translatingWallVelocityFvPatchVectorField Foam::translatingWallVelocityFvPatchVectorField
Description Description
Foam::translatingWallVelocityFvPatchVectorField This boundary condition provides a velocity condition for translational
motion on walls.
/heading Patch usage
/table
Property | Description | Required | Default value
U | translational velocity | yes|
/endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type rotatingWallVelocity;
U (100 0 0);
}
\endverbatim
SeeAlso
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
translatingWallVelocityFvPatchVectorField.C translatingWallVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef translatingWallVelocityFvPatchVectorField_H #ifndef translatingWallVelocityFvPatchVectorField_H
@ -43,7 +69,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class translatingWallVelocityFvPatchField Declaration Class translatingWallVelocityFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class translatingWallVelocityFvPatchVectorField class translatingWallVelocityFvPatchVectorField
@ -52,7 +78,7 @@ class translatingWallVelocityFvPatchVectorField
{ {
// Private data // Private data
//- Origin of the rotation //- Translational velocity
vector U_; vector U_;
@ -124,7 +150,6 @@ public:
} }
// Member functions // Member functions
// Access functions // Access functions

View File

@ -21,25 +21,59 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::turbulentInletFvPatchField Foam::turbulentInletFvPatchField
Description Description
Generate a fluctuating inlet condition by adding a random component This boundary condition generates a fluctuating inlet condition by adding
to a reference (mean) field. a random component to a reference (mean) field.
Input:
referenceField \f[
Mean field. x_p = (1 - \alpha)*x_p^{n-1} + \alpha*(x_{ref}+C_{RMS}*s*x_{ref})
fluctuationScale \f]
RMS fluctuation, provided as the fraction of the mean field.
alpha where
temporal correlation factor;
the fraction of the new random component added to the previous /vartable
time-step (defaults to 0.1). x_p | patch values
x_{ref} | refernce patch values
n | time level
\alpha | fraction of new random component added to previous time value
C_{RMS} | RMS coefficient
s | fluctuation scale
/endvartable
/heading Patch usage
/table
Property | Description | Required | Default value
fluctuationScale | RMS fluctuation scale (fraction of mean) | yes |
referenceField | reference (mean) field | yes |
alpha | fraction of new random component added to previous| no| 0.1
/endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type turbulentInlet;
fluctuationScale 0.1;
referenceField uniform 10;
alpha 0.1;
}
\endverbatim
SeeAlso
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
turbulentInletFvPatchField.C turbulentInletFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef turbulentInletFvPatchField_H #ifndef turbulentInletFvPatchField_H
@ -54,7 +88,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class turbulentInletFvPatch Declaration Class turbulentInletFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>
@ -64,10 +98,19 @@ class turbulentInletFvPatchField
{ {
// Private data // Private data
//- Random number generator
Random ranGen_; Random ranGen_;
//- Fluctuation scake
Type fluctuationScale_; Type fluctuationScale_;
//- Reference field
Field<Type> referenceField_; Field<Type> referenceField_;
//- Fraction of RMS component to apply to last time step values
scalar alpha_; scalar alpha_;
//- Current time index (used for updating)
label curTimeIndex_; label curTimeIndex_;

View File

@ -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
@ -40,8 +40,8 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
intensity_(0.0), intensity_(0.0),
UName_("undefined-U"), UName_("U"),
phiName_("undefined-phi") phiName_("phi")
{ {
this->refValue() = 0.0; this->refValue() = 0.0;
this->refGrad() = 0.0; this->refGrad() = 0.0;
@ -82,12 +82,15 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
( (
"turbulentIntensityKineticEnergyInletFvPatchScalarField::" "turbulentIntensityKineticEnergyInletFvPatchScalarField::"
"turbulentIntensityKineticEnergyInletFvPatchScalarField" "turbulentIntensityKineticEnergyInletFvPatchScalarField"
"(const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, " "("
"const dictionary& dict)" "const fvPatch&, "
"const DimensionedField<scalar, volMesh>&, "
"const dictionary&
")"
) << "Turbulence intensity should be specified as a fraction 0-1 " ) << "Turbulence intensity should be specified as a fraction 0-1 "
"of the mean velocity\n" "of the mean velocity\n"
" value given is " << intensity_ " value given is " << intensity_ << nl
<< "\n on patch " << this->patch().name() << " on patch " << this->patch().name()
<< " of field " << this->dimensionedInternalField().name() << " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath() << " in file " << this->dimensionedInternalField().objectPath()
<< exit(FatalError); << exit(FatalError);
@ -157,8 +160,8 @@ void Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::write
{ {
fvPatchScalarField::write(os); fvPatchScalarField::write(os);
os.writeKeyword("intensity") << intensity_ << token::END_STATEMENT << nl; os.writeKeyword("intensity") << intensity_ << token::END_STATEMENT << nl;
os.writeKeyword("U") << UName_ << token::END_STATEMENT << nl; writeEntryIfDifferent<word>(os, "U", "U", UName_);
os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl; writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -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,26 +21,58 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField
Description Description
Calculate turbulent kinetic energy from the intensity provided as a This boundary condition provides a turbulent kinetic energy condition,
fraction of the mean velocity based on user-supplied turbulence intensity, defined as a fraction of the
mean velocity:
\f[
k_p = 1.5*(I)*|U|^2
\f]
where
/vartable
k_p | kinetic energy at the patch
I | turbulence intensity
U | velocity field
/endvartable
In the event of reverse flow, a zero-gradient condition is applied.
/heading Patch usage
/table
Property | Description | Required | Default value
intensity | fraction of mean field [0-1] | yes |
U | velocity field name | no | U
phi | flux field name | no | phi
/endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
inlet myPatch
{ {
type turbulentIntensityKineticEnergyInlet; type turbulentIntensityKineticEnergyInlet;
intensity 0.05; // 5% turbulence intensity 0.05; // 5% turbulence
value uniform 1; // placeholder value uniform 1; // placeholder
} }
\endverbatim \endverbatim
SeeAlso
Foam::inletOutletFvPatchField
SourceFiles SourceFiles
turbulentIntensityKineticEnergyInletFvPatchScalarField.C turbulentIntensityKineticEnergyInletFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef turbulentIntensityKineticEnergyInletFvPatchScalarField_H #ifndef turbulentIntensityKineticEnergyInletFvPatchScalarField_H
@ -54,7 +86,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class turbulentIntensityKineticEnergyInletFvPatch Declaration Class turbulentIntensityKineticEnergyInletFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class turbulentIntensityKineticEnergyInletFvPatchScalarField class turbulentIntensityKineticEnergyInletFvPatchScalarField

View File

@ -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,19 +21,55 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::uniformDensityHydrostaticPressureFvPatchScalarField Foam::uniformDensityHydrostaticPressureFvPatchScalarField
Description Description
Hydrostatic pressure boundary condition calculated as This boundary condition provides a 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
/heading Patch usage
/table
Property | Description | Required | Default value
rho | uniform density [kg/m3] | yes |
pRefValue | reference pressure [Pa] | yes |
pRefPoint | reference pressure location | yes |
/endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type uniformDensityHydrostaticPressure;
rho rho;
pRefValue 1e5;
pRefPoint (0 0 0);
value uniform 0; // optional initial value
}
\endverbatim
SourceFiles SourceFiles
uniformDensityHydrostaticPressureFvPatchScalarField.C uniformDensityHydrostaticPressureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef uniformDensityHydrostaticPressureFvPatchScalarField_H #ifndef uniformDensityHydrostaticPressureFvPatchScalarField_H
@ -47,7 +83,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class uniformDensityHydrostaticPressureFvPatch Declaration Class uniformDensityHydrostaticPressureFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class uniformDensityHydrostaticPressureFvPatchScalarField class uniformDensityHydrostaticPressureFvPatchScalarField

View File

@ -21,29 +21,45 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::uniformFixedValueFvPatchField Foam::uniformFixedValueFvPatchField
Description Description
Enables the specification of a uniform fixed value boundary condition. This boundary condition provides a uniform fixed value condition.
/heading Patch usage
/table
Property | Description | Required | Default value
uniformValue | uniform value | yes |
/endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
inlet myPatch
{ {
type uniformFixedValue; type uniformFixedValue;
uniformValue constant 0.2; uniformValue constant 0.2;
} }
\endverbatim \endverbatim
\note
The uniformValue entry is a DataEntry type, able to describe time The uniformValue entry is a DataEntry type, able to describe time
varying functions. The example above gives the usage for supplying a varying functions. The example above gives the usage for supplying a
constant value. constant value.
SeeAlso
Foam::DataEntry
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
uniformFixedValueFvPatchField.C uniformFixedValueFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef uniformFixedValueFvPatchField_H #ifndef uniformFixedValueFvPatchField_H
@ -58,7 +74,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class uniformFixedValueFvPatch Declaration Class uniformFixedValueFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -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,20 +21,61 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::uniformTotalPressureFvPatchScalarField Foam::uniformTotalPressureFvPatchScalarField
Description Description
A time-varying form of a uniform total pressure boundary condition. The This boundary condition provides a time-varying form of the uniform total
variation is specified as an DataEntry (see Foam::DataEntry). pressure boundary condition.
See Also /heading Patch usage
Foam::uniformFixedValueFvPatchField.H
and Foam::totalPressureFvPatchScalarField.H /table
Property | Description | Required | Default value
U | velocity field name | no | U
phi | flux field name | no | phi
rho | density field name | no | none
psi | compressibility field name | no | none
gamma | ratio of specific heats (Cp/Cv) | yes |
p0 | static pressure reference | yes |
pressure | total pressure as a function of time | yes |
/endtable
\note
The default boundary behaviour is for subsonic, incompressible flow.
Example of the boundary condition specification:
\verbatim
myPatch
{
type uniformTotalPressure;
U U;
phi phi;
rho rho;
psi psi;
gamma 1.4;
p0 uniform 1e5;
pressure uniform 0.0;
}
\endverbatim
The \c pressure entry is specified as a DataEntry type, able to describe
time varying functions.
SeeAlso
Foam::DataEntry
Foam::uniformFixedValueFvPatchField
Foam::totalPressureFvPatchField
SourceFiles SourceFiles
uniformTotalPressureFvPatchScalarField.C uniformTotalPressureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef uniformTotalPressureFvPatchScalarField_H #ifndef uniformTotalPressureFvPatchScalarField_H
@ -75,7 +116,7 @@ class uniformTotalPressureFvPatchScalarField
//- Heat capacity ratio //- Heat capacity ratio
scalar gamma_; scalar gamma_;
//- Total pressure //- Static pressure reference
scalar p0_; scalar p0_;
//- Table of time vs total pressure, including the bounding treatment //- Table of time vs total pressure, including the bounding treatment

View File

@ -21,32 +21,51 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::variableHeightFlowRateFvPatchScalarField Foam::variableHeightFlowRateFvPatchScalarField
Description Description
This boundary condition uses zeroGradient within a specified range of This boundary condition provides a phase fraction condition based on the
values for phase fraction alpha. The range is defined within the local flow conditions, whereby the values are constrained to lay between
boundary condition by the lowerBound and upperBound. user-specified upper and lower bounds. The behaviour is described by:
alpha > upperBound: fixedValue with uniform value of upperBound if alpha > upperBound:
lowerBound <= alpha <= upperBound: zeroGradient - apply a fixed value condition, with a uniform level of the upper bound
alpha < lowerBound: fixedValue with uniform value of lowerBound
Example: if lower bound <= alpha <= upper bound:
- apply a zero-gradient condition
if alpha < lowerBound:
- apply a fixed value condition, with a uniform level of the lower bound
/heading Patch usage
/table
Property | Description | Required | Default value
phi | flux field name | no | phi
lowerBound | lower bound for clipping | yes |
upperBound | upper bound for clipping | yes |
/endtable
Example of the boundary condition specification:
\verbatim \verbatim
inlet myPatch
{ {
type clippedZeroGradient; type variableHeightFlowRate;
lowerBound 0.0; lowerBound 0.0;
upperBound 0.9; upperBound 0.9;
value uniform 0; value uniform 0;
} }
\verbatim \verbatim
SourceFiles SourceFiles
variableHeightFlowRateFvPatchScalarField.C variableHeightFlowRateFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef variableHeightFlowRateFvPatchScalarField_H #ifndef variableHeightFlowRateFvPatchScalarField_H
@ -60,7 +79,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class variableHeightFlowRateFvPatchScalar Declaration Class variableHeightFlowRateFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class variableHeightFlowRateFvPatchScalarField class variableHeightFlowRateFvPatchScalarField
@ -81,6 +100,7 @@ protected:
//- Upper bound for alpha1 //- Upper bound for alpha1
scalar upperBound_; scalar upperBound_;
public: public:
//- Runtime scalar information //- Runtime scalar information
@ -156,10 +176,6 @@ public:
//- Write //- Write
virtual void write(Ostream&) const; virtual void write(Ostream&) const;
// Member operators
}; };

View File

@ -121,8 +121,10 @@ void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
} }
void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField::write
::write(Ostream& os) const (
Ostream& os
) const
{ {
fvPatchField<vector>::write(os); fvPatchField<vector>::write(os);

View File

@ -22,39 +22,50 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\addtogroup boundaryConditions
@{
Class Class
Foam::variableHeightFlowRateInletVelocityFvPatchVectorField Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
Description Description
Describes a volumetric/mass flow normal vector boundary condition by its This boundary condition provides a velocity boundary condition for
magnitude as an integral over its area. multphase flow based on a user-specified volumetric flow rate.
The basis of the patch (volumetric or mass) is determined by the The flow rate is made proportional to the phase fraction alpha at each
dimensions of the flux, phi. face of the patch and alpha is ensured to be bound between 0 and 1.
The current density is used to correct the velocity when applying the
mass basis.
The flow rate is made proportional to the phase fraction alpha at each face /heading Patch usage
of the patch and alpha is ensured to be bound between 0 and 1.
/table
Property | Description | Required | Default value
flowRate | volumetric flow rate [m3/s] | yes |
/endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
inlet myPatch
{ {
type variableHeightFlowRateInletVelocity; type variableHeightFlowRateInletVelocity;
flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s] flowRate 0.2;
value uniform (0 0 0); // placeholder value uniform (0 0 0); // placeholder
} }
\endverbatim \endverbatim
Note \note
- The value is positive inwards - the value is positive into the domain
- May not work correctly for transonic inlets - may not work correctly for transonic inlets
- Strange behaviour with potentialFoam since the U equation is not solved - strange behaviour with potentialFoam since the momentum equation is
not solved
SeeAlso
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
variableHeightFlowRateInletVelocityFvPatchVectorField.C variableHeightFlowRateInletVelocityFvPatchVectorField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef variableHeightFlowRateInletVelocityFvPatchVectorField_H #ifndef variableHeightFlowRateInletVelocityFvPatchVectorField_H
@ -67,7 +78,7 @@ SourceFiles
namespace Foam namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class variableHeightFlowRateInletVelocityFvPatch Declaration Class variableHeightFlowRateInletVelocityFvPatchVectorField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class variableHeightFlowRateInletVelocityFvPatchVectorField class variableHeightFlowRateInletVelocityFvPatchVectorField
@ -79,6 +90,7 @@ class variableHeightFlowRateInletVelocityFvPatchVectorField
//- Inlet integral flow rate //- Inlet integral flow rate
scalar flowRate_; scalar flowRate_;
public: public:
//- Runtime type information //- Runtime type information
@ -174,7 +186,6 @@ public:
//- Write //- Write
virtual void write(Ostream&) const; virtual void write(Ostream&) const;
}; };

View File

@ -21,6 +21,9 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::waveSurfacePressureFvPatchScalarField Foam::waveSurfacePressureFvPatchScalarField
@ -29,34 +32,50 @@ Description
the hydrostatic pressure based on a given displacement: the hydrostatic pressure based on a given displacement:
\f[ \f[
p = -rho*g*zeta p = -\rho*g*\zeta
\f] \f]
where /vartable
\var g = acceleration due to gravity [m/s2] \rho | density [kg/m3]
\var zeta = wave amplitude [m] g | acceleration due to gravity [m/s2]
\zeta | wave amplitude [m]
/endvartable
The wave amplitude is updated as part of the calculation, derived from the The wave amplitude is updated as part of the calculation, derived from the
local volumetric flux. local volumetric flux.
/heading Patch usage
/table
Property | Description | Required | Default value
phi | flux field name | no | phi
rho | density field name | no | rho
zeta | wave amplitude field name | no | zeta
/endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch myPatch
{ {
type waveSurfacePressure; type waveSurfacePressure;
phi phi; // name of flux field (default = phi) phi phi;
rho rho; // name of density field (default = rho) rho rho;
zeta zeta; // name amplitude field (default = zeta) zeta zeta;
value uniform 0; // place holder value uniform 0; // place holder
} }
\endverbatim \endverbatim
The density field is only required if the flux is mass-based as opposed to The density field is only required if the flux is mass-based as opposed to
volumetric-based. volumetric-based.
SeeAlso
Foam::fixedValueFvPatchField
SourceFiles SourceFiles
waveSurfacePressureFvPatchScalarField.C waveSurfacePressureFvPatchScalarField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef waveSurfacePressureFvPatchScalarField_H #ifndef waveSurfacePressureFvPatchScalarField_H

View File

@ -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,15 +21,61 @@ 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/>.
\addtogroup boundaryConditions
@{
Class Class
Foam::waveTransmissiveFvPatchField Foam::waveTransmissiveFvPatchField
Description Description
Foam::waveTransmissiveFvPatchField This boundary condition provides a wave transmissive outflow condition,
based onsolving DDt(psi, U) = 0 at the boundary.
The wave speed is calculated using:
\f[
x_p = \frac{\phi_p}{|Sf|} + \sqrt{\frac{\gamma}{\psi_p}}
\f]
where
/vartable
x_p | patch values
\phi_p | patch face flux
\psi_p | patch compressibility
Sf | patch face area vector
\gamma | ratio of specific heats
/endvartable
/heading Patch usage
/table
Property | Description | Required | Default value
phi | flux field name | no | phi
rho | density field name | no | rho
psi | compressibility field name | no | psi
gamma | ratio of specific heats (Cp/Cv) | yes |
/endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type waveTransmissive;
phi phi;
psi psi;
gamma 1.4;
}
\endverbatim
SeeAlso
Foam::advectiveFvPatchField
SourceFiles SourceFiles
waveTransmissiveFvPatchField.C waveTransmissiveFvPatchField.C
@}
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef waveTransmissiveFvPatchField_H #ifndef waveTransmissiveFvPatchField_H
@ -43,7 +89,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class waveTransmissiveFvPatch Declaration Class waveTransmissiveFvPatchField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -21,6 +21,11 @@ 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/>.
\defgroup boundaryConditions Boundary Conditions
@{
This group contains OpenFOAM boundary condition types
@}
Class Class
Foam::fvPatchField Foam::fvPatchField