6 |
|
* redistribute this software in source and binary code form, provided |
7 |
|
* that the following conditions are met: |
8 |
|
* |
9 |
< |
* 1. Acknowledgement of the program authors must be made in any |
10 |
< |
* publication of scientific results based in part on use of the |
11 |
< |
* program. An acceptable form of acknowledgement is citation of |
12 |
< |
* the article in which the program was described (Matthew |
13 |
< |
* A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher |
14 |
< |
* J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented |
15 |
< |
* Parallel Simulation Engine for Molecular Dynamics," |
16 |
< |
* J. Comput. Chem. 26, pp. 252-271 (2005)) |
17 |
< |
* |
18 |
< |
* 2. Redistributions of source code must retain the above copyright |
9 |
> |
* 1. Redistributions of source code must retain the above copyright |
10 |
|
* notice, this list of conditions and the following disclaimer. |
11 |
|
* |
12 |
< |
* 3. Redistributions in binary form must reproduce the above copyright |
12 |
> |
* 2. Redistributions in binary form must reproduce the above copyright |
13 |
|
* notice, this list of conditions and the following disclaimer in the |
14 |
|
* documentation and/or other materials provided with the |
15 |
|
* distribution. |
28 |
|
* arising out of the use of or inability to use software, even if the |
29 |
|
* University of Notre Dame has been advised of the possibility of |
30 |
|
* such damages. |
31 |
+ |
* |
32 |
+ |
* SUPPORT OPEN SCIENCE! If you use OpenMD or its source code in your |
33 |
+ |
* research, please cite the appropriate papers when you publish your |
34 |
+ |
* work. Good starting points are: |
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). |
39 |
+ |
* [4] Vardeman & Gezelter, in progress (2009). |
40 |
|
*/ |
41 |
|
#include "applications/hydrodynamics/HydrodynamicsModel.hpp" |
42 |
|
#include "hydrodynamics/Shape.hpp" |
44 |
|
#include "hydrodynamics/Ellipsoid.hpp" |
45 |
|
#include "applications/hydrodynamics/CompositeShape.hpp" |
46 |
|
|
47 |
< |
namespace oopse { |
47 |
> |
namespace OpenMD { |
48 |
|
|
49 |
|
bool HydrodynamicsModel::calcHydroProps(Shape* shape, RealType viscosity, RealType temperature) { |
50 |
|
return false; |
51 |
|
} |
52 |
|
|
53 |
|
void HydrodynamicsModel::writeHydroProps(std::ostream& os) { |
54 |
+ |
|
55 |
+ |
Vector3d center; |
56 |
+ |
Mat6x6d Xi, D; |
57 |
|
|
55 |
– |
|
58 |
|
os << sd_->getType() << "\t"; |
59 |
|
|
60 |
|
//center of resistance |
61 |
< |
os << cr_.center[0] << "\t" << cr_.center[1] << "\t" << cr_.center[2] << "\t"; |
61 |
> |
|
62 |
> |
center = cr_->getCOR(); |
63 |
> |
|
64 |
> |
os << center[0] << "\t" << center[1] << "\t" << center[2] << "\t"; |
65 |
|
|
66 |
|
//resistance tensor at center of resistance |
67 |
|
//translation |
68 |
< |
os << cr_.Xi(0, 0) << "\t" << cr_.Xi(0, 1) << "\t" << cr_.Xi(0, 2) << "\t" |
69 |
< |
<< cr_.Xi(1, 0) << "\t" << cr_.Xi(1, 1) << "\t" << cr_.Xi(1, 2) << "\t" |
70 |
< |
<< cr_.Xi(2, 0) << "\t" << cr_.Xi(2, 1) << "\t" << cr_.Xi(2, 2) << "\t"; |
68 |
> |
|
69 |
> |
Xi = cr_->getXi(); |
70 |
> |
|
71 |
> |
os << Xi(0, 0) << "\t" << Xi(0, 1) << "\t" << Xi(0, 2) << "\t" |
72 |
> |
<< Xi(1, 0) << "\t" << Xi(1, 1) << "\t" << Xi(1, 2) << "\t" |
73 |
> |
<< Xi(2, 0) << "\t" << Xi(2, 1) << "\t" << Xi(2, 2) << "\t"; |
74 |
|
|
75 |
|
//rotation-translation |
76 |
< |
os << cr_.Xi(0, 3) << "\t" << cr_.Xi(0, 4) << "\t" << cr_.Xi(0, 5) << "\t" |
77 |
< |
<< cr_.Xi(1, 3) << "\t" << cr_.Xi(1, 4) << "\t" << cr_.Xi(1, 5) << "\t" |
78 |
< |
<< cr_.Xi(2, 3) << "\t" << cr_.Xi(2, 4) << "\t" << cr_.Xi(2, 5) << "\t"; |
76 |
> |
os << Xi(0, 3) << "\t" << Xi(0, 4) << "\t" << Xi(0, 5) << "\t" |
77 |
> |
<< Xi(1, 3) << "\t" << Xi(1, 4) << "\t" << Xi(1, 5) << "\t" |
78 |
> |
<< Xi(2, 3) << "\t" << Xi(2, 4) << "\t" << Xi(2, 5) << "\t"; |
79 |
|
|
80 |
|
//translation-rotation |
81 |
< |
os << cr_.Xi(3, 0) << "\t" << cr_.Xi(3, 1) << "\t" << cr_.Xi(3, 2) << "\t" |
82 |
< |
<< cr_.Xi(4, 0) << "\t" << cr_.Xi(4, 1) << "\t" << cr_.Xi(4, 2) << "\t" |
83 |
< |
<< cr_.Xi(5, 0) << "\t" << cr_.Xi(5, 1) << "\t" << cr_.Xi(5, 2) << "\t"; |
81 |
> |
os << Xi(3, 0) << "\t" << Xi(3, 1) << "\t" << Xi(3, 2) << "\t" |
82 |
> |
<< Xi(4, 0) << "\t" << Xi(4, 1) << "\t" << Xi(4, 2) << "\t" |
83 |
> |
<< Xi(5, 0) << "\t" << Xi(5, 1) << "\t" << Xi(5, 2) << "\t"; |
84 |
|
|
85 |
|
//rotation |
86 |
< |
os << cr_.Xi(3, 3) << "\t" << cr_.Xi(3, 4) << "\t" << cr_.Xi(3, 5) << "\t" |
87 |
< |
<< cr_.Xi(4, 3) << "\t" << cr_.Xi(4, 4) << "\t" << cr_.Xi(4, 5) << "\t" |
88 |
< |
<< cr_.Xi(5, 3) << "\t" << cr_.Xi(5, 4) << "\t" << cr_.Xi(5, 5) << "\t"; |
86 |
> |
os << Xi(3, 3) << "\t" << Xi(3, 4) << "\t" << Xi(3, 5) << "\t" |
87 |
> |
<< Xi(4, 3) << "\t" << Xi(4, 4) << "\t" << Xi(4, 5) << "\t" |
88 |
> |
<< Xi(5, 3) << "\t" << Xi(5, 4) << "\t" << Xi(5, 5) << "\t"; |
89 |
|
|
90 |
|
|
91 |
|
//diffusion tensor at center of resistance |
92 |
|
//translation |
93 |
< |
os << cr_.D(0, 0) << "\t" << cr_.D(0, 1) << "\t" << cr_.D(0, 2) << "\t" |
94 |
< |
<< cr_.D(1, 0) << "\t" << cr_.D(1, 1) << "\t" << cr_.D(1, 2) << "\t" |
95 |
< |
<< cr_.D(2, 0) << "\t" << cr_.D(2, 1) << "\t" << cr_.D(2, 2) << "\t"; |
93 |
> |
|
94 |
> |
D = cr_->getD(); |
95 |
> |
|
96 |
> |
os << D(0, 0) << "\t" << D(0, 1) << "\t" << D(0, 2) << "\t" |
97 |
> |
<< D(1, 0) << "\t" << D(1, 1) << "\t" << D(1, 2) << "\t" |
98 |
> |
<< D(2, 0) << "\t" << D(2, 1) << "\t" << D(2, 2) << "\t"; |
99 |
|
|
100 |
|
//rotation-translation |
101 |
< |
os << cr_.D(0, 3) << "\t" << cr_.D(0, 4) << "\t" << cr_.D(0, 5) << "\t" |
102 |
< |
<< cr_.D(1, 3) << "\t" << cr_.D(1, 4) << "\t" << cr_.D(1, 5) << "\t" |
103 |
< |
<< cr_.D(2, 3) << "\t" << cr_.D(2, 4) << "\t" << cr_.D(2, 5) << "\t"; |
101 |
> |
os << D(0, 3) << "\t" << D(0, 4) << "\t" << D(0, 5) << "\t" |
102 |
> |
<< D(1, 3) << "\t" << D(1, 4) << "\t" << D(1, 5) << "\t" |
103 |
> |
<< D(2, 3) << "\t" << D(2, 4) << "\t" << D(2, 5) << "\t"; |
104 |
|
|
105 |
|
//translation-rotation |
106 |
< |
os << cr_.D(3, 0) << "\t" << cr_.D(3, 1) << "\t" << cr_.D(3, 2) << "\t" |
107 |
< |
<< cr_.D(4, 0) << "\t" << cr_.D(4, 1) << "\t" << cr_.D(4, 2) << "\t" |
108 |
< |
<< cr_.D(5, 0) << "\t" << cr_.D(5, 1) << "\t" << cr_.D(5, 2) << "\t"; |
106 |
> |
os << D(3, 0) << "\t" << D(3, 1) << "\t" << D(3, 2) << "\t" |
107 |
> |
<< D(4, 0) << "\t" << D(4, 1) << "\t" << D(4, 2) << "\t" |
108 |
> |
<< D(5, 0) << "\t" << D(5, 1) << "\t" << D(5, 2) << "\t"; |
109 |
|
|
110 |
|
//rotation |
111 |
< |
os << cr_.D(3, 3) << "\t" << cr_.D(3, 4) << "\t" << cr_.D(3, 5) << "\t" |
112 |
< |
<< cr_.D(4, 3) << "\t" << cr_.D(4, 4) << "\t" << cr_.D(4, 5) << "\t" |
113 |
< |
<< cr_.D(5, 3) << "\t" << cr_.D(5, 4) << "\t" << cr_.D(5, 5) << "\t"; |
111 |
> |
os << D(3, 3) << "\t" << D(3, 4) << "\t" << D(3, 5) << "\t" |
112 |
> |
<< D(4, 3) << "\t" << D(4, 4) << "\t" << D(4, 5) << "\t" |
113 |
> |
<< D(5, 3) << "\t" << D(5, 4) << "\t" << D(5, 5) << "\t"; |
114 |
|
|
115 |
|
//--------------------------------------------------------------------- |
116 |
|
|
117 |
|
//center of diffusion |
118 |
< |
os << cd_.center[0] << "\t" << cd_.center[1] << "\t" << cd_.center[2] << "\t"; |
118 |
> |
|
119 |
> |
center = cd_->getCOR(); |
120 |
> |
|
121 |
> |
os << center[0] << "\t" << center[1] << "\t" << center[2] << "\t"; |
122 |
|
|
123 |
|
//resistance tensor at center of diffusion |
124 |
|
//translation |
125 |
< |
os << cd_.Xi(0, 0) << "\t" << cd_.Xi(0, 1) << "\t" << cd_.Xi(0, 2) << "\t" |
126 |
< |
<< cd_.Xi(1, 0) << "\t" << cd_.Xi(1, 1) << "\t" << cd_.Xi(1, 2) << "\t" |
127 |
< |
<< cd_.Xi(2, 0) << "\t" << cd_.Xi(2, 1) << "\t" << cd_.Xi(2, 2) << "\t"; |
125 |
> |
|
126 |
> |
Xi = cd_->getXi(); |
127 |
> |
|
128 |
> |
os << Xi(0, 0) << "\t" << Xi(0, 1) << "\t" << Xi(0, 2) << "\t" |
129 |
> |
<< Xi(1, 0) << "\t" << Xi(1, 1) << "\t" << Xi(1, 2) << "\t" |
130 |
> |
<< Xi(2, 0) << "\t" << Xi(2, 1) << "\t" << Xi(2, 2) << "\t"; |
131 |
|
|
132 |
|
//rotation-translation |
133 |
< |
os << cd_.Xi(0, 3) << "\t" << cd_.Xi(0, 4) << "\t" << cd_.Xi(0, 5) << "\t" |
134 |
< |
<< cd_.Xi(1, 3) << "\t" << cd_.Xi(1, 4) << "\t" << cd_.Xi(1, 5) << "\t" |
135 |
< |
<< cd_.Xi(2, 3) << "\t" << cd_.Xi(2, 4) << "\t" << cd_.Xi(2, 5) << "\t"; |
133 |
> |
os << Xi(0, 3) << "\t" << Xi(0, 4) << "\t" << Xi(0, 5) << "\t" |
134 |
> |
<< Xi(1, 3) << "\t" << Xi(1, 4) << "\t" << Xi(1, 5) << "\t" |
135 |
> |
<< Xi(2, 3) << "\t" << Xi(2, 4) << "\t" << Xi(2, 5) << "\t"; |
136 |
|
|
137 |
|
//translation-rotation |
138 |
< |
os << cd_.Xi(3, 0) << "\t" << cd_.Xi(3, 1) << "\t" << cd_.Xi(3, 2) << "\t" |
139 |
< |
<< cd_.Xi(4, 0) << "\t" << cd_.Xi(4, 1) << "\t" << cd_.Xi(4, 2) << "\t" |
140 |
< |
<< cd_.Xi(5, 0) << "\t" << cd_.Xi(5, 1) << "\t" << cd_.Xi(5, 2) << "\t"; |
138 |
> |
os << Xi(3, 0) << "\t" << Xi(3, 1) << "\t" << Xi(3, 2) << "\t" |
139 |
> |
<< Xi(4, 0) << "\t" << Xi(4, 1) << "\t" << Xi(4, 2) << "\t" |
140 |
> |
<< Xi(5, 0) << "\t" << Xi(5, 1) << "\t" << Xi(5, 2) << "\t"; |
141 |
|
|
142 |
|
//rotation |
143 |
< |
os << cd_.Xi(3, 3) << "\t" << cd_.Xi(3, 4) << "\t" << cd_.Xi(3, 5) << "\t" |
144 |
< |
<< cd_.Xi(4, 3) << "\t" << cd_.Xi(4, 4) << "\t" << cd_.Xi(4, 5) << "\t" |
145 |
< |
<< cd_.Xi(5, 3) << "\t" << cd_.Xi(5, 4) << "\t" << cd_.Xi(5, 5) << "\t"; |
143 |
> |
os << Xi(3, 3) << "\t" << Xi(3, 4) << "\t" << Xi(3, 5) << "\t" |
144 |
> |
<< Xi(4, 3) << "\t" << Xi(4, 4) << "\t" << Xi(4, 5) << "\t" |
145 |
> |
<< Xi(5, 3) << "\t" << Xi(5, 4) << "\t" << Xi(5, 5) << "\t"; |
146 |
|
|
147 |
|
|
148 |
|
//diffusion tensor at center of diffusion |
149 |
|
//translation |
150 |
< |
os << cd_.D(0, 0) << "\t" << cd_.D(0, 1) << "\t" << cd_.D(0, 2) << "\t" |
151 |
< |
<< cd_.D(1, 0) << "\t" << cd_.D(1, 1) << "\t" << cd_.D(1, 2) << "\t" |
152 |
< |
<< cd_.D(2, 0) << "\t" << cd_.D(2, 1) << "\t" << cd_.D(2, 2) << "\t"; |
150 |
> |
|
151 |
> |
D = cd_->getD(); |
152 |
> |
|
153 |
> |
os << D(0, 0) << "\t" << D(0, 1) << "\t" << D(0, 2) << "\t" |
154 |
> |
<< D(1, 0) << "\t" << D(1, 1) << "\t" << D(1, 2) << "\t" |
155 |
> |
<< D(2, 0) << "\t" << D(2, 1) << "\t" << D(2, 2) << "\t"; |
156 |
|
|
157 |
|
//rotation-translation |
158 |
< |
os << cd_.D(0, 3) << "\t" << cd_.D(0, 4) << "\t" << cd_.D(0, 5) << "\t" |
159 |
< |
<< cd_.D(1, 3) << "\t" << cd_.D(1, 4) << "\t" << cd_.D(1, 5) << "\t" |
160 |
< |
<< cd_.D(2, 3) << "\t" << cd_.D(2, 4) << "\t" << cd_.D(2, 5) << "\t"; |
158 |
> |
os << D(0, 3) << "\t" << D(0, 4) << "\t" << D(0, 5) << "\t" |
159 |
> |
<< D(1, 3) << "\t" << D(1, 4) << "\t" << D(1, 5) << "\t" |
160 |
> |
<< D(2, 3) << "\t" << D(2, 4) << "\t" << D(2, 5) << "\t"; |
161 |
|
|
162 |
|
//translation-rotation |
163 |
< |
os << cd_.D(3, 0) << "\t" << cd_.D(3, 1) << "\t" << cd_.D(3, 2) << "\t" |
164 |
< |
<< cd_.D(4, 0) << "\t" << cd_.D(4, 1) << "\t" << cd_.D(4, 2) << "\t" |
165 |
< |
<< cd_.D(5, 0) << "\t" << cd_.D(5, 1) << "\t" << cd_.D(5, 2) << "\t"; |
163 |
> |
os << D(3, 0) << "\t" << D(3, 1) << "\t" << D(3, 2) << "\t" |
164 |
> |
<< D(4, 0) << "\t" << D(4, 1) << "\t" << D(4, 2) << "\t" |
165 |
> |
<< D(5, 0) << "\t" << D(5, 1) << "\t" << D(5, 2) << "\t"; |
166 |
|
|
167 |
|
//rotation |
168 |
< |
os << cd_.D(3, 3) << "\t" << cd_.D(3, 4) << "\t" << cd_.D(3, 5) << "\t" |
169 |
< |
<< cd_.D(4, 3) << "\t" << cd_.D(4, 4) << "\t" << cd_.D(4, 5) << "\t" |
170 |
< |
<< cd_.D(5, 3) << "\t" << cd_.D(5, 4) << "\t" << cd_.D(5, 5) << "\n"; |
168 |
> |
os << D(3, 3) << "\t" << D(3, 4) << "\t" << D(3, 5) << "\t" |
169 |
> |
<< D(4, 3) << "\t" << D(4, 4) << "\t" << D(4, 5) << "\t" |
170 |
> |
<< D(5, 3) << "\t" << D(5, 4) << "\t" << D(5, 5) << "\n"; |
171 |
|
|
172 |
|
} |
173 |
|
|