|
| 1 | +# This script calculates input parameters for an FDS simulation involving vegetative fuels. |
| 2 | + |
| 3 | +# Modify the following lines for your particular type of fuel. |
| 4 | + |
| 5 | +Y_C = 0.497 # Mass fraction of carbon in the dry vegetation |
| 6 | +Y_H = 0.059 # Mass fraction of hydrogen in the dry vegetation |
| 7 | +Y_O = 0.406 # Mass fraction of oxygen in the dry vegetation |
| 8 | +Y_C_char = 0.869 # Mass fraction of carbon in the char |
| 9 | +Y_O_char = 0.049 # Mass fraction of oxygen in the char |
| 10 | +nu_char = 0.16 # Fraction of mass of dry vegetation remaining as char after complete anaerobic pyrolysis |
| 11 | +nu_ash = 0.0 # Fraction of mass of char remaining as ash after complete oxidation |
| 12 | +E = 13100 # Energy released per unit mass oxygen consumed during combustion of pyrolyzate (kJ/kg) |
| 13 | +W_pyr = 25 # Effective molecular weight of the pyrolyzate (g/mol) |
| 14 | + |
| 15 | +# Calculated quantities. Some of these quantities are calculated automatically by FDS and are listed here as check. |
| 16 | + |
| 17 | +Y_C_adj = Y_C*(1-nu_char*nu_ash)/(Y_C+Y_H+Y_O) |
| 18 | +Y_H_adj = Y_H*(1-nu_char*nu_ash)/(Y_C+Y_H+Y_O) |
| 19 | +Y_O_adj = Y_O*(1-nu_char*nu_ash)/(Y_C+Y_H+Y_O) |
| 20 | + |
| 21 | +x = (Y_C_adj/12)/(Y_C_adj/12 + Y_H_adj + Y_O_adj/16 + nu_char*nu_ash) |
| 22 | +y = (Y_H_adj )/(Y_C_adj/12 + Y_H_adj + Y_O_adj/16 + nu_char*nu_ash) |
| 23 | +z = (Y_O_adj/16)/(Y_C_adj/12 + Y_H_adj + Y_O_adj/16 + nu_char*nu_ash) |
| 24 | + |
| 25 | +W_veg = (12*x+y+16*z)/(1-nu_char*nu_ash) |
| 26 | +x_prime = nu_char*W_veg*(1-nu_ash)/(12*(1+Y_O_char/Y_C_char)) |
| 27 | +z_prime = 12*x_prime*Y_O_char/(16*Y_C_char) |
| 28 | + |
| 29 | +nu_O2_char = (32*nu_char*W_veg*(1-nu_ash)-44*16*z_prime)/((44-32)*nu_char*W_veg) |
| 30 | + |
| 31 | +nu_CO2 = (1+nu_O2_char-nu_ash)*(nu_char*W_veg)/44 |
| 32 | +nu_O2 = nu_O2_char*nu_char*W_veg/32 |
| 33 | +nu_pyr = (12*(x-x_prime)+y+16*(z-z_prime))/W_pyr |
| 34 | + |
| 35 | +x_prime_prime = (x-x_prime)/nu_pyr |
| 36 | +y_prime_prime = y/nu_pyr |
| 37 | +z_prime_prime = (z-z_prime)/nu_pyr |
| 38 | +W_pyr_check = 12*x_prime_prime+y_prime_prime+16*z_prime_prime |
| 39 | + |
| 40 | +nu_O2_prime = (2*x_prime_prime+y_prime_prime/2-z_prime_prime)/2 |
| 41 | +Delta_h_pyr = (32*nu_O2_prime*E)/W_pyr |
| 42 | + |
| 43 | +print() |
| 44 | +print('The following values are used in the FDS input file:', end='\n\n') |
| 45 | +print(f"{x_prime_prime:.3f}",' x_prime_prime, carbon subscript of pyrolyzate molecule (C on REAC or SPEC line)') |
| 46 | +print(f"{y_prime_prime:.3f}",' y_prime_prime, hydrogen subscript of pyrolyzate molecule (H on REAC or SPEC line)') |
| 47 | +print(f"{z_prime_prime:.3f}",' z_prime_prime, oxygen subscript of pyrolyzate molecule (O on REAC or SPEC line)') |
| 48 | +print(f"{nu_O2_char:.3f}",' nu_O2_char, mass oxygen consumed per unit mass char oxidized (OXYGEN NU_SPEC on MATL line)') |
| 49 | +print(f"{Delta_h_pyr:.0f}",' Delta_h_pyr, pyrolyzate heat of combustion (HEAT_OF_COMBUSTION on REAC line)') |
| 50 | +print() |
| 51 | +print('The following values are not used directly and can be used to check the calculation:', end='\n\n') |
| 52 | +print(f"{Y_C_adj:.3f}",' Y_C_adj, adjusted carbon content') |
| 53 | +print(f"{Y_H_adj:.3f}",' Y_H_adj, adjusted hydrogen content') |
| 54 | +print(f"{Y_O_adj:.3f}",' Y_O_adj, adjusted oxygen content') |
| 55 | +print(f"{x:.3f}",' x, carbon subscript for the dry vegetation molecule') |
| 56 | +print(f"{y:.3f}",' y, hydrogen subscript for the dry vegetation molecule') |
| 57 | +print(f"{z:.3f}",' z, oxygen subscript for the dry vegetation molecule') |
| 58 | +print(f"{W_veg:.3f}",' W_veg, molecular weight of dry vegetation (g/mol)') |
| 59 | +print(f"{x_prime:.3f}",' x_prime, carbon subscript in char molecule') |
| 60 | +print(f"{z_prime:.3f}",' z_prime, oxygen subscript in char molecule') |
| 61 | +print(f"{nu_CO2:.3f}",' nu_CO2, moles CO2 per moles char oxidized') |
| 62 | +print(f"{nu_O2:.3f}",' nu_O2, moles O2 consumed per moles char oxidized') |
| 63 | +print(f"{nu_pyr:.3f}",' nu_pyr, moles pyrolyzate per moles vegetation pyrolyzed') |
| 64 | +print(f"{W_pyr_check:.2f}",' W_pyr_check, algebra check (g/mol)') |
| 65 | +print(f"{nu_O2_prime:.3f}",' nu_O2_prime, moles O2 per mole pyrolyzate consumed') |
| 66 | + |
0 commit comments