def slurrydensity(radius,temp,xi,solidflux,mol_conc_oxygen_bulk, \ sedimentation_constant,mol_conc_SSi=8,model='prem'): # Density profile across slurry layer csb_radius = radius[-1] if model == 'prem': csb_density = premdensity(csb_radius) elif model == 'ohtaki': _, csb_density = ohtaki(csb_radius) # Solid fraction Kphi = getKphi(sedimentation_constant, radius, mol_conc_oxygen_bulk) phi = (-solidflux / Kphi)**(3 / 5) # Density fluctuations deltaV_solid_liquid = getchangevolmeltingFe(csb_density) temp_denFluc = -csb_density * alphaT * (temp - temp[-1]) xi_denFluc = -csb_density * alphaXi * (xi - xi[-1]) phi_denFluc = csb_density * (csb_density * deltaV_solid_liquid + alphaXi * xi) * (phi - phi[-1]) density_fluc = temp_denFluc + xi_denFluc + phi_denFluc # Hydrostatic density slurry_gravity = premgravity(radius) density_hydrostatic=1/(slurry_gravity*(radius-csb_radius)/bulk_modulus+ \ 1/csb_density) # Total density density_slurry = density_hydrostatic + density_fluc return (density_slurry, phi, temp_denFluc, xi_denFluc, phi_denFluc, density_fluc)
def fun(r,y,p): # Eigenvalues F=p[0] speed=p[1] # PREM gravity and density in layer if model =='prem': density_seis=lp.premdensity(r*csb_radius)/density0 # dimensionless density elif model == 'ohtaki': _,density_seis = lp.ohtaki(r*csb_radius)/density0 gravity_seis=lp.premgravity(r*csb_radius)/csb_gravity # dimensionless gravity density_grad_seis=np.gradient(density_seis,r) gravity_grad_seis=np.gradient(gravity_seis,r) # r derivative of barodiffusion term term=gravity_seis*density_seis*np.exp(F*(csb_radius*r-icb_radius)/layer_thickness)* \ (F*csb_radius/layer_thickness+2/r-y[3]/y[0]+ \ gravity_grad_seis/gravity_seis+density_grad_seis/density_seis)/y[0] # liquidus (=dxi/dr) eq1=-(Lip*density_seis*gravity_seis+y[3]/y[0])*Rrho/(Lix*St*y[0]) # oxygen eqn (=dj/dr) eq2=(Lip*Rrho*term/(Lix*St*Pe*Rvol) - eq1*(Rrho*speed+y[2]) - \ 2*y[1]*y[2]/r)/y[1] # temp eqn (=d2T/dr2) eq3=-Pe/Le*((eq2+2/r*y[2])/St + \ (speed+2*Le/(r*Pe))*y[3]) return np.vstack([y[3],eq1,eq2,eq3])
def getLip(csb_radius, model='prem'): gravity = premgravity(csb_radius) if model == 'prem': density = premdensity(csb_radius) elif model == 'ohtaki': _, density = ohtaki(csb_radius) Lip = deltaV_solidFe_liquidFe * gravity * density * csb_radius / latent_heat return Lip, gravity, density
def getKphi(sedimentation_constant, radius, mol_conc_oxygen_bulk, mol_conc_SSi=8): gravity = premgravity(radius) density = premdensity(radius) deltaV_solid_liquid = getchangevolmeltingFe(density[-1]) Kphi = sedimentation_constant * gravity * density * deltaV_solid_liquid return Kphi
def adiabat(oc_radius, csb_temp, n): # Construct adiabat across outer core given CSB temperature # Gravity oc_gravity = premgravity(oc_radius) # Seismic parameter seismic_parameter = premvp(oc_radius)**2 # Pre-allocate temp_adiabat = np.zeros(n) # Integrand for the adiabat integrand = oc_gravity * gruneisen / seismic_parameter # Boundary condition temp_adiabat[0] = csb_temp # Integrate for i in range(1, n): temp_adiabat[i]=csb_temp*np.exp(-integrate.simps(integrand[0:i+1], \ oc_radius[0:i+1])) return temp_adiabat
def heatflux(radius,temp,xi,solidflux,phi,temp_grad,xi_grad,density_slurry, \ icb_speed,icb_heatflux,layer_thickness,thermal_conductivity, \ csb_heatflux,n): csb_radius = radius[-1] # GRAVITATIONAL POWER # Gravitational potential radius_psi = np.linspace(icb_radius, cmb_radius) gravity_psi = premgravity(radius_psi) psi = np.zeros(radius_psi.size) for i in range(radius_psi.size - 1): psi[i] = -integrate.simps(gravity_psi[i:], radius_psi[i:]) # Slurry f = interpolate.interp1d(radius_psi, psi) psi_slurry = f(radius) oxygen_mass_slurry = 4 * np.pi * density_solidFe * layer_thickness**2 * icb_speed * xi[ -1] mass_slurry = integrate.simps(density_slurry * 4 * np.pi * radius**2, radius) Qg_slurry = -alphaXi*oxygen_mass_slurry/mass_slurry* \ integrate.simps(density_slurry*psi_slurry*4*np.pi*radius**2,radius) # print('Change in oxygen mass (slurry) is {}'.format(oxygen_mass_slurry)) # print('Mass of slurry is {}'.format(mass_slurry)) print('Qg slurry is {:.2f}TW'.format(Qg_slurry * 1e-12)) # Outer core radius_oc = np.linspace(csb_radius, cmb_radius) psi_oc = f(radius_oc) surf = -psi[0] * alphaXi * density_slurry[-1] * xi[ -1] * icb_speed * 4 * np.pi * csb_radius**2 # Mass of OC density_oc = premdensity(radius_oc) mass_oc = integrate.simps(density_oc * 4 * np.pi * radius_oc**2, radius_oc) oxygen_mass_oc = -density_slurry[ -1] * icb_speed * 4 * np.pi * csb_radius**2 * xi[-1] / mass_oc bulk = integrate.simps( alphaXi * psi_oc * oxygen_mass_oc * 4 * np.pi * radius_oc**2, radius_oc) # print('Change in oxygen mass (outer core) is {}'.format(oxygen_mass_oc)) # print('Mass of outer core is {}'.format(mass_oc)) print('Qg surface term in outer core is {:.2f}TW'.format(surf * 1e-12)) print('Qg bulk term in outer core is {:.5f}TW'.format(bulk * 1e-12)) # Total gravitational energy Qg_oc = surf + bulk Qg = Qg_slurry + Qg_oc print('Total Qg is {:.2f}TW'.format(Qg * 1e-12)) # LATENT HEAT Ql = 4 * np.pi * icb_radius**2 * density_solidFe * icb_speed * latent_heat print('Total Ql is {:.2f}TW'.format(Ql * 1e-12)) # SECULAR COOLING # Cooling rate csb_temp = temp[-1] cooling_rate, cmb_temp, temp_ad = get_cooling(icb_speed, csb_temp, radius_oc, csb_radius, cmb_radius) # Outer core Qs_oc = - heat_capacity*cooling_rate/cmb_temp \ *integrate.simps(density_oc*temp_ad*4*np.pi*radius_oc**2,radius_oc) print('Qs in outer core is {:.2f}TW'.format(Qs_oc * 1e-12)) # Slurry Qs_slurry = csb_heatflux - Qg_slurry - Ql print('Qs in slurry {:.2f}TW'.format(Qs_slurry * 1e-12)) Qs = Qs_slurry + Qs_oc print('Total Qs is {:.2f}TW'.format(Qs * 1e-12)) # CMB heat flux Q_cmb = csb_heatflux + Qs_oc + Qg_oc print('Qcmb is is {:.2f}TW'.format((Q_cmb) * 1e-12)) return (Q_cmb, Qs, Qs_slurry, Qs_oc, Ql, Qg, Qg_oc, Qg_slurry, cooling_rate, cmb_temp, temp_ad)