SPEED
MAKE_STRESS_TENSOR.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine make_stress_tensor (nn, lambda, mu, duxdx, duydx, duzdx, duxdy, duydy, duzdy, duxdz, duydz, duzdz, sxx, syy, szz, syz, szx, sxy)
 Computes the stress tensor.
 

Function/Subroutine Documentation

◆ make_stress_tensor()

subroutine make_stress_tensor ( integer*4  nn,
real*8, dimension(nn,nn,nn)  lambda,
real*8, dimension(nn,nn,nn)  mu,
real*8, dimension(nn,nn,nn)  duxdx,
real*8, dimension(nn,nn,nn)  duydx,
  duzdx,
real*8, dimension(nn,nn,nn)  duxdy,
real*8, dimension(nn,nn,nn)  duydy,
  duzdy,
real*8, dimension(nn,nn,nn)  duxdz,
real*8, dimension(nn,nn,nn)  duydz,
  duzdz,
real*8, dimension(nn,nn,nn)  sxx,
real*8, dimension(nn,nn,nn)  syy,
real*8, dimension(nn,nn,nn)  szz,
real*8, dimension(nn,nn,nn)  syz,
real*8, dimension(nn,nn,nn)  szx,
real*8, dimension(nn,nn,nn)  sxy 
)

Computes the stress tensor.

Author
Ilario Mazzieri
Date
September, 2013
Version
1.0
Parameters
[in]nnnumber of 1-D Legendre nodes
[in]lambdanodal values of Lame coefficient lambda
[in]munodal values of Lame coefficient mu
[in]duxdxnodal values for spatial derivatives of the displacement
[in]duydxnodal values for spatial derivatives of the displacement
[in]duzdxnodal values for spatial derivatives of the displacement
[in]duxdynodal values for spatial derivatives of the displacement
[in]duydynodal values for spatial derivatives of the displacement
[in]duzdynodal values for spatial derivatives of the displacement
[in]duxdznodal values for spatial derivatives of the displacement
[in]duydznodal values for spatial derivatives of the displacement
[in]duzdznodal values for spatial derivatives of the displacement
[out]sxxnodal values for the stress tensor
[out]syynodal values for the stress tensor
[out]szznodal values for the stress tensor
[out]syznodal values for the stress tensor
[out]szxnodal values for the stress tensor
[out]sxynodal values for the stress tensor

Definition at line 43 of file MAKE_STRESS_TENSOR.f90.

49
50
51 implicit none
52
53 integer*4 :: nn
54 integer*4 :: p,q,r
55
56 real*8, dimension(nn,nn,nn) :: lambda,mu
57 real*8, dimension(nn,nn,nn) :: sxx,syy,szz,syz,szx,sxy
58 real*8, dimension(nn,nn,nn) :: duxdx,duxdy,duxdz,duydx,duydy,duydz,duzdx,duzdy,duzdz
59
60
61! STRESS CALCULATION
62
63 do r = 1,nn
64 do q = 1,nn
65 do p = 1,nn
66
67 sxx(p,q,r) = lambda(p,q,r) * (duxdx(p,q,r) +duydy(p,q,r) +duzdz(p,q,r)) &
68 +2.0d0*mu(p,q,r) * duxdx(p,q,r)
69 syy(p,q,r) = lambda(p,q,r) * (duxdx(p,q,r) +duydy(p,q,r) +duzdz(p,q,r)) &
70 +2.0d0*mu(p,q,r) * duydy(p,q,r)
71 szz(p,q,r) = lambda(p,q,r) * (duxdx(p,q,r) +duydy(p,q,r) +duzdz(p,q,r)) &
72 +2.0d0*mu(p,q,r) * duzdz(p,q,r)
73
74 syz(p,q,r) = mu(p,q,r) * (duydz(p,q,r) + duzdy(p,q,r))
75 szx(p,q,r) = mu(p,q,r) * (duzdx(p,q,r) + duxdz(p,q,r))
76 sxy(p,q,r) = mu(p,q,r) * (duxdy(p,q,r) + duydx(p,q,r))
77
78 enddo
79 enddo
80 enddo
81
82 return
83

Referenced by compute_energy_error().

Here is the caller graph for this function: