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 |
|
|
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 |
> |
const RealType convertConstant = 6.023; //convert poise.angstrom to amu/fs |
87 |
> |
Xi *= convertConstant; |
88 |
> |
XiCopy = Xi; |
89 |
> |
|
90 |
> |
invertMatrix(XiCopy, D); |
91 |
> |
RealType kt = OOPSEConstant::kB * temperature; |
92 |
> |
D *= kt; |
93 |
> |
Xi *= OOPSEConstant::kb * temperature; |
94 |
> |
|
95 |
> |
HydroProp* hprop = new HydroProp(V3Zero, Xi, D); |
96 |
> |
|
97 |
> |
return hprop; |
98 |
|
} |
99 |
|
|
100 |
|
} |