Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve: hotfix error chemical equilibria with inert species #941

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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