DuvautLionsViscosity.h
Go to the documentation of this file.
1 /* ---------------------------------------------------------------------
2  * _
3  * _ __ ___ __ _ _ __ _ __ ___ ___ | |_
4  * | '_ ` _ \ / _` | '__| '_ ` _ \ / _ \| __|
5  * | | | | | | (_| | | | | | | | | (_) | |_
6  * |_| |_| |_|\__,_|_| |_| |_| |_|\___/ \__|
7  *
8  * Unit of Strength of Materials and Structural Analysis
9  * University of Innsbruck,
10  * 2020 - today
11  *
12  * festigkeitslehre@uibk.ac.at
13  *
14  * Matthias Neuner matthias.neuner@uibk.ac.at
15  *
16  * This file is part of the MAteRialMOdellingToolbox (marmot).
17  *
18  * This library is free software; you can redistribute it and/or
19  * modify it under the terms of the GNU Lesser General Public
20  * License as published by the Free Software Foundation; either
21  * version 2.1 of the License, or (at your option) any later version.
22  *
23  * The full text of the license can be found in the file LICENSE.md at
24  * the top level directory of marmot.
25  * ---------------------------------------------------------------------
26  */
27 
28 #pragma once
29 #include "Marmot/MarmotTypedefs.h"
30 
31 namespace Marmot {
32  namespace ContinuumMechanics::CommonConstitutiveModels {
38  template < int nMatTangentSize >
40  private:
41  /*
42  * Viscosity parameter for Duvault-Lions viscosity*/
43  const double viscosity;
44 
45  public:
46  typedef Eigen::Matrix< double, nMatTangentSize, nMatTangentSize > TangentSizedMatrix;
47 
49 
53  double applyViscosityOnStateVar( double stateVarTrial, double StateVarInf, double dT );
58  const Marmot::Vector6d& stressInf,
59  double dT );
64  TangentSizedMatrix applyViscosityOnMatTangent( const TangentSizedMatrix& matTangentInv, double dT );
65  };
66  } // namespace ContinuumMechanics::CommonConstitutiveModels
67 } // namespace Marmot
68 
69 namespace Marmot {
70  namespace ContinuumMechanics::CommonConstitutiveModels {
71  template < int s >
72  DuvautLionsViscosity< s >::DuvautLionsViscosity( double viscosity ) : viscosity( viscosity )
73  {
74  }
75 
76  template < int s >
77  double DuvautLionsViscosity< s >::applyViscosityOnStateVar( double stateVarTrial, double StateVarInf, double dT )
78  {
79  return ( stateVarTrial + ( dT / viscosity ) * StateVarInf ) / ( dT / viscosity + 1 );
80  }
81 
82  template < int s >
84  const Marmot::Vector6d& stressInf,
85  double dT )
86  {
87  return ( trialStress + ( dT / viscosity ) * stressInf ) / ( dT / viscosity + 1 );
88  }
89 
90  template < int s >
92  const TangentSizedMatrix& matTangentInv,
93  double dT )
94  {
95  return ( 1 / ( 1 + dT / viscosity ) ) * ( TangentSizedMatrix::Identity() + dT / viscosity * matTangentInv );
96  }
97  } // namespace ContinuumMechanics::CommonConstitutiveModels
98 } // namespace Marmot
Marmot::ContinuumMechanics::CommonConstitutiveModels::DuvautLionsViscosity
Implementation of Duvaut-Lions viscosity for a material with nMatTangentSize internal degrees of free...
Definition: DuvautLionsViscosity.h:39
MarmotTypedefs.h
Marmot::ContinuumMechanics::CommonConstitutiveModels::DuvautLionsViscosity::applyViscosityOnMatTangent
TangentSizedMatrix applyViscosityOnMatTangent(const TangentSizedMatrix &matTangentInv, double dT)
Definition: DuvautLionsViscosity.h:91
Marmot::ContinuumMechanics::CommonConstitutiveModels::DuvautLionsViscosity::applyViscosityOnStress
Marmot::Vector6d applyViscosityOnStress(const Marmot::Vector6d &trialStress, const Marmot::Vector6d &stressInf, double dT)
Definition: DuvautLionsViscosity.h:83
Marmot
This file includes functions needed for calculations with stress and strain tensors written in voigt ...
Definition: MarmotTesting.h:30
Marmot::ContinuumMechanics::CommonConstitutiveModels::DuvautLionsViscosity::DuvautLionsViscosity
DuvautLionsViscosity(double viscosity)
Definition: DuvautLionsViscosity.h:72
Marmot::ContinuumMechanics::CommonConstitutiveModels::DuvautLionsViscosity::TangentSizedMatrix
Eigen::Matrix< double, nMatTangentSize, nMatTangentSize > TangentSizedMatrix
Definition: DuvautLionsViscosity.h:46
Marmot::Vector6d
Eigen::Matrix< double, 6, 1 > Vector6d
Definition: MarmotTypedefs.h:43
Marmot::ContinuumMechanics::CommonConstitutiveModels::DuvautLionsViscosity::applyViscosityOnStateVar
double applyViscosityOnStateVar(double stateVarTrial, double StateVarInf, double dT)
Definition: DuvautLionsViscosity.h:77
Marmot::ContinuumMechanics::CommonConstitutiveModels::DuvautLionsViscosity::viscosity
const double viscosity
Definition: DuvautLionsViscosity.h:43