21 use physicalproperties
22 use conductivity
, only: equcond
23 use ioutils
, only: newunit
24 use model
, only: modelpu,
ngas,nfv,
dz,dif,sol,bc,mor
25 use inout
, only: input,output,print_header
26 integer :: i, j, k, l, counter, fi
27 integer :: multiplicator
28 integer :: itol, itask, istate, iopt
29 integer :: MF, ML, MU, LRW, LIW, LENRAT, NNZ, LWM, NEQ
30 integer,
allocatable :: IWORK(:)
32 real(dp) :: tin, tout, keq
33 real(dp) :: rtol, atol, jdem
35 real(dp),
allocatable :: ystate(:), yprime(:)
36 real(dp),
allocatable :: RWORK(:)
37 real(dp),
allocatable :: yinit(:)
38 real(dp),
allocatable :: pp(:)
62 call createmodels(
ngas)
87 allocate(ystate(1:neq))
88 allocate(yprime(1:neq))
140 lwm = 2*nnz + 2*neq + (nnz+10*neq)/lenrat
141 liw = 31 + neq + nnz +100
142 lrw = 20 + (2 + 1._dp/lenrat)*nnz + (11 + 9._dp/lenrat)*neq
146 allocate(rwork(1:lrw))
147 allocate(iwork(1:liw))
148 open(10,file=
'dcmp_progress.out', status=
'unknown')
160 open (newunit(fi),file=
'keq_time.out')
161 write(fi,
'(10A23)')
'#time',
'eq_conductivity',
'total_pressure',
'p_O2', &
162 'p_N2',
'p_CO2',
'p_CP' 163 call output(0, 0.0_dp, ystate, neq, pp)
165 write(fi,
'(10es23.15)')
tbeg/(3600*24),keq*1.0e3_dp,sum(pp),pp
170 call dlsodes(modelpu, neq, ystate, tin, tout, itol, rtol, atol, itask,&
171 istate, iopt, rwork, lrw, iwork, liw, jdem, mf)
173 if (istate.lt.0)
then 174 write(*,*)
'Something is wrong, look for ISTATE =', istate
175 if (istate.eq.-1)
then 180 iwork(6) = counter*1000
182 counter = counter + 2
183 write(*,*)
'MAXSTEP', iwork(6)
184 write(10,*)
'MAXSTEP', iwork(6)
188 elseif (counter>3)
then 190 iwork(6) = counter*1000
191 write(*,*)
'MAXSTEP', iwork(6)
192 write(10,*)
'MAXSTEP', iwork(6)
195 if (mod(i,multiplicator).eq.0)
then 196 write(*,
'(2x,A,1x,f6.1,1x,A)')
'time:', tout/(3600*24),
'days' 197 write(10,
'(2x,A,1x,es9.3,1x,A)')
'time:', tout/(3600*24),
'days' 198 call output(i/multiplicator, tout, ystate, neq, pp)
200 write(fi,
'(10es23.15)') tout/(3600*24),keq*1e3,sum(pp),pp
205 call destroymodels(
ngas)
206 end subroutine integrate
208 end module integration
integer divwall
number of grid points in wall
integer, dimension(:), allocatable solmodel
solubility model
real(dp), dimension(:), allocatable xg
molar fractions of gases
integer ngas
number of dissolved gases
real(dp), dimension(:), allocatable sheetsg
gas solubility in sheet
integer divcell
number of grid points in cell
real(dp) rhop
polymer density
real(dp) temp
temperature (K)
real(dp) tbeg
time at the end
real(dp) eps
foam porosity
integer, dimension(:), allocatable diffmodel
diffusivity model
real(dp), dimension(:), allocatable pbg
boundary conditions
real(dp), dimension(:), allocatable dz
spatial discretization
real(dp), dimension(:), allocatable pressure
partial pressure(Pa)
real(dp), dimension(:), allocatable dg
gas diffusiviy in polymer
real(dp) dfoam
foam thickness
real(dp) rhof
foam density
integer nroutputs
number of outer endme steps
real(dp) fstrut
strut content
real(dp), dimension(:), allocatable sheetdg
gas diffusivity in sheet
integer divsheet
number of grid points in sheet
real(dp), dimension(:), allocatable sg
gas solubility in polymer
integer ncell
number of cells
real(dp) dsheet
sheet thickness
real(dp) temp_cond
temperature of conductivity measurements
namespace with global variables
logical sheet
determines if sheet is used on the outside of the foam
real(dp) dgas
gas diffusivity in gasphase
real(dp) dwall
wall thickness