SPEED
MAKE_STRESS_TENSOR.f90
Go to the documentation of this file.
1! Copyright (C) 2012 The SPEED FOUNDATION
2! Author: Ilario Mazzieri
3!
4! This file is part of SPEED.
5!
6! SPEED is free software; you can redistribute it and/or modify it
7! under the terms of the GNU Affero General Public License as
8! published by the Free Software Foundation, either version 3 of the
9! License, or (at your option) any later version.
10!
11! SPEED is distributed in the hope that it will be useful, but
12! WITHOUT ANY WARRANTY; without even the implied warranty of
13! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14! Affero General Public License for more details.
15!
16! You should have received a copy of the GNU Affero General Public License
17! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
41
42
43 subroutine make_stress_tensor(nn,lambda,mu,&
44 duxdx,duydx,duzdx,&
45 duxdy,duydy,duzdy,&
46 duxdz,duydz,duzdz,&
47 sxx,syy,szz,&
48 syz,szx,sxy)
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
84 end subroutine make_stress_tensor
85
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.