void beam_PK1_stress_function(TensorValue<double>& PP, const TensorValue<double>& FF, const libMesh::Point& /*X*/, const libMesh::Point& s, Elem* const /*elem*/, const vector<NumericVector<double>*>& /*system_data*/, double /*time*/, void* /*ctx*/) { const double r = sqrt((s(0) - 0.2) * (s(0) - 0.2) + (s(1) - 0.2) * (s(1) - 0.2)); if (r > 0.05) { static const TensorValue<double> II(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); const TensorValue<double> CC = FF.transpose() * FF; const TensorValue<double> EE = 0.5 * (CC - II); const TensorValue<double> SS = lambda_s * EE.tr() * II + 2.0 * mu_s * EE; PP = FF * SS; } else { PP.zero(); } return; } // beam_PK1_stress_function
void beam_PK1_stress_function(TensorValue<double>& PP, const TensorValue<double>& FF, const libMesh::Point& /*X*/, const libMesh::Point& s, Elem* const /*elem*/, const vector<NumericVector<double>*>& /*system_data*/, double /*time*/, void* /*ctx*/) { const double dist2root = sqrt((s(0) - 0) * (s(0) - 0)); if (dist2root <= fixed_L) // we use penalty method to fix the root { PP = 0.0 * FF; // so we no longer compute stress here return ; } // 1) compute the radius r(x) : r_x double arc_s = get_arc_length(s(0)); const double r_x = slope * arc_s + r0; // 2) compute ratio_moduli; const double ratio_radius = r_x /r0; const double ratio_moduli = ratio_radius * ratio_radius* ratio_radius* ratio_radius; const TensorValue<double> CC = FF.transpose() * FF; const TensorValue<double> EE = 0.5 * (CC - II); const TensorValue<double> SS = lambda_s * EE.tr() * II + 2.0 * mu_s * EE; PP = ratio_moduli * FF * SS; return; } // beam_PK1_stress_function
void upper_PK1_stress_function( TensorValue<double>& PP, const TensorValue<double>& FF, const libMesh::Point& /*X*/, const libMesh::Point& s, Elem* const /*elem*/, const vector<NumericVector<double>*>& /*system_data*/, double /*time*/, void* /*ctx*/) { if (s(0) > 5.0 && s(0) < 10.0) { static const TensorValue<double> II(1.0,0.0,0.0, 0.0,1.0,0.0, 0.0,0.0,1.0); const TensorValue<double> CC = FF.transpose()*FF; const TensorValue<double> EE = 0.5*(CC - II); const TensorValue<double> SS = lambda_s*EE.tr()*II + 2.0*mu_s*EE; PP = FF*SS; } else { PP.zero(); } return; }// upper_PK1_stress_function