ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / lagrangian / intermediate / submodels / Kinematic / ParticleForces / ParticleForce / ParticleForce.C
blobfc4ba1314b21bb20a8b0593eff513382779dbb53
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 \*---------------------------------------------------------------------------*/
26 #include "ParticleForce.H"
28 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
31 template<class CloudType>
32 Foam::ParticleForce<CloudType>::ParticleForce
34     CloudType& owner,
35     const fvMesh& mesh,
36     const dictionary& dict,
37     const word& forceType,
38     const bool readCoeffs
41     owner_(owner),
42     mesh_(mesh),
43     coeffs_(readCoeffs ? dict : dictionary::null)
45     if (readCoeffs && (coeffs_.dictName() != forceType))
46     {
47         FatalIOErrorIn
48         (
49             "Foam::ParticleForce<CloudType>::ParticleForce"
50             "("
51                 "CloudType&, "
52                 "const fvMesh&, "
53                 "const dictionary&, "
54                 "const word&, "
55                 "const bool"
56             ")",
57             dict
58         )   << "Force " << forceType << " must be specified as a dictionary"
59             << exit(FatalIOError);
60     }
64 template<class CloudType>
65 Foam::ParticleForce<CloudType>::ParticleForce(const ParticleForce& pf)
67     owner_(pf.owner_),
68     mesh_(pf.mesh_),
69     coeffs_(pf.coeffs_)
73 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
75 template<class CloudType>
76 Foam::ParticleForce<CloudType>::~ParticleForce()
80 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
82 template<class CloudType>
83 void Foam::ParticleForce<CloudType>::cacheFields(const bool store)
87 template<class CloudType>
88 Foam::forceSuSp Foam::ParticleForce<CloudType>::calcCoupled
90     const typename CloudType::parcelType&,
91     const scalar dt,
92     const scalar mass,
93     const scalar Re,
94     const scalar muc
95 ) const
97     forceSuSp value;
98     value.Su() = vector::zero;
99     value.Sp() = 0.0;
101     return value;
105 template<class CloudType>
106 Foam::forceSuSp Foam::ParticleForce<CloudType>::calcNonCoupled
108     const typename CloudType::parcelType&,
109     const scalar dt,
110     const scalar mass,
111     const scalar Re,
112     const scalar muc
113 ) const
115     forceSuSp value;
116     value.Su() = vector::zero;
117     value.Sp() = 0.0;
119     return value;
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 #include "ParticleForceNew.C"
127 // ************************************************************************* //