22 _geomFields(geomFields),
23 _flowFields(flowFields)
25 const int numMeshes =
_meshes.size();
26 for (
int n=0; n<numMeshes; n++)
31 _vcMap[mesh.
getID()] = vc;
41 const int numMeshes =
_meshes.size();
42 for (
int n=0; n<numMeshes; n++)
50 TArray& density =
dynamic_cast<TArray&
>(_flowFields.density[cells]);
55 const T operatingPressure = vc[
"operatingPressure"];
56 const T molWt = vc[
"molecularWeight"];
58 const T Rgas = 8314.472/molWt;
63 const T urf =
init ? T(1) : T(vc[
"urf"]);
65 for(
int c=0; c<nCells; c++)
67 T absP = (cellP[c] + operatingPressure);
69 if (absP < pMin) absP = pMin;
70 if (temp < TMin) temp = TMin;
73 density[c] = absP/(Rgas*temp);
75 density[c] = urf*absP/(Rgas*temp) + (1.0-urf)*density[c];
95 _impl(new
Impl(geomFields,flowFields,meshes))
123 return _impl->advance(niter);
std::map< int, IdealGasVC< T > * > VCMap
const GeomFields & _geomFields
FloatVal< T > getVal(const string varName) const
virtual ~IdealGasDensityModel()
const StorageSite & getCells() const
Impl(const GeomFields &geomFields, FlowFields &flowFields, const MeshList &meshes)
bool advance(const int niter, bool init=false)
IdealGasDensityModel(const GeomFields &geomFields, FlowFields &thermalFields, const MeshList &meshes)
bool advance(const int niter)
vector< Mesh * > MeshList