ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / lagrangian / intermediate / submodels / Kinematic / ParticleForces / forceSuSp / forceSuSp.H
blob5522514912c667545d31c9c73d7575fcc0999832
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Class
25     Foam::forceSuSp
27 Description
28     Helper container for force Su and Sp terms.
30         F = Sp(U - Up) + Su
32     Explicit contribution, Su specified as a force
33     Implicit coefficient, Sp specified as force/velocity
35 SourceFiles
36     forceSuSpI.H
38 \*---------------------------------------------------------------------------*/
40 #ifndef forceSuSp_H
41 #define forceSuSp_H
43 #include "Tuple2.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 // Forward declaration of friend functions
51 class forceSuSp;
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 \*---------------------------------------------------------------------------*/
59 class forceSuSp
61     public Tuple2<vector, scalar>
64 public:
66     // Constructors
68         //- Construct null
69         inline forceSuSp();
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&);
81     // Member Functions
83         // Access
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;
92         // Edit
94             //- Return reference to the explicit contribution
95             inline vector& Su();
97             //- Return reference to the implicit coefficient
98             inline scalar& Sp();
101         // Operators
103             //- Assignment
104             inline void operator=(const forceSuSp& susp);
106             //- Addition
107             inline void operator+=(const forceSuSp& susp);
109             //- Subtraction
110             inline void operator-=(const forceSuSp& susp);
113         // Friend operators
115             //- Addition
116             friend inline forceSuSp operator*
117             (
118                 const forceSuSp& susp1,
119                 const forceSuSp& susp2
120             );
122             //- Multiplication
123             friend inline forceSuSp operator*
124             (
125                 const scalar s,
126                 const forceSuSp& susp
127             );
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 #include "forceSuSpI.H"
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 #endif
143 // ************************************************************************* //