Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
v3d4_NeoHookeanInCompressDef.f90
Go to the documentation of this file.
1 !*********************************************************************
2 !* Illinois Open Source License *
3 !* *
4 !* University of Illinois/NCSA *
5 !* Open Source License *
6 !* *
7 !* Copyright@2008, University of Illinois. All rights reserved. *
8 !* *
9 !* Developed by: *
10 !* *
11 !* Center for Simulation of Advanced Rockets *
12 !* *
13 !* University of Illinois *
14 !* *
15 !* www.csar.uiuc.edu *
16 !* *
17 !* Permission is hereby granted, free of charge, to any person *
18 !* obtaining a copy of this software and associated documentation *
19 !* files (the "Software"), to deal with the Software without *
20 !* restriction, including without limitation the rights to use, *
21 !* copy, modify, merge, publish, distribute, sublicense, and/or *
22 !* sell copies of the Software, and to permit persons to whom the *
23 !* Software is furnished to do so, subject to the following *
24 !* conditions: *
25 !* *
26 !* *
27 !* @ Redistributions of source code must retain the above copyright *
28 !* notice, this list of conditions and the following disclaimers. *
29 !* *
30 !* @ Redistributions in binary form must reproduce the above *
31 !* copyright notice, this list of conditions and the following *
32 !* disclaimers in the documentation and/or other materials *
33 !* provided with the distribution. *
34 !* *
35 !* @ Neither the names of the Center for Simulation of Advanced *
36 !* Rockets, the University of Illinois, nor the names of its *
37 !* contributors may be used to endorse or promote products derived *
38 !* from this Software without specific prior written permission. *
39 !* *
40 !* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
41 !* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
42 !* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
43 !* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
44 !* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
45 !* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
46 !* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
47 !* USE OR OTHER DEALINGS WITH THE SOFTWARE. *
48 !*********************************************************************
49 !* Please acknowledge The University of Illinois Center for *
50 !* Simulation of Advanced Rockets in works and publications *
51 !* resulting from this software or its derivatives. *
52 !*********************************************************************
53 SUBROUTINE v3d4_neohookeanincompressdef(coor,matcstet,lmcstet,R_in,d,ci, &
54  s11,s22,s33,s12,s23,s13,numnp,nstart,nend,numcstet,numat_vol, &
55  xmu,xkappa)
56 
57 !________________________________________________________________________
58 !
59 ! V3D4 - Performs displacement based computations for Volumetric 3D
60 ! 4-node tetrahedra large deformation (i.e. nonlinear) elastic
61 ! elements with linear interpolation functions. (constant strain
62 ! tetrahedra). Returns the internal force vector R_in.
63 !
64 ! DATE: 04.2000 AUTHOR: SCOT BREITENFELD
65 !
66 ! Source:
67 ! "Nonlinear continuum mechanics for finite element analysis"
68 ! Javier Bonet and Richard D. Wood
69 ! ISBN 0-521-57272-X
70 
71 !________________________________________________________________________
72 
73  IMPLICIT NONE
74 !---- Global variables
75  INTEGER :: numnp ! number of nodal points
76  INTEGER :: numcstet ! number of CSTet elements
77  INTEGER :: numat_vol ! number of volumetric materials
78 !-- coordinate array
79  REAL*8, DIMENSION(1:3,1:numnp) :: coor
80 !-- elastic stiffness consts
81  REAL*8, DIMENSION(1:9,1:numat_vol) :: ci
82 !-- internal force
83  REAL*8, DIMENSION(1:3*numnp) :: r_in
84 !-- displacement vector
85  REAL*8, DIMENSION(1:3*numnp) :: d
86 !-- CSTet stress
87  REAL*8, DIMENSION(1:numcstet) :: s11, s22, s33, s12, s23, s13
88 !-- x, y and z displacements of nodes
89  REAL*8 :: u1,u2,u3,u4,v1,v2,v3,v4,w1,w2,w3,w4
90 !-- coordinate holding variable
91  REAL*8 :: x1,x2,x3,x4,y1,y2,y3,y4,z1,z2,z3,z4
92 !-- coordinate holding variable
93  REAL*8 :: x1d,x2d,x3d,x4d,y1d,y2d,y3d,y4d,z1d,z2d,z3d,z4d
94 !-- Coordinate subtractions
95  REAL*8 :: x14, x24, x34, y14, y24, y34, z14, z24, z34
96 !-- 6*volume, inverse(6*volume), and the volume
97 ! REAL*8 :: Vx6, vol
98 !-- spacial derivatives
99  REAL*8 :: b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12
100 !-- partial derivatives of the displacement
101  REAL*8 :: dudx,dvdy,dwdz,dudy,dvdx,dvdz,dwdy,dudz,dwdx
102 !-- strains
103  REAL*8 :: e11,e22,e33,e12,e23,e13
104 ! -- connectivity table for CSTet
105  INTEGER, DIMENSION(1:4,1:numcstet) :: lmcstet
106 ! -- mat number for CST element
107  INTEGER, DIMENSION(1:numcstet) :: matcstet
108 ! -- node numbers
109  INTEGER :: n1,n2,n3,n4
110 ! -- dummy and counters
111  INTEGER :: i,j,nstart,nend
112  INTEGER :: k1n1,k1n2,k1n3,k1n4,k2n1,k2n2,k2n3,k2n4
113  INTEGER :: k3n1,k3n2,k3n3,k3n4
114 ! --
115  REAL*8 :: f11, f12, f13, f21, f22, f23, f31, f32, f33
116  REAL*8 :: j1,jsqrd,jsqrdinv
117  REAL*8 :: c11, c12, c13, c21, c22, c23, c31, c32, c33
118  REAL*8, DIMENSION(1:numat_vol) :: xmu, xkappa
119  REAL*8, DIMENSION(1:4,1:4) :: eledb
120  REAL*8,DIMENSION(1:3,1:3) :: xj
121  REAL*8,DIMENSION(1:3,1:3) :: xjv0
122  REAL*8 :: weight = 1.d0/6.d0
123  INTEGER :: id, jd, in, ip
124  REAL*8 :: xcoor
125  REAL*8 :: detjb,detjbv0,evol,theta,press
126  REAL*8 :: ic, iiic,vx6old0,vx6old
127  REAL*8 :: onethird = 1.d0/3.d0
128  REAL*8 :: val11, val21, val31
129 
130  REAL*8 :: v0x6, v0x6inv
131  REAL*8 :: vx6, vx6inv
132  REAL*8 :: vol, vol0
133  REAL*8 :: term1, term2, cinv
134  REAL*8 :: sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8, sh9, sh10, sh11, sh12
135 !-- Coordinate subtractions
136  REAL*8 :: x14d, x24d, x34d, y14d, y24d, y34d, z14d, z24d, z34d
137 !-- Coordinate subtractions: These are to speed up B calculation
138  REAL*8 :: x12d, x13d, y12d, y13d, z12d, z13d
139  REAL*8 :: sigma(3,3),f(3,3),ft(3,3),spk2(3,3), btens(3,3)
140  REAL*8 :: rmat3_det, detf,jinv
141 
142  DO i = nstart, nend
143  j = matcstet(i)
144 
145  n1 = lmcstet(1,i)
146  n2 = lmcstet(2,i)
147  n3 = lmcstet(3,i)
148  n4 = lmcstet(4,i)
149 
150  k3n1 = 3*n1
151  k3n2 = 3*n2
152  k3n3 = 3*n3
153  k3n4 = 3*n4
154 
155  k2n1 = k3n1 - 1
156  k2n2 = k3n2 - 1
157  k2n3 = k3n3 - 1
158  k2n4 = k3n4 - 1
159 
160  k1n1 = k3n1 - 2
161  k1n2 = k3n2 - 2
162  k1n3 = k3n3 - 2
163  k1n4 = k3n4 - 2
164  ! k#n# dummy variables replaces:
165  u1 = d(k1n1) ! (3*n1-2)
166  u2 = d(k1n2) ! (3*n2-2)
167  u3 = d(k1n3) ! (3*n3-2)
168  u4 = d(k1n4) ! (3*n4-2)
169  v1 = d(k2n1) ! (3*n1-1)
170  v2 = d(k2n2) ! (3*n2-1)
171  v3 = d(k2n3) ! (3*n3-1)
172  v4 = d(k2n4) ! (3*n4-1)
173  w1 = d(k3n1) ! (3*n1)
174  w2 = d(k3n2) ! (3*n2)
175  w3 = d(k3n3) ! (3*n3)
176  w4 = d(k3n4) ! (3*n4)
177 
178  x1 = coor(1,n1)
179  x2 = coor(1,n2)
180  x3 = coor(1,n3)
181  x4 = coor(1,n4)
182  y1 = coor(2,n1)
183  y2 = coor(2,n2)
184  y3 = coor(2,n3)
185  y4 = coor(2,n4)
186  z1 = coor(3,n1)
187  z2 = coor(3,n2)
188  z3 = coor(3,n3)
189  z4 = coor(3,n4)
190 
191  x1d = x1 + u1
192  x2d = x2 + u2
193  x3d = x3 + u3
194  x4d = x4 + u4
195  y1d = y1 + v1
196  y2d = y2 + v2
197  y3d = y3 + v3
198  y4d = y4 + v4
199  z1d = z1 + w1
200  z2d = z2 + w2
201  z3d = z3 + w3
202  z4d = z4 + w4
203 !
204 ! creates the Jacobian matrix using equation ???
205 ! Using undeformed coordinates
206 
207  x14 = x1 - x4
208  x24 = x2 - x4
209  x34 = x3 - x4
210  y14 = y1 - y4
211  y24 = y2 - y4
212  y34 = y3 - y4
213  z14 = z1 - z4
214  z24 = z2 - z4
215  z34 = z3 - z4
216 
217  val11 = y24*z34 - z24*y34
218  val21 = -( x24*z34 - z24*x34 )
219  val31 = x24*y34 - y24*x34
220 
221  v0x6 = -( x14*val11 + y14*val21 + z14*val31 )
222 !
223 ! creates the Jacobian matrix using equation ???
224 ! Determines the determinant of xj and checks for zero values
225 !
226 ! Using deformed coordinates
227 
228  x12d = x1d - x2d ! not used in vol. calc
229  x13d = x1d - x3d ! not used in vol. calc
230  x14d = x1d - x4d
231  x24d = x2d - x4d
232  x34d = x3d - x4d
233  y12d = y1d - y2d ! not used in vol. calc
234  y13d = y1d - y3d ! not used in vol. calc
235  y14d = y1d - y4d
236  y24d = y2d - y4d
237  y34d = y3d - y4d
238  z12d = z1d - z2d ! not used in vol. calc
239  z13d = z1d - z3d ! not used in vol. calc
240  z14d = z1d - z4d
241  z24d = z2d - z4d
242  z34d = z3d - z4d
243 
244  val11 = y24d*z34d - z24d*y34d
245  val21 = -( x24d*z34d - z24d*x34d )
246  val31 = x24d*y34d - y24d*x34d
247 
248  vx6 = -( x14d*val11 + y14d*val21 + z14d*val31 )
249 
250  IF(vx6.LE.0.d0) THEN
251  WRITE(*,100) i
252  stop
253  ENDIF
254 
255 
256 ! calculate the volume
257 
258  vol0 = v0x6/6.d0
259  vol = vx6/6.d0
260 
261  v0x6inv = 1.d0/v0x6
262  vx6inv = 1.d0/vx6
263 
264 ! See the maple worksheet 'V3D4.mws' for the derivation of Vx6
265 
266 ! See the maple worksheet 'V3D4.mws' for the derivation of [B]
267 ! NOTE: Factored for a more equivalent/compact form then maple's
268 
269  b1 = ( (y3-y4)*(z2-z4) - (y2-y4)*(z3-z4) ) * v0x6inv
270  b2 = ( (z3-z4)*(x2-x4) - (z2-z4)*(x3-x4) ) * v0x6inv
271  b3 = ( (x3-x4)*(y2-y4) - (x2-x4)*(y3-y4) ) * v0x6inv
272  b4 = ( (y1-y3)*(z1-z4) - (y1-y4)*(z1-z3) ) * v0x6inv
273  b5 = ( (z1-z3)*(x1-x4) - (z1-z4)*(x1-x3) ) * v0x6inv
274  b6 = ( (x1-x3)*(y1-y4) - (x1-x4)*(y1-y3) ) * v0x6inv
275  b7 = ( (y1-y4)*(z1-z2) - (y1-y2)*(z1-z4) ) * v0x6inv
276  b8 = ( (z1-z4)*(x1-x2) - (z1-z2)*(x1-x4) ) * v0x6inv
277  b9 = ( (x1-x4)*(y1-y2) - (x1-x2)*(y1-y4) ) * v0x6inv
278  b10 = ( (y1-y2)*(z1-z3) - (y1-y3)*(z1-z2) ) * v0x6inv
279  b11 = ( (z1-z2)*(x1-x3) - (z1-z3)*(x1-x2) ) * v0x6inv
280  b12 = ( (x1-x2)*(y1-y3) - (x1-x3)*(y1-y2) ) * v0x6inv
281 !
282 ! deformation gradients F
283 !
284  f11 = 1.d0 + ( b1*u1 + b4*u2 + b7*u3 + b10*u4 ) ! 1 + ( dudx )
285  f22 = 1.d0 + ( b2*v1 + b5*v2 + b8*v3 + b11*v4 ) ! 1 + ( dvdy )
286  f33 = 1.d0 + ( b3*w1 + b6*w2 + b9*w3 + b12*w4 ) ! 1 + ( dwdz )
287  f12 = b2*u1 + b5*u2 + b8*u3 + b11*u4 ! dudy
288  f21 = b1*v1 + b4*v2 + b7*v3 + b10*v4 ! dvdx
289  f23 = b3*v1 + b6*v2 + b9*v3 + b12*v4 ! dvdz
290  f32 = b2*w1 + b5*w2 + b8*w3 + b11*w4 ! dwdy
291  f13 = b3*u1 + b6*u2 + b9*u3 + b12*u4 ! dudz
292  f31 = b1*w1 + b4*w2 + b7*w3 + b10*w4 ! dwdx
293 
294  theta = vol/vol0
295 
296  press = xkappa(j)*(theta-1.d0)
297 
298  j1 = f11*(f22*f33-f23*f32)+f12*(f31*f23-f21*f33)+f13*(-f31*f22+f21*f32)
299  IF(j1.LE.0.d0) THEN
300  WRITE(*,*)'Volume has become zero for element',i
301  stop
302  ENDIF
303  jsqrd = j1*j1
304 
305 ! first invariant of C
306 
307  ic = f11**2+f21**2+f31**2+f12**2+f22**2+f32**2+f13**2+f23**2+f33**2
308 
309 ! Third invariant of C
310 
311  iiic = jsqrd
312 
313 ! T
314 ! C = F F = right Cauchy-Green deformation tensor
315 !
316  c11 = (f11*f11+f21*f21+f31*f31)
317  c12 = (f11*f12+f21*f22+f31*f32)
318  c13 = (f11*f13+f21*f23+f31*f33)
319  c21 = c12
320  c22 = (f12*f12+f22*f22+f32*f32)
321  c23 = (f12*f13+f22*f23+f32*f33)
322  c31 = c13
323  c32 = c23
324  c33 = (f13*f13+f23*f23+f33*f33)
325 !
326 ! T
327 ! b = F F = left Cauchy-Green deformation tensor
328 !
329 
330  btens(1,1) = f11**2+f12**2+f13**2
331  btens(1,2) = f11*f21+f12*f22+f13*f23
332  btens(1,3) = f11*f31+f12*f32+f13*f33
333  btens(2,1) = btens(1,2)
334  btens(2,2) = f21**2+f22**2+f23**2
335  btens(2,3) = f21*f31+f22*f32+f23*f33
336  btens(3,1) = btens(1,3)
337  btens(3,2) = btens(2,3)
338  btens(3,3) = f31**2+f32**2+f33**2
339 !
340 ! Cauchy stress
341 
342  call neoinccauchystress(3,xmu(j),j1,btens,sigma)
343  call addpres(3,press,sigma)
344 
345 !
346 ! Second Piola-Kirchoff tensor
347 ! Eq. (5.28), pg. 124
348 
349  jsqrdinv = 1.d0/jsqrd
350 
351  term1 = xmu(j)*iiic**(-onethird)
352  term2 = press*j1
353 
354  cinv = (c22*c33-c23*c32)*jsqrdinv
355  s11(i) = term1*(1.d0-onethird*ic*cinv) + term2*cinv
356  cinv = (c11*c33-c31*c13)*jsqrdinv
357  s22(i) = term1*(1.d0-onethird*ic*cinv) + term2*cinv
358  cinv = (c11*c22-c12*c21)*jsqrdinv
359  s33(i) = term1*(1.d0-onethird*ic*cinv) + term2*cinv
360  cinv = (-c12*c33+c13*c32)*jsqrdinv
361  s12(i) = cinv*(-term1*onethird*ic + term2)
362  cinv = (-c11*c23+c13*c21)*jsqrdinv
363  s23(i) = cinv*(-term1*onethird*ic + term2)
364  cinv = ( c12*c23-c13*c22)*jsqrdinv
365  s13(i) = cinv*(-term1*onethird*ic + term2)
366 
367  spk2(1,1) = s11(i)
368  spk2(1,2) = s12(i)
369  spk2(1,3) = s13(i)
370  spk2(2,1) = spk2(1,2)
371  spk2(2,2) = s22(i)
372  spk2(2,3) = s23(i)
373  spk2(3,1) = spk2(1,3)
374  spk2(3,2) = spk2(2,3)
375  spk2(3,3) = s33(i)
376 
377  f(1,1) = f11
378  f(1,2) = f12
379  f(1,3) = f13
380  f(2,1) = f21
381  f(2,2) = f22
382  f(2,3) = f23
383  f(3,1) = f31
384  f(3,2) = f32
385  f(3,3) = f33
386 
387  ft(:,:) = transpose(f(:,:))
388 
389  detf = rmat3_det(f)
390 
391  jinv=1.d0/detf
392 
393 ! print*,'lkjk',sigma(1,1),sigma(2,2), sigma(3,3)
394 ! SIGMA(:,:) = Jinv*F(:,:)*SPK2(:,:)*FT(:,:)
395 ! print*,sigma(1,1),sigma(2,2), sigma(3,3)
396 
397  sh1 = (y34d*z24d - y24d*z34d) * vx6inv
398  sh2 = (z34d*x24d - z24d*x34d) * vx6inv
399  sh3 = (x34d*y24d - x24d*y34d) * vx6inv
400  sh4 = (y13d*z14d - y14d*z13d) * vx6inv
401  sh5 = (z13d*x14d - z14d*x13d) * vx6inv
402  sh6 = (x13d*y14d - x14d*y13d) * vx6inv
403  sh7 = (y14d*z12d - y12d*z14d) * vx6inv
404  sh8 = (z14d*x12d - z12d*x14d) * vx6inv
405  sh9 = (x14d*y12d - x12d*y14d) * vx6inv
406  sh10 = (y12d*z13d - y13d*z12d) * vx6inv
407  sh11 = (z12d*x13d - z13d*x12d) * vx6inv
408  sh12 = (x12d*y13d - x13d*y12d) * vx6inv
409 
410 ! ASSEMBLE THE INTERNAL FORCE VECTOR
411 !
412 ! local node 1
413  r_in(k1n1) = r_in(k1n1) - vol* &
414  ( sigma(1,1)*sh1 + sigma(1,2)*sh2 + sigma(1,3)*sh3 )
415  r_in(k2n1) = r_in(k2n1) - vol* &
416  ( sigma(1,2)*sh1 + sigma(2,2)*sh2 + sigma(2,3)*sh3 )
417  r_in(k3n1) = r_in(k3n1) - vol* &
418  ( sigma(1,3)*sh1 + sigma(2,3)*sh2 + sigma(3,3)*sh3 )
419 ! local node 2
420  r_in(k1n2) = r_in(k1n2) - vol* &
421  ( sigma(1,1)*sh4 + sigma(1,2)*sh5 + sigma(1,3)*sh6 )
422  r_in(k2n2) = r_in(k2n2) - vol* &
423  ( sigma(1,2)*sh4 + sigma(2,2)*sh5 + sigma(2,3)*sh6 )
424  r_in(k3n2) = r_in(k3n2) - vol* &
425  ( sigma(1,3)*sh4 + sigma(2,3)*sh5 + sigma(3,3)*sh6 )
426 ! local node 3
427  r_in(k1n3) = r_in(k1n3) - vol* &
428  ( sigma(1,1)*sh7 + sigma(1,2)*sh8 + sigma(1,3)*sh9 )
429  r_in(k2n3) = r_in(k2n3) - vol* &
430  ( sigma(1,2)*sh7 + sigma(2,2)*sh8 + sigma(2,3)*sh9 )
431  r_in(k3n3) = r_in(k3n3) - vol* &
432  ( sigma(1,3)*sh7 + sigma(2,3)*sh8 + sigma(3,3)*sh9 )
433 ! local node 4
434  r_in(k1n4) = r_in(k1n4) - vol* &
435  ( sigma(1,1)*sh10 + sigma(1,2)*sh11 + sigma(1,3)*sh12 )
436  r_in(k2n4) = r_in(k2n4) - vol* &
437  ( sigma(1,2)*sh10 + sigma(2,2)*sh11 + sigma(2,3)*sh12 )
438  r_in(k3n4) = r_in(k3n4) - vol* &
439  ( sigma(1,3)*sh10 + sigma(2,3)*sh11 + sigma(3,3)*sh12 )
440 
441 
442  ENDDO
443 
444  RETURN
445 
446 100 FORMAT(' Negative Jacobian for element: ',i10)
447 END SUBROUTINE v3d4_neohookeanincompressdef
448 
449 
450 FUNCTION rmat3_det ( a )
451 !
452 !*******************************************************************************
453 !
454 !! RMAT3_DET computes the determinant of a 3 by 3 matrix.
455 !
456 !
457 ! The determinant is the volume of the shape spanned by the vectors
458 ! making up the rows or columns of the matrix.
459 !
460 ! Formula:
461 !
462 ! det = a11 * a22 * a33 - a11 * a23 * a32
463 ! + a12 * a23 * a31 - a12 * a21 * a33
464 ! + a13 * a21 * a32 - a13 * a22 * a31
465 !
466 ! Parameters:
467 !
468 ! Input, real A(3,3), the matrix whose determinant is desired.
469 !
470 ! Output, real RMAT3_DET, the determinant of the matrix.
471 !
472  IMPLICIT NONE
473 !
474  REAL*8 a(3,3)
475  REAL*8 rmat3_det
476 !
477  rmat3_det = a(1,1) * ( a(2,2) * a(3,3) - a(2,3) * a(3,2) ) &
478  + a(1,2) * ( a(2,3) * a(3,1) - a(2,1) * a(3,3) ) &
479  + a(1,3) * ( a(2,1) * a(3,2) - a(2,2) * a(3,1) )
480 
481  RETURN
482  END FUNCTION rmat3_det
483 
484  SUBROUTINE neoinccauchystress(ndime,xmu,detf,btens,sigma)
485 !
486 !-----------------------------------------------------------------------
487 !
488 ! Determines the Cauchy stress tensor for nearly incompressible
489 ! neo-Hookean materials
490 !
491 !
492 ! ndime --> number of dimensions
493 ! xmu --> mu coefficient
494 ! detf --> determinant of F
495 ! btens --> right Cauchy-Green tensor
496 ! sigma --> Cauchy stress tensor
497 !
498 !-----------------------------------------------------------------------
499 !
500  IMPLICIT NONE
501 
502  REAL*8, DIMENSION(1:3,1:3) :: sigma, btens
503  REAL*8 :: detf, xmu
504  INTEGER :: ndime
505 
506  REAL*8 :: trace, xm
507  INTEGER :: id, jd
508 !
509 ! Obtains the Cauchy stress using equation ???
510 ! First finds the trace
511 !
512  trace = 0.d0
513  DO id = 1, 3
514  trace = trace + btens(id,id)
515  ENDDO
516 
517  xm = xmu/(detf**(5./3.))
518  DO id = 1, ndime
519  DO jd = 1, ndime
520  sigma(id,jd) = xm*btens(id,jd)
521  ENDDO
522  sigma(id,id)=sigma(id,id)-xm*trace/3.
523  ENDDO
524 
525  RETURN
526  END SUBROUTINE neoinccauchystress
527 
528  subroutine addpres(ndime,press,sigma)
529 
530 !-----------------------------------------------------------------------
531 !
532 ! Adds the pressure to the deviatoric stresses
533 !
534 ! ndime --> number of dimensions
535 ! press --> pressure
536 ! sigma --> Cauchy stress tensor
537 !
538 !-----------------------------------------------------------------------
539 !
540 
541  implicit none
542 
543  integer :: ndime
544  real*8, DIMENSION(1:3,1:3) :: sigma
545  real*8 :: press
546 
547  integer :: id
548 !
549 ! Obtains the Cauchy stress from deviatoric and pressure
550 ! components using equation ???
551 !
552  do id = 1,ndime
553  sigma(id,id) = sigma(id,id) + press
554  enddo
555  return
556  end
557 
const NT & d
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ic
real *8 function rmat3_det(a)
blockLoc i
Definition: read.cpp:79
Tfloat trace() const
Return the trace of the image, viewed as a matrix.
Definition: CImg.h:13217
j indices j
Definition: Indexing.h:6
unsigned long id(const Leda_like_handle &x)
Definition: Handle.h:107
subroutine addpres(ndime, press, sigma)
subroutine v3d4_neohookeanincompressdef(coor, matcstet, lmcstet, R_in, d, ci, S11, S22, S33, S12, S23, S13, numnp, nstart, nend, numcstet, numat_vol, xmu, xkappa)
RT a() const
Definition: Line_2.h:140
subroutine neoinccauchystress(ndime, xmu, detf, btens, sigma)