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

Comparing trunk/src/hydrodynamics/Sphere.cpp (file contents):
Revision 963 by tim, Wed May 17 21:51:42 2006 UTC vs.
Revision 1322 by gezelter, Mon Nov 24 22:01:56 2008 UTC

# Line 69 | Line 69 | namespace oopse {
69      return boundary;
70    }
71    
72 <  HydroProps Sphere::getHydroProps(RealType viscosity, RealType temperature) {
73 <    HydroProps props;
74 <    props.center =V3Zero;
72 >  HydroProp* Sphere::getHydroProp(RealType viscosity, RealType temperature) {
73 >    
74      RealType Xitt  = 6.0 * NumericConstant::PI * viscosity * radius_;
75      RealType Xirr = 8.0 * NumericConstant::PI * viscosity * radius_ * radius_ * radius_;
76 <    props.Xi(0, 0) = Xitt;
77 <    props.Xi(1, 1) = Xitt;
78 <    props.Xi(2, 2) = Xitt;
79 <    props.Xi(3, 3) = Xirr;
80 <    props.Xi(4, 4) = Xirr;
81 <    props.Xi(5, 5) = Xirr;
76 >
77 >    Mat6x6d Xi, XiCopy, D;
78 >
79 >    Xi(0, 0) = Xitt;
80 >    Xi(1, 1) = Xitt;
81 >    Xi(2, 2) = Xitt;
82 >    Xi(3, 3) = Xirr;
83 >    Xi(4, 4) = Xirr;
84 >    Xi(5, 5) = Xirr;
85      
86 <    const RealType convertConstant = 6.023; //convert poise.angstrom to amu/fs
87 <    props.Xi *= convertConstant;
88 <    Mat6x6d XiCopy = props.Xi;
89 <    invertMatrix(XiCopy, props.D);
90 <    RealType kt = OOPSEConstant::kB * temperature;
91 <    props.D *= kt;
92 <    props.Xi *= OOPSEConstant::kb * temperature;
86 >    Xi *= OOPSEConstant::viscoConvert;
87 >    XiCopy = Xi;
88 >
89 >    invertMatrix(XiCopy, D);
90 >    RealType kt = OOPSEConstant::kb * temperature; // in kcal mol^-1
91 >    D *= kt;  // now in angstroms^2 fs^-1  (at least for Trans-trans)
92 >
93 >    HydroProp* hprop = new HydroProp(V3Zero, Xi, D);
94      
95 <    return props;
95 >    return hprop;
96    }
97    
98   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines