1 |
tim |
891 |
/* |
2 |
|
|
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
3 |
|
|
* |
4 |
|
|
* The University of Notre Dame grants you ("Licensee") a |
5 |
|
|
* non-exclusive, royalty free, license to use, modify and |
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 |
19 |
|
|
* notice, this list of conditions and the following disclaimer. |
20 |
|
|
* |
21 |
|
|
* 3. Redistributions in binary form must reproduce the above copyright |
22 |
|
|
* notice, this list of conditions and the following disclaimer in the |
23 |
|
|
* documentation and/or other materials provided with the |
24 |
|
|
* distribution. |
25 |
|
|
* |
26 |
|
|
* This software is provided "AS IS," without a warranty of any |
27 |
|
|
* kind. All express or implied conditions, representations and |
28 |
|
|
* warranties, including any implied warranty of merchantability, |
29 |
|
|
* fitness for a particular purpose or non-infringement, are hereby |
30 |
|
|
* excluded. The University of Notre Dame and its licensors shall not |
31 |
|
|
* be liable for any damages suffered by licensee as a result of |
32 |
|
|
* using, modifying or distributing the software or its |
33 |
|
|
* derivatives. In no event will the University of Notre Dame or its |
34 |
|
|
* licensors be liable for any lost revenue, profit or data, or for |
35 |
|
|
* direct, indirect, special, consequential, incidental or punitive |
36 |
|
|
* damages, however caused and regardless of the theory of liability, |
37 |
|
|
* arising out of the use of or inability to use software, even if the |
38 |
|
|
* University of Notre Dame has been advised of the possibility of |
39 |
|
|
* such damages. |
40 |
|
|
*/ |
41 |
tim |
906 |
#include "applications/hydrodynamics/HydrodynamicsModel.hpp" |
42 |
gezelter |
972 |
#include "hydrodynamics/Shape.hpp" |
43 |
|
|
#include "hydrodynamics/Sphere.hpp" |
44 |
|
|
#include "hydrodynamics/Ellipsoid.hpp" |
45 |
tim |
906 |
#include "applications/hydrodynamics/CompositeShape.hpp" |
46 |
tim |
891 |
|
47 |
|
|
namespace oopse { |
48 |
gezelter |
972 |
|
49 |
|
|
bool HydrodynamicsModel::calcHydroProps(Shape* shape, RealType viscosity, RealType temperature) { |
50 |
tim |
906 |
return false; |
51 |
gezelter |
972 |
} |
52 |
|
|
|
53 |
|
|
void HydrodynamicsModel::writeHydroProps(std::ostream& os) { |
54 |
gezelter |
981 |
|
55 |
|
|
Vector3d center; |
56 |
|
|
Mat6x6d Xi, D; |
57 |
tim |
895 |
|
58 |
tim |
906 |
os << sd_->getType() << "\t"; |
59 |
tim |
895 |
|
60 |
tim |
906 |
//center of resistance |
61 |
gezelter |
981 |
|
62 |
|
|
center = cr_->getCOR(); |
63 |
|
|
|
64 |
|
|
os << center[0] << "\t" << center[1] << "\t" << center[2] << "\t"; |
65 |
gezelter |
972 |
|
66 |
tim |
906 |
//resistance tensor at center of resistance |
67 |
|
|
//translation |
68 |
gezelter |
981 |
|
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 |
gezelter |
972 |
|
75 |
tim |
906 |
//rotation-translation |
76 |
gezelter |
981 |
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 |
gezelter |
972 |
|
80 |
tim |
906 |
//translation-rotation |
81 |
gezelter |
981 |
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 |
gezelter |
972 |
|
85 |
tim |
906 |
//rotation |
86 |
gezelter |
981 |
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 |
gezelter |
972 |
|
90 |
|
|
|
91 |
tim |
906 |
//diffusion tensor at center of resistance |
92 |
|
|
//translation |
93 |
gezelter |
981 |
|
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 |
gezelter |
972 |
|
100 |
tim |
906 |
//rotation-translation |
101 |
gezelter |
981 |
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 |
gezelter |
972 |
|
105 |
tim |
906 |
//translation-rotation |
106 |
gezelter |
981 |
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 |
gezelter |
972 |
|
110 |
tim |
906 |
//rotation |
111 |
gezelter |
981 |
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 |
gezelter |
972 |
|
115 |
tim |
906 |
//--------------------------------------------------------------------- |
116 |
gezelter |
972 |
|
117 |
tim |
906 |
//center of diffusion |
118 |
gezelter |
981 |
|
119 |
|
|
center = cd_->getCOR(); |
120 |
|
|
|
121 |
|
|
os << center[0] << "\t" << center[1] << "\t" << center[2] << "\t"; |
122 |
gezelter |
972 |
|
123 |
tim |
906 |
//resistance tensor at center of diffusion |
124 |
|
|
//translation |
125 |
gezelter |
981 |
|
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 |
gezelter |
972 |
|
132 |
tim |
906 |
//rotation-translation |
133 |
gezelter |
981 |
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 |
gezelter |
972 |
|
137 |
tim |
906 |
//translation-rotation |
138 |
gezelter |
981 |
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 |
gezelter |
972 |
|
142 |
tim |
906 |
//rotation |
143 |
gezelter |
981 |
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 |
gezelter |
972 |
|
147 |
|
|
|
148 |
tim |
906 |
//diffusion tensor at center of diffusion |
149 |
|
|
//translation |
150 |
gezelter |
981 |
|
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 |
gezelter |
972 |
|
157 |
tim |
906 |
//rotation-translation |
158 |
gezelter |
981 |
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 |
gezelter |
972 |
|
162 |
tim |
906 |
//translation-rotation |
163 |
gezelter |
981 |
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 |
gezelter |
972 |
|
167 |
tim |
906 |
//rotation |
168 |
gezelter |
981 |
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 |
gezelter |
972 |
|
172 |
|
|
} |
173 |
|
|
|
174 |
tim |
891 |
} |