1 #include <lifev/fsi_blocks/solver/NeoHookean.hpp> 6 NeoHookean::NeoHookean(
const commPtr_Type& communicator ):
12 M_identity (0, 0) = 1.0;
13 M_identity (0, 1) = 0.0;
14 M_identity (0, 2) = 0.0;
15 M_identity (1, 0) = 0.0;
16 M_identity (1, 1) = 1.0;
17 M_identity (1, 2) = 0.0;
18 M_identity (2, 0) = 0.0;
19 M_identity (2, 1) = 0.0;
20 M_identity (2, 2) = 1.0;
21 if ( M_comm->MyPID() == 0 )
23 std::cout <<
"\nUsing NeoHookean model for the structure\n";
27 NeoHookean::~NeoHookean()
31 NeoHookean::setCoefficients (
const Real density,
const Real young,
const Real poisson)
39 Real lambda = ( young * poisson ) / ( ( 1.0 + poisson ) * ( 1.0 - 2.0 * poisson ) );
41 M_mu = young / ( 2.0 * ( 1.0 + poisson ) );
43 M_bulk = ( 2.0 / 3.0 ) * M_mu + lambda;
49 NeoHookean::setup(
const meshPtr_Type& mesh,
const std::string dOrder)
55 M_displacementFESpace.reset (
new FESpace<mesh_Type, map_Type> (mesh, M_dOrder, 3, M_comm) );
57 M_displacementFESpace_ETA.reset(
new ETFESpace_displacement ( M_displacementFESpace->mesh(), &(M_displacementFESpace->refFE()), M_comm));
61 NeoHookean::evaluate_residual(
const vectorPtr_Type& solution,
const Real& coefficient,
const vectorPtr_Type& csi, vectorPtr_Type& residual )
65 if ( M_comm->MyPID() == 0 )
67 std::cout <<
" S- Assembling residual NeoHookean structure\n";
70 residual.reset (
new vector_Type ( M_displacementFESpace->map() ) );
73 vectorPtr_Type solution_rep (
new vector_Type ( *solution, Repeated ) );
75 vectorPtr_Type csi_rep (
new vector_Type ( *csi, Repeated ) );
77 using namespace ExpressionAssembly;
80 tensorF_Type F = ExpressionDefinitions::deformationGradient( M_displacementFESpace_ETA, *solution_rep, M_offset, M_identity );
83 determinantF_Type J = ExpressionDefinitions::determinantF( F );
86 tensorC_Type C = ExpressionDefinitions::tensorC( transpose(F), F );
89 minusT_Type F_T = ExpressionDefinitions::minusT( F );
92 traceTensor_Type I_C = ExpressionDefinitions::traceTensor( C );
94 integrate ( elements ( M_displacementFESpace_ETA->mesh() ),
95 M_displacementFESpace->qr(),
96 M_displacementFESpace_ETA,
97 value ( coefficient * M_density ) * dot( value( M_displacementFESpace_ETA, *solution_rep ), phi_i ) -
98 value ( M_density ) * dot ( value ( M_displacementFESpace_ETA, *csi_rep ), phi_i ) +
99 value ( M_mu ) * pow (J, -2.0 / 3.0) * (dot ( F - value (1.0 / 3.0) * I_C * F_T, grad (phi_i) ) )
100 + value (1.0 / 2.0) * value ( M_bulk ) * ( pow ( J , 2.0) - J + log (J) ) * dot ( F_T, grad (phi_i) )
103 residual->globalAssemble();
107 NeoHookean::update_jacobian(
const vectorPtr_Type& solution,
const Real& coefficient, matrixPtr_Type& jacobian )
109 using namespace ExpressionAssembly;
113 vectorPtr_Type solution_rep (
new vector_Type ( *solution, Repeated ) );
116 tensorF_Type F = ExpressionDefinitions::deformationGradient( M_displacementFESpace_ETA, *solution_rep, M_offset, M_identity );
119 determinantF_Type J = ExpressionDefinitions::determinantF( F );
122 tensorC_Type C = ExpressionDefinitions::tensorC( transpose(F), F );
125 minusT_Type F_T = ExpressionDefinitions::minusT( F );
128 traceTensor_Type I_C = ExpressionDefinitions::traceTensor( C );
130 integrate ( elements ( M_displacementFESpace_ETA->mesh() ) ,
131 M_displacementFESpace->qr(),
132 M_displacementFESpace_ETA,
133 M_displacementFESpace_ETA,
135 value ( coefficient * M_density ) * dot( phi_i, phi_j )
138 + value (-2.0 / 3.0) * value ( M_mu ) * pow (J, - (2.0 / 3.0) ) * dot ( F_T , grad (phi_j) ) * dot ( F , grad (phi_i) )
140 + value (2.0 / 9.0) * value ( M_mu ) * pow( J, (-2.0/3.0) ) * I_C * dot ( F_T , grad (phi_j) ) * dot ( F_T , grad (phi_i) )
142 + value ( M_mu ) * pow (J, - (2.0 / 3.0) ) * dot ( grad (phi_j), grad (phi_i) )
144 + value (-2.0 / 3.0) * value ( M_mu ) * pow (J, - (2.0 / 3.0) ) * dot ( F , grad (phi_j) ) * dot ( F_T , grad (phi_i) )
146 + value (1.0 / 3.0) * value ( M_mu ) * pow( J, -2.0/3.0) * I_C * dot ( ( F_T * transpose (grad (phi_j) ) * F_T ), grad (phi_i) )
148 + value ( 1.0 / 2.0 ) * value ( M_bulk ) * ( value (2.0) *pow (J, 2.0) - J + value (1.0) ) * dot ( F_T, grad (phi_j) ) * dot ( F_T, grad (phi_i) )
149 + value ( - 1.0 / 2.0 ) * value ( M_bulk ) * ( pow (J, 2.0) - J + log (J) ) * dot ( F_T * transpose (grad (phi_j) ) * F_T, grad (phi_i) )
152 jacobian->globalAssemble();