ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/NPTim.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/NPTim.cpp (file contents):
Revision 762 by mmeineke, Thu Sep 4 21:48:35 2003 UTC vs.
Revision 763 by tim, Mon Sep 15 16:52:02 2003 UTC

# Line 29 | Line 29 | template<typename T> NPTim<T>::NPTim ( SimInfo *theInf
29   {
30    chi = 0.0;
31    eta = 0.0;
32 +  integralOfChidt = 0.0;
33    have_tau_thermostat = 0;
34    have_tau_barostat = 0;
35    have_target_temp = 0;
# Line 281 | Line 282 | template<typename T> int NPTim<T>::readyCheck() {
282  
283    return 1;
284   }
285 +
286 + template<typename T> double NPTim<T>::getConservedQuantity(void){
287 +
288 +  double conservedQuantity;
289 +  double tb2;
290 +  double eta2;  
291 +
292 +
293 +  //HNVE
294 +  conservedQuantity = tStats->getTotalE();
295 +
296 +  //HNVT
297 +  conservedQuantity += (info->getNDF() * kB * targetTemp *
298 +                        (integralOfChidt + tauThermostat * tauThermostat * chi * chi /2))/ eConvert ;
299 +
300 +  //HNPT
301 +  tb2 = tauBarostat *tauBarostat;
302 +  eta2 = eta * eta;
303 +  
304 +  conservedQuantity += (targetPressure * tStats->getVolume() / p_convert +
305 +                        3*NkBT/2 * tb2 * eta2) / eConvert;
306 +  
307 +  return conservedQuantity;
308 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines