Commit d1193a2e authored by GIRAUDET Chloe's avatar GIRAUDET Chloe Committed by GILLES Sebastien

#1418 Fix vectorial product, energy contribution and spherical coordinates.

parent 48b86056
......@@ -158,9 +158,9 @@ namespace MoReFEM
tauI6 /= normI6;
// vectorial product to construct third local basis vector tau_n
taun(0) = tauI6(1) * tauI4(2) - tauI6(2) * tauI4(1);
taun(1) = tauI6(2) * tauI4(0) - tauI6(0) * tauI4(2);
taun(2) = tauI6(0) * tauI4(1) - tauI6(1) * tauI4(0);
taun(0) = tauI4(1) * tauI6(2) - tauI4(2) * tauI6(1);
taun(1) = tauI4(2) * tauI6(0) - tauI4(0) * tauI6(2);
taun(2) = tauI4(0) * tauI6(1) - tauI4(1) * tauI6(0);
const auto size = dW.shape(0);
......@@ -173,9 +173,9 @@ namespace MoReFEM
double norm = 0.;
// local coordinates of the integration direction in the fiber frame of reference
double xloc1 = std::cos(lbdvp_[quad_pointp]) * std::cos(lbdvt_[quad_pointt]);
double xloc2 = std::sin(lbdvp_[quad_pointp]) * std::cos(lbdvt_[quad_pointt]);
double xloc3 = std::sin(lbdvt_[quad_pointt]);
double xloc1 = std::cos(lbdvp_[quad_pointp]) * std::sin(lbdvt_[quad_pointt]);
double xloc2 = std::sin(lbdvp_[quad_pointp]) * std::sin(lbdvt_[quad_pointt]);
double xloc3 = std::cos(lbdvt_[quad_pointt]);
// Calculation of the local integration directions and diagonal values sigma_xx, sigma_yy and sigma_zz.
for (auto i = 0u; i < DimensionT ; ++i)
......@@ -208,8 +208,10 @@ namespace MoReFEM
double stiffnessloc = weightI4 * density_interpolate_I4 + weightI6 * density_interpolate_I6;
// calculation of the fiber traction and of its derivative with respect ot the square elongation
double raideur_c = 2. * stiffnessloc * (long1 - 1.) / long1;
double draideur_c = 2. * stiffnessloc / (long1 * long1 * long1);
// Piola = 2 * dW
double raideur_c = 2 * (0.5 * stiffnessloc * (long1 - 1.) / long1);
// Tangent = 4 * d2W
double draideur_c = 4 * (0.25 * stiffnessloc / (long1 * long1 * long1));
// update of gradient and of second derivative with respect to Cauchy Greene
dW += raideur_c * tauxtau;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment