8 use constants
, only: dp
11 real(dp),
parameter :: &
15 real(dp),
dimension(:,:),
allocatable :: bblgr_res
16 public odesystem,set_initial_conditions,update_domain_size,q
23 subroutine odesystem(neq, t, y, ydot)
24 use constants
, only: pi
26 use phys_prop
, only: dispress,rb,visc
27 integer,
intent(in) :: neq
28 real(dp),
intent(in) :: t
29 real(dp),
intent(in) ::
y(neq)
30 real(dp),
intent(out) :: ydot(neq)
32 real(dp) :: z,ze,zw,zee,zww
34 real(dp) :: h,he,hw,hee,hww,heee,hwww
35 real(dp) :: he1,hw1,he2,hw2,he3,hw3
36 real(dp) :: fluxe,fluxw
42 call update_domain_size(t,
y)
52 he=hee*lame+h*(1-lame)
53 heee=
y(i+2)*lame+hee*(1-lame)
55 he2=(hee-2*he+h)/(
dr**2/4)
56 he3=(heee-2*hee+2*h-hw)/(
dr**3/4)
58 call dispress(he,dispr,dph)
59 fluxe=
gam*he**3*(2*he1**3/ze+he1**5/ze+he1*(1+3*ze**2*he2**2)/ze-&
60 he2-ze*he3-he1**2*(he2+ze*he3))/(1+he1**2)**2.5_dp+&
69 hw=h*lamw+hww*(1-lamw)
71 hwww=hww*lamw+
y(i-2)*(1-lamw)
73 hw2=(h-2*hw+hww)/(
dr**2/4)
74 hw3=(he-2*h+2*hww-hwww)/(
dr**3/4)
75 call dispress(he,dispr,dph)
76 fluxw=
gam*hw**3*(2*hw1**3/zw+hw1**5/zw+hw1*(1+3*zw**2*hw2**2)/zw-&
77 hw2-zw*hw3-hw1**2*(hw2+zw*hw3))/(1+hw1**2)**2.5_dp+&
91 hw=h*lamw+hww*(1-lamw)
92 he=hee*lame+h*(1-lame)
96 hwww=hww*lamw+
y(i-2)*(1-lamw)
101 heee=
y(i+2)*lame+hee*(1-lame)
104 hw2=(h-2*hw+hww)/(
dr**2/4)
105 hw3=(he-2*h+2*hww-hwww)/(
dr**3/4)
107 he2=(hee-2*he+h)/(
dr**2/4)
108 he3=(heee-2*hee+2*h-hw)/(
dr**3/4)
109 call dispress(he,dispr,dph)
110 fluxw=
gam*hw**3*(2*hw1**3/zw+hw1**5/zw+hw1*(1+3*zw**2*hw2**2)/zw-&
111 hw2-zw*hw3-hw1**2*(hw2+zw*hw3))/(1+hw1**2)**2.5_dp+&
113 call dispress(he,dispr,dph)
114 fluxe=
gam*he**3*(2*he1**3/ze+he1**5/ze+he1*(1+3*ze**2*he2**2)/ze-&
115 he2-ze*he3-he1**2*(he2+ze*he3))/(1+he1**2)**2.5_dp+&
118 ydot(i)=(fluxe-fluxw)/(z*
dr)/3/
mu 120 end subroutine odesystem
126 subroutine set_initial_conditions(y)
128 use in_out
, only: load_bubble_growth
129 use phys_prop
, only: rb_spline_ini,visc_spline_ini,porosity_spline_ini
130 real(dp),
dimension(:),
intent(out) :: y
131 integer :: i,neq,cp_por_ind
132 real(dp) :: rs,ri,cp_por
135 call load_bubble_growth(bblgr_res)
139 rs=
rd*sqrt((1+s**2)/s**2)*
dstr 143 if (i>neq*(1-
dstr))
then 144 y(i)=(rs+
hi)-sqrt(rs**2-(ri-(1-
dstr)*
rd)**2)
149 rc0=
rd+y(neq)/sqrt(3.0_dp)
152 call rb_spline_ini(bblgr_res)
153 call porosity_spline_ini(bblgr_res)
155 cp_por_ind=minloc(abs(bblgr_res(:,3)-0.70_dp),dim=1)
156 rs=bblgr_res(cp_por_ind,2)
163 y(i)=rs+
hi-sqrt(rs**2-ri**2)
167 call visc_spline_ini(bblgr_res)
170 end subroutine set_initial_conditions
178 subroutine update_domain_size(t,y)
180 use phys_prop
, only: rb
181 real(dp),
intent(in) :: t
182 real(dp),
dimension(:),
intent(in) :: y
188 rc=(rb(t)+
hi)/sqrt(3.0_dp)
190 rd=
rc-y(neq)/sqrt(3.0_dp)
192 end subroutine update_domain_size
real(dp) gam
surface tension
character(len=1024) growthratemodel
growth rate model (constantGrowth, fromFile)
real(dp), dimension(:), allocatable y
state variables
real(dp) hi
film thickness at center
real(dp) rc
total window size (radius)
character(len=1024) viscositymodel
viscosity model (constant, fromFile)
real(dp) rc0
initial total window size (radius)
real(dp) dstr
where strut starts in initial domain
real(dp) timestep
timestep
integer its
number of outer integration outer time steps
namespace with global variables
real(dp) rd
computational domain size (radius)
real(dp) initialtime
starting time
real(dp) dr
mesh points spacing