80 auto const l = vec2.
norm();
83 auto const lp = vec1.
norm();
91 auto const cosPhi = (vec1 * vec2) / (lp * l);
93 auto const sinPhi = vecpro.norm() / (l * lp);
96 const double Dxx = lp /
lp0;
98 const double Dyx = 0.0;
99 const double Dyy = l /
l0 * sinPhi /
sinPhi0;
103 const double Gxy = Dxx * Dxy + Dyx * Dyy;
104 const double Gyx = Dxx * Dxy + Dyy * Dyx;
108 const double i1 = (Gxx + Gyy) - 2;
109 const double i2 = ((Gxx * Gyy) - (Gxy * Gyx)) - 1;
117 dEdI2 = -
k1 / (6.0 * (i2 + 1.0) * (i2 + 1.0));
120 dEdI1 =
k1 * (i1 + 1) / 6.0;
121 dEdI2 = -
k1 / 6.0 +
k2 * i2 / 6.0;
125 const double dI1dGxx = 1;
126 const double dI1dGxy = 0;
127 const double dI1dGyx = 0;
128 const double dI1dGyy = 1;
130 const double dI2dGxx = Gyy;
131 const double dI2dGxy = -Gyx;
133 const double dI2dGyx = -Gxy;
135 const double dI2dGyy = Gxx;
138 const double dGxxdV1x = 2 *
a1 * Dxx;
139 const double dGxxdV1y = 0;
140 const double dGxxdV2x = 2 *
a2 * Dxx;
141 const double dGxxdV2y = 0;
143 const double dGxydV1x =
a1 * Dxy +
b1 * Dxx;
144 const double dGxydV1y =
a1 * Dyy;
145 const double dGxydV2x =
a2 * Dxy +
b2 * Dxx;
146 const double dGxydV2y =
a2 * Dyy;
148 const double dGyxdV1x =
a1 * Dxy +
b1 * Dxx;
149 const double dGyxdV1y =
a1 * Dyy;
150 const double dGyxdV2x =
a2 * Dxy +
b2 * Dxx;
151 const double dGyxdV2y =
a2 * Dyy;
153 const double dGyydV1x = 2 *
b1 * Dxy;
154 const double dGyydV1y = 2 *
b1 * Dyy;
155 const double dGyydV2x = 2 *
b2 * Dxy;
156 const double dGyydV2y = 2 *
b2 * Dyy;
167 f1_rot[0] = -(dEdI1 * dI1dGxx * dGxxdV1x) - (dEdI1 * dI1dGxy * dGxydV1x) -
168 (dEdI1 * dI1dGyx * dGyxdV1x) - (dEdI1 * dI1dGyy * dGyydV1x) -
169 (dEdI2 * dI2dGxx * dGxxdV1x) - (dEdI2 * dI2dGxy * dGxydV1x) -
170 (dEdI2 * dI2dGyx * dGyxdV1x) - (dEdI2 * dI2dGyy * dGyydV1x);
171 f1_rot[1] = -(dEdI1 * dI1dGxx * dGxxdV1y) - (dEdI1 * dI1dGxy * dGxydV1y) -
172 (dEdI1 * dI1dGyx * dGyxdV1y) - (dEdI1 * dI1dGyy * dGyydV1y) -
173 (dEdI2 * dI2dGxx * dGxxdV1y) - (dEdI2 * dI2dGxy * dGxydV1y) -
174 (dEdI2 * dI2dGyx * dGyxdV1y) - (dEdI2 * dI2dGyy * dGyydV1y);
175 f2_rot[0] = -(dEdI1 * dI1dGxx * dGxxdV2x) - (dEdI1 * dI1dGxy * dGxydV2x) -
176 (dEdI1 * dI1dGyx * dGyxdV2x) - (dEdI1 * dI1dGyy * dGyydV2x) -
177 (dEdI2 * dI2dGxx * dGxxdV2x) - (dEdI2 * dI2dGxy * dGxydV2x) -
178 (dEdI2 * dI2dGyx * dGyxdV2x) - (dEdI2 * dI2dGyy * dGyydV2x);
179 f2_rot[1] = -(dEdI1 * dI1dGxx * dGxxdV2y) - (dEdI1 * dI1dGxy * dGxydV2y) -
180 (dEdI1 * dI1dGyx * dGyxdV2y) - (dEdI1 * dI1dGyy * dGyydV2y) -
181 (dEdI2 * dI2dGxx * dGxxdV2y) - (dEdI2 * dI2dGxy * dGxydV2y) -
182 (dEdI2 * dI2dGyx * dGyxdV2y) - (dEdI2 * dI2dGyy * dGyydV2y);
189 auto forces = RotateForces(f1_rot, f2_rot, vec1, vec2);
Utils::Vector< T, 3 > get_mi_vector(const Utils::Vector< T, 3 > &a, const Utils::Vector< T, 3 > &b) const
Get the minimum-image vector between two coordinates.
std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > RotateForces(Utils::Vector2d const &f1_rot, Utils::Vector2d const &f2_rot, Utils::Vector3d const &v12, Utils::Vector3d const &v13)
Rotate calculated trielastic forces in the 2d plane back to the 3d plane.