Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Quantum Rings formed by a Species Growing in a Circular Dish

Views: 55
# Quantum Rings formed by a Species Growing in a Circular Dish # Royal Society Open Science # Siddharth G. Chatterjee, 406 Walters Hall, Department of Paper and Bioprocess Engineering, SUNY College of Environmental Science & Forestry, 1 Forestry Drive, Syracuse, New York, 13210, USA. E-mail: [email protected] ################################################################## # Unsteady-state pattern formation in a circular dish by diffusion of a species along with a first-order generation term. All calculations are made in dimensionless coordinates. Initial dimensionless concentration is f(r) = r throughout domain (0 <= r <= 1), concentration is bounded at the center of the dish and its value is zero at the edge of the dish (i.e. Dirichlet boundary condition). ################################################################## print print "RESULTS" print print print "Figure 12" print ################################################################## var('y t') #plot(bessel_J(0,x),x,0,50) # This command was used to generate a plot of J0(x) vs x in order to obtain a preliminary idea of its roots. #find_root(bessel_J(0,x),38,41) # This command was used to find a root of the equation J0(x) = 0 in the specified interval. # vector mu contains the zeros of J0(x) = 0; i.e., there are 15 of them mu = vector([2.4048255576957747,5.520078110286311,8.653727912911009,11.791534439014281,14.930917708487495,18.07106396791092,21.21163662987926,24.352471530748968, 27.493479132040253,30.634606468431976,33.77582021357357,36.91709835366399,40.05842576462824,43.19979171317677,46.34118837166139]) A = vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) for i in range(0,15): A[i]= 2*(mu[i] - N(pi)*struve_H(0,mu[i])/2.0)/mu[i]^2/bessel_J(1,mu[i]) print "KR = ", mu[0]^2, "(n = 1)" print def conc(x,t): sum = 0.0 for j in range(0, 14): sum = sum + A[j]*exp(-(mu[j]^2 - mu[0]^2)*t)*bessel_J(0,x*mu[j]) return sum # Create a combined plot # create an empty plot object B = plot([],figsize=4,axes_labels=['Radial coordinate (r)','Concentration (c)'],gridlines=false, frame=True) B += plot(x,(x,0,1),color='blue', legend_label='t = 0', ymin = 0, ymax = 1, linestyle = 'dashdot', thickness=1) B += plot(conc(x,0.01),(x,0,1),color='green', legend_label='t = 0.01',ymin = 0, ymax = 1, linestyle = 'dotted', thickness=2) B += plot(conc(x,0.05),(x,0,1),color='black', legend_label='t = 0.05', ymin = 0, ymax = 1, linestyle = 'dashed', thickness=1) B += plot(conc(x,0.1),(x,0,1),color='red', legend_label='t = 0.1', ymin = 0, ymax = 1, linestyle = 'solid', thickness=1) show(B) ############################################ #first root mu[1] print "KR = ", mu[1]^2, "(n = 2)" print def conc(x,t): sum = 0.0 for j in range(1, 14): sum = sum + A[j]*exp(-(mu[j]^2 - mu[1]^2)*t)*bessel_J(0,x*mu[j]) return sum # Create a combined plot # create an empty plot object B = plot([],figsize=4,axes_labels=['Radial coordinate (r)','Concentration (c)'],gridlines=false, frame=True) B += plot(x,(x,0,1),color='blue', legend_label='t = 0', ymin = 0, ymax = 1, linestyle = 'dashdot', thickness=1) B += plot(conc(x,0.01),(x,0,1),color='green', legend_label='t = 0.01',ymin = 0, ymax = 1, linestyle = 'dotted', thickness=2) B += plot(conc(x,0.05),(x,0,1),color='black', legend_label='t = 0.05', ymin = 0, ymax = 1, linestyle = 'dashed', thickness=1) B += plot(conc(x,0.1),(x,0,1),color='red', legend_label='t = 0.1', ymin = 0, ymax = 1, linestyle = 'solid', thickness=1) show(B) ################################# #second root mu[2] print "KR = ", mu[2]^2, "(n = 3)" print def conc(x,t): sum = 0.0 for j in range(2, 14): sum = sum + A[j]*exp(-(mu[j]^2 - mu[2]^2)*t)*bessel_J(0,x*mu[j]) return sum # Create a combined plot # create an empty plot object B = plot([],figsize=4,axes_labels=['Radial coordinate (r)','Concentration (c)'],gridlines=false, frame=True) B += plot(x,(x,0,1),color='blue', legend_label='t = 0', ymin = 0, ymax = 1, linestyle = 'dashdot', thickness=1) B += plot(conc(x,0.01),(x,0,1),color='green', legend_label='t = 0.01',ymin = 0, ymax = 1, linestyle = 'dotted', thickness=2) B += plot(conc(x,0.05),(x,0,1),color='black', legend_label='t = 0.05', ymin = 0, ymax = 1, linestyle = 'dashed', thickness=1) B += plot(conc(x,0.1),(x,0,1),color='red', legend_label='t = 0.1', ymin = 0, ymax = 1, linestyle = 'solid', thickness=1) show(B) ################################# #third root mu[3] print "KR = ", mu[3]^2, "(n = 4)" print def conc(x,t): sum = 0.0 for j in range(3, 14): sum = sum + A[j]*exp(-(mu[j]^2 - mu[3]^2)*t)*bessel_J(0,x*mu[j]) return sum # Create a combined plot # create an empty plot object B = plot([],figsize=4,axes_labels=['Radial coordinate (r)','Concentration (c)'],gridlines=false, frame=True) B += plot(x,(x,0,1),color='blue', legend_label='t = 0', ymin = 0, ymax = 1, linestyle = 'dashdot', thickness=1) B += plot(conc(x,0.01),(x,0,1),color='green', legend_label='t = 0.01',ymin = 0, ymax = 1, linestyle = 'dotted', thickness=2) B += plot(conc(x,0.05),(x,0,1),color='black', legend_label='t = 0.05', ymin = 0, ymax = 1, linestyle = 'dashed', thickness=1) B += plot(conc(x,0.1),(x,0,1),color='red', legend_label='t = 0.1', ymin = 0, ymax = 1, linestyle = 'solid', thickness=1) show(B) ############################## #fourth root mu[4] print "KR = ", mu[4]^2, "(n = 5)" print def conc(x,t): sum = 0.0 for j in range(4, 14): sum = sum + A[j]*exp(-(mu[j]^2 - mu[4]^2)*t)*bessel_J(0,x*mu[j]) return sum # Create a combined plot # create an empty plot object B = plot([],figsize=4,axes_labels=['Radial coordinate (r)','Concentration (c)'],gridlines=false, frame=True) B += plot(x,(x,0,1),color='blue', legend_label='t = 0', ymin = 0, ymax = 1, linestyle = 'dashdot', thickness=1) B += plot(conc(x,0.01),(x,0,1),color='green', legend_label='t = 0.01',ymin = 0, ymax = 1, linestyle = 'dotted', thickness=2) B += plot(conc(x,0.05),(x,0,1),color='black', legend_label='t = 0.05', ymin = 0, ymax = 1, linestyle = 'dashed', thickness=1) B += plot(conc(x,0.1),(x,0,1),color='red', legend_label='t = 0.1', ymin = 0, ymax = 1, linestyle = 'solid', thickness=1) show(B)