function [Vf,gp,gt,vm,K]=volume(T)

vm = 0.025+1e-3*(T-167);
K = 0.1856-2.965e-4*(T-273);

Vf = 0:0.005:vm;
n = size(Vf,2);

for i = 1:n
   if Vf(i) > 0.05, gp(i) = 1;
   else gp(i) = 7.1e-5*exp(171.53*Vf(i));
   end

   if Vf(i) > K, gt(i) = 0.10575*exp(17.15*Vf(i)-0.01715*(T-273));
   else gt(i) = 2.3e-6*exp(75*Vf(i));
   end
end
Vf =[Vf vm];
gp = [gp 1];
gt = [gt 1];

plot(Vf,[gp; gt])
xlabel('total free volume');
ylabel('gel effect factor');

