LifeV
StructuralConstitutiveLawData.cpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  * @file
29  * @brief DataElasticStructure - File containing a data container for solid problems with elastic structure
30  *
31  * @version 1.0
32  * @date 01-10-2003
33  * @author M.A. Fernandez
34  *
35  * @version 1.18
36  * @date 10-06-2010
37  * @author Cristiano Malossi
38  *
39  * @version 1.19
40  * @author Gilles Fourestey
41  *
42  * @contributor Paolo Tricerri <paolo.tricerri@epfl.ch>
43  * @maintainer Paolo Tricerri <paolo.tricerri@epfl.ch>
44  */
45 
46 #include <lifev/structure/solver/StructuralConstitutiveLawData.hpp>
47 
48 namespace LifeV
49 {
50 
51 //=====================================================
52 // Constructors
53 //=====================================================
54 StructuralConstitutiveLawData::StructuralConstitutiveLawData() :
55  M_time ( ),
56  M_timeAdvance ( ),
57  M_density ( ),
58  M_thickness ( ),
59  M_externalPressure ( ),
60  M_materialsFlagSet ( false ),
61  M_poisson ( ),
62  M_young ( ),
63  M_bulk ( ),
64  M_alpha ( ),
65  M_gamma ( ),
66  M_order ( ),
67  M_verbose ( ),
68  M_solidTypeIsotropic ( ),
69  M_constitutiveLaw ( ),
70  M_solidTypeAnisotropic ( ),
71  M_numberFibers ( 0 ),
72  M_stiffnessParametersFibers ( ),
73  M_nonlinearityParametersFibers ( ),
74  M_characteristicStretch ( ),
75  M_distributionParametersFibers ( ),
76  M_epsilon ( 0 ),
77  M_fiberActivation ( ),
78  M_toleranceActivation ( ),
79  M_lawType ( ),
80  M_useExactJacobian ( false ),
81  M_vectorMaterialFlags ( ),
82  M_maxSubIterationNumber ( ),
83  M_absoluteTolerance ( ),
84  M_relativeTolerance ( ),
85  M_errorTolerance ( ),
86  M_NonLinearLineSearch ( )
87 {
88 }
89 
90 StructuralConstitutiveLawData::StructuralConstitutiveLawData ( const StructuralConstitutiveLawData& structuralConstitutiveLawData ) :
91  M_time ( structuralConstitutiveLawData.M_time ),
92  M_timeAdvance ( structuralConstitutiveLawData.M_timeAdvance ),
93  M_density ( structuralConstitutiveLawData.M_density ),
94  M_thickness ( structuralConstitutiveLawData.M_thickness ),
95  M_externalPressure ( structuralConstitutiveLawData.M_externalPressure ),
96  M_materialsFlagSet ( structuralConstitutiveLawData.M_materialsFlagSet ),
97  M_poisson ( structuralConstitutiveLawData.M_poisson ),
98  M_young ( structuralConstitutiveLawData.M_young ),
99  M_bulk ( structuralConstitutiveLawData.M_bulk ),
100  M_alpha ( structuralConstitutiveLawData.M_alpha ),
101  M_gamma ( structuralConstitutiveLawData.M_gamma ),
102  M_order ( structuralConstitutiveLawData.M_order ),
103  M_verbose ( structuralConstitutiveLawData.M_verbose ),
104  M_solidTypeIsotropic ( structuralConstitutiveLawData.M_solidTypeIsotropic ),
105  M_constitutiveLaw ( structuralConstitutiveLawData.M_constitutiveLaw ),
106  M_solidTypeAnisotropic ( structuralConstitutiveLawData.M_solidTypeAnisotropic ),
107  M_numberFibers ( structuralConstitutiveLawData.M_numberFibers ),
108  M_stiffnessParametersFibers ( structuralConstitutiveLawData.M_stiffnessParametersFibers ),
109  M_nonlinearityParametersFibers ( structuralConstitutiveLawData.M_nonlinearityParametersFibers ),
110  M_characteristicStretch ( structuralConstitutiveLawData.M_characteristicStretch ),
111  M_distributionParametersFibers ( structuralConstitutiveLawData.M_distributionParametersFibers ),
112  M_epsilon ( structuralConstitutiveLawData.M_epsilon ),
113  M_fiberActivation ( structuralConstitutiveLawData.M_fiberActivation ),
114  M_toleranceActivation ( structuralConstitutiveLawData.M_toleranceActivation ),
115  M_lawType ( structuralConstitutiveLawData.M_lawType ),
116  M_useExactJacobian ( structuralConstitutiveLawData.M_useExactJacobian ),
117  M_vectorMaterialFlags ( structuralConstitutiveLawData.M_vectorMaterialFlags ),
118  M_maxSubIterationNumber ( structuralConstitutiveLawData.M_maxSubIterationNumber ),
119  M_absoluteTolerance ( structuralConstitutiveLawData.M_absoluteTolerance ),
120  M_relativeTolerance ( structuralConstitutiveLawData.M_relativeTolerance ),
121  M_errorTolerance ( structuralConstitutiveLawData.M_errorTolerance ),
122  M_NonLinearLineSearch ( structuralConstitutiveLawData.M_NonLinearLineSearch )
123 
124 {
125 }
126 
127 // ===================================================
128 // Operators
129 // ===================================================
130 StructuralConstitutiveLawData&
131 StructuralConstitutiveLawData::operator= ( const StructuralConstitutiveLawData& structuralConstitutiveLawData )
132 {
133  if ( this != &structuralConstitutiveLawData )
134  {
135  M_time = structuralConstitutiveLawData.M_time;
136  M_timeAdvance = structuralConstitutiveLawData.M_timeAdvance;
137  M_density = structuralConstitutiveLawData.M_density;
138  M_thickness = structuralConstitutiveLawData.M_thickness;
139  M_externalPressure = structuralConstitutiveLawData.M_externalPressure;
140  M_materialsFlagSet = structuralConstitutiveLawData.M_materialsFlagSet;
141  M_poisson = structuralConstitutiveLawData.M_poisson;
142  M_young = structuralConstitutiveLawData.M_young;
143  M_bulk = structuralConstitutiveLawData.M_bulk;
144  M_alpha = structuralConstitutiveLawData.M_alpha;
145  M_gamma = structuralConstitutiveLawData.M_gamma;
146  M_order = structuralConstitutiveLawData.M_order;
147  M_verbose = structuralConstitutiveLawData.M_verbose;
148  M_solidTypeIsotropic = structuralConstitutiveLawData.M_solidTypeIsotropic;
149  M_constitutiveLaw = structuralConstitutiveLawData.M_constitutiveLaw;
150  M_solidTypeAnisotropic = structuralConstitutiveLawData.M_solidTypeAnisotropic;
151  M_numberFibers = structuralConstitutiveLawData.M_numberFibers;
152  M_stiffnessParametersFibers = structuralConstitutiveLawData.M_stiffnessParametersFibers;
153  M_nonlinearityParametersFibers = structuralConstitutiveLawData.M_nonlinearityParametersFibers;
154  M_characteristicStretch = structuralConstitutiveLawData.M_characteristicStretch;
155  M_distributionParametersFibers = structuralConstitutiveLawData.M_distributionParametersFibers;
156  M_epsilon = structuralConstitutiveLawData.M_epsilon;
157  M_fiberActivation = structuralConstitutiveLawData.M_fiberActivation;
158  M_toleranceActivation = structuralConstitutiveLawData.M_toleranceActivation;
159  M_lawType = structuralConstitutiveLawData.M_lawType;
160  M_useExactJacobian = structuralConstitutiveLawData.M_useExactJacobian;
161  M_vectorMaterialFlags = structuralConstitutiveLawData.M_vectorMaterialFlags;
162  M_maxSubIterationNumber = structuralConstitutiveLawData.M_maxSubIterationNumber;
163  M_absoluteTolerance = structuralConstitutiveLawData.M_absoluteTolerance;
164  M_relativeTolerance = structuralConstitutiveLawData.M_relativeTolerance;
165  M_errorTolerance = structuralConstitutiveLawData.M_errorTolerance;
166  M_NonLinearLineSearch = structuralConstitutiveLawData.M_NonLinearLineSearch;
167  }
168 
169  return *this;
170 }
171 
172 // ===================================================
173 // Methods
174 // ===================================================
175 void
176 StructuralConstitutiveLawData::setup ( const GetPot& dataFile, const std::string& section )
177 {
178  // If data time has not been set
179  if ( !M_time.get() )
180  {
181  M_time.reset ( new time_Type ( dataFile, section + "/time_discretization" ) );
182  }
183 
184  if ( !M_timeAdvance.get() )
185  {
186  M_timeAdvance.reset ( new timeAdvance_Type ( dataFile, section + "/time_discretization" ) );
187  }
188 
189  // physics
190  M_solidTypeIsotropic = dataFile ( ( section + "/model/solidTypeIsotropic" ).data(), "NO_DEFAULT_SOLID_TYPE_ISOTROPIC" );
191 
192  // Reading the type of anisotropic part and the number of fibers
193  M_constitutiveLaw = dataFile ( ( section + "/model/constitutiveLaw" ).data(), "isotropic" );
194 
195  if( !M_constitutiveLaw.compare("anisotropic") ) // anisotropic laws
196  {
197  M_solidTypeAnisotropic = dataFile ( ( section + "/model/solidTypeAnisotropic" ).data(), "NO_DEFAULT_SOLID_TYPE_ANISOTROPIC" );
198  M_numberFibers = dataFile ( ( section + "/model/fibers/numberFamilies" ).data(), 0 );
199 
200  ASSERT( M_numberFibers, " The number of fibers of the anisotropic law has to be different from 0!" );
201  }
202 
203  // The check can be done on the isotropic part since the anisotropic is for sure nonlinear
204  if( !M_solidTypeIsotropic.compare("linearVenantKirchhoff") )
205  {
206  M_lawType = "linear";
207  }
208  else
209  {
210  M_lawType = "nonlinear";
211  }
212 
213  if( !M_constitutiveLaw.compare("anisotropic") ) // anisotropic laws => no LE
214  {
215  ASSERT ( M_lawType.compare ("linear"), "The Linear Elastic law cannot be used with anisotropic laws");
216  }
217 
218  M_externalPressure = dataFile ( ( section + "/physics/externalPressure" ).data(), 0. );
219  M_density = dataFile ( ( section + "/physics/density" ).data(), 1. );
220  M_thickness = dataFile ( ( section + "/physics/thickness" ).data(), 0.1 );
221 
222 
223  UInt materialsNumber = dataFile.vector_variable_size ( ( section + "/physics/material_flag" ).data() );
224 
225  if( !M_constitutiveLaw.compare("anisotropic") )
226  {
227  UInt numberOfStiffnesses = dataFile.vector_variable_size ( ( section + "/model/fibers/stiffness" ).data() );
228  UInt numberOfNonlinearities = dataFile.vector_variable_size ( ( section + "/model/fibers/nonlinearity" ).data() );
229 
230 
231  ASSERT( M_numberFibers , " The number of fiber families is equal to zero, change the variable constitutiveLaw from anisotropic to isotropic " );
232  ASSERT( ( M_numberFibers == numberOfStiffnesses ) && ( M_numberFibers == numberOfNonlinearities ), " Inconsistency in the set up of the fiber parameters" );
233 
234  if( !M_solidTypeAnisotropic.compare("multimechanism") ||
235  !M_solidTypeAnisotropic.compare("holzapfelGeneralized") )
236  {
237  UInt numberStretches = dataFile.vector_variable_size ( ( section + "/model/fibers/stretch" ).data() );
238  ASSERT( ( M_numberFibers == numberOfStiffnesses ) &&
239  ( M_numberFibers == numberOfNonlinearities ) &&
240  ( M_numberFibers == numberStretches ) , " Inconsistency in the set up of the fiber parameters" );
241  }
242 
243  if( !M_solidTypeAnisotropic.compare("distributedHolzapfel") )
244  {
245  UInt numberOfDistribution = dataFile.vector_variable_size ( ( section + "/model/fibers/distribution" ).data() );
246  ASSERT( ( M_numberFibers == numberOfStiffnesses ) && ( M_numberFibers == numberOfNonlinearities )
247  && ( M_numberFibers == numberOfDistribution ), " Inconsistency in the set up of the fiber parameters" );
248  }
249  }
250 
251  // Reading the material for isotropic laws
252  ASSERT ( materialsNumber, "Set the materrial_flag variable in [solid]/physics");
253 
254  if ( materialsNumber == 0 )
255  {
256  // If no material is specified in the data file the code assume that there is just one material
257  // and by default it is memorized with ID 1. Getters and Setters have been designed to deal with thic choice.
258  M_materialsFlagSet = false;
259  M_vectorMaterialFlags.resize (1);
260 
261  M_vectorMaterialFlags[0] = 1;
262  M_young[1] = dataFile ( ( section + "/model/young" ).data(), 0. );
263  M_poisson[1] = dataFile ( ( section + "/model/poisson" ).data(), 0. );
264 
265  M_bulk[1] = dataFile ( ( section + "/model/bulk" ).data(), 0. );
266  M_alpha[1] = dataFile ( ( section + "/model/alpha" ).data(), 0. );
267  M_gamma[1] = dataFile ( ( section + "/model/gamma" ).data(), 0. );
268  }
269  else
270  {
271  M_materialsFlagSet = true;
272 
273  // These asserts are commented because in some cases we need to initialize the materials with default Young and Poisson, setting the correct values a posteriori.
274  //ASSERT( M_materialsFlagSet == dataFile.vector_variable_size( ( section + "/physics/young" ).data()), "!!! ERROR: Inconsistent size for Young Modulus !!!");
275  //ASSERT( M_materialsFlagSet == dataFile.vector_variable_size( ( section + "/physics/poisson" ).data() ), "!!! ERROR: Inconsistent size for Poisson Coef. !!!");
276 
277  UInt material (0);
278  for ( UInt i (0) ; i < materialsNumber ; ++i )
279  {
280 
281  M_vectorMaterialFlags.resize ( materialsNumber );
282  material = dataFile ( ( section + "/physics/material_flag" ).data(), 0., i );
283 
284  M_vectorMaterialFlags[i] = material;
285  M_young[material] = dataFile ( ( section + "/model/young" ).data(), 0., i );
286  M_poisson[material] = dataFile ( ( section + "/model/poisson" ).data(), 0., i );
287 
288  M_bulk[material] = dataFile ( ( section + "/model/bulk" ).data(), 0.0, i );
289  M_alpha[material] = dataFile ( ( section + "/model/alpha" ).data(), 0.0, i );
290  M_gamma[material] = dataFile ( ( section + "/model/gamma" ).data(), 0.0, i );
291  }
292  }
293 
294  if( !M_constitutiveLaw.compare("anisotropic") )
295  {
296  M_stiffnessParametersFibers .resize ( M_numberFibers );
297  M_nonlinearityParametersFibers .resize ( M_numberFibers );
298  M_distributionParametersFibers .resize ( M_numberFibers );
299 
300  if( !M_solidTypeAnisotropic.compare("multimechanism") ||
301  !M_solidTypeAnisotropic.compare("holzapfelGeneralized") )
302  {
303  M_characteristicStretch .resize ( M_numberFibers );
304  }
305 
306  for ( UInt i (0) ; i < M_numberFibers ; ++i )
307  {
308  M_stiffnessParametersFibers[ i ] = dataFile ( ( section + "/model/fibers/stiffness" ).data(), 0., i );
309  M_nonlinearityParametersFibers[ i ] = dataFile ( ( section + "/model/fibers/nonlinearity" ).data(), 0., i );
310 
311  if( !M_solidTypeAnisotropic.compare("multimechanism") ||
312  !M_solidTypeAnisotropic.compare("holzapfelGeneralized") )
313  {
314  M_characteristicStretch[ i ] = dataFile ( ( section + "/model/fibers/stretch" ).data(), 0., i );
315  }
316 
317  if( !M_solidTypeAnisotropic.compare("distributedHolzapfel") )
318  {
319  M_distributionParametersFibers[ i ] = dataFile ( ( section + "/model/fibers/distribution" ).data(), 0., i );
320  }
321  }
322  M_epsilon = dataFile ( ( section + "/model/fibers/smoothness" ).data(), 0. );
323  M_fiberActivation = dataFile ( ( section + "/model/fiberActivation" ).data(), "implicit" );
324  M_toleranceActivation = dataFile ( ( section + "/model/fibers/tolActivation" ).data(), 0.001 );
325  }
326 
327  // space_discretization
328  M_order = dataFile ( ( section + "/space_discretization/order" ).data(), "P1" );
329 
330  // miscellaneous
331  M_verbose = dataFile ( ( section + "/miscellaneous/verbose" ).data(), 0 );
332  M_useExactJacobian = dataFile ( ( section + "/useExactJacobian" ).data(), false );
333 
334  // Problem - Non Linear Richardson Parameters
335  M_maxSubIterationNumber = dataFile ( ( section + "/newton/maxSubIter" ).data(), 300 );
336  M_absoluteTolerance = dataFile ( ( section + "/newton/abstol" ).data(), 1.e-07 );
337  M_relativeTolerance = dataFile ( ( section + "/newton/reltol" ).data(), 1.e-07 );
338  M_errorTolerance = dataFile ( ( section + "/newton/etamax" ).data(), 1.e-03 );
339  M_NonLinearLineSearch = static_cast<Int> ( dataFile ( ( section + "/newton/NonLinearLineSearch" ).data(), 0 ) );
340 
341 }
342 
343 void
344 StructuralConstitutiveLawData::showMe ( std::ostream& output ) const
345 {
346  // physics
347  output << "\n*** Values for data [solid/physics]\n\n";
348  output << "external pressure = " << M_externalPressure << std::endl;
349  output << "density = " << M_density << std::endl;
350  output << "thickness = " << M_thickness << std::endl;
351  for ( materialContainerIterator_Type i = M_young.begin() ; i != M_young.end() ; ++i )
352  {
353  output << "young[" << i->first << "] = " << i->second << std::endl;
354  }
355  for ( materialContainerIterator_Type i = M_poisson.begin() ; i != M_poisson.end() ; ++i )
356  {
357  output << "poisson[" << i->first << "] = " << i->second << std::endl;
358  }
359 
360  for ( materialContainerIterator_Type i = M_bulk.begin() ; i != M_bulk.end() ; ++i )
361  {
362  output << "bulk[" << i->first << "] = " << i->second << std::endl;
363  }
364 
365  for ( materialContainerIterator_Type i = M_alpha.begin() ; i != M_alpha.end() ; ++i )
366  {
367  output << "alpha[" << i->first << "] = " << i->second << std::endl;
368  }
369 
370  for ( materialContainerIterator_Type i = M_gamma.begin() ; i != M_gamma.end() ; ++i )
371  {
372  output << "gamma[" << i->first << "] = " << i->second << std::endl;
373  }
374 
375  for ( materialContainerIterator_Type i = M_poisson.begin() ; i != M_poisson.end() ; ++i )
376  {
377  output << "Lame - lambda[" << i->first << "] = " << lambda ( i->first ) << std::endl;
378  output << "Lame - mu[" << i->first << "] = " << mu ( i->first ) << std::endl;
379  }
380 
381  for ( UInt i (0); i < M_vectorMaterialFlags.size(); i++ )
382  {
383  output << "Position:" << i << " -> Material Flag: = " << M_vectorMaterialFlags[i] << std::endl;
384  }
385 
386 
387  output << "\n*** Values for data [solid/miscellaneous]\n\n";
388  output << "verbose = " << M_verbose << std::endl;
389 
390  output << "\n*** Values for data [solid/space_discretization]\n\n";
391  output << "FE order = " << M_order << std::endl;
392 
393  output << "\n*** Values for data [solid/time_discretization]\n\n";
394  M_time->showMe ( output );
395  M_timeAdvance->showMe ( output );
396 
397  output << " Informations on the constitutive law " << std::endl;
398  output << " Type of constitutive law " << M_constitutiveLaw << std::endl;
399  output << " Isotropic Part: " << M_solidTypeIsotropic << std::endl;
400 
401  if( !M_constitutiveLaw.compare("anisotropic") )
402  {
403  output << " Anisotropic Part: " << M_solidTypeAnisotropic << std::endl;
404 
405  for ( UInt i (0) ; i < M_numberFibers ; ++i )
406  {
407  std::cout << i + 1 << "-th coupled of parameters ( stiffness, nonlinearity ) : ( " << M_stiffnessParametersFibers[ i ]
408  << ", " << M_nonlinearityParametersFibers[ i ] << " ); " << std::endl;
409  }
410 
411  if( !M_solidTypeAnisotropic.compare("multimechanism") ||
412  !M_solidTypeAnisotropic.compare("holzapfelGeneralized"))
413  {
414  for ( UInt i (0) ; i < M_numberFibers ; ++i )
415  {
416  std::cout << i + 1
417  << "-th characteristic stretch : " << M_characteristicStretch[ i ]
418  << std::endl;
419  }
420  }
421 
422  if( !M_solidTypeAnisotropic.compare("distributedHolzapfel") )
423  {
424  for ( UInt i (0) ; i < M_numberFibers ; ++i )
425  {
426  std::cout << i + 1
427  << "-th distribution: " << M_distributionParametersFibers[ i ]
428  << std::endl;
429  }
430  }
431  }
432 }
433 
434 // ===================================================
435 // Get Method
436 // ===================================================
437 Real
438 StructuralConstitutiveLawData::poisson ( const UInt& material ) const
439 {
440  materialContainer_Type::const_iterator IT;
441 
442  if ( M_materialsFlagSet )
443  {
444  IT = M_poisson.find ( material );
445  }
446  else
447  {
448  IT = M_poisson.find ( 1 );
449  }
450 
451  if ( IT != M_poisson.end() )
452  {
453  return IT->second;
454  }
455  else
456  {
457  std::cout << " !!! Warning: the Poisson modulus has not been set !!!" << std::endl;
458  return 0;
459  }
460 }
461 
462 Real
463 StructuralConstitutiveLawData::young ( const UInt& material ) const
464 {
465  materialContainer_Type::const_iterator IT;
466  if ( M_materialsFlagSet )
467  {
468  IT = M_young.find ( material );
469  }
470  else
471  {
472  IT = M_young.find ( 1 );
473  }
474 
475  if ( IT != M_young.end() )
476  {
477  return IT->second;
478  }
479  else
480  {
481  std::cout << " !!! Warning: the Young modulus has not been set !!!" << std::endl;
482  return 0;
483  }
484 }
485 
486 Real
487 StructuralConstitutiveLawData::bulk ( const UInt& material ) const
488 {
489  materialContainer_Type::const_iterator IT;
490  if ( M_materialsFlagSet )
491  {
492  IT = M_bulk.find ( material );
493  }
494  else
495  {
496  IT = M_bulk.find ( 1 );
497  }
498 
499  if ( IT != M_bulk.end() )
500  {
501  return IT->second;
502  }
503  else
504  {
505  std::cout << " !!! Warning: the bulk modulus has not been set !!!" << std::endl;
506  return 0;
507  }
508 }
509 
510 Real
511 StructuralConstitutiveLawData::alpha ( const UInt& material ) const
512 {
513  materialContainer_Type::const_iterator IT;
514  if ( M_materialsFlagSet )
515  {
516  IT = M_alpha.find ( material );
517  }
518  else
519  {
520  IT = M_alpha.find ( 1 );
521  }
522 
523  if ( IT != M_alpha.end() )
524  {
525  return IT->second;
526  }
527  else
528  {
529  std::cout << " !!! Warning: the alpha modulus has not been set !!!" << std::endl;
530  return 0;
531  }
532 }
533 
534 Real
535 StructuralConstitutiveLawData::gamma ( const UInt& material ) const
536 {
537  materialContainer_Type::const_iterator IT;
538  if ( M_materialsFlagSet )
539  {
540  IT = M_gamma.find ( material );
541  }
542  else
543  {
544  IT = M_gamma.find ( 1 );
545  }
546 
547  if ( IT != M_gamma.end() )
548  {
549  return IT->second;
550  }
551  else
552  {
553  std::cout << " !!! Warning: the gamma modulus has not been set !!!" << std::endl;
554  return 0;
555  }
556 }
557 
558 
559 Real
560 StructuralConstitutiveLawData::lambda ( const UInt& material ) const
561 {
562  Real youngC, poissonC;
563 
564  youngC = this->young ( material );
565  poissonC = this->poisson ( material );
566 
567  return youngC * poissonC / ( ( 1.0 + poissonC ) * ( 1.0 - 2.0 * poissonC ) );
568 }
569 
570 Real
571 StructuralConstitutiveLawData::mu ( const UInt& material ) const
572 {
573  Real youngC, poissonC;
574 
575  youngC = this->young ( material );
576  poissonC = this->poisson ( material );
577 
578  return youngC / ( 2.0 * ( 1.0 + poissonC ) );
579 }
580 
581 }
void updateInverseJacobian(const UInt &iQuadPt)
#define ASSERT(X, A)
Definition: LifeAssert.hpp:90
double Real
Generic real data.
Definition: LifeV.hpp:175
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191