Loading...
Searching...
No Matches
CoulombForce.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) 2023 OpenCFD Ltd.
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::CoulombForce
28
29Group
30 grpLagrangianIntermediateForceSubModels
31
32Description
33 Particle electric force model involving the Coulomb force calculation.
34
35 \f[
36 \vec{F}_\mathrm{E} = q \, \vec{E}
37 \f]
38
39 where
40
41 \vartable
42 \vec{F}_\mathrm{E} | Coulomb force [kg m s^{-2}]
43 q | Electric charge of particle [A s]
44 \vec{E} | Electric field [kg m^2 A^{-1} s^{-3} m^{-1}]
45 \endvartable
46
47 References:
48 \verbatim
49 Governing equations (tag:YSSD):
50 Ye, Q., Steigleder, T., Scheibe, A., & Domnick, J. (2002).
51 Numerical simulation of the electrostatic powder coating process
52 with a corona spray gun. Journal of Electrostatics, 54(2), 189-205.
53 DOI:10.1016/S0304-3886(01)00181-4
54 \endverbatim
55
56Usage
57 Minimal example by using \c constant/cloudProperties:
58 \verbatim
59 subModels
60 {
61 solution
62 {
63 interpolationSchemes
64 {
65 <Ename> <interpolationScheme>;
66 }
67 }
68
69 particleForces
70 {
71 Coulomb
72 {
73 q <Function1<scalar>>;
74 E <word>;
75 }
76 }
77 }
78 \endverbatim
79
80 where the entries mean:
81 \table
82 Property | Description | Type | Reqd | Deflt
83 type | Type name: Coulomb | word | yes | -
84 q | Electric charge of particles | <Function1<scalar> | yes | -
85 E | Name of electric field | word | no | E
86 \endtable
87
88Note
89 - Particle electric charge can be input as a function of particle diameter:
90 \verbatim
91 particleForces
92 {
93 Coulomb
94 {
95 q table
96 (
97 // d [m] q [C = A s]
98 (1e-06 -5.0e-11)
99 (1e-05 -1.0e-10)
100 );
101 E electricPotential:E;
102 }
103 }
104 \endverbatim
105
106SourceFiles
107 CoulombForce.C
108
109\*---------------------------------------------------------------------------*/
110
111#ifndef Foam_CoulombForce_H
112#define Foam_CoulombForce_H
113
114#include "ParticleForce.H"
115#include "Function1.H"
116#include "interpolation.H"
117
118// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120namespace Foam
121{
122
123// Forward Declarations
124class fvMesh;
125
126/*---------------------------------------------------------------------------*\
127 Class CoulombForce Declaration
128\*---------------------------------------------------------------------------*/
129
130template<class CloudType>
131class CoulombForce
132:
133 public ParticleForce<CloudType>
134{
135 // Private Data
136
137 //- Particle electric charge
138 autoPtr<Function1<scalar>> qPtr_;
139
140 //- Name of electric field
141 const word Ename_;
142
143 //- Electric-field interpolator
144 mutable std::unique_ptr<interpolation<vector>> EInterpPtr_;
145
146
147 // Private Member Functions
148
149 //- Return requested volVectorField from the object registry
150 //- or read+register the field to the object registry
151 volVectorField& getOrReadField(const word& fieldName) const;
152
153
154public:
155
156 //- Runtime type information
157 TypeName("Coulomb");
158
159
160 // Constructors
161
162 //- Construct from mesh
164 (
166 const fvMesh& mesh,
167 const dictionary& dict
168 );
169
170 //- Copy construct
171 CoulombForce(const CoulombForce& gf);
172
173 //- No copy assignment
174 void operator=(const CoulombForce<CloudType>&) = delete;
175
176 //- Construct and return a clone
178 {
180 (
181 new CoulombForce<CloudType>(*this)
182 );
183 }
184
185
186 //- Destructor
187 virtual ~CoulombForce() = default;
188
189
190 // Member Functions
191
192 // Evaluation
193
194 //- Cache fields
195 virtual void cacheFields(const bool store);
196
197 //- Calculate the non-coupled force
199 (
200 const typename CloudType::parcelType& p,
201 const typename CloudType::parcelType::trackingData& td,
202 const scalar dt,
203 const scalar mass,
204 const scalar Re,
205 const scalar muc
206 ) const;
207};
208
209
210// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211
212} // End namespace Foam
213
214// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215
216#ifdef NoRepository
217 #include "CoulombForce.C"
218#endif
219
220// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
222#endif
223
224// ************************************************************************* //
Particle electric force model involving the Coulomb force calculation.
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.
void operator=(const CoulombForce< CloudType > &)=delete
No copy assignment.
TypeName("Coulomb")
Runtime type information.
CoulombForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict)
Construct from mesh.
virtual ~CoulombForce()=default
Destructor.
Abstract base class for particle forces.
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
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
GeometricField< vector, fvPatchField, volMesh > volVectorField
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