The solubility of gas i is given by m_i = K_H * (φ_i*P_i)/γ_i,where m is the molality, γ is the activity coefficient in water, K_H is the equilibrium constant, P is the partial pressure, and φ is the fugacity coefficient (the activity coefficient in the gas phase).
if (pr_done) { lp = phase_ptr->p_soln_x / gas_phase_ptr->Get_total_p() * gas_phase_ptr->Get_volume() / gas_phase_ptr->Get_v_m(); phase_ptr->moles_x = lp;
3) correct the solubility of gas i with: pr_si_f = log10(phi_i) - Delta_V_i * (P - 1) / (2.303 * R * TK);
lp = -phase_ptr->lk; for (rxn_ptr = phase_ptr->rxn_x->token + 1; rxn_ptr->s != NULL; rxn_ptr++) { lp += rxn_ptr->s->la * rxn_ptr->coef; } phase_ptr->p_soln_x = exp(LOG_10 * (lp - phase_ptr->pr_si_f)); if (pr_done) { lp = phase_ptr->p_soln_x / gas_phase_ptr->Get_total_p() * gas_phase_ptr->Get_volume() / gas_phase_ptr->Get_v_m(); phase_ptr->moles_x = lp; }