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/>.
25 Foam::ParamagneticForce
28 Calculates particle paramagnetic (magnetic field) force
34 \*---------------------------------------------------------------------------*/
36 #ifndef ParamagneticForce_H
37 #define ParamagneticForce_H
39 #include "ParticleForce.H"
40 #include "interpolation.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class ParamagneticForce Declaration
51 \*---------------------------------------------------------------------------*/
53 template<class CloudType>
54 class ParamagneticForce
56 public ParticleForce<CloudType>
60 //- Name of paramagnetic field strength field - default = "HdotGradH"
61 const word HdotGradHName_;
63 //- HdotGradH interpolator
64 const interpolation<vector>* HdotGradHInterpPtr_;
66 //- Magnetic susceptibility of particle
67 const scalar magneticSusceptibility_;
72 //- Runtime type information
73 TypeName("paramagnetic");
78 //- Construct from mesh
83 const dictionary& dict
87 ParamagneticForce(const ParamagneticForce& gf);
89 //- Construct and return a clone
90 virtual autoPtr<ParticleForce<CloudType> > clone() const
92 return autoPtr<ParticleForce<CloudType> >
94 new ParamagneticForce<CloudType>(*this)
100 virtual ~ParamagneticForce();
107 //- Return the name of paramagnetic field strength field
108 const word& HdotGradHName() const;
110 //- Return the magnetic susceptibility of particle
111 scalar magneticSusceptibility() const;
117 virtual void cacheFields(const bool store);
119 //- Calculate the non-coupled force
120 virtual forceSuSp calcNonCoupled
122 const typename CloudType::parcelType& p,
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 #include "ParamagneticForceI.H"
140 #include "ParamagneticForce.C"
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 // ************************************************************************* //