| 35 |
|
* |
| 36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
| 37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
| 38 |
< |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
| 38 |
> |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
| 39 |
|
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
| 40 |
|
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
| 41 |
|
*/ |
| 131 |
|
viscosity_ = simParams->getViscosity(); |
| 132 |
|
} |
| 133 |
|
|
| 134 |
+ |
doThermalCoupling_ = true; |
| 135 |
+ |
if ( fabs(viscosity_) < 1e-6 ) { |
| 136 |
+ |
sprintf(painCave.errMsg, |
| 137 |
+ |
"LangevinHullDynamics: The bath viscosity was set lower than\n" |
| 138 |
+ |
"\t1e-6 poise. OpenMD is turning off the thermal coupling to\n" |
| 139 |
+ |
"\tthe bath.\n"); |
| 140 |
+ |
painCave.isFatal = 0; |
| 141 |
+ |
painCave.severity = OPENMD_INFO; |
| 142 |
+ |
simError(); |
| 143 |
+ |
doThermalCoupling_ = false; |
| 144 |
+ |
} |
| 145 |
+ |
|
| 146 |
|
dt_ = simParams->getDt(); |
| 147 |
|
|
| 148 |
|
variance_ = 2.0 * PhysicalConstants::kb * targetTemp_ / dt_; |
| 200 |
|
Vector3d extPressure = -unitNormal * (targetPressure_ * thisArea) / |
| 201 |
|
PhysicalConstants::energyConvert; |
| 202 |
|
|
| 203 |
< |
Vector3d randomForce = S * randNums[thisFacet++]; |
| 204 |
< |
Vector3d dragForce = -hydroTensor * facetVel; |
| 203 |
> |
Vector3d randomForce(V3Zero); |
| 204 |
> |
Vector3d dragForce(V3Zero); |
| 205 |
> |
if (doThermalCoupling_) { |
| 206 |
> |
randomForce = S * randNums[thisFacet++]; |
| 207 |
> |
dragForce = -hydroTensor * facetVel; |
| 208 |
> |
} |
| 209 |
|
|
| 210 |
|
Vector3d langevinForce = (extPressure + randomForce + dragForce); |
| 211 |
|
|
| 223 |
|
|
| 224 |
|
Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); |
| 225 |
|
currSnapshot->setVolume(surfaceMesh_->getVolume()); |
| 226 |
+ |
currSnapshot->setHullVolume(surfaceMesh_->getVolume()); |
| 227 |
|
ForceManager::postCalculation(); |
| 228 |
|
} |
| 229 |
|
|