33
34
35
36 USE constant_mod ,
ONLY : zero, em15, half, one, two, three, three100
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 IMPLICIT NONE
58#include "my_real.inc"
59
60
61
62#include "param_c.inc"
63#include "com04_c.inc"
64#include "com06_c.inc"
65#include "com08_c.inc"
66#include "vect01_c.inc"
67#include "scr06_c.inc"
68
69
70
71 INTEGER MAT(NEL), IFLAG, NEL
73 . off(nel) ,eint(nel) ,mu(nel) ,
74 . mu2(nel) ,espe(nel) ,dvol(nel) ,df(nel) ,
75 . vnew(nel) ,psh(nel) ,pnew(nel) ,dpdm(nel),
76 . dpde(nel)
77
78
79
80 INTEGER :: I, MX
82 my_real :: c0,c1,c2,c3,c4,c5,pc,sph
83
84
85
86 IF(iflag == 0) THEN
87 mx = mat(1)
88 c0 = pm(104,mx)
89 c1 = pm( 32,mx)
90 c2 = pm( 33,mx)
91 c3 = pm( 34,mx)
92 c4 = pm( 35,mx)
93 c5 = pm( 36,mx)
94 sph = pm( 69,mx)
95 psh(1:nel) = pm( 88,mx)
96 pc = pm( 37,mx)
97 DO i=1,nel
98 pp = c0 +(c1 +c3 *mu(i)*mu(i))*mu(i)+c2 *mu2(i) + (c4 +c5 *mu(i))*espe(i)
99 dpdm(i) = c1 + two*c2 *
max(zero,mu(i))+three*c3 *mu(i)*mu(i) + c5 *espe(i)+(c4 +c5 *mu(i))*df(i)*df(i)*(pp+psh(i) )
100 dpde(i) = c4 +c5 *mu(i)
101 pnew(i) =
max(pp,pc)*off(i)
102 ENDDO
103
104 ELSEIF(iflag == 1) THEN
105 mx = mat(1)
106 c0 = pm(104,mx)
107 c1 = pm( 32,mx)
108 c2 = pm( 33,mx)
109 c3 = pm( 34,mx)
110 c4 = pm( 35,mx)
111 c5 = pm( 36,mx)
112 pc = pm( 37,mx)
113 psh(1:nel) = pm(88,mx)
114 DO i=1,nel
115 aa = c0 +mu(i)*(c1 +c3 *mu(i)*mu(i))+c2 *mu2(i)
116 bb = c4 +c5 *mu(i)
117 dvv = half*dvol(i)*df(i) /
max(em15,vnew(i))
118 pnew(i) = (aa+bb*(espe(i)-psh(i) *dvv))/(one+bb*dvv)
119 pnew(i)
120 eint(i) = eint(i) - half*dvol(i)*(pnew(i)+psh(i))
121 dpde(i) = c4 +c5 *mu(i)
122 ENDDO
123
124 ELSEIF(iflag == 2) THEN
125 mx = mat(1)
126 c0 = pm(104,mx)
127 c1 = pm( 32,mx)
128 c2 = pm( 33,mx)
129 c3 = pm( 34,mx)
130 c4 = pm( 35,mx)
131 c5 = pm( 36,mx)
132 sph = pm( 69,mx)
133 psh(1:nel) = pm(88,mx)
134 pc = pm(37,mx)
135 DO i=1, nel
136 IF (vnew(i) > zero) THEN
137 pnew(i) = c0 +(c1 +c3 *mu(i)*mu(i))*mu(i)+c2 *mu2(i) + (c4 +c5 *mu(i))*espe(i)
138 dpdm(i) = c1 + two*c2 *
max(zero,mu(i))+three*c3 *mu(i)*mu(i) +
139 . c5 *espe(i)+(c4 +c5 *mu(i))*df(i)*df(i)*(pnew(i)+psh(i) )
140 dpde(i) = c4 +c5 *mu(i)
141 pnew(i) =
max(pnew(i),pc )*off(i)
142 ENDIF
143 ENDDO
144 ENDIF
145
146 RETURN