Loading...
Searching...
No Matches
ParamagneticForce.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::ParamagneticForce
28
29Group
30 grpLagrangianIntermediateForceSubModels
31
32Description
33 Calculates particle paramagnetic (magnetic field) force
34
35SourceFiles
36 ParamagneticForceI.H
37 ParamagneticForce.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef Foam_ParamagneticForce_H
42#define Foam_ParamagneticForce_H
43
44#include "ParticleForce.H"
45#include "interpolation.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class ParamagneticForce Declaration
54\*---------------------------------------------------------------------------*/
55
56template<class CloudType>
58:
59 public ParticleForce<CloudType>
60{
61 // Private Data
62
63 //- Name of paramagnetic field strength field - default = "HdotGradH"
64 const word HdotGradHName_;
65
66 //- HdotGradH interpolator
67 const interpolation<vector>* HdotGradHInterpPtr_;
68
69 //- Magnetic susceptibility of particle
70 const scalar magneticSusceptibility_;
71
72
73public:
74
75 //- Runtime type information
76 TypeName("paramagnetic");
77
78
79 // Constructors
80
81 //- Construct from mesh
83 (
85 const fvMesh& mesh,
86 const dictionary& dict
87 );
88
89 //- Construct copy
91
92 //- Construct and return a clone
94 {
96 (
98 );
99 }
100
101
102 //- Destructor
103 virtual ~ParamagneticForce();
104
105
106 // Member Functions
107
108 // Access
109
110 //- Return the name of paramagnetic field strength field
111 const word& HdotGradHName() const noexcept { return HdotGradHName_; }
112
113 //- Return the magnetic susceptibility of particle
114 scalar magneticSusceptibility() const noexcept
115 {
116 return magneticSusceptibility_;
117 }
118
119
120 // Evaluation
121
122 //- Cache fields
123 virtual void cacheFields(const bool store);
125 //- Calculate the non-coupled force
127 (
128 const typename CloudType::parcelType& p,
129 const typename CloudType::parcelType::trackingData& td,
130 const scalar dt,
131 const scalar mass,
132 const scalar Re,
133 const scalar muc
134 ) const;
135};
136
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140} // End namespace Foam
141
142// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144#ifdef NoRepository
145 #include "ParamagneticForce.C"
146#endif
147
148// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150#endif
151
152// ************************************************************************* //
virtual autoPtr< ParticleForce< CloudType > > clone() const
Construct and return a clone.
virtual forceSuSp calcNonCoupled(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const scalar dt, const scalar mass, const scalar Re, const scalar muc) const
Calculate the non-coupled force.
virtual void cacheFields(const bool store)
Cache fields.
const word & HdotGradHName() const noexcept
Return the name of paramagnetic field strength field.
TypeName("paramagnetic")
Runtime type information.
scalar magneticSusceptibility() const noexcept
Return the magnetic susceptibility of particle.
virtual ~ParamagneticForce()
Destructor.
ParamagneticForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict)
Construct from mesh.
const fvMesh & mesh() const noexcept
Return the mesh database.
const CloudType & owner() const noexcept
Return const access to the cloud owner.
ParticleForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict, const word &forceType, const bool readCoeffs)
Construct from mesh.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Helper container for force Su and Sp terms.
Definition forceSuSp.H:63
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Abstract base class for volume field interpolation.
A class for handling words, derived from Foam::string.
Definition word.H:66
volScalarField & p
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
Namespace for OpenFOAM.
DSMCCloud< dsmcParcel > CloudType
const direction noexcept
Definition scalarImpl.H:265
scalarField Re(const UList< complex > &cmplx)
Extract real component.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68