1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
28 Helper container for force Su and Sp terms.
32 Explicit contribution, Su specified as a force
33 Implicit coefficient, Sp specified as force/velocity
38 \*---------------------------------------------------------------------------*/
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 // Forward declaration of friend functions
52 inline forceSuSp operator+(const forceSuSp& susp1, const forceSuSp& susp2);
53 inline forceSuSp operator*(const forceSuSp& susp, const scalar s);
55 /*---------------------------------------------------------------------------*\
56 Class forceSuSp Declaration
57 \*---------------------------------------------------------------------------*/
61 public Tuple2<vector, scalar>
71 //- Construct given Tuple2
72 inline forceSuSp(const Tuple2<vector, scalar>& susp);
74 //- Construct given two components
75 inline forceSuSp(const vector& Su, const scalar Sp);
77 //- Construct from Istream
78 inline forceSuSp(Istream&);
85 //- Return const access to the explicit contribution [kg.m/s2]
86 inline const vector& Su() const;
88 //- Return const access to the implicit coefficient [kg/s]
89 inline scalar Sp() const;
94 //- Return reference to the explicit contribution
97 //- Return reference to the implicit coefficient
104 inline void operator=(const forceSuSp& susp);
107 inline void operator+=(const forceSuSp& susp);
110 inline void operator-=(const forceSuSp& susp);
116 friend inline forceSuSp operator*
118 const forceSuSp& susp1,
119 const forceSuSp& susp2
123 friend inline forceSuSp operator*
126 const forceSuSp& susp
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 #include "forceSuSpI.H"
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 // ************************************************************************* //