Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -775,9 +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)
dCompMoleFrac_dCompMassFrac[ic][ic] = mwInv;
compMoleFrac[ic] = composition[ic] / m_componentMolarWeight[ic]; // this is molality (units of mole/mass)
totalMolality += compMoleFrac[ic];
}

Expand All @@ -788,8 +786,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];
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/coreComponents/schema/schema.xsd.other
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ A field can represent a physical variable. (pressure, temperature, global compos
<!--fractureStencil => (no description available)-->
<xsd:attribute name="fractureStencil" type="geos_SurfaceElementStencil" />
<!--targetRegions => List of regions to build the stencil for-->
<xsd:attribute name="targetRegions" type="geos_mapBase_lt_string_cm_-geos_internal_StdVectorWrapper_lt_string_cm_-std_allocator_lt_string-_gt__cm_-true_gt__cm_-std_integral_constant_lt_bool_cm_-true_gt_-_gt_" />
<xsd:attribute name="targetRegions" type="geos_mapBase_lt_string_cm_-geos_internal_StdVectorWrapper_lt_string_cm_-std_allocator_lt_string-_gt__cm_-false_gt__cm_-std_integral_constant_lt_bool_cm_-true_gt_-_gt_" />
</xsd:complexType>
<xsd:complexType name="OutputsType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
Expand Down Expand Up @@ -1603,7 +1603,7 @@ A field can represent a physical variable. (pressure, temperature, global compos
<xsd:element name="MeshBodies" type="MeshBodiesType" />
</xsd:choice>
<!--Neighbors => (no description available)-->
<xsd:attribute name="Neighbors" type="geos_internal_StdVectorWrapper_lt_geos_NeighborCommunicator_cm_-std_allocator_lt_geos_NeighborCommunicator_gt__cm_-true_gt_" />
<xsd:attribute name="Neighbors" type="geos_internal_StdVectorWrapper_lt_geos_NeighborCommunicator_cm_-std_allocator_lt_geos_NeighborCommunicator_gt__cm_-false_gt_" />
<!--partitionManager => (no description available)-->
<xsd:attribute name="partitionManager" type="geos_PartitionBase" />
</xsd:complexType>
Expand Down
Loading