void set_r(const double r) { vector_fp moleFracs(2); moleFracs[0] = r; moleFracs[1] = 1-r; test_phase->setMoleFractions(&moleFracs[0]); }
void MaskellSolidSolnPhase::calcDensity() { const vector_fp& vbar = getStandardVolumes(); vector_fp moleFracs(m_kk); Phase::getMoleFractions(&moleFracs[0]); doublereal vtotal = 0.0; for (size_t i = 0; i < m_kk; i++) { vtotal += vbar[i] * moleFracs[i]; } Phase::setDensity(meanMolecularWeight() / vtotal); }