Skip to content

Commit

Permalink
Merge pull request #941 from AlbertoCuadra/develop
Browse files Browse the repository at this point in the history
Solve: hotfix error chemical equilibria with inert species
  • Loading branch information
AlbertoCuadra authored Jan 29, 2024
2 parents 8432e3b + ae04fee commit 37ad1a9
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion modules/ct_equil/equilibrate_T.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
% Compute property matrix of the species at chemical equilibrium
% NOTE: If the ind variable is removed from the inputs, the set_species
% routine will completely fill the properties matrix
M0 = set_species(self, self.S.LS, N(:, 1), TP, ind);
M0 = set_species(self, self.S.LS, N(:, 1), TP, [ind, self.S.ind_frozen]);
% Compute properties of final mixture
mix2 = set_properties(self, mix1, M0, pP, TP, STOP, STOP_ions);
end
Expand Down
2 changes: 1 addition & 1 deletion modules/ct_equil/equilibrium_gibbs.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
R0TP = self.C.R0 * TP; % [J/(mol)]

% Initialization
NatomE = mix1.NatomE;
NatomE = mix1.NatomE_react;
max_NatomE = max(NatomE);
NP = 0.1;
SIZE = -log(self.TN.tolN);
Expand Down
2 changes: 1 addition & 1 deletion modules/ct_equil/equilibrium_gibbs_eos.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
A0 = C.A0.value;
R0TP = C.R0 * TP; % [J/mol]
% Initialization
NatomE = mix1.NatomE_react';
NatomE = mix1.NatomE_react;
max_NatomE = max(NatomE);
NP = 0.1;
SIZE = -log(TN.tolN);
Expand Down
2 changes: 1 addition & 1 deletion modules/ct_equil/equilibrium_gibbs_large.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
R0TP = self.C.R0 * TP; % [J/mol]

% Initialization
NatomE = mix1.NatomE_react';
NatomE = mix1.NatomE_react;
max_NatomE = max(NatomE);
NP = 0.1;
SIZE = -log(self.TN.tolN);
Expand Down
2 changes: 1 addition & 1 deletion modules/ct_equil/equilibrium_helmholtz.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
R0TP = self.C.R0 * TP; % [J/(mol)]

% Initialization
NatomE = mix1.NatomE;
NatomE = mix1.NatomE_react;
max_NatomE = max(NatomE);
NP = 0.1;
SIZE = -log(self.TN.tolN);
Expand Down
2 changes: 1 addition & 1 deletion modules/ct_equil/equilibrium_helmholtz_eos.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
A0 = C.A0.value;
R0TP = C.R0 * TP; % [J/mol]
% Initialization
NatomE = mix1.NatomE_react';
NatomE = mix1.NatomE_react;
max_NatomE = max(NatomE);
NP = 0.1;
SIZE = -log(TN.tolN);
Expand Down
2 changes: 1 addition & 1 deletion modules/ct_equil/equilibrium_helmholtz_large.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
R0TP = self.C.R0 * TP; % [J/mol]

% Initialization
NatomE = mix1.NatomE_react';
NatomE = mix1.NatomE_react;
max_NatomE = max(NatomE);
NP = 0.1;
SIZE = -log(self.TN.tolN);
Expand Down
4 changes: 2 additions & 2 deletions utils/compute_properties.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
% Definitions
R0 = self.C.R0; % [J/(K mol)] Universal gas constant
% Initialization
mix.error_moles = [];
mix.error_moles_ions = [];
mix.error_moles = 0;
mix.error_moles_ions = 0;
% Inputs
mix.p = p; % [bar]
mix.T = T; % [K]
Expand Down

0 comments on commit 37ad1a9

Please sign in to comment.