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 956 by gezelter, Tue May 16 02:06:37 2006 UTC vs.
Revision 1322 by gezelter, Mon Nov 24 22:01:56 2008 UTC

# Line 45 | Line 45 | namespace oopse {
45  
46   namespace oopse {
47    
48 <  Sphere::Sphere(Vector3d origin, double radius) : origin_(origin), radius_(radius){
48 >  Sphere::Sphere(Vector3d origin, RealType radius) : origin_(origin), radius_(radius){
49      
50    }
51    
# Line 69 | Line 69 | namespace oopse {
69      return boundary;
70    }
71    
72 <  HydroProps Sphere::getHydroProps(double viscosity, double temperature) {
73 <    HydroProps props;
74 <    props.center =V3Zero;
75 <    double Xitt  = 6.0 * NumericConstant::PI * viscosity * radius_;
76 <    double Xirr = 8.0 * NumericConstant::PI * viscosity * radius_ * radius_ * radius_;
77 <    props.Xi(0, 0) = Xitt;
78 <    props.Xi(1, 1) = Xitt;
79 <    props.Xi(2, 2) = Xitt;
80 <    props.Xi(3, 3) = Xirr;
81 <    props.Xi(4, 4) = Xirr;
82 <    props.Xi(5, 5) = Xirr;
72 >  HydroProp* Sphere::getHydroProp(RealType viscosity, RealType temperature) {
73      
74 <    const double convertConstant = 6.023; //convert poise.angstrom to amu/fs
75 <    props.Xi *= convertConstant;
76 <    Mat6x6d XiCopy = props.Xi;
77 <    invertMatrix(XiCopy, props.D);
78 <    double kt = OOPSEConstant::kB * temperature;
79 <    props.D *= kt;
80 <    props.Xi *= OOPSEConstant::kb * temperature;
74 >    RealType Xitt  = 6.0 * NumericConstant::PI * viscosity * radius_;
75 >    RealType Xirr = 8.0 * NumericConstant::PI * viscosity * radius_ * radius_ * radius_;
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 <    return props;
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 hprop;
96    }
97    
98   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines