9 use constants
, only: dp
12 integer :: rb_kx=4,rb_iknot=0,rb_inbvx,rb_nx
13 real(dp),
dimension(:),
allocatable :: rb_tx,rb_coef
14 integer :: por_kx=2,por_iknot=0,por_inbvx,por_nx
15 real(dp),
dimension(:),
allocatable :: por_tx,por_coef
16 integer :: visc_kx=2,visc_iknot=0,visc_inbvx,visc_nx
17 real(dp),
dimension(:),
allocatable :: visc_tx,visc_coef
18 public volume_balance,dispress,min_film_thickness,rb_spline_ini,&
19 rb,rb_der,porosity_spline_ini,
porosity,visc_spline_ini,visc
23 pure subroutine volume_balance(y,vt,fs)
25 real(dp),
intent(out) :: fs
26 real(dp),
intent(out) :: vt
27 real(dp),
dimension(:),
intent(in) :: y
35 vf=vf+2*pi*
dr*(0.5_dp+i-1)*y(i)*
dr 37 vs=vs+2*pi*
dr*(0.5_dp+i-1)*y(i)*
dr 40 vs=vs+pi*y(neq)/3*(
rd**2+
rc*
rd+
rc**2)-pi*y(neq)*
rd**2
43 end subroutine volume_balance
49 pure subroutine dispress(h,dispr,dph)
51 real(dp),
intent(in) :: h
52 real(dp),
intent(out) :: dispr
53 real(dp),
intent(out) :: dph
57 end subroutine dispress
63 subroutine min_film_thickness(y,hmin,hloc,havg)
65 real(dp),
dimension(:),
intent(in) :: y
66 real(dp),
intent(out) :: hmin
67 real(dp),
intent(out) :: hloc
68 real(dp),
intent(out) :: havg
71 hloc=minloc(y,dim=1)*
dr 76 havg=havg+2*pi*
dr*(0.5_dp+i-1)*y(i)*
dr 81 havg=havg/(pi*(
dr*(0.5_dp+i-2))**2)
82 end subroutine min_film_thickness
88 real(dp) function rb_der(t)
90 real(dp),
intent(in) :: t
93 call db1val(t,idx,rb_tx,rb_nx,rb_kx,rb_coef,rb_der,iflag,rb_inbvx)
95 print*,
'evaluation of bubble radius derivative from spline failed',&
105 real(dp) function rb(t)
107 real(dp),
intent(in) :: t
110 call db1val(t,idx,rb_tx,rb_nx,rb_kx,rb_coef,rb,iflag,rb_inbvx)
112 print*,
'evaluation of bubble radius from spline failed',iflag
121 subroutine rb_spline_ini(bblgr_res)
124 real(dp),
dimension(:,:),
intent(in) :: bblgr_res
126 rb_nx=
size(bblgr_res(:,1))
127 if (
allocated(rb_tx))
deallocate(rb_tx)
128 if (
allocated(rb_coef))
deallocate(rb_coef)
129 allocate(rb_tx(rb_nx+rb_kx),rb_coef(rb_nx))
131 call db1ink(bblgr_res(:,1),rb_nx,bblgr_res(:,2),&
132 rb_kx,rb_iknot,rb_tx,rb_coef,iflag)
135 print*,
'initialization of bubble radius spline failed' 138 end subroutine rb_spline_ini
146 real(dp),
intent(in) :: t
149 call db1val(t,idx,por_tx,por_nx,por_kx,por_coef,
porosity,iflag,por_inbvx)
151 print*,
'evaluation of porosity from spline failed',iflag
160 subroutine porosity_spline_ini(bblgr_res)
163 real(dp),
dimension(:,:),
intent(in) :: bblgr_res
165 por_nx=
size(bblgr_res(:,1))
166 if (
allocated(por_tx))
deallocate(por_tx)
167 if (
allocated(por_coef))
deallocate(por_coef)
168 allocate(por_tx(por_nx+por_kx),por_coef(por_nx))
170 call db1ink(bblgr_res(:,1),por_nx,bblgr_res(:,3),&
171 por_kx,por_iknot,por_tx,por_coef,iflag)
174 print*,
'initialization of porosity spline failed' 177 end subroutine porosity_spline_ini
183 real(dp) function visc(t)
185 real(dp),
intent(in) :: t
188 call db1val(t,idx,visc_tx,visc_nx,visc_kx,visc_coef,visc,iflag,visc_inbvx)
190 print*,
'evaluation of viscosity from spline failed',iflag
199 subroutine visc_spline_ini(bblgr_res)
202 real(dp),
dimension(:,:),
intent(in) :: bblgr_res
204 visc_nx=
size(bblgr_res(:,1))
205 if (
allocated(visc_tx))
deallocate(visc_tx)
206 if (
allocated(visc_coef))
deallocate(visc_coef)
207 allocate(visc_tx(visc_nx+visc_kx),visc_coef(visc_nx))
209 call db1ink(bblgr_res(:,1),visc_nx,bblgr_res(:,4),&
210 visc_kx,visc_iknot,visc_tx,visc_coef,iflag)
213 print*,
'initialization of viscosity spline failed' 216 end subroutine visc_spline_ini
double porosity(int ***amat)
Calculates porosity.
real(dp) strutfilmparameter
parameter determining strut-film boundary
real(dp) rc
total window size (radius)
real(dp) cdp
disjoining pressure constant
real(dp) bdp
disjoining pressure constant, set to zero for no DP
real(dp) ndp
disjoining pressure constant
namespace with global variables
real(dp) rd
computational domain size (radius)
real(dp) hdp
disjoining pressure constant
real(dp) mdp
disjoining pressure constant
real(dp) dr
mesh points spacing