OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
powder_burn.F File Reference
#include "my_real.inc"
#include "comlock.inc"
#include "com06_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine powder_burn (iflag, nel, pm, off, eint, mu, mu2, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde, mat_param, vareos, nvareos, npropm, nummat, dt1, rho0, bfrac)

Function/Subroutine Documentation

◆ powder_burn()

subroutine powder_burn ( integer iflag,
integer nel,
dimension(npropm,nummat), intent(in) pm,
dimension(nel), intent(in) off,
dimension(nel), intent(inout) eint,
dimension(nel), intent(in) mu,
dimension(nel), intent(in) mu2,
dimension(nel), intent(inout) espe,
dimension(nel), intent(in) dvol,
dimension(nel), intent(in) df,
dimension(nel), intent(in) vnew,
integer, dimension(nel) mat,
psh,
dimension(nel), intent(inout) pnew,
dimension(nel), intent(inout) dpdm,
dimension(nel), intent(inout) dpde,
type(matparam_struct_), intent(in) mat_param,
dimension(nel,nvareos), intent(inout) vareos,
integer, intent(in) nvareos,
integer, intent(in) npropm,
integer, intent(in) nummat,
intent(in) dt1,
dimension(nel), intent(inout) rho0,
dimension(nel), intent(inout) bfrac )
Parameters
[in]mat_parammaterial data structure

Definition at line 31 of file powder_burn.F.

36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39C
40C-----------------------------------------------
41C D e s c r i p t i o n
42C-----------------------------------------------
43C This is a template to introduce numerical solving of Deflagration EoS (experimental) based on LAW105 Implementation
44!----------------------------------------------------------------------------
45!! \details STAGGERED SCHEME IS EXECUTED IN TWO PASSES IN EOSMAIN : IFLG=0 THEN IFLG=1
46!! \details COLLOCATED SCHEME IS DOING A SINGLE PASS : IFLG=2
47!! \details
48!! \details STAGGERED SCHEME
49!! \details EOSMAIN / IFLG = 0 : DERIVATIVE CALCULATION FOR SOUND SPEED ESTIMATION c[n+1] REQUIRED FOR PSEUDO-VISCOSITY (DPDE:partial derivative, DPDM:total derivative)
50!! \details MQVISCB : PSEUDO-VISCOSITY Q[n+1]
51!! \details MEINT : INTERNAL ENERGY INTEGRATION FOR E[n+1] : FIRST PART USING P[n], Q[n], and Q[n+1] CONTRIBUTIONS
52!! \details EOSMAIN / IFLG = 1 : UPDATE P[n+1], T[N+1]
53!! \details INTERNAL ENERGY INTEGRATION FOR E[n+1] : LAST PART USING P[n+1] CONTRIBUTION
54!! \details (second order integration dE = -P.dV where P = 0.5(P[n+1] + P[n]) )
55!! \details COLLOCATED SCHEME
56!! \details EOSMAIN / IFLG = 2 : SINGLE PASS FOR P[n+1] AND DERIVATIVES
57!----------------------------------------------------------------------------
58C-----------------------------------------------
59C M o d u l e s
60C-----------------------------------------------
61 USE matparam_def_mod, ONLY : matparam_struct_
62 use constant_mod , only : zero, one, zep07, three100, em04
63C-----------------------------------------------
64C I m p l i c i t T y p e s
65C-----------------------------------------------
66 implicit none
67C-----------------------------------------------
68C I n c l u d e F i l e s
69C-----------------------------------------------
70#include "my_real.inc"
71#include "comlock.inc"
72#include "com06_c.inc"
73C-----------------------------------------------
74C D u m m y A r g u m e n t s
75C-----------------------------------------------
76 INTEGER,INTENT(IN) :: NVAREOS,NUMMAT,NPROPM
77 INTEGER MAT(NEL), IFLAG, NEL
78 my_real,INTENT(IN) :: pm(npropm,nummat),off(nel),mu(nel),mu2(nel),dvol(nel),df(nel),vnew(nel)
79 my_real,INTENT(INOUT) :: pnew(nel),dpdm(nel),dpde(nel),eint(nel),rho0(nel),espe(nel)
80 my_real,INTENT(INOUT) :: vareos(nel,nvareos),bfrac(nel)
81 my_real,INTENT(IN) :: dt1
82 TYPE(MATPARAM_STRUCT_), INTENT(IN) :: MAT_PARAM !< material data structure
83C-----------------------------------------------
84C L o c a l V a r i a b l e s
85C-----------------------------------------------
86 INTEGER I
87 my_real :: bulk,p0,psh,dd,eg,gr,cc,alpha,fscale_b,fscale_p,fscale_g,fscale_rho, c1,c2
88 my_real :: tmp, tmp2
89 my_real :: compac
90 my_real :: total_bfrac
91 my_real :: dpdm_gas, dpdm_powder
92 my_real :: mass,ps,pg,rho_s, rho_g,pold
93 my_real :: rho(nel)
94 INTEGER :: funcb,funcg
95C-----------------------------------------------
96C E x t e r n a l F u n c t i o n s
97C-----------------------------------------------
98 my_real,EXTERNAL :: finter
99 ! EXTERNAL FINTER
100 ! Y = FINTER(IFUNC(J),X,NPF,TF,DYDX)
101 ! Y : y = f(x)
102 ! X : x
103 ! DYDX : f'(x) = dy/dx
104 ! IFUNC(J): FUNCTION INDEX
105 ! J : FIRST(J=1), SECOND(J=2) .. FUNCTION USED FOR THIS LAW
106 ! NPF,TF : FUNCTION PARAMETER
107C-----------------------------------------------
108C S o u r c e L i n e s
109C-----------------------------------------------
110
111 ! --- STAGGERED SCHEME IFLG=0
112 IF(iflag == 0) THEN
113 bulk = mat_param%EOS%UPARAM(01)
114 p0 = mat_param%EOS%UPARAM(02)
115 psh = mat_param%EOS%UPARAM(03)
116 dd = mat_param%EOS%UPARAM(04)
117 eg = mat_param%EOS%UPARAM(05)
118 gr = mat_param%EOS%UPARAM(06)
119 cc = mat_param%EOS%UPARAM(07)
120 alpha = mat_param%EOS%UPARAM(08)
121 fscale_b = mat_param%EOS%UPARAM(09)
122 fscale_p = mat_param%EOS%UPARAM(10)
123 fscale_g = mat_param%EOS%UPARAM(11)
124 fscale_rho = mat_param%EOS%UPARAM(12)
125 c1 = mat_param%EOS%UPARAM(13)
126 c2 = mat_param%EOS%UPARAM(14)
127 funcb = mat_param%EOS%FUNC(1)
128 funcg = mat_param%EOS%FUNC(2)
129 compac = one - zep07 !1-0.07 = 0.93
130 total_bfrac = zero
131 IF(dt1 == zero)THEN
132 DO i=1,nel
133 espe(i) = eg
134 eint(i) = eg*rho0(i)*vnew(i)
135 vareos(i,1) = p0 !PS
136 vareos(i,2) = zero !PG
137 vareos(i,3) = rho0(i)/compac !RHO_S
138 vareos(i,4) = zero !RHO_G
139 vareos(i,5) = p0 !POLD
140 vareos(i,6) = zero !F(t_old)
141 vareos(i,7) = rho0(i)*vnew(i) !Mass0
142 dpdm(i) = bulk
143 dpde(i) = zero
144 ENDDO
145 ENDIF
146 DO i=1,nel
147 !--------------------------------!
148 ! INIT. !
149 !--------------------------------!
150 rho(i) = rho0(i) * (one + mu(i))
151 mass = rho(i)*vnew(i)
152 espe = eint(i)/mass
153 ps =vareos(i,1)
154 pg =vareos(i,2)
155 rho_s=vareos(i,3)
156 rho_g=vareos(i,4)
157 pold =vareos(i,5)
158 !--------------------------------------------------------------------!
159 ! SOUND SPEED DERIVATIVE !
160 ! DPDM ! dP/dmu total derivative !
161 ! dPdE ! partial derivative (where E=Eint/V0 , and rho0V0=rho.V) !
162 !--------------------------------------------------------------------!
163 tmp = (one+mu(i))*rho0(i)/dd
164 tmp2 = (one+mu(i)) ; tmp2=tmp2*tmp2
165 dpdm_gas = eg*exp(tmp)*(one+tmp) + pg/tmp2*(one+mu(i))*exp(tmp)
166 dpdm_powder = bulk
167 dpdm(i) = total_bfrac * dpdm_gas + (one-total_bfrac)*dpdm_powder !total derivative of mixture
168 dpde(i) = total_bfrac * (one+mu(i)*tmp) !partial derivative of mixture
169 ENDDO
170
171 ELSEIF(iflag == 1) THEN
172
173 ELSEIF (iflag == 2) THEN
174 DO i=1, nel
175 IF (vnew(i) > zero) THEN
176 pnew(i) = zero
177 dpdm(i) = zero !total derivative
178 dpde(i) = zero !partial derivative
179 ENDIF
180 ENDDO
181
182 ENDIF
183C-----------------------------------------------
184 RETURN
#define my_real
Definition cppsort.cpp:32
#define alpha
Definition eval.h:35