From 6c51ac0a62967a3a5858612b941e56b6fab3e2ee Mon Sep 17 00:00:00 2001
From: Ian Bell <ian.bell@nist.gov>
Date: Wed, 16 Jun 2021 18:05:05 -0400
Subject: [PATCH] Skip components with mole fraction of exactly zero

---
 include/teqp/models/multifluid.hpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/teqp/models/multifluid.hpp b/include/teqp/models/multifluid.hpp
index cf72dff..daec32a 100644
--- a/include/teqp/models/multifluid.hpp
+++ b/include/teqp/models/multifluid.hpp
@@ -42,6 +42,7 @@ public:
         resulttype alphar = 0.0;
         auto N = molefracs.size();
         for (auto i = 0; i < N; ++i) {
+            if (molefracs[i] == 0.0) { continue; }
             alphar = alphar + molefracs[i] * EOSs[i].alphar(tau, delta);
         }
         return alphar;
-- 
GitLab