moleculeCloud.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef moleculeCloud_H
00038 #define moleculeCloud_H
00039
00040 #include "Cloud.H"
00041 #include "molecule.H"
00042 #include "IOdictionary.H"
00043 #include "potential.H"
00044 #include "interactionLists.H"
00045 #include "labelVector.H"
00046 #include "Random.H"
00047 #include "fileName.H"
00048
00049
00050
00051 namespace Foam
00052 {
00053
00054
00055
00056
00057
00058 class moleculeCloud
00059 :
00060 public Cloud<molecule>
00061 {
00062
00063 private:
00064
00065
00066
00067 const polyMesh& mesh_;
00068
00069 const potential& pot_;
00070
00071 List<DynamicList<molecule*> > cellOccupancy_;
00072
00073 interactionLists il_;
00074
00075 List<molecule::constantProperties> constPropList_;
00076
00077 Random rndGen_;
00078
00079
00080
00081
00082 void buildConstProps();
00083
00084 void setSiteSizesAndPositions();
00085
00086
00087 void buildCellOccupancy();
00088
00089 void calculatePairForce();
00090
00091 inline void evaluatePair
00092 (
00093 molecule* molI,
00094 molecule* molJ
00095 );
00096
00097 inline void evaluatePair
00098 (
00099 molecule* molReal,
00100 referredMolecule* molRef
00101 );
00102
00103 inline bool evaluatePotentialLimit
00104 (
00105 molecule* molI,
00106 molecule* molJ
00107 ) const;
00108
00109 inline bool evaluatePotentialLimit
00110 (
00111 molecule* molReal,
00112 referredMolecule* molRef
00113 ) const;
00114
00115 void calculateTetherForce();
00116
00117 void calculateExternalForce();
00118
00119 void removeHighEnergyOverlaps();
00120
00121 void initialiseMolecules
00122 (
00123 const IOdictionary& mdInitialiseDict
00124 );
00125
00126 void createMolecule
00127 (
00128 const point& position,
00129 label cell,
00130 label id,
00131 bool tethered,
00132 scalar temperature,
00133 const vector& bulkVelocity
00134 );
00135
00136 label nSites() const;
00137
00138 inline vector equipartitionLinearVelocity
00139 (
00140 scalar temperature,
00141 scalar mass
00142 );
00143
00144 inline vector equipartitionAngularMomentum
00145 (
00146 scalar temperature,
00147 const molecule::constantProperties& cP
00148 );
00149
00150
00151 moleculeCloud(const moleculeCloud&);
00152
00153
00154 void operator=(const moleculeCloud&);
00155
00156
00157 public:
00158
00159
00160
00161 static scalar kb;
00162
00163 static scalar elementaryCharge;
00164
00165 static scalar vacuumPermittivity;
00166
00167
00168
00169
00170
00171 moleculeCloud
00172 (
00173 const polyMesh& mesh,
00174 const potential& pot
00175 );
00176
00177
00178 moleculeCloud
00179 (
00180 const polyMesh& mesh,
00181 const potential& pot,
00182 const IOdictionary& mdInitialiseDict
00183 );
00184
00185
00186
00187
00188
00189 void evolve();
00190
00191 void calculateForce();
00192
00193 void applyConstraintsAndThermostats
00194 (
00195 const scalar targetTemperature,
00196 const scalar measuredTemperature
00197 );
00198
00199
00200
00201
00202 inline const polyMesh& mesh() const;
00203
00204 inline const potential& pot() const;
00205
00206 inline const List<DynamicList<molecule*> >& cellOccupancy() const;
00207
00208 inline const interactionLists& il() const;
00209
00210 inline const List<molecule::constantProperties> constProps() const;
00211
00212 inline const molecule::constantProperties&
00213 constProps(label id) const;
00214
00215 inline Random& rndGen();
00216
00217
00218
00219
00220
00221 void writeFields() const;
00222
00223
00224 void writeXYZ(const fileName& fName) const;
00225 };
00226
00227
00228
00229
00230 }
00231
00232
00233
00234 #include "moleculeCloudI.H"
00235
00236
00237
00238 #endif
00239
00240
Copyright © 2000-2009 OpenCFD Ltd