ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/integrators/LangevinHullForceManager.cpp
(Generate patch)

Comparing branches/development/src/integrators/LangevinHullForceManager.cpp (file contents):
Revision 1767 by gezelter, Fri Jul 6 22:01:58 2012 UTC vs.
Revision 1856 by gezelter, Tue Apr 2 21:30:34 2013 UTC

# Line 35 | Line 35
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   */
# Line 131 | Line 131 | namespace OpenMD {
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_;
# Line 188 | Line 200 | namespace OpenMD {
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        
# Line 207 | Line 223 | namespace OpenMD {
223      
224      Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
225      currSnapshot->setVolume(surfaceMesh_->getVolume());    
226 +    currSnapshot->setHullVolume(surfaceMesh_->getVolume());
227      ForceManager::postCalculation();  
228    }
229    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines