OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
m5law.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!|| m5law ../engine/source/materials/mat/mat005/m5law.F
25!||--- called by ------------------------------------------------------
26!|| mmain ../engine/source/materials/mat_share/mmain.F90
27!||====================================================================
28 SUBROUTINE m5law(PM ,SIG ,EINT ,RHO ,PSH ,
29 1 P0 ,TBURN ,BFRAC ,VOLN ,DELTAX,
30 2 MAT ,NEL ,SSP ,DF ,
31 3 ER1V ,ER2V ,WDR1V ,WDR2V ,W1 ,
32 4 RHO0 ,AMU ,NUMMAT,TT, DPDE)
33C-----------------------------------------------
34C I m p l i c i t T y p e s
35C-----------------------------------------------
36#include "implicit_f.inc"
37C-----------------------------------------------
38C G l o b a l P a r a m e t e r s
39C-----------------------------------------------
40#include "mvsiz_p.inc"
41#include "param_c.inc"
42C-----------------------------------------------
43C D u m m y A r g u m e n t s
44C-----------------------------------------------
45 INTEGER,INTENT(IN) :: NUMMAT !< size for PM array
46 INTEGER,INTENT(IN) :: MAT(*) !< application : [1:NEL] -> mat_id
47 INTEGER,INTENT(IN) :: NEL !< number of element in the current group
48 my_real,INTENT(IN) :: TT !< current time
49 my_real,INTENT(IN) :: pm(npropm,nummat) !< material buffer (real)
50 my_real,INTENT(INOUT) :: sig(nel,6) !< stress tensor
51 my_real,INTENT(IN) :: eint(nel) !< internal energy
52 my_real,INTENT(IN) :: rho(nel) ! mass density
53 my_real,INTENT(INOUT) :: psh(*) !< pressure shift
54 my_real,INTENT(INOUT) :: p0(*) !< initial pressure
55 my_real,INTENT(IN) :: tburn(mvsiz) !<time of burn (detonation time)
56 my_real,INTENT(INOUT) :: bfrac(mvsiz) !< burn fraction
57 my_real,INTENT(IN) :: voln(mvsiz) !< element volume
58 my_real,INTENT(IN) :: deltax(nel) !< mesh size
59 my_real,INTENT(INOUT) :: ssp(nel) !< sound speed
60 my_real,INTENT(INOUT) :: df(*) !< V/V0 (or rho0/rho or 1/(1+mu))
61 my_real,INTENT(IN) :: amu(*) !< volumetric strain
62 my_real,INTENT(INOUT) :: er1v(nel), er2v(nel), wdr1v(nel), wdr2v(nel), w1(nel), rho0(nel) !< working arrays to save computation time
63 my_real,INTENT(INOUT) :: dpde(nel) !< partial derivative
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67 INTEGER I,MX,IBFRAC
68 my_real A,B, R1, R2, W, VDET, PSH_PARAM, BULK, P0_PARAM, RHO0_PARAM !< eos parameters
69 my_real TB !< time of burn
70 my_real BFRAC1, BFRAC2, BHE !< working arrays for burn fraction calculation
71 my_real r1v(mvsiz), r2v(mvsiz), dr1v(mvsiz) !< temporary arrays
72 my_real p(mvsiz) !< pressure
73C-----------------------------------------------
74C B o d y
75C-----------------------------------------------
76
77 ! User defined material properties
78 mx = mat(1)
79 rho0_param = pm( 1,mx)
80 a = pm(33,mx)
81 b = pm(34,mx)
82 r1 = pm(35,mx)
83 r2 = pm(36,mx)
84 w = pm(45,mx)
85 vdet = pm(38,mx)
86 bhe = pm(40,mx)
87 psh_param = pm(88,mx)
88 p0_param = pm(31,mx)
89 bulk = pm(44,mx)
90 ibfrac = nint(pm(41,mx))
91
92 ! Initialize the material properties used later from mjwl.F
93 DO i=1,nel
94 rho0(i) = rho0_param
95 psh(i) = psh_param
96 p0(i) = p0_param
97 w1(i) = w
98 ENDDO
99
100 ! Relative Volume Calculation
101 DO i=1,nel
102 df(i) = rho0(i)/rho(i) ! DF = v = V/V0 = RHO0/RHO = 1/(MU+1)
103 ENDDO
104
105 ! Burn Fraction Calculation
106 ! BFRAC1 : time control
107 ! BFRAC2 : volumetric control
108 DO i=1,nel
109 IF(bfrac(i) < one) THEN
110 tb=-tburn(i)
111 bfrac1 = zero
112 bfrac2 = zero
113 IF(ibfrac /= 1 .AND. tt > tb) bfrac1=vdet*(tt-tb)/three_half/deltax(i) !time control
114 IF(ibfrac /= 2)bfrac2=bhe*(one-df(i)) !volumetric control
115 bfrac(i) = max(bfrac1,bfrac2)
116 IF(bfrac(i)<em04) bfrac(i)=zero
117 IF(bfrac(i)>one) THEN
118 bfrac(i) = one
119 ENDIF
120 ENDIF
121 ENDDO
122
123 ! working arrays to save CPU operations. ER1V ER2V, WDR1V, WDR2V used later from mjwl.F
124 DO i=1,nel
125 r1v(i) = a*w/(r1*df(i))
126 r2v(i) = b*w/(r2*df(i))
127 wdr1v(i) = a-r1v(i)
128 wdr2v(i) = b-r2v(i)
129 dr1v(i) = w*eint(i)/max(em20,voln(i)) !w*Eint/V = w*E/v where v=V/V0
130 er1v(i) = exp(-r1*df(i))
131 er2v(i) = exp(-r2*df(i))
132 ENDDO
133
134 ! Pressure Calculation
135 IF (bulk == zero) THEN
136 ! Behavior of unreacted explosive is not provided
137 DO i=1,nel
138 p(i) = p0(i) + (wdr1v(i)*er1v(i)+wdr2v(i)*er2v(i)+dr1v(i))
139 ENDDO
140 ELSE
141 ! Behavior of unreacted explosive is provided
142 DO i=1,nel
143 p(i) = (one - bfrac(i))*(p0(i)+bulk*amu(i)) + bfrac(i)*(wdr1v(i)*er1v(i)+wdr2v(i)*er2v(i)+dr1v(i))
144 ENDDO
145 ENDIF
146 DO i=1,nel
147 p(i) = max(zero, p(i)) - psh(i) !PMIN = 0.0 (fluid)
148 ENDDO
149
150 !partial derivative at constant volume
151 DO i=1,nel
152 dpde(i) = w/df(i)
153 ENDDO
154
155 ! sound speed calculation
156 DO i=1,nel
157 ssp(i) = a*er1v(i)*( (-w/df(i)/r1) + r1*df(i) - w)
158 . + b*er2v(i)*( (-w/df(i)/r2) + r2*df(i) - w)
159 . + dr1v(i) + (p(i) + psh(i))*w
160 ssp(i) = ssp(i) * df(i)
161 ENDDO
162 IF (bulk == zero) THEN
163 DO i=1,nel
164 ssp(i) = sqrt(abs(ssp(i))/rho0(i))
165 ssp(i) = max(ssp(i),vdet*(one-bfrac(i)))
166 ENDDO
167 ELSE
168 DO i=1,nel
169 ssp(i) = bfrac(i) * (ssp(i) / rho0(i)) + (one - bfrac(i)) * (bulk / rho0(i))
170 ssp(i) = sqrt(abs(ssp(i)))
171 ENDDO
172 ENDIF
173
174 ! Return the updated stress tensor. FLUID => NO DEVIATOR STRESS
175 DO i=1,nel
176 sig(i,1) = zero
177 sig(i,2) = zero
178 sig(i,3) = zero
179 sig(i,4) = zero
180 sig(i,5) = zero
181 sig(i,6) = zero
182 ENDDO
183
184 RETURN
185 END
subroutine m5law(pm, sig, eint, rho, psh, p0, tburn, bfrac, voln, deltax, mat, nel, ssp, df, er1v, er2v, wdr1v, wdr2v, w1, rho0, amu, nummat, tt, dpde)
Definition m5law.F:33
#define max(a, b)
Definition macros.h:21