Soil Thermal Properties
Table of contents
Code
Main program
sp_05_01.m
| View on GitHub
% Supplemental program 5.1
% ----------------------------------------
% Calculate and graph thermal conductivity
% ----------------------------------------
cwat = 4188; % Specific heat of water (J/kg/K)
cice = 2117.27; % Specific heat ice (J/kg/K)
rho_wat = 1000; % Density of water (kg/m3)
rho_ice = 917; % Density of ice (kg/m3)
cvwat = cwat * rho_wat; % Heat capacity of water (J/m3/K)
cvice = cice * rho_ice; % Heat capacity of ice (J/m3/K)
cvsol = 1.926e06; % Heat capacity of soil solids (J/m3/K)
tkwat = 0.57; % Thermal conductivity of water (W/m/K)
tkice = 2.29; % Thermal conductivity of ice (W/m/K)
tk_quartz = 7.7; % Thermal conductivity of quartz (W/m/K)
% Soil texture classes (Cosby et al. 1984. Water Resources Research 20:682-690)
% 1: sand
% 2: loamy sand
% 3: sandy loam
% 4: silty loam
% 5: loam
% 6: sandy clay loam
% 7 silty clay loam
% 8: clay loam
% 9: sandy clay
% 10: silty clay
% 11: clay
silt = [ 5, 12, 32, 70, 39, 15, 56, 34, 6, 47, 20]; % Percent silt
sand = [92, 82, 58, 17, 43, 58, 10, 32, 52, 6, 22]; % Percent sand
clay = [ 3, 6, 10, 13, 18, 27, 34, 34, 42, 47, 58]; % Percent clay
% Volumetric soil water content at saturation (porosity)
% (Clapp and Hornberger. 1978. Water Resources Research 14:601-604)
watsat = [0.395, 0.410, 0.435, 0.485, 0.451, 0.420, 0.477, 0.476, 0.426, 0.492, 0.482];
% Define 5 soil types to process
soiltyp = [1, 3, 5, 8, 11];
% Set relative soil water content (s) from 0 to 1
inc = 0.05; % increment
n = (1 - 0) / inc + 1; % number of values
s = linspace(0,1,n); % n evenly spaced values between 0 and 1 (inclusive)
% Loop through each soil type
for i = 1:length(soiltyp)
% Soil texture to process
k = soiltyp(i);
% Thermal conductivity and heat capacity for each soil moisture
for j = 1:length(s)
% Volumetric water content
h2osoi = s(j) * watsat(k);
% Dry thermal conductivity (W/m/K) from bulk density (kg/m3)
bd = 2700 * (1 - watsat(k));
tkdry = (0.135 * bd + 64.7) / (2700 - 0.947 * bd);
% Soil solids thermal conducitivty (W/m/K) from quartz fraction
% tko = thermal conductivity of other minerals (W/m/K)
quartz = sand(k) / 100;
if (quartz > 0.2)
tko = 2.0;
else
tko = 3.0;
end
tksol = (tk_quartz^quartz) * (tko^(1-quartz));
% Unfrozen and frozen saturated thermal conductivity (W/m/K)
tksat_u = (tksol^(1-watsat(k))) * (tkwat^watsat(k));
tksat_f = (tksol^(1-watsat(k))) * (tkice^watsat(k));
% Unfrozen and frozen Kersten number
if (sand(k) < 50)
ke_u = log10(max(s(j),0.1)) + 1;
else
ke_u = 0.7 * log10(max(s(j),0.05)) + 1;
end
ke_f = s(j);
% Unfrozen and frozen thermal conductivity (W/m/K)
tku = (tksat_u - tkdry) * ke_u + tkdry;
tkf = (tksat_f - tkdry) * ke_f + tkdry;
% Unfrozen and frozen heat capacity (J/m3/K)
cvu = (1 - watsat(k)) * cvsol + cvwat * h2osoi;
cvf = (1 - watsat(k)) * cvsol + cvice * h2osoi;
% Save values for each texture type
if (i == 1)
tk1(j) = tku;
cv1(j) = cvu * 1e-06;
elseif (i == 2)
tk2(j) = tku;
cv2(j) = cvu * 1e-06;
elseif (i == 3)
tk3(j) = tku;
cv3(j) = cvu * 1e-06;
elseif (i == 4)
tk4(j) = tku;
cv4(j) = cvu * 1e-06;
elseif (i == 5)
tk5(j) = tku;
cv5(j) = cvu * 1e-06;
end
end % end soil water loop j
end % end soil type loop i
% Make graph
plot(s,tk1,'r-',s,tk2,'g-',s,tk3,'b-',s,tk4,'m-',s,tk5,'c-')
title('Thermal conductivity')
xlabel('Relative soil moisture')
ylabel('Thermal conductivity (W m^{-1} K^{-1})')
legend('sand','sandy loam','loam','clay loam','clay','Location','best')
% Write formated output to text file: n rows x 6 columns
% column 1 = relative soil water (s)
% column 2 = thermal conductivity for soil 1 (W/m/K)
% column 3 = thermal conductivity for soil 2 (W/m/K)
% column 4 = thermal conductivity for soil 3 (W/m/K)
% column 5 = thermal conductivity for soil 4 (W/m/K)
% column 6 = thermal conductivity for soil 5 (W/m/K)
A = [s; tk1; tk2; tk3; tk4; tk5];
fileID = fopen('tk.txt','w');
fprintf(fileID,'%12s %12s %12s %12s %12s %12s\n','s','tex1','tex2','tex3','tex4','tex5');
fprintf(fileID,'%12.4f %12.4f %12.4f %12.4f %12.4f %12.4f\n', A);
fclose(fileID);
% Write formated output to text file: n rows x 6 columns
% column 1 = relative soil water (s)
% column 2 = heat capacity for soil 1 (MJ/m3/K)
% column 3 = heat capacity for soil 2 (MJ/m3/K)
% column 4 = heat capacity for soil 3 (MJ/m3/K)
% column 5 = heat capacity for soil 4 (MJ/m3/K)
% column 6 = heat capacity for soil 5 (MJ/m3/K)
B = [s; cv1; cv2; cv3; cv4; cv5];
fileID = fopen('cv.txt','w');
fprintf(fileID,'%12s %12s %12s %12s %12s %12s\n','s','tex1','tex2','tex3','tex4','tex5');
fprintf(fileID,'%12.4f %12.4f %12.4f %12.4f %12.4f %12.4f\n', B);
fclose(fileID);
Output
Figures
Figure 1
Text
cv.txt
| View on GitHub | View raw
s tex1 tex2 tex3 tex4 tex5
0.0000 1.1652 1.0882 1.0574 1.0092 0.9977
0.0500 1.2479 1.1793 1.1518 1.1089 1.0986
0.1000 1.3307 1.2704 1.2463 1.2086 1.1995
0.1500 1.4134 1.3615 1.3407 1.3082 1.3005
0.2000 1.4961 1.4525 1.4351 1.4079 1.4014
0.2500 1.5788 1.5436 1.5296 1.5076 1.5023
0.3000 1.6615 1.6347 1.6240 1.6073 1.6033
0.3500 1.7442 1.7258 1.7184 1.7069 1.7042
0.4000 1.8269 1.8169 1.8129 1.8066 1.8051
0.4500 1.9096 1.9080 1.9073 1.9063 1.9060
0.5000 1.9924 1.9991 2.0018 2.0060 2.0070
0.5500 2.0751 2.0902 2.0962 2.1056 2.1079
0.6000 2.1578 2.1813 2.1906 2.2053 2.2088
0.6500 2.2405 2.2723 2.2851 2.3050 2.3098
0.7000 2.3232 2.3634 2.3795 2.4047 2.4107
0.7500 2.4059 2.4545 2.4740 2.5043 2.5116
0.8000 2.4886 2.5456 2.5684 2.6040 2.6126
0.8500 2.5714 2.6367 2.6628 2.7037 2.7135
0.9000 2.6541 2.7278 2.7573 2.8034 2.8144
0.9500 2.7368 2.8189 2.8517 2.9030 2.9154
1.0000 2.8195 2.9100 2.9462 3.0027 3.0163
tk.txt
| View on GitHub | View raw
s tex1 tex2 tex3 tex4 tex5
0.0000 0.4556 0.3572 0.2043 0.1880 0.1843
0.0500 0.4556 0.3572 0.2043 0.1880 0.1843
0.1000 0.9470 0.6915 0.2043 0.1880 0.1843
0.1500 1.2345 0.8870 0.4432 0.3978 0.3761
0.2000 1.4385 1.0258 0.6127 0.5467 0.5122
0.2500 1.5967 1.1334 0.7441 0.6621 0.6177
0.3000 1.7260 1.2213 0.8516 0.7565 0.7040
0.3500 1.8353 1.2957 0.9424 0.8362 0.7769
0.4000 1.9300 1.3601 1.0210 0.9053 0.8400
0.4500 2.0135 1.4169 1.0904 0.9663 0.8958
0.5000 2.0882 1.4677 1.1525 1.0208 0.9456
0.5500 2.1558 1.5136 1.2087 1.0701 0.9907
0.6000 2.2175 1.5556 1.2599 1.1151 1.0318
0.6500 2.2742 1.5942 1.3071 1.1565 1.0697
0.7000 2.3268 1.6299 1.3508 1.1949 1.1047
0.7500 2.3757 1.6632 1.3914 1.2306 1.1374
0.8000 2.4214 1.6943 1.4294 1.2640 1.1679
0.8500 2.4644 1.7236 1.4651 1.2954 1.1966
0.9000 2.5049 1.7511 1.4988 1.3249 1.2236
0.9500 2.5433 1.7772 1.5307 1.3529 1.2492
1.0000 2.5797 1.8020 1.5609 1.3795 1.2735