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/>.
24 \*---------------------------------------------------------------------------*/
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30 template<class CloudType>
31 Foam::SRFForce<CloudType>::SRFForce
35 const dictionary& dict
38 ParticleForce<CloudType>(owner, mesh, dict, typeName, false),
43 template<class CloudType>
44 Foam::SRFForce<CloudType>::SRFForce
49 ParticleForce<CloudType>(srff),
54 // * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
56 template<class CloudType>
57 Foam::SRFForce<CloudType>::~SRFForce()
61 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
63 template<class CloudType>
64 void Foam::SRFForce<CloudType>::cacheFields(const bool store)
68 const typename SRF::SRFModel& model = this->mesh().template
69 lookupObject<SRF::SRFModel>("SRFProperties");
79 template<class CloudType>
80 Foam::forceSuSp Foam::SRFForce<CloudType>::calcNonCoupled
82 const typename CloudType::parcelType& p,
89 forceSuSp value(vector::zero, 0.0);
91 const typename SRF::SRFModel& srf = *srfPtr_;
93 const vector& omega = srf.omega().value();
95 const vector& r = p.position();
97 // Coriolis and centrifugal acceleration terms
98 value.Su() = mass*(2.0*(p.U() ^ omega) + (omega ^ (r ^ omega)));
104 // ************************************************************************* //