OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
m5law.F File Reference
#include "implicit_f.inc"
#include "mvsiz_p.inc"
#include "param_c.inc"

Go to the source code of this file.

Functions/Subroutines

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)

Function/Subroutine Documentation

◆ m5law()

subroutine m5law ( dimension(npropm,nummat), intent(in) pm,
dimension(nel,6), intent(inout) sig,
dimension(nel), intent(in) eint,
dimension(nel), intent(in) rho,
dimension(*), intent(inout) psh,
dimension(*), intent(inout) p0,
dimension(mvsiz), intent(in) tburn,
dimension(mvsiz), intent(inout) bfrac,
dimension(mvsiz), intent(in) voln,
dimension(nel), intent(in) deltax,
integer, dimension(*), intent(in) mat,
integer, intent(in) nel,
dimension(nel), intent(inout) ssp,
dimension(*), intent(inout) df,
dimension(nel), intent(inout) er1v,
dimension(nel), intent(inout) er2v,
dimension(nel), intent(inout) wdr1v,
dimension(nel), intent(inout) wdr2v,
dimension(nel), intent(inout) w1,
dimension(nel), intent(inout) rho0,
dimension(*), intent(in) amu,
integer, intent(in) nummat,
intent(in) tt,
dimension(nel), intent(inout) dpde )
Parameters
[in]nummatsize for PM array
[in]matapplication : [1:NEL] -> mat_id
[in]nelnumber of element in the current group

Definition at line 28 of file m5law.F.

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
#define my_real
Definition cppsort.cpp:32
#define max(a, b)
Definition macros.h:21