OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
gray20.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| gray20 ../engine/source/materials/mat/mat016/gray20.F
25!||--- called by ------------------------------------------------------
26!|| mmain ../engine/source/materials/mat_share/mmain.F90
27!||--- calls -----------------------------------------------------
28!|| gray21 ../engine/source/materials/mat/mat016/gray21.F
29!||====================================================================
30 SUBROUTINE gray20(
31 1 PM, EINT, RHO, TEMP,
32 2 XIST, QOLD, VOLN, MAT,
33 3 DVOL, POLD, DF, RHO0,
34 4 P1, P01, P02, E01,
35 5 E02, SSP, DPDM, NEL)
36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39#include "implicit_f.inc"
40C-----------------------------------------------
41C G l o b a l P a r a m e t e r s
42C-----------------------------------------------
43#include "mvsiz_p.inc"
44C-----------------------------------------------
45C C o m m o n B l o c k s
46C-----------------------------------------------
47#include "param_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER, INTENT(IN) :: NEL
52 my_real
53 . PM(NPROPM,*), EINT(*), RHO(*), TEMP(*), XIST(*), QOLD(*), VOLN(*),
54 . DVOL(*), POLD(*), DF(*),
55 . RHO0(*), P1(*), P01(*), P02(*), E01(*), E02(*), SSP(*), DPDM(*)
56 INTEGER MAT(*)
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 INTEGER I, MX
61 my_real
62 . em0(mvsiz), em1(mvsiz), em2(mvsiz),
63 . espe(mvsiz), alp(mvsiz), pcr(mvsiz), c(mvsiz),
64 . geax(mvsiz), g0ax(mvsiz), tm(mvsiz), delt(mvsiz), rp3(mvsiz), x(mvsiz), gp(mvsiz),
65 . dsp(mvsiz), xlam(mvsiz), s(mvsiz), pcc(mvsiz),
66 . e0h(mvsiz), tm0(mvsiz), egg(mvsiz), xp(mvsiz), a(mvsiz), am(mvsiz), gam0(mvsiz),
67 . game(mvsiz), gam0m(mvsiz),e0(mvsiz), e00(mvsiz), tg(mvsiz), pmin(mvsiz),xist0(mvsiz),
68 . p1a(mvsiz), dmu(mvsiz), xm, unpm2
69C-----------------------------------------------
70C S o u r c e L i n e s
71C-----------------------------------------------
72
73 !-----------------------------
74 !
75 ! CALCUL DES VARIABLES GRAY
76 !
77 !-----------------------------
78
79 unpm2 = o88p9844
80 xm = ninep38
81
82 mx = mat(1)
83 DO i=1,nel
84 dpdm(i) = onep333*pm(22,mx)
85 tm0(i) = pm(29,mx)
86 e00(i) = pm(30,mx)
87 c(i) = pm(33,mx)
88 s(i) = pm(34,mx)
89 pcc(i) = pm(35,mx)
90 gam0(i) = pm(36,mx)
91 pmin(i) = pm(37,mx)
92 a(i) = pm(48,mx)
93 gam0m(i) = pm(49,mx)
94 am(i) = pm(50,mx)
95 game(i) = pm(51,mx)
96 gp(i) = pm(52,mx)
97 dsp(i) = pm(53,mx)
98 e0h(i) = pm(54,mx)
99 rp3(i) = pm(55,mx)
100 alp(i) = pm(61,mx)
101 ENDDO
102
103 DO i=1,nel
104 dmu(i) = -dvol(i)/(voln(i)-dvol(i))/df(i)
105 x(i) = one-df(i)
106 ENDDO
107
108 DO i=1,nel
109 e0(i) = c(i)**2*x(i)**2*half/(one-s(i)*x(i))*(one+s(i)*x(i)/three+(s(i)-gam0(i))*s(i)*x(i)**2*one_over_6)
110 . + e00(i)*(one+gam0(i)*x(i)) + e0h(i)
111 ENDDO
112
113 DO i=1,nel
114 xp(i) = zero
115 IF(x(i)>=zero) xp(i)=one
116 ENDDO
117
118 DO i=1,nel
119 tm(i) = tm0(i)*((one-xp(i))*(one+two*(gam0m(i)-four_over_3)*x(i)+
120 . ((two*gam0m(i)-five_over_3)*(gam0m(i)-four_over_3)-am(i))*x(i)**2)
121 . / (one-x(i))**2 + xp(i)*( one+(two*gam0m(i)-two_third)*x(i)+((gam0m(i)-third)*(two*gam0m(i)+third)-am(i))*x(i)**2))
122 tg(i) = tm(i)*xm
123 ENDDO
124
125 DO i=1,nel
126 xlam(i) = two_third - two*gam0m(i)+two*am(i)*x(i)
127 ENDDO
128
129 DO i=1,nel
130 delt(i) = dsp(i)*xlam(i)**2*tm(i)**2
131 ENDDO
132
133 DO i=1,nel
134 em1(i) = e0(i)+rp3(i)*(tm(i)+delt(i))+half*gp(i)*(tm(i)+delt(i))**2
135 em2(i) = em1(i)+tm(i)*(dsp(i)-half*alp(i)*(1.+(tm(i)+delt(i))**2/tm(i)**2))
136 egg(i) = e0(i)+rp3(i)*tg(i)+half*gp(i)*tg(i)**2+tm(i)*(dsp(i)-half*alp(i)*unpm2)
137 g0ax(i) = gam0(i)-a(i)*x(i)
138 geax(i) =(game(i)-g0ax(i))*gp(i)
139 ENDDO
140
141 DO i=1,nel
142 xist0(i) = xist(i)
143 e01(i) = eint(i)-(pold(i)+qold(i))*dvol(i)*half
144 e01(i) = max(zero,e01(i))
145 espe(i) = e01(i)/(voln(i)*rho(i))
146 em0(i) = espe(i)-e0(i)
147 p1a(i) = c(i)**2*x(i)
148 . *(one-(one+half*gam0(i))*x(i)+half*a(i)*x(i)**2)*rho0(i)
149 . /((one-x(i))*(one-s(i)*x(i))**2)
150 p1(i) = pcc(i)+p1a(i)+g0ax(i)*(espe(i)-e0h(i))*rho0(i)/(one-x(i))
151 ENDDO
152C-----------------------------
153C BRANCHEMENTS
154C-----------------------------
155 CALL gray21(
156 1 pm, rho, temp, xist,
157 2 mat, rho0, dsp, alp,
158 3 pcr, p1, egg, xist0,
159 4 xlam, em0, em1, em2,
160 5 espe, geax, g0ax, tm,
161 6 delt, rp3, x, gp,
162 7 nel)
163C------------------------------------
164C PRESSION 1ERE ESTIMATION
165C------------------------------------
166 DO i=1,nel
167 p01(i) = p1(i)+half*pcr(i)*rho(i)
168 ENDDO
169
170 DO i=1,nel
171 IF(p01(i)<=pmin(i))THEN
172 p01(i) = zero
173 xist(i) = five
174 ENDIF
175 ENDDO
176
177 DO i=1,nel
178 e02(i) = eint(i)-(p01(i)+qold(i))*dvol(i)*half
179 e02(i) = max(zero,e02(i))
180 espe(i) = e02(i)/(voln(i)*rho(i))
181 em0(i) = espe(i)-e0(i)
182 p1(i) = pcc(i)+p1a(i)+g0ax(i)*(espe(i)-e0h(i))*rho0(i)/(one-x(i))
183 ENDDO
184C-----------------------------
185C BRANCHEMENTS
186C-----------------------------
187 CALL gray21(
188 1 pm, rho, temp, xist,
189 2 mat, rho0, dsp, alp,
190 3 pcr, p1, egg, xist0,
191 4 xlam, em0, em1, em2,
192 5 espe, geax, g0ax, tm,
193 6 delt, rp3, x, gp,
194 7 nel)
195C------------------------------------
196C PRESSION 2EME ESTIMATION
197C------------------------------------
198 DO i=1,nel
199 p02(i) = p1(i)+half*pcr(i)*rho(i)
200 ENDDO
201
202 DO i=1,nel
203 IF(p02(i)<=pmin(i))THEN
204 p02(i) = zero
205 xist(i) = five
206 ENDIF
207 ENDDO
208C------------------------------------
209C VITESSE DU SON
210C------------------------------------
211 DO i=1,nel
212 IF(dmu(i)/=zero)THEN
213 dpdm(i) = dpdm(i)+max(rho0(i)*c(i)*c(i),abs((p02(i)-pold(i))/dmu(i)))
214 ELSE
215 dpdm(i) = dpdm(i)+rho0(i)*c(i)*c(i)
216 ENDIF
217 ENDDO
218
219 DO i=1,nel
220 ssp(i) = sqrt(abs(dpdm(i))/rho0(i))
221 ENDDO
222
223 RETURN
224 END
subroutine gray20(pm, eint, rho, temp, xist, qold, voln, mat, dvol, pold, df, rho0, p1, p01, p02, e01, e02, ssp, dpdm, nel)
Definition gray20.F:36
subroutine gray21(pm, rho, temp, xist, mat, rho0, dsp, alp, pcr, p1, egg, xist0, xlam, em0, em1, em2, espe, geax, g0ax, tm, delt, rp3, x, gp, nel)
Definition gray21.F:36
#define max(a, b)
Definition macros.h:21