From 8ef446d531e520e75e1c5e2732122472e7907b06 Mon Sep 17 00:00:00 2001 From: LiYang Date: Mon, 1 Jun 2026 23:42:58 +0800 Subject: [PATCH 1/5] Fix multifluid mole-fraction derivative initialization for GCC15 (#4070) --- .../constitutive/fluid/multifluid/MultiFluidBase.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp index 58f3b16abea..48acdd1f92f 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp @@ -777,7 +777,6 @@ MultiFluidBase::KernelWrapper:: // component weight can not be zero, checked in MultiFluidBase::postInputInitialization real64 const mwInv = 1.0 / m_componentMolarWeight[ic]; compMoleFrac[ic] = composition[ic] * mwInv; // this is molality (units of mole/mass) - dCompMoleFrac_dCompMassFrac[ic][ic] = mwInv; totalMolality += compMoleFrac[ic]; } @@ -788,8 +787,9 @@ MultiFluidBase::KernelWrapper:: for( integer jc = 0; jc < numComps; ++jc ) { - dCompMoleFrac_dCompMassFrac[ic][jc] -= compMoleFrac[ic] / m_componentMolarWeight[jc]; - dCompMoleFrac_dCompMassFrac[ic][jc] *= totalMolalityInv; + real64 const delta = ic == jc ? 1.0 : 0.0; + dCompMoleFrac_dCompMassFrac[ic][jc] = + ( delta - compMoleFrac[ic] ) * totalMolalityInv / m_componentMolarWeight[jc]; } } } From 4768a94fb5ee748173afc89b6015c4c1585366c4 Mon Sep 17 00:00:00 2001 From: Dickson Kachuma <81433670+dkachuma@users.noreply.github.com> Date: Mon, 1 Jun 2026 10:51:04 -0500 Subject: [PATCH 2/5] Fix molality calculation in MultiFluidBase.hpp --- .../constitutive/fluid/multifluid/MultiFluidBase.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp index 48acdd1f92f..cf1ce621644 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp @@ -775,8 +775,7 @@ MultiFluidBase::KernelWrapper:: for( integer ic = 0; ic < numComps; ++ic ) { // component weight can not be zero, checked in MultiFluidBase::postInputInitialization - real64 const mwInv = 1.0 / m_componentMolarWeight[ic]; - compMoleFrac[ic] = composition[ic] * mwInv; // this is molality (units of mole/mass) + compMoleFrac[ic] = composition[ic] * m_componentMolarWeight[ic]; // this is molality (units of mole/mass) totalMolality += compMoleFrac[ic]; } From f036925a17fcadf5c5da6e52c72879f9b3d570fe Mon Sep 17 00:00:00 2001 From: Dickson Kachuma <81433670+dkachuma@users.noreply.github.com> Date: Mon, 1 Jun 2026 10:55:27 -0500 Subject: [PATCH 3/5] Fix calculation of component mole fraction --- .../constitutive/fluid/multifluid/MultiFluidBase.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp index cf1ce621644..2bcbc5f71de 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp @@ -775,7 +775,7 @@ MultiFluidBase::KernelWrapper:: for( integer ic = 0; ic < numComps; ++ic ) { // component weight can not be zero, checked in MultiFluidBase::postInputInitialization - compMoleFrac[ic] = composition[ic] * m_componentMolarWeight[ic]; // this is molality (units of mole/mass) + compMoleFrac[ic] = composition[ic] / m_componentMolarWeight[ic]; // this is molality (units of mole/mass) totalMolality += compMoleFrac[ic]; } From 07a4ec7310f5385bae856a8b4f792edbd875444d Mon Sep 17 00:00:00 2001 From: dkachuma Date: Fri, 5 Jun 2026 11:14:20 -0500 Subject: [PATCH 4/5] Change --- .../constitutive/fluid/multifluid/MultiFluidBase.hpp | 1 + src/coreComponents/schema/schema.xsd.other | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp index 22ab079eeaa..f7e24dd93d4 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp @@ -17,6 +17,7 @@ * @file MultiFluidBase.hpp */ + #ifndef GEOS_CONSTITUTIVE_FLUID_MULTIFLUID_MULTIFLUIDBASE_HPP_ #define GEOS_CONSTITUTIVE_FLUID_MULTIFLUID_MULTIFLUIDBASE_HPP_ diff --git a/src/coreComponents/schema/schema.xsd.other b/src/coreComponents/schema/schema.xsd.other index 355f061e7f5..11e08ccc206 100644 --- a/src/coreComponents/schema/schema.xsd.other +++ b/src/coreComponents/schema/schema.xsd.other @@ -526,7 +526,7 @@ A field can represent a physical variable. (pressure, temperature, global compos - + @@ -1603,7 +1603,7 @@ A field can represent a physical variable. (pressure, temperature, global compos - + From 966993d78a2870528d56b12bd42f806bad3db730 Mon Sep 17 00:00:00 2001 From: dkachuma Date: Fri, 5 Jun 2026 11:14:42 -0500 Subject: [PATCH 5/5] Change --- .../constitutive/fluid/multifluid/MultiFluidBase.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp index f7e24dd93d4..22ab079eeaa 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.hpp @@ -17,7 +17,6 @@ * @file MultiFluidBase.hpp */ - #ifndef GEOS_CONSTITUTIVE_FLUID_MULTIFLUID_MULTIFLUIDBASE_HPP_ #define GEOS_CONSTITUTIVE_FLUID_MULTIFLUID_MULTIFLUIDBASE_HPP_