mixture properties in Matlab

91 views
Skip to first unread message

csgold...@gmail.com

unread,
Jun 26, 2021, 8:56:51 AM6/26/21
to Cantera Users' Group
Hello,

I have a multi-phase mixture of aluminum and oxygen that I equilibrate and I'm trying to extract the enthalpy of the mixture or specific phases within the mixture. What is the command to do this in matlab? "enthalpy_mass(mix)" does not work....

Here is the relevant syntax:

gas             = Solution('nasa_gas_CSG.yaml');

aluminumSolid   = Solution('nasa_AluminumSolid_csg.yaml');

aluminumLiquid  = Solution('nasa_AluminumLiquid_csg.yaml');

aluminaLiquid   = Solution('nasa_AluminaLiquid_csg.yaml');

aluminaSolid   = Solution('nasa_AluminaSolid_csg.yaml');

 

 

Tv = [2000]';                    % Temperature or Temperature vector to loop over

Pv  =[1e5:1e5:10e5]';      % Pressure or Pressure vector to loop over


for ii = 1:length(Pv)

    T0      = Tv(1,1);

    P0      = Pv(1,1);    

    set(gas,'T',T0,'P',P0,'X',Xstr_g);

    set(aluminumLiquid,'T',T0,'P',P0,'X',Xstr_l);

    set(aluminumSolid,'T',T0,'P',P0,'X',Xstr_s);    

    set(aluminaLiquid,'T',T0,'P',P0,'X',Xstr_p);

    set(aluminaSolid,'T',T0,'P',P0,'X',Xstr_p2);

    

    mix_phases  = [{gas,1.5}; {aluminumSolid, 2.0}; {aluminumLiquid, 0.0}; {aluminaLiquid, 0.0}];

 

    mix         = Mixture(mix_phases);

    equilibrate(mix, mode,2);

       

    Teq(ii,1)   = temperature(mix);        % Temperature, K

%     Heq(ii,1)   = enthalpy_mass(mix);       % J/kg

end

Thank you!!!

csgold...@gmail.com

unread,
Jun 26, 2021, 11:03:44 AM6/26/21
to Cantera Users' Group
I should also mention that I need to know the number of moles of each phase at equilibrium and I'm not sure how to "pull" that out of the mixture after performing the equilibrium calculation.

Thank you

Reply all
Reply to author
Forward
0 new messages