OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
powder_burn_mod Module Reference

Functions/Subroutines

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

Function/Subroutine Documentation

◆ powder_burn()

subroutine powder_burn_mod::powder_burn ( integer, intent(in) npropm,
integer, intent(in) nummat,
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,
intent(in) dt1,
dimension(nel), intent(in) rho0,
dimension(nel), intent(inout) bfrac )
Parameters
[in]mat_parammaterial data structure

Definition at line 39 of file powder_burn.F.

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