externalCoupledMixedFvPatchField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::externalCoupledMixedFvPatchField
26 
27 Group
28  grpGenericBoundaryConditions grpCoupledBoundaryConditions
29 
30 Description
31  This boundary condition extends the mixed boundary condition with
32  serialisation through
33  - writeHeader
34  - writeData
35  - readData
36  functions. It is used for coupling to external applications in combination
37  with the externalCoupled functionObject. The default output is one
38  line per face, with columns
39  <value> <snGrad> <refValue> <refGrad> <valueFraction>
40 
41 Notes
42  readData,writeData are not callbacks for regIOobject (since fvPatchField
43  not derived from it). They do however do exactly the same - streaming of
44  data.
45 
46 SeeAlso
47  mixedFvPatchField
48  externalCoupledFunctionObject
49 
50 SourceFiles
51  externalCoupledMixedFvPatchField.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef externalCoupledMixedFvPatchField_H
56 #define externalCoupledMixedFvPatchField_H
57 
58 #include "mixedFvPatchFields.H"
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class externalCoupledMixedFvPatchField Declaration
67 \*---------------------------------------------------------------------------*/
68 
69 template<class Type>
71 :
72  public mixedFvPatchField<Type>
73 {
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("externalCoupled");
79 
80 
81  // Constructors
82 
83  //- Construct from patch and internal field
85  (
86  const fvPatch&,
88  );
89 
90  //- Construct from patch, internal field and dictionary
92  (
93  const fvPatch&,
95  const dictionary&
96  );
97 
98  //- Construct by mapping given externalCoupledMixedFvPatchField
99  // onto a new patch
101  (
103  const fvPatch&,
105  const fvPatchFieldMapper&
106  );
107 
108  //- Construct as copy
110  (
112  );
113 
114  //- Construct and return a clone
115  virtual tmp<fvPatchField<Type> > clone() const
116  {
117  return tmp<fvPatchField<Type> >
118  (
120  );
121  }
122 
123  //- Construct as copy setting internal field reference
125  (
128  );
129 
130  //- Construct and return a clone setting internal field reference
132  (
134  ) const
135  {
136  return tmp<fvPatchField<Type> >
137  (
139  );
140  }
141 
142 
143  //- Destructor
145 
146 
147  // Member functions
148 
149  //- Write header
150  virtual void writeHeader(Ostream&) const;
151 
152  //- Write data
153  virtual void writeData(Ostream&) const;
154 
155  //- Read data
156  virtual void readData(Istream&);
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #ifdef NoRepository
168 #endif
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //
Foam::externalCoupledMixedFvPatchField::readData
virtual void readData(Istream &)
Read data.
Definition: externalCoupledMixedFvPatchField.C:141
Foam::externalCoupledMixedFvPatchField::writeHeader
virtual void writeHeader(Ostream &) const
Write header.
Definition: externalCoupledMixedFvPatchField.C:110
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::externalCoupledMixedFvPatchField
This boundary condition extends the mixed boundary condition with serialisation through.
Definition: externalCoupledMixedFvPatchField.H:69
Foam::externalCoupledMixedFvPatchField::writeData
virtual void writeData(Ostream &) const
Write data.
Definition: externalCoupledMixedFvPatchField.C:120
Foam::externalCoupledMixedFvPatchField::externalCoupledMixedFvPatchField
externalCoupledMixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: externalCoupledMixedFvPatchField.C:35
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::externalCoupledMixedFvPatchField::~externalCoupledMixedFvPatchField
virtual ~externalCoupledMixedFvPatchField()
Destructor.
Definition: externalCoupledMixedFvPatchField.C:102
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::mixedFvPatchField
This boundary condition provides a base class for 'mixed' type boundary conditions,...
Definition: mixedFvPatchField.H:126
mixedFvPatchFields.H
Foam::externalCoupledMixedFvPatchField::TypeName
TypeName("externalCoupled")
Runtime type information.
Foam::externalCoupledMixedFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: externalCoupledMixedFvPatchField.H:114
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
externalCoupledMixedFvPatchField.C
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51