function Example_39_1
%Example_39_1 Code used in the solution of Example 39.1 of AFCoKaRE

    % Known quantities and constants entered in a structure array
    given = struct;
    given.yA0 = 0.15;
    given.VFRg0 = 2.0E-3; % m^3/min
    given.CBl0 = 3.0*1000; % mol/m^3
    given.VFRl = 0.06E-3; % m^3/min
    given.T = 20+273.15; % K
    given.P = 5.0; % atm
    given.Vl = 1.0E-3; % m^3
    given.SV = 445.; % /m
    given.kGP = 0.83*60; % mol/m^2/atm/min
    given.kL = 0.053/100*60; % m/min
    given.hA = 50.0E-3; % atm m^3/mol
    given.DA = 2.1E-5/1.0E4*60; % m^2/min
    given.DB = 7.25E-6/1.0E4*60; % m^2/min
    given.k = 6.05E2/1000; % m^3/mol/min
    given.R = 0.08206/1000; % m^3atm/mol/K
    given.xL = given.DA/given.kL; % eq 3
    given.nAg0 = given.VFRg0*given.P/given.R/given.T*given.yA0; % eq 7
    given.nBl0 = given.VFRl*given.CBl0; % eq 8
    
	% Solve the bulk liquid and gas mole balances
    guess = [
        0.1*given.nAg0 % nAg guess
        0.001*given.nBl0 % nAl guess
        given.nBl0/3. % nBl guess
        given.P*given.yA0/2. % PAi guess
        ];
    [nAg,nAl,nBl,PAi] = Example_39_1_bulk(given,guess);
    
    % Calculate and report the conversion
    pct_conv = 100*(given.nAg0 - nAg - nAl)/given.nAg0 % eq 24

end % of Example_39_1
