16 logical :: rb_initialized
17 integer :: rb_kx=4,rb_iknot=0,rb_inbvx
18 real(dp),
dimension(:),
allocatable :: rb_tx,rb_coef
19 public set_initial_physical_properties,physical_properties,rb,rderiv,&
27 subroutine set_initial_physical_properties
29 if (.not. firstrun)
r0=rb(
time)
36 if (sum(
xgas) /= 1)
then 37 write(*,*)
'Sum of initial molar fractions of gases in the bubble is & 38 not equal to one. Normalizing...' 40 write(*,*)
'New initial molar fractions of gases in the bubble' 43 call createmodenamodels
82 sn=(1._dp/(
nb0*4._dp/3*pi*
r0**3)+1)**(1._dp/3)
87 sn=(1._dp/(
nb0*pi*
r0**2)+1)**(1._dp/2)
94 if (
allocated(etat))
deallocate(etat)
95 if (
allocated(port))
deallocate(port)
96 if (
allocated(init_bub_rad))
deallocate(init_bub_rad)
97 allocate(etat(0:
its,2),port(0:
its,2),init_bub_rad(0:
its,2))
99 end subroutine set_initial_physical_properties
107 subroutine physical_properties(temp,conv,radius)
108 real(dp),
intent(in) :: temp
109 real(dp),
intent(in) :: conv
110 real(dp),
intent(in) :: radius
112 real(dp) :: Aeta,Eeta,Cg,AA,B
114 print*,
'temperature > 500', temp
125 eta=aeta*exp(eeta/(rg*temp))*&
127 if (
eta>1e10)
eta=1.0e10_dp
206 kh(i)=
rhop/
mbl(i)/
pamb*(0.0064_dp+0.0551_dp*exp(-(temp-298)**2/&
219 end subroutine physical_properties
227 real(dp) function rderiv(t)
229 real(dp),
intent(in) :: t
231 integer :: nx,idx,iflag
234 nx=
size(bub_rad(:,1))
235 if (.not. rb_initialized)
then 239 call db1val(t,idx,rb_tx,nx,rb_kx,rb_coef,rderiv,iflag,rb_inbvx)
241 print*,
'evaluation of bubble radius derivative from spline failed',&
253 real(dp) function rb(t)
256 real(dp),
intent(in) :: t
257 integer :: nx,idx,iflag
261 nx=
size(bub_rad(:,1))
265 if (.not. rb_initialized)
then 269 call db1val(t,idx,rb_tx,nx,rb_kx,rb_coef,rb,iflag,rb_inbvx)
271 print*,
'evaluation of bubble radius from spline failed',iflag
282 subroutine rb_spline_ini
285 nx=
size(bub_rad(:,1))
286 if (
allocated(rb_tx))
deallocate(rb_tx)
287 if (
allocated(rb_coef))
deallocate(rb_coef)
288 allocate(rb_tx(nx+rb_kx),rb_coef(nx))
290 call db1ink(bub_rad(:,1),nx,bub_rad(:,bub_inx+1),&
291 rb_kx,rb_iknot,rb_tx,rb_coef,iflag)
293 rb_initialized=.true.
295 print*,
'initialization of spline failed' 298 end subroutine rb_spline_ini
logical gelpoint
gel point reached (t/f)
logical solcorr
use solubility correction on bubble radius (t/f)
integer ngas
number of dissolved gases
integer, dimension(:), allocatable sol_model
solubility model 1=constant,2=modena
integer rhop_model
polymer density model. 1=constant,2=modena
real(dp) rhop
polymer density
real(dp) temp
temperature (K)
real(dp) nb0
initial bubble number density
real(dp) pair0
initial partial pressure of air
real(dp) radius
bubble radius (m)
real(dp), dimension(:), allocatable kh
Henry constants (for each dissolved gas)
real(dp) gelpointconv
conversion of polyol at gel point
real(dp) sn
how many times is initial shell larger than initial bubble radius
real(dp) s0
initial shell thickness
real(dp) sigma
interfacial tension
integer, dimension(:), allocatable diff_model
diffusivity model 1=constant,2=modena
real(dp), dimension(:), allocatable mbl
blowing agent molar mass (for each dissolved gas)
real(dp) conv
conversion of polyol
character(len=99) geometry
geometry 3D=spherical, 2D=cylindrical
real(dp), dimension(:), allocatable cpbll
heat capacity of blowing agent in liquid phase (for each gas)
real(dp), dimension(:), allocatable d0
initial diffusion coefficients used in non-dimensional routines
real(dp), dimension(:), allocatable xgas
initial molar fraction of gases in the bubble
real(dp), dimension(:), allocatable cbl
concentration profile in reaction mixture
integer itens_model
interfacial tension model. 1=constant,2=modena
real(dp) temp0
initial temperature
real(dp), dimension(:), allocatable d
diffusion coefficients (for each dissolved gas)
real(dp) pamb
ambient pressure (in the liquid)
real(dp) timestep
timestep
integer its
number of outer integration outer time steps
real(dp) cp
heat capacity of the reaction mixture
real(dp) cppol
heat capacity of polymer
real(dp) r0
initial radius
namespace with global variables
integer visc_model
viscosity model. 1=constant,2=Castro and Macosko,3=modena