tmax2 = 20.0 # max time for large particles, s t2 = np.arange(0, tmax2+dt, dt) # time vector for large particles, s # 1-D Transient Heat Conduction for DF = 200 um # ----------------------------------------------------------------------------- # surface area to volume equivalent sphere diameter Dsv, m dsv200 = dsv(sa200, v200) # intraparticle temperature array [T] in Kelvin for Dsv case, b = 2 for sphere # row = time step, column = node point from 0 to m Tsv200 = hc2(dsv200, x, k, Gb, h, Ti, Tinf, 2, m, t) # volume average temperature at each time step vol200 = vol(dsv200, m) # volumes in the sphere Tvol200 = Tvol(Tsv200, vol200) # Dsv volume average temperature profile # 1-D Transient Heat Conduction for DF = 400 um # ----------------------------------------------------------------------------- # surface area to volume equivalent sphere diameter Dsv, m dsv400 = dsv(sa400, v400) # intraparticle temperature array [T] in Kelvin for Dsv case, b = 2 for sphere # row = time step, column = node point from 0 to m Tsv400 = hc2(dsv400, x, k, Gb, h, Ti, Tinf, 2, m, t) # volume average temperature at each time step vol400 = vol(dsv400, m) # volumes in the sphere Tvol400 = Tvol(Tsv400, vol400) # Dsv volume average temperature profile
dt = tmax/nt # time step, s t = np.arange(0, tmax+dt, dt) # time vector, s # intraparticle temperature array [T] in Kelvin # row = time step, column = node point from 0 to m Ts = hc2(ds, x, k, Gb, h, Ti, Tinf, 2, m, t) # ds case, b = 2 for sphere Tv = hc2(dv, x, k, Gb, h, Ti, Tinf, 2, m, t) # dv case, b = 2 for sphere Tsv = hc2(dsv, x, k, Gb, h, Ti, Tinf, 2, m, t) # dsv case, b = 2 for sphere Tc = hc2(dc, x, k, Gb, h, Ti, Tinf, 2, m, t) # dc case, b = 2 for sphere Th = hc2(dh, x, k, Gb, h, Ti, Tinf, 2, m, t) # dh case, b = 2 for sphere Tw = hc2(dw, x, k, Gb, h, Ti, Tinf, 2, m, t) # dw case, b = 2 for sphere Tl = hc2(dl, x, k, Gb, h, Ti, Tinf, 2, m, t) # dl case, b = 2 for sphere # volume average temperatures Vs = vol(ds, m) # volumes in the sphere Ts_vol = Tvol(Ts, Vs) # ds volume average temperature profile Vv = vol(dv, m) Tv_vol = Tvol(Tv, Vv) # dv volume average temperature profile Vsv = vol(dsv, m) Tsv_vol = Tvol(Tsv, Vsv) # dsv volume average temperature profile Vc = vol(dc, m) Tc_vol = Tvol(Tc, Vc) # dc volume average temperature profile Vh = vol(dh, m) Th_vol = Tvol(Th, Vh) # dh volume average temperature profile Vw = vol(dw, m) Tw_vol = Tvol(Tw, Vw) # dw volume average temperature profile
# time vector from 0 to max time tmax = 0.8 # max time, s nt = 1000 # number of time steps dt = tmax / nt # time step, s t = np.arange(0, tmax + dt, dt) # time vector, s # intraparticle temperature array [T] in Kelvin # row = time step, column = node point from 0 to m Ts = hc2(ds, x, k, Gb, h, Ti, Tinf, 2, m, t) # ds case, b = 2 for sphere Tv = hc2(dv, x, k, Gb, h, Ti, Tinf, 2, m, t) # dv case, b = 2 for sphere Tsv = hc2(dsv, x, k, Gb, h, Ti, Tinf, 2, m, t) # dsv case, b = 2 for sphere Tc = hc2(dc, x, k, Gb, h, Ti, Tinf, 2, m, t) # dc case, b = 2 for sphere # volume average temperatures v = vol(ds, m) # volumes in the sphere Ts_vol = Tvol(Ts, v) # ds volume average temperature profile Tv_vol = Tvol(Tv, v) # dv volume average temperature profile Tsv_vol = Tvol(Tsv, v) # dsv volume average temperature profile Tc_vol = Tvol(Tc, v) # dc volume average temperature profile # grab data from text file txtfile = 'comsol/200tempsPine.txt' t2, Tv, Tst, Tc, Tl, Tw, Tsa = np.loadtxt(txtfile, skiprows=5, unpack=True) # Plot Results # ----------------------------------------------------------------------------- py.ion() py.close('all')
dt = tmax / nt # time step, s t = np.arange(0, tmax + dt, dt) # time vector, s # intraparticle temperature array [T] in Kelvin # row = time step, column = node point from 0 to m Ts = hc2(ds, x, k, Gb, h, Ti, Tinf, 2, m, t) # ds case, b = 2 for sphere Tv = hc2(dv, x, k, Gb, h, Ti, Tinf, 2, m, t) # dv case, b = 2 for sphere Tsv = hc2(dsv, x, k, Gb, h, Ti, Tinf, 2, m, t) # dsv case, b = 2 for sphere Tc = hc2(dc, x, k, Gb, h, Ti, Tinf, 2, m, t) # dc case, b = 2 for sphere Th = hc2(dh, x, k, Gb, h, Ti, Tinf, 2, m, t) # dh case, b = 2 for sphere Tw = hc2(dw, x, k, Gb, h, Ti, Tinf, 2, m, t) # dw case, b = 2 for sphere Tl = hc2(dl, x, k, Gb, h, Ti, Tinf, 2, m, t) # dl case, b = 2 for sphere # volume average temperatures v = vol(ds, m) # volumes in the sphere Ts_vol = Tvol(Ts, v) # ds volume average temperature profile Tv_vol = Tvol(Tv, v) # dv volume average temperature profile Tsv_vol = Tvol(Tsv, v) # dsv volume average temperature profile Tc_vol = Tvol(Tc, v) # dc volume average temperature profile Th_vol = Tvol(Th, v) # dh volume average temperature profile Tw_vol = Tvol(Tw, v) # dw volume average temperature profile Tl_vol = Tvol(Tl, v) # dl volume average temperature profile # grab data from text file txtfile = 'comsol/20000tempsPine.txt' t2, Tv, Tst, Tc, Tl, Tw, Tsa = np.loadtxt(txtfile, skiprows=5, unpack=True) # Plot Results # ----------------------------------------------------------------------------- py.ion()
# number of nodes from center of particle (m=0) to surface (m) m = 1000 # time vector from 0 to max time tmax = 5.0 # max time, s nt = 1000 # number of time steps dt = tmax / nt # time step, s t = np.arange(0, tmax + dt, dt) # time vector, s # intraparticle temperature array [T] in Kelvin # row = time step, column = node point from 0 to m Tsv = hc2(dsv, x, k, Gb, h, Ti, Tinf, 2, m, t) # dsv case, b = 2 for sphere # volume average temperatures v = vol(ds, m) # volumes in the sphere Tsv_vol = Tvol(Tsv, v) # dsv volume average temperature profile # grab data from text file txtfile = 'comsol/5400tempsPine.txt' t2, Tv, Tst, Tc, Tl, Tw, Tsa = np.loadtxt(txtfile, skiprows=5, unpack=True) # Plot Results # ----------------------------------------------------------------------------- py.ion() py.close('all') def despine(): ax = py.gca() ax.spines['top'].set_visible(False)
m = 1000 # time vector from 0 to max time tmax = 4.0 # max time, s dt = 0.01 # time step, s nt = tmax / dt # number of time steps t = np.arange(0, tmax + dt, dt) # time vector, s # intraparticle temperature array [T] in Kelvin # row = time step, column = node point from 0 (center) to m (surface) T = hc3(d, cp, k, Gb, h, Ti, Tinf, 2, m, t) Tavg = [np.mean(row) for row in T] # volume average temperature at each time step v = vol(d, m) Tv = Tvol(T, v) # 1D Analytical Solution for Transient Heat Conduction in Solid Sphere # ----------------------------------------------------------------------------- ro = d / 2 # radius of sphere (a.k.a outer radius), m rs = ro / ro # dimensionless surface radius, (-) rc = 1e-12 / ro # dimensionless center radius, (-) z = np.arange(0, 1250, 0.1) # range to evaluate the zeta, Bi equation z[0] = 1e-12 # prevent divide by zero warning rho = Gb * 1000 # density, kg/m^3 alpha = k / (rho * cp) # thermal diffusivity biomass, m^2/s Bi = (h * ro) / k # Biot number, (-) Fo = (alpha * t) / (ro**2) # Fourier number, (-)
# ------------------------------------------------------------------------------ # surface area, volume, and dsv for each particle size ds = (sa / np.pi)**(1 / 2) # surface area equivalent sphere diameter, m dv = (6 / np.pi * v)**(1 / 3) # volume equivalent sphere diameter, m dsv = (dv**3) / (ds**2) # surface area to volume sphere diameter, m # calculate temp profiles as Tsv in each particle as based on Dsv where # row = time step, column = center to surface temperature # determine center volume and shell volumes as v # calculate volume averaged temperature of particle at each time step as Tsv_v T = hc2(dsv, x, k, Gb, h, Ti, Tinf, 2, m, t) # temperature array, K rad = np.linspace(0, dsv / 2, m) # radius vector from center to surface, m v = vol(rad) # volumes in particle vector, m^3 Tv = Tvol(T, v) # volume average temperatures vector, K # Plot Results # ------------------------------------------------------------------------------ py.ion() py.close('all') def despine(): ax = py.gca() ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) py.tick_params(axis='both', bottom='off', top='off',
# number of nodes from center of particle (m=0) to surface (m) m = 1000 # time vector from 0 to max time tmax = 4.0 # max time, s nt = 400 # number of time steps dt = tmax / nt # time step, s t = np.arange(0, tmax + dt, dt) # time vector, s # temperatures using d # row = time step, column = node point from 0 (center) to m (surface) T_sphere1d = hc3(d, cp, k, Gb, h, Ti, Tinf, 2, m, t) # array of temperatues, K # volume average temperature at each time step based on d vs = vol(d, m) Tv_sphere1d = Tvol(T_sphere1d, vs) # temperatures using dsv # row = time step, column = node point from 0 (center) to m (surface) dsv_sphere = dsv(SAsph, Vsph) T_sphere1dsv = hc3(dsv_sphere, cp, k, Gb, h, Ti, Tinf, 2, m, t) vs_dsv = vol(dsv_sphere, m) Tv_sphere1dsv = Tvol(T_sphere1dsv, vs_dsv) # 1-D Transient Heat Conduction Method in Solid Cube # ----------------------------------------------------------------------------- # volume average temperatures dsv_cube = dsv(SAcube, Vcube) # cube Tcube_dsv = hc3(dsv_cube, cp, k, Gb, h, Ti, Tinf, 2, m, t)