-
Notifications
You must be signed in to change notification settings - Fork 5
/
mooney_cc.h
130 lines (97 loc) · 2.93 KB
/
mooney_cc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#ifndef MOONEY_CC_H_
#define MOONEY_CC_H_
#include <dense_vector.h>
#include <dense_matrix.h>
#include <vector_value.h>
#include <tensor_value.h>
#include <getpot.h>
#include "defines.h"
#if MOONEY
#if COMPRESSIBLE && ! PORO
class MooneyCurrentConfig {
public:
MooneyCurrentConfig(
const std::vector<std::vector<RealGradient> >& dphi) :
dphi(dphi) {
E = 0.1;
nu = 0.3;
K1=1;
K2=0;
}
#endif
#if INCOMPRESSIBLE || (CHAP)
class MooneyCurrentConfig {
public:
MooneyCurrentConfig(
const std::vector<std::vector<RealGradient> >& dphi, const std::vector<std::vector<Real> >& psi) :
dphi(dphi),psi(psi) {
E = 1;
nu = 0.3;
// mu is the shear modulus is one of several quantities for measuring the stiffness of materials
//Polyethylene (plastic) mu= 0.117
///Rubber mu= 0.0006
K1=1;
K2=0;
}
#endif
/**
* Initialize the class for the given displacement gradient at the
* specified quadrature point.
*/
void init_for_qp(VectorValue<Gradient> & grad_u, Number & p_current, unsigned int qp);
void init_for_qp(VectorValue<Gradient> & grad_u, Number & p_current, unsigned int qp, Real m);
/**
* Return the residual vector for the current state.
*/
void get_residual(DenseVector<Real> & residuum, unsigned int & i);
/**
* Return the stiffness matrix for the current state.
*/
void get_linearized_stiffness(DenseMatrix<Real> & stiffness,
unsigned int & i, unsigned int & j);
#if INCOMPRESSIBLE || (CHAP)
void get_linearized_p_uvw_stiffness(DenseVector<Real> & p_stiffness, unsigned int & i, unsigned int & j);
void get_linearized_uvw_p_stiffness(DenseVector<Real> & p_stiffness, unsigned int & i, unsigned int & j);
void get_p_residual(DenseVector<Real> & p_residuum, unsigned int & i);
#endif
/**
* Flag to indicate if it is necessary to calculate values for stiffness
* matrix during initialization.
*/
bool calculate_linearized_stiffness;
//private:
void build_b_0_mat(int i, DenseMatrix<Real>& b_l_mat);
void calculate_stress();
void calculate_tangent();
static void tensor_to_voigt(const RealTensor &tensor, DenseVector<Real> &vec);
static void tensorOtensor_to_voigt(const RealTensor &tensorB, const RealTensor &tensorA, DenseMatrix<Real> &mat);
static void z_ref_to_voigt(const RealTensor &tensorB, const RealTensor &tensorA, DenseMatrix<Real> &mat);
void c_update(RealTensor C);
unsigned int current_qp;
const std::vector<std::vector<RealGradient> >& dphi;
Real K1 ;
Real K2 ;
Real m;
Real p_solid;
RealTensor Identity;
Real I_1;
Real I_2;
Real I_3;
Real J;
Real f ;
Real gamma;
DenseMatrix<Real> C_mat;
Real E;
Real nu;
#if INCOMPRESSIBLE || (CHAP)
Number p_current;
// Real detF;
//RealTensor invF;
const std::vector<std::vector<Real> >& psi;
#endif
RealTensor F, S, tau, sigma, C, invC, b, Ft;
DenseMatrix<Real> B_L;
DenseMatrix<Real> B_K;
};
#endif
#endif /* Mooney_CC_H_ */