CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
umat_ciarlet_el.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine umat_ciarlet_el (amat, iel, iint, kode, elconloc, emec, emec0, beta, xokl, voj, xkl, vj, ithermal, t1l, dtime, time, ttime, icmd, ielas, mi, nstate_, xstateini, xstate, stre, stiff, iorien, pgauss, orab)
 
subroutine voigt_33mat_to_6vec (mat, vec)
 
subroutine voigt_tetrad_to_matrix (C, stiff)
 
subroutine s2_ciarlet (Cb, lamda, mu, S2, Cbi, detC)
 
subroutine ds2_ciarlet_de (lamda, mu, detC, Cbi, A)
 
subroutine m33inv_det (A, AINV, DET, OK_FLAG)
 

Function/Subroutine Documentation

◆ ds2_ciarlet_de()

subroutine ds2_ciarlet_de ( double precision  lamda,
double precision  mu,
double precision  detC,
double precision, dimension(3,3)  Cbi,
double precision, dimension(3,3,3,3)  A 
)
284 C computes linearization of 2PK stresses with E
285 C for Ciarlet-model
286  implicit none
287 C input:
288  double precision lamda,mu,detc,cbi(3,3)
289 C output:
290  double precision a(3,3,3,3)
291 C local:
292  double precision f1,f2
293  integer i,j,k,l
294 
295  f1 = lamda*detc
296  f2 = 2.d0*mu - lamda*(detc-1.d0)
297  do i=1,3
298  do j=1,3
299  do k=1,3
300  do l=1,3
301  a(i,j,k,l) =
302  & f1 * cbi(k,l)*cbi(i,j) +
303  & f2 * cbi(i,k)*cbi(l,j)
304  enddo
305  enddo
306  enddo
307  enddo
308  return
static double * f1
Definition: objectivemain_se.c:47

◆ m33inv_det()

subroutine m33inv_det ( double precision, dimension(3,3), intent(in)  A,
double precision, dimension(3,3), intent(out)  AINV,
double precision  DET,
logical, intent(out)  OK_FLAG 
)
312 C
313 C
314 C !******************************************************************
315 C ! M33INV_DET - Compute the inverse of a 3x3 matrix.
316 C !
317 C ! A = input 3x3 matrix to be inverted
318 C ! AINV = output 3x3 inverse of matrix A
319 C ! OK_FLAG = (output) .TRUE. if the input matrix could be inverted,
320 C ! and .FALSE. if the input matrix is singular.
321 C !******************************************************************
322 
323  IMPLICIT NONE
324 
325  DOUBLE PRECISION, DIMENSION(3,3), INTENT(IN) :: a
326  DOUBLE PRECISION, DIMENSION(3,3), INTENT(OUT) :: ainv
327  LOGICAL, INTENT(OUT) :: ok_flag
328 
329  DOUBLE PRECISION, PARAMETER :: eps = 1.0d-10
330  DOUBLE PRECISION :: det
331  DOUBLE PRECISION, DIMENSION(3,3) :: cofactor
332 
333 
334  det = a(1,1)*a(2,2)*a(3,3) - a(1,1)*a(2,3)*a(3,2)
335  & - a(1,2)*a(2,1)*a(3,3) + a(1,2)*a(2,3)*a(3,1)
336  & + a(1,3)*a(2,1)*a(3,2) - a(1,3)*a(2,2)*a(3,1)
337 
338  IF (abs(det) .LE. eps) THEN
339  ainv = 0.0d0
340  ok_flag = .false.
341  RETURN
342  END IF
343 
344  cofactor(1,1) = +(a(2,2)*a(3,3)-a(2,3)*a(3,2))
345  cofactor(1,2) = -(a(2,1)*a(3,3)-a(2,3)*a(3,1))
346  cofactor(1,3) = +(a(2,1)*a(3,2)-a(2,2)*a(3,1))
347  cofactor(2,1) = -(a(1,2)*a(3,3)-a(1,3)*a(3,2))
348  cofactor(2,2) = +(a(1,1)*a(3,3)-a(1,3)*a(3,1))
349  cofactor(2,3) = -(a(1,1)*a(3,2)-a(1,2)*a(3,1))
350  cofactor(3,1) = +(a(1,2)*a(2,3)-a(1,3)*a(2,2))
351  cofactor(3,2) = -(a(1,1)*a(2,3)-a(1,3)*a(2,1))
352  cofactor(3,3) = +(a(1,1)*a(2,2)-a(1,2)*a(2,1))
353 
354  ainv = transpose(cofactor) / det
355 
356  ok_flag = .true.
357 
358  RETURN

◆ s2_ciarlet()

subroutine s2_ciarlet ( double precision, dimension(3,3)  Cb,
double precision  lamda,
double precision  mu,
double precision, dimension(3,3)  S2,
double precision, dimension(3,3)  Cbi,
double precision  detC 
)
249 C computes 2PK stresses for Ciarlet-model
250 C
251  implicit none
252 C input:
253  double precision cb(3,3),lamda,mu
254 C output:
255  double precision s2(3,3), cbi(3,3), detc
256 C local:
257  double precision id(3,3)
258  double precision f1
259  integer i,j
260  logical ok_flag
261 
262 C Set id:
263  do i=1,3
264  do j=1,3
265  id(i,j)=0.d0
266  enddo
267  id(i,i)=1.d0
268  enddo
269 
270 C Inverse of Cb and det(C):
271  call m33inv_det(cb, cbi, detc, ok_flag)
272 C
273 C
274  f1 = 0.5d0*lamda*(detc-1.d0)
275  do i=1,3
276  do j=1,3
277  s2(i,j)=f1*cbi(i,j) + mu * ( id(i,j)-cbi(i,j) )
278  enddo
279  enddo
280  return
static double * f1
Definition: objectivemain_se.c:47
subroutine m33inv_det(A, AINV, DET, OK_FLAG)
Definition: umat_ciarlet_el.f:312

◆ umat_ciarlet_el()

subroutine umat_ciarlet_el ( character*80  amat,
integer  iel,
integer  iint,
integer  kode,
real*8, dimension(21)  elconloc,
real*8, dimension(6)  emec,
real*8, dimension(6)  emec0,
real*8, dimension(6)  beta,
real*8, dimension(3,3)  xokl,
real*8  voj,
real*8, dimension(3,3)  xkl,
real*8  vj,
integer  ithermal,
real*8  t1l,
real*8  dtime,
real*8  time,
real*8  ttime,
integer  icmd,
integer  ielas,
integer, dimension(*)  mi,
integer  nstate_,
real*8, dimension(nstate_,mi(1),*)  xstateini,
real*8, dimension(nstate_,mi(1),*)  xstate,
real*8, dimension(6)  stre,
real*8, dimension(21)  stiff,
integer  iorien,
real*8, dimension(3)  pgauss,
real*8, dimension(7,*)  orab 
)
27 !
28 ! calculates stiffness and stresses for a user defined material
29 ! law
30 !
31 ! icmd=3: calcutates stress at mechanical strain
32 ! else: calculates stress at mechanical strain and the stiffness
33 ! matrix
34 !
35 ! INPUT:
36 !
37 ! amat material name
38 ! iel element number
39 ! iint integration point number
40 !
41 ! kode material type (-100-#of constants entered
42 ! under *USER MATERIAL): can be used for materials
43 ! with varying number of constants
44 !
45 ! elconloc(21) user defined constants defined by the keyword
46 ! card *USER MATERIAL (max. 21, actual # =
47 ! -kode-100), interpolated for the
48 ! actual temperature t1l
49 !
50 ! emec(6) Lagrange mechanical strain tensor (component order:
51 ! 11,22,33,12,13,23) at the end of the increment
52 ! (thermal strains are subtracted)
53 ! emec0(6) Lagrange mechanical strain tensor at the start of the
54 ! increment (thermal strains are subtracted)
55 ! beta(6) residual stress tensor (the stress entered under
56 ! the keyword *INITIAL CONDITIONS,TYPE=STRESS)
57 !
58 ! xokl(3,3) deformation gradient at the start of the increment
59 ! voj Jacobian at the start of the increment
60 ! xkl(3,3) deformation gradient at the end of the increment
61 ! vj Jacobian at the end of the increment
62 !
63 ! ithermal 0: no thermal effects are taken into account
64 ! >0: thermal effects are taken into account (triggered
65 ! by the keyword *INITIAL CONDITIONS,TYPE=TEMPERATURE)
66 ! t1l temperature at the end of the increment
67 ! dtime time length of the increment
68 ! time step time at the end of the current increment
69 ! ttime total time at the start of the current increment
70 !
71 ! icmd not equal to 3: calculate stress and stiffness
72 ! 3: calculate only stress
73 ! ielas 0: no elastic iteration: irreversible effects
74 ! are allowed
75 ! 1: elastic iteration, i.e. no irreversible
76 ! deformation allowed
77 !
78 ! mi(1) max. # of integration points per element in the
79 ! model
80 ! nstate_ max. # of state variables in the model
81 !
82 ! xstateini(nstate_,mi(1),# of elements)
83 ! state variables at the start of the increment
84 ! xstate(nstate_,mi(1),# of elements)
85 ! state variables at the end of the increment
86 !
87 ! stre(6) Piola-Kirchhoff stress of the second kind
88 ! at the start of the increment
89 !
90 ! iorien number of the local coordinate axis system
91 ! in the integration point at stake (takes the value
92 ! 0 if no local system applies)
93 ! pgauss(3) global coordinates of the integration point
94 ! orab(7,*) description of all local coordinate systems.
95 ! If a local coordinate system applies the global
96 ! tensors can be obtained by premultiplying the local
97 ! tensors with skl(3,3). skl is determined by calling
98 ! the subroutine transformatrix:
99 ! call transformatrix(orab(1,iorien),pgauss,skl)
100 !
101 !
102 ! OUTPUT:
103 !
104 ! xstate(nstate_,mi(1),# of elements)
105 ! updated state variables at the end of the increment
106 ! stre(6) Piola-Kirchhoff stress of the second kind at the
107 ! end of the increment
108 ! stiff(21): consistent tangent stiffness matrix in the material
109 ! frame of reference at the end of the increment. In
110 ! other words: the derivative of the PK2 stress with
111 ! respect to the Lagrangian strain tensor. The matrix
112 ! is supposed to be symmetric, only the upper half is
113 ! to be given in the same order as for a fully
114 ! anisotropic elastic material (*ELASTIC,TYPE=ANISO).
115 ! Notice that the matrix is an integral part of the
116 ! fourth order material tensor, i.e. the Voigt notation
117 ! is not used.
118 !
119  implicit none
120 !
121  character*80 amat
122  integer ithermal,icmd,kode,ielas,iel,iint,nstate_,mi(*),iorien
123  real*8 elconloc(21),stiff(21),emec(6),emec0(6),beta(6),stre(6),
124  & vj,t1l,dtime,xkl(3,3),xokl(3,3),voj,pgauss(3),orab(7,*),
125  & time,ttime
126  real*8 xstate(nstate_,mi(1),*),xstateini(nstate_,mi(1),*)
127 !
128 !
129 ! Ela-Pla-modifications:
130  real*8 c1(3,3), c1i(3,3), detc1, ds2de(3,3,3,3), s2pk1(3,3)
131  real*8 lamda, mu
132 
133  lamda=elconloc(1)
134  mu=elconloc(2)
135 
136 C ciarlet_doc
137 C
138 C Compute pullback C1(3,3) of metric tensor g.
139  c1 = matmul(transpose(xkl),xkl)
140 C
141 C 2PK-Stress at C:
142  call s2_ciarlet(c1,lamda,mu, s2pk1,c1i,detc1)
143 C Tangent/linearization:
144  call ds2_ciarlet_de(lamda,mu,detc1,c1i,ds2de)
145 
146 C Dhondt-Voigt-Order, see umat_lin_iso_el.f
147  call voigt_33mat_to_6vec(s2pk1,stre)
148  call voigt_tetrad_to_matrix(ds2de,stiff)
149 
150 C ciarlet_cod
151 
152  return
subroutine ds2_ciarlet_de(lamda, mu, detC, Cbi, A)
Definition: umat_ciarlet_el.f:284
static double * c1
Definition: mafillvcompmain.c:30
subroutine s2_ciarlet(Cb, lamda, mu, S2, Cbi, detC)
Definition: umat_ciarlet_el.f:249
subroutine voigt_tetrad_to_matrix(C, stiff)
Definition: umat_ciarlet_el.f:176
subroutine voigt_33mat_to_6vec(mat, vec)
Definition: umat_ciarlet_el.f:158

◆ voigt_33mat_to_6vec()

subroutine voigt_33mat_to_6vec ( double precision, dimension(3,3)  mat,
double precision, dimension(6)  vec 
)
158  implicit none
159 C in:
160  double precision mat(3,3)
161 C out:
162  double precision vec(6)
163 C 11,22,33,12,13,23
164  vec(1)=mat(1,1)
165  vec(2)=mat(2,2)
166  vec(3)=mat(3,3)
167  vec(4)=mat(1,2)
168  vec(5)=mat(1,3)
169  vec(6)=mat(2,3)
170 
171  return

◆ voigt_tetrad_to_matrix()

subroutine voigt_tetrad_to_matrix ( double precision, dimension(3,3,3,3)  C,
double precision, dimension(21)  stiff 
)
176  implicit none
177 C in:
178  double precision c(3,3,3,3)
179 C out:
180  double precision stiff(21)
181 
182 C indices according to
183 C 1) file anisotropic.f and
184 C 2) html-documentation
185 C -> Making C symmetric in the **last two** indices:
186 C
187 C stiff stores:
188 C 1111, 1122, 2222, 1133
189 C 2233, 3333, 1112, 2212
190 C
191 C 1111
192  stiff(1) = c(1,1,1,1)
193 C 1122 = 2211
194  stiff(2) = c(1,1,2,2)
195 C 2222
196  stiff(3) = c(2,2,2,2)
197 C 1133 = 3311
198  stiff(4) = c(1,1,3,3)
199 C 2233 = 3322
200  stiff(5) = c(2,2,3,3)
201 C 3333
202  stiff(6) = c(3,3,3,3)
203 C 1112 = 1121 = 1211 = 2111
204  stiff(7) = 0.5d0*(c(1,1,1,2)+c(1,1,2,1))
205 C 2212 = 1222 = 2122 = 2221
206  stiff(8) = 0.5d0*(c(2,2,1,2)+c(2,2,2,1))
207 C
208 C stiff stores:
209 C 3312, 1212, 1113, 2213
210 C 3313, 1213, 1313, 1123
211 C
212 C 3312 = 1233 = 2133 = 3321
213  stiff(9) = 0.5d0*(c(3,3,1,2)+c(3,3,2,1))
214 C 1212 = 1221 = 2112 = 2121
215  stiff(10) = 0.5d0*(c(1,2,1,2)+c(1,2,2,1))
216 C 1113 = 1131 = 1311 = 3111
217  stiff(11) = 0.5d0*(c(1,1,1,3)+c(1,1,3,1))
218 C 2213 = 1322 = 2231 = 3122
219  stiff(12) = 0.5d0*(c(2,2,1,3)+c(2,2,3,1))
220 C
221 C 3313 = 1333 = 3133 = 3331
222  stiff(13) = 0.5d0*(c(3,3,1,3)+c(3,3,3,1))
223 C 1213 = 1231 = 1312 = 1321 = 2113 = 2131 = 3112 = 3121:
224  stiff(14) = 0.5d0*(c(1,2,1,3)+c(1,2,3,1))
225 C 1313 = 1331 = 3113 = 3131
226  stiff(15) = 0.5d0*(c(1,3,1,3)+c(1,3,3,1))
227 C 1123 = 1132 = 2311 = 3211
228  stiff(16) = 0.5d0*(c(1,1,2,3)+c(1,1,3,2))
229 C
230 C stiff stores:
231 C 2223, 3323, 1223, 1323
232 C 2323
233 C
234 C 2223 = 2232 = 2322 = 3222
235  stiff(17) = 0.5d0*(c(2,2,2,3)+c(2,2,3,2))
236 C 3323 = 2333 = 3233 = 3332
237  stiff(18) = 0.5d0*(c(3,3,2,3)+c(3,3,3,2))
238 C 1223 = 1232 = 2123 = 2132 = 2312 = 2321 = 3212 = 3221
239  stiff(19) = 0.5d0*(c(1,2,2,3)+c(1,2,3,2))
240 C 1323 = 1332 = 2313 = 2331 = 3123 = 3132 = 3213 = 3231
241  stiff(20) = 0.5d0*(c(1,3,2,3)+c(1,3,3,2))
242 C 2323 = 2332
243  stiff(21) = 0.5d0*(c(2,3,2,3)+c(2,3,3,2))
244 
245  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)