@@ -214,7 +214,7 @@ def phase_volumes(self):
214214 """
215215 volumes = np .array (
216216 [
217- phase .molar_volume * molar_fraction
217+ phase .volume * molar_fraction * self . number_of_moles
218218 for (phase , molar_fraction ) in zip (self .phases , self .molar_fractions )
219219 ]
220220 )
@@ -227,7 +227,7 @@ def phase_masses(self):
227227 """
228228 masses = np .array (
229229 [
230- phase .molar_mass * molar_fraction
230+ phase .mass * molar_fraction * self . number_of_moles
231231 for (phase , molar_fraction ) in zip (self .phases , self .molar_fractions )
232232 ]
233233 )
@@ -236,9 +236,10 @@ def phase_masses(self):
236236 @material_property
237237 def formula (self ):
238238 """
239- Returns molar chemical formula of the composite
239+ Returns extensive chemical formula of the composite
240240 """
241- return sum_formulae ([ph .formula for ph in self .phases ], self .molar_fractions )
241+ molar_amounts = self .molar_fractions * self .number_of_moles
242+ return sum_formulae ([ph .formula for ph in self .phases ], molar_amounts )
242243
243244 @material_property
244245 def molar_internal_energy (self ):
@@ -282,14 +283,14 @@ def molar_volume(self):
282283 Returns molar volume of the composite [m^3/mol]
283284 Aliased with self.V
284285 """
285- return np .sum (self .phase_volumes )
286+ return np .sum (self .phase_volumes ) / self . number_of_moles
286287
287288 @material_property
288289 def molar_mass (self ):
289290 """
290291 Returns molar mass of the composite [kg/mol]
291292 """
292- return sum (self .phase_masses )
293+ return sum (self .phase_masses ) / self . number_of_moles
293294
294295 @material_property
295296 def density (self ):
@@ -438,7 +439,7 @@ def effective_isentropic_bulk_modulus(self):
438439 Returns the effective isotropic, isentropic bulk modulus of the composite [Pa]
439440 Aliased with self.K_eff
440441 """
441- V_frac = self .phase_volumes
442+ V_frac = self .phase_volumes / sum ( self . phase_volumes )
442443 K_ph = np .array ([phase .isentropic_bulk_modulus_reuss for phase in self .phases ])
443444 G_ph = np .array ([phase .shear_modulus for phase in self .phases ])
444445
@@ -450,7 +451,7 @@ def effective_shear_modulus(self):
450451 Returns the effective isotropic shear modulus of the mineral [Pa]
451452 Aliased with self.G_eff
452453 """
453- V_frac = self .phase_volumes
454+ V_frac = self .phase_volumes / sum ( self . phase_volumes )
454455 K_ph = np .array ([phase .isentropic_bulk_modulus_reuss for phase in self .phases ])
455456 G_ph = np .array ([phase .shear_modulus for phase in self .phases ])
456457
0 commit comments