|
[Sponsors] |
October 3, 2012, 12:50 |
Using liquidMixtureProperties
|
#1 | |
Member
Adam
Join Date: Jun 2011
Posts: 32
Rep Power: 14 |
I would like to use the water properties functions offered by the liquidMixtureProperties class, specifically, I want to calculate the mixture density in a sprayFoam calculation. The density function requires the pressure, temperature, and mole fraction (http://foam.sourceforge.net/docs/cpp...b69ac33c0e3962). The problem for me seems to be in passing the mole fraction in the correct format. Here is the code that I've placed in sprayFoam.C:
Code:
const scalar pc = p[cellI]; const scalar Tc = T[cellI]; const scalarField& Y_(Y[0]); // Find the mole fraction, given the mass fraction const scalarField X_ = slgThermo.liquids().X(Y_); const scalar rho_ = slgThermo.liquids().rho(pc, Tc, X_); Code:
const scalarField& Y_(Y[0][0]); Quote:
|
||
|
|