Skip to content

Commit 319520e

Browse files
authored
Merge pull request #240 from DongWuTUM/shell_singularity_test
Shell test for singularity in shell model
2 parents 8eb7099 + ff00f15 commit 319520e

File tree

48 files changed

+1509
-187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1509
-187
lines changed

src/for_2D_build/particles/solid_particles_supplementary.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,16 @@ namespace SPH
5151
sqrt(sigmaxx * sigmaxx + sigmayy * sigmayy - sigmaxx * sigmayy + 3.0 * sigmaxy * sigmaxy);
5252
}
5353
//=============================================================================================//
54+
void MidSurfaceVonMisesStressofShells::update(size_t index_i, Real dt)
55+
{
56+
Matd sigma = mid_surface_cauchy_stress_[index_i];
57+
58+
Real sigmaxx = sigma(0, 0);
59+
Real sigmayy = sigma(1, 1);
60+
Real sigmaxy = sigma(0, 1);
61+
62+
derived_variable_[index_i] =
63+
sqrt(sigmaxx * sigmaxx + sigmayy * sigmayy - sigmaxx * sigmayy + 3.0 * sigmaxy * sigmaxy);
64+
}
65+
//=============================================================================================//
5466
}

src/for_3D_build/particles/solid_particles_supplementary.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,22 @@ namespace SPH
5656
sigmaxx * sigmayy - sigmaxx * sigmazz - sigmayy * sigmazz +
5757
3.0 * (sigmaxy * sigmaxy + sigmaxz * sigmaxz + sigmayz * sigmayz));
5858
}
59+
//=============================================================================================//
60+
void MidSurfaceVonMisesStressofShells::update(size_t index_i, Real dt)
61+
{
62+
Matd sigma = mid_surface_cauchy_stress_[index_i];
63+
64+
Real sigmaxx = sigma(0, 0);
65+
Real sigmayy = sigma(1, 1);
66+
Real sigmazz = sigma(2, 2);
67+
Real sigmaxy = sigma(0, 1);
68+
Real sigmaxz = sigma(0, 2);
69+
Real sigmayz = sigma(1, 2);
70+
71+
derived_variable_[index_i] =
72+
sqrt(sigmaxx * sigmaxx + sigmayy * sigmayy + sigmazz * sigmazz -
73+
sigmaxx * sigmayy - sigmaxx * sigmazz - sigmayy * sigmazz +
74+
3.0 * (sigmaxy * sigmaxy + sigmaxz * sigmaxz + sigmayz * sigmayz));
75+
}
5976
//=================================================================================================//
6077
}

src/shared/materials/elastic_solid.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,6 @@ namespace SPH
1515
cs0_ = sqrt(G0_ / rho0_);
1616
};
1717
//=================================================================================================//
18-
Matd ElasticSolid::NumericalDampingRightCauchy(
19-
Matd &F, Matd &dF_dt, Real smoothing_length, size_t particle_index_i)
20-
{
21-
Matd strain_rate = 0.5 * (dF_dt.transpose() * F + F.transpose() * dF_dt);
22-
Matd normal_rate = getDiagonal(strain_rate);
23-
return 0.5 * rho0_ * (cs0_ * (strain_rate - normal_rate) + c0_ * normal_rate) * smoothing_length;
24-
}
25-
//=================================================================================================//
26-
Matd ElasticSolid::NumericalDampingLeftCauchy(
27-
Matd &F, Matd &dF_dt, Real smoothing_length, size_t particle_index_i)
28-
{
29-
Matd strain_rate = 0.5 * (dF_dt * F.transpose() + F * dF_dt.transpose());
30-
Matd normal_rate = getDiagonal(strain_rate);
31-
return 0.5 * rho0_ * (cs0_ * (strain_rate - normal_rate) + c0_ * normal_rate) * smoothing_length;
32-
}
33-
//=================================================================================================//
3418
Real ElasticSolid::PairNumericalDamping(Real dE_dt_ij, Real smoothing_length)
3519
{
3620
return 0.5 * rho0_ * c0_ * dE_dt_ij * smoothing_length;

src/shared/materials/elastic_solid.h

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,21 @@ class ElasticSolid : public Solid
7575
/** Cauchy stress through Eulerian Almansi strain tensor. */
7676
virtual Matd StressCauchy(Matd &almansi_strain, Matd &F, size_t particle_index_i) = 0;
7777
/** Numerical damping stress using right Cauchy tensor. */
78-
virtual Matd NumericalDampingRightCauchy(Matd &deformation, Matd &deformation_rate, Real smoothing_length, size_t particle_index_i);
79-
/** Numerical damping stress using left Cauchy tensor. */
80-
virtual Matd NumericalDampingLeftCauchy(Matd &deformation, Matd &deformation_rate, Real smoothing_length, size_t particle_index_i);
78+
template <typename ScalingType>
79+
Matd NumericalDampingRightCauchy(const Matd &deformation, const Matd &deformation_rate, const ScalingType &scaling, size_t particle_index_i)
80+
{
81+
Matd strain_rate = 0.5 * (deformation_rate.transpose() * deformation + deformation.transpose() * deformation_rate);
82+
Matd normal_rate = getDiagonal(strain_rate);
83+
return 0.5 * rho0_ * (cs0_ * (strain_rate - normal_rate) + c0_ * normal_rate) * scaling;
84+
}
85+
/** Numerical damping stress using left Cauchy tensor. */
86+
template <typename ScalingType>
87+
Matd NumericalDampingLeftCauchy(const Matd &deformation, const Matd &deformation_rate, const ScalingType& scaling, size_t particle_index_i)
88+
{
89+
Matd strain_rate = 0.5 * (deformation_rate * deformation.transpose() + deformation * deformation_rate.transpose());
90+
Matd normal_rate = getDiagonal(strain_rate);
91+
return 0.5 * rho0_ * (cs0_ * (strain_rate - normal_rate) + c0_ * normal_rate) * scaling;
92+
}
8193
/** Numerical damping is computed between particles i and j */
8294
virtual Real PairNumericalDamping(Real dE_dt_ij, Real smoothing_length);
8395

src/shared/particle_dynamics/solid_dynamics/thin_structure_dynamics.cpp

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ namespace SPH
7272
elastic_solid_(particles_->elastic_solid_),
7373
global_stress_(particles_->global_stress_),
7474
global_moment_(particles_->global_moment_),
75+
mid_surface_cauchy_stress_(particles_->mid_surface_cauchy_stress_),
76+
numerical_damping_scaling_(particles_->numerical_damping_scaling_),
7577
global_shear_stress_(particles_->global_shear_stress_),
7678
n_(particles_->n_),
7779
rho0_(elastic_solid_.ReferenceDensity()),
@@ -98,15 +100,8 @@ namespace SPH
98100
gaussian_point_ = three_gaussian_points_;
99101
gaussian_weight_ = three_gaussian_weights_;
100102
}
101-
/** Define the factor of hourglass control algorithm according to the dimension. */
102-
if (Dimensions == 2)
103-
{
104-
hourglass_control_factor_ = 0.05;
105-
}
106-
else
107-
{
108-
hourglass_control_factor_ = 0.01;
109-
}
103+
/** Define the factor of hourglass control algorithm. */
104+
hourglass_control_factor_ = 0.005;
110105
}
111106
//=================================================================================================//
112107
void ShellStressRelaxationFirstHalf::initialization(size_t index_i, Real dt)
@@ -120,12 +115,16 @@ namespace SPH
120115

121116
F_[index_i] += dF_dt_[index_i] * dt * 0.5;
122117
F_bending_[index_i] += dF_bending_dt_[index_i] * dt * 0.5;
123-
rho_[index_i] = rho0_ / F_[index_i].determinant();
118+
119+
Real J = F_[index_i].determinant();
120+
Matd inverse_F = F_[index_i].inverse();
121+
122+
rho_[index_i] = rho0_ / J;
124123

125124
/** Calculate the current normal direction of mid-surface. */
126125
n_[index_i] = transformation_matrix_[index_i].transpose() * getNormalFromDeformationGradientTensor(F_[index_i]);
127126
/** Get transformation matrix from global coordinates to current local coordinates. */
128-
Matd current_transformation_matrix = getTransformationMatrix(n_[index_i]);
127+
Matd current_transformation_matrix = getTransformationMatrix(pseudo_n_[index_i]);
129128

130129
Matd resultant_stress = Matd::Zero();
131130
Matd resultant_moment = Matd::Zero();
@@ -144,39 +143,40 @@ namespace SPH
144143
current_local_almansi_strain = getCorrectedAlmansiStrain(current_local_almansi_strain, nu_);
145144

146145
/** correct out-plane numerical damping. */
147-
Matd numerical_damping = current_transformation_matrix * transformation_matrix_[index_i].transpose() * F_gaussian_point *
148-
elastic_solid_.NumericalDampingRightCauchy(F_gaussian_point, dF_gaussian_point_dt, smoothing_length_, index_i) * F_gaussian_point.transpose() * transformation_matrix_[index_i] * current_transformation_matrix.transpose() / F_gaussian_point.determinant();
149-
numerical_damping.col(Dimensions - 1) *= thickness_[index_i] / smoothing_length_;
150-
151-
Matd cauchy_stress = elastic_solid_.StressCauchy(current_local_almansi_strain, F_gaussian_point, index_i) + numerical_damping;
146+
Matd cauchy_stress = elastic_solid_.StressCauchy(current_local_almansi_strain, F_gaussian_point, index_i)
147+
+ current_transformation_matrix * transformation_matrix_[index_i].transpose() * F_gaussian_point *
148+
elastic_solid_.NumericalDampingRightCauchy(F_gaussian_point, dF_gaussian_point_dt, numerical_damping_scaling_[index_i], index_i)
149+
* F_gaussian_point.transpose() * transformation_matrix_[index_i] * current_transformation_matrix.transpose()
150+
/ F_gaussian_point.determinant();
152151

153152
/** Impose modeling assumptions. */
154153
cauchy_stress.col(Dimensions - 1) *= shear_correction_factor_;
155154
cauchy_stress.row(Dimensions - 1) *= shear_correction_factor_;
156155
cauchy_stress(Dimensions - 1, Dimensions - 1) = 0.0;
156+
157+
if (i == 0)
158+
{
159+
mid_surface_cauchy_stress_[index_i] = cauchy_stress;
160+
}
157161

158-
Matd stress_PK2_gaussian_point = F_gaussian_point.determinant() * F_gaussian_point.inverse() * transformation_matrix_[index_i] *
159-
current_transformation_matrix.transpose() * cauchy_stress * current_transformation_matrix * transformation_matrix_[index_i].transpose() * F_gaussian_point.inverse().transpose();
160-
161-
Vecd shear_stress_PK2_gaussian_point = -stress_PK2_gaussian_point.col(Dimensions - 1);
162-
Matd moment_PK2_gaussian_point = stress_PK2_gaussian_point * gaussian_point_[i] * thickness_[index_i] * 0.5;
163-
162+
/** Integrate Cauchy stress along thickness. */
164163
resultant_stress +=
165-
0.5 * thickness_[index_i] * gaussian_weight_[i] * F_gaussian_point * stress_PK2_gaussian_point;
164+
0.5 * thickness_[index_i] * gaussian_weight_[i] * cauchy_stress;
166165
resultant_moment +=
167-
0.5 * thickness_[index_i] * gaussian_weight_[i] * F_gaussian_point * moment_PK2_gaussian_point;
168-
resultant_shear_stress +=
169-
0.5 * thickness_[index_i] * gaussian_weight_[i] * F_gaussian_point * shear_stress_PK2_gaussian_point;
166+
0.5 * thickness_[index_i] * gaussian_weight_[i] * (cauchy_stress * gaussian_point_[i] * thickness_[index_i] * 0.5);
167+
resultant_shear_stress -=
168+
0.5 * thickness_[index_i] * gaussian_weight_[i] * cauchy_stress.col(Dimensions - 1);
169+
170+
resultant_stress.col(Dimensions - 1) = Vecd::Zero();
171+
resultant_moment.col(Dimensions - 1) = Vecd::Zero();
170172
}
171-
/** Only one (for 2D) or two (for 3D) angular momentum equations left. */
172-
resultant_moment.col(Dimensions - 1) = Vecd::Zero();
173-
resultant_moment.row(Dimensions - 1) = Vecd::Zero().transpose();
174-
resultant_shear_stress[Dimensions - 1] = 0.0;
175173

176174
/** stress and moment in global coordinates for pair interaction */
177-
global_stress_[index_i] = transformation_matrix_[index_i].transpose() * resultant_stress * transformation_matrix_[index_i];
178-
global_moment_[index_i] = transformation_matrix_[index_i].transpose() * resultant_moment * transformation_matrix_[index_i];
179-
global_shear_stress_[index_i] = transformation_matrix_[index_i].transpose() * resultant_shear_stress;
175+
global_stress_[index_i] = J * current_transformation_matrix.transpose() * resultant_stress * current_transformation_matrix
176+
* transformation_matrix_[index_i].transpose() * inverse_F.transpose() * transformation_matrix_[index_i];
177+
global_moment_[index_i] = J * current_transformation_matrix.transpose() * resultant_moment * current_transformation_matrix
178+
* transformation_matrix_[index_i].transpose() * inverse_F.transpose() * transformation_matrix_[index_i];
179+
global_shear_stress_[index_i] = J * current_transformation_matrix.transpose() * resultant_shear_stress;
180180
}
181181
//=================================================================================================//
182182
void ShellStressRelaxationFirstHalf::update(size_t index_i, Real dt)
@@ -190,7 +190,7 @@ namespace SPH
190190
pos_[index_i] += vel_[index_i] * dt * 0.5;
191191
rotation_[index_i] += angular_vel_[index_i] * dt * 0.5;
192192
dpseudo_n_dt_[index_i] = transformation_matrix_[index_i].transpose() *
193-
getVectorChangeRateAfterThinStructureRotation(local_pseudo_n_0, rotation_[index_i], angular_vel_[index_i]);
193+
getVectorChangeRateAfterThinStructureRotation(local_pseudo_n_0, rotation_[index_i], angular_vel_[index_i]);
194194
pseudo_n_[index_i] += dpseudo_n_dt_[index_i] * dt * 0.5;
195195
}
196196
//=================================================================================================//

src/shared/particle_dynamics/solid_dynamics/thin_structure_dynamics.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ namespace SPH
208208
transformation_matrix_[index_i].transpose() * F_[index_i] * transformation_matrix_[index_i],
209209
pos_[index_j],
210210
transformation_matrix_[index_i].transpose() * F_[index_j] * transformation_matrix_[index_i]);
211-
acceleration += hourglass_control_factor_ * weight * E0_ * pos_jump * dim_inv_r_ij *
211+
acceleration += hourglass_control_factor_ * weight * G0_ * pos_jump * dim_inv_r_ij *
212212
inner_neighborhood.dW_ijV_j_[n] * thickness_[index_i];
213213

214214
Vecd pseudo_n_jump = getLinearVariableJump(e_ij, r_ij, pseudo_n_[index_i] - n0_[index_i],
@@ -236,7 +236,7 @@ namespace SPH
236236

237237
protected:
238238
ElasticSolid &elastic_solid_;
239-
StdLargeVec<Matd> &global_stress_, &global_moment_;
239+
StdLargeVec<Matd> &global_stress_, &global_moment_, &mid_surface_cauchy_stress_, &numerical_damping_scaling_;
240240
StdLargeVec<Vecd> &global_shear_stress_, &n_;
241241
Real rho0_, inv_rho0_;
242242
Real smoothing_length_, E0_, G0_, nu_, hourglass_control_factor_;

src/shared/particle_dynamics/solid_dynamics/thin_structure_math.cpp

Lines changed: 42 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -44,85 +44,64 @@ namespace SPH
4444
//=================================================================================================//
4545
Vec2d getVectorChangeRateAfterThinStructureRotation(const Vec2d &initial_vector, const Vec2d &rotation_angles, const Vec2d &angular_vel)
4646
{
47-
/**The derivative of the rotation matrix. */
48-
Real sin_angle = sin(rotation_angles[0]);
49-
Real cos_angle = cos(rotation_angles[0]);
50-
Mat2d drotation_matrix_dt{
51-
{-sin_angle * angular_vel[0], cos_angle * angular_vel[0]},
52-
{-cos_angle * angular_vel[0], -sin_angle * angular_vel[0]},
53-
};
54-
55-
return drotation_matrix_dt * initial_vector;
47+
return Vec2d(cos(rotation_angles[0]) * angular_vel[0], -sin(rotation_angles[0]) * angular_vel[0]);
5648
}
5749
//=================================================================================================//
5850
Vec3d getVectorChangeRateAfterThinStructureRotation(const Vec3d &initial_vector, const Vec3d &rotation_angles, const Vec3d &angular_vel)
5951
{
60-
/**The rotation matrix about the X-axis. */
61-
Real sin_angle_x = sin(rotation_angles[0]);
62-
Real cos_angle_x = cos(rotation_angles[0]);
63-
64-
Real sin_angle_y = sin(rotation_angles[1]);
65-
Real cos_angle_y = cos(rotation_angles[1]);
52+
Real sin_rotation_0 = sin(rotation_angles[0]);
53+
Real cos_rotation_0 = cos(rotation_angles[0]);
6654

67-
Real angular_vel_x = angular_vel[0];
68-
Real angular_vel_y = angular_vel[1];
55+
Real sin_rotation_1 = sin(rotation_angles[1]);
56+
Real cos_rotation_1 = cos(rotation_angles[1]);
6957

70-
Mat3d rotation_matrix_x{
71-
{1.0, 0.0, 0.0},
72-
{0.0, cos_angle_x, -sin_angle_x},
73-
{0.0, sin_angle_x, cos_angle_x},
74-
};
75-
/**The rotation matrix about the Y-axis. */
76-
Mat3d rotation_matrix_y{
77-
{cos_angle_y, 0.0, sin_angle_y},
78-
{0.0, 1.0, 0.0},
79-
{-sin_angle_y, 0.0, cos_angle_y},
80-
};
81-
/**The derivative of the rotation matrix of the X-axis. */
82-
Mat3d drotation_matrix_x_dt{
83-
{0.0, 0.0, 0.0},
84-
{0.0,-sin_angle_x * angular_vel_x, -cos_angle_x * angular_vel_x},
85-
{0.0, cos_angle_x * angular_vel_x, -sin_angle_x * angular_vel_x},
86-
};
87-
/**The derivative of the rotation matrix of the Y-axis. */
88-
Mat3d drotation_matrix_y_dt{
89-
{-sin_angle_y * angular_vel_y, 0.0, cos_angle_y * angular_vel_y},
90-
{0.0, 0.0, 0.0},
91-
{-cos_angle_y * angular_vel_y, 0.0,-sin_angle_y * angular_vel_y},
92-
};
58+
Real dpseudo_n_dt_0 = -sin_rotation_0 * sin_rotation_1 * angular_vel[0] + cos_rotation_0 * cos_rotation_1 * angular_vel[1];
59+
Real dpseudo_n_dt_1 = -cos_rotation_0 * angular_vel[0];
60+
Real dpseudo_n_dt_2 = -sin_rotation_0 * cos_rotation_1 * angular_vel[0] - cos_rotation_0 * sin_rotation_1 * angular_vel[1];
9361

94-
return (drotation_matrix_y_dt * rotation_matrix_x + rotation_matrix_y * drotation_matrix_x_dt)* initial_vector;
62+
return Vec3d(dpseudo_n_dt_0, dpseudo_n_dt_1, dpseudo_n_dt_2);
9563
}
9664
//=================================================================================================//
9765
Vec2d getRotationFromPseudoNormalForFiniteDeformation(const Vec2d &dpseudo_n_d2t, const Vec2d &rotation, const Vec2d &angular_vel, Real dt)
98-
{
99-
Vec2d dangular_vel_dt = Vec2d::Zero();
100-
dangular_vel_dt[0] = -(dpseudo_n_d2t[0] + sin(rotation[0]) * pow(angular_vel[0], 2))
101-
/ (2 * sin(rotation[0]) * angular_vel[0] * dt - cos(rotation[0]));
102-
return dangular_vel_dt;
66+
{
67+
Real cos_rotation_0 = cos(rotation[0]);
68+
Real sin_rotation_0 = sin(rotation[0]);
69+
70+
Real angle_vel_dt_0 = cos_rotation_0 * (dpseudo_n_d2t[0] + sin_rotation_0 * angular_vel[0] * angular_vel[0])
71+
- sin_rotation_0 * (dpseudo_n_d2t[1] + cos_rotation_0 * angular_vel[0] * angular_vel[0]);
72+
73+
return Vec2d(angle_vel_dt_0, 0.0);
10374
}
10475
//=================================================================================================//
10576
Vec3d getRotationFromPseudoNormalForFiniteDeformation(const Vec3d &dpseudo_n_d2t, const Vec3d &rotation, const Vec3d &angular_vel, Real dt)
10677
{
107-
Real sin_rotation_x = sin(rotation[0]);
108-
Real cos_rotation_x = cos(rotation[0]);
109-
Real sin_rotation_y = sin(rotation[1]);
110-
Real cos_rotation_y = cos(rotation[1]);
78+
Real sin_rotation_0 = sin(rotation[0]);
79+
Real cos_rotation_0 = cos(rotation[0]);
80+
Real sin_rotation_1 = sin(rotation[1]);
81+
Real cos_rotation_1 = cos(rotation[1]);
11182

112-
Real angle_vel_dt_x = (dpseudo_n_d2t[1] - sin_rotation_x * pow(angular_vel[0], 2))
113-
/ (2 * sin_rotation_x * angular_vel[0] * dt - cos_rotation_x);
83+
Real rotation_0_a = -(dpseudo_n_d2t[2] * cos_rotation_1 + dpseudo_n_d2t[0] * sin_rotation_1
84+
+ angular_vel[1] * angular_vel[1] * cos_rotation_0
85+
+ angular_vel[0] * angular_vel[0] * cos_rotation_0);
86+
Real rotation_0_b = sin_rotation_0 * angular_vel[0] * angular_vel[0] - dpseudo_n_d2t[1];
87+
Real angle_vel_dt_0 = sin_rotation_0 * rotation_0_a + cos_rotation_0 * rotation_0_b;
11488

115-
Real angle_vel_dt_y = (dpseudo_n_d2t[0] + cos_rotation_x * sin_rotation_y
116-
* (pow(angular_vel[0], 2) + pow(angular_vel[1], 2))
117-
+ 2 * sin_rotation_x * cos_rotation_y * angular_vel[0] * angular_vel[1]
118-
+ (2 * cos_rotation_x * sin_rotation_y * angular_vel[0] * dt
119-
+ 2 * sin_rotation_x * cos_rotation_y * angular_vel[1] * dt
120-
+ sin_rotation_x * cos_rotation_y) * angle_vel_dt_x)
121-
/ (-2 * sin_rotation_x * cos_rotation_y * angular_vel[0] * dt
122-
- 2 * cos_rotation_x * sin_rotation_y * angular_vel[1] * dt
123-
+ cos_rotation_x * cos_rotation_y);
124-
125-
return Vec3d(angle_vel_dt_x, angle_vel_dt_y, 0.0);
89+
Real rotation_1_a = dpseudo_n_d2t[0] * cos_rotation_1 - dpseudo_n_d2t[2] * sin_rotation_1
90+
+ 2.0 * angular_vel[1] * angular_vel[0] * sin_rotation_0;
91+
Real rotation_1_b1 = dpseudo_n_d2t[0] * cos_rotation_0
92+
+ angular_vel[1] * angular_vel[1] * cos_rotation_0 * cos_rotation_0 * sin_rotation_1
93+
+ angular_vel[0] * angular_vel[0] * sin_rotation_1
94+
- dpseudo_n_d2t[1] * sin_rotation_1 * sin_rotation_0
95+
+ 2.0 * angular_vel[1] * angular_vel[0] * cos_rotation_1 * cos_rotation_0 * sin_rotation_0;
96+
Real rotation_1_b2 = -(dpseudo_n_d2t[2] * cos_rotation_0
97+
+ angular_vel[1] * angular_vel[1] * cos_rotation_1 * cos_rotation_0 * cos_rotation_0
98+
+ angular_vel[0] * angular_vel[0] * cos_rotation_1
99+
- dpseudo_n_d2t[1] * cos_rotation_1 * sin_rotation_0
100+
- 2.0 * angular_vel[1] * angular_vel[0] * cos_rotation_0 * sin_rotation_1 * sin_rotation_0);
101+
Real angle_vel_dt_1 = rotation_1_a * rotation_1_a * (rotation_1_b1 * cos_rotation_1 + rotation_1_b2 * sin_rotation_1)
102+
/ (rotation_1_b1 * rotation_1_b1 + rotation_1_b2 * rotation_1_b2 + Eps);
103+
104+
return Vec3d(angle_vel_dt_0, angle_vel_dt_1, 0.0);
126105
}
127106
//=================================================================================================//
128107
Vec2d getRotationFromPseudoNormalForSmallDeformation(const Vec2d &dpseudo_n_d2t, const Vec2d &rotation, const Vec2d &angular_vel, Real dt)

0 commit comments

Comments
 (0)