ENH: combustible mixtures to be read from dictionary

This commit is contained in:
andy
2010-10-14 12:12:29 +01:00
parent 6a29417641
commit cfa96a8519
6 changed files with 28 additions and 28 deletions

View File

@ -50,9 +50,9 @@ Foam::dieselMixture<ThermoType>::dieselMixture
stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")),
fuel_(thermoDict.lookup("fuel")),
oxidant_(thermoDict.lookup("oxidant")),
products_(thermoDict.lookup("burntProducts")),
fuel_(thermoDict.subDict("fuel")),
oxidant_(thermoDict.subDict("oxidant")),
products_(thermoDict.subDict("burntProducts")),
mixture_("mixture", fuel_),
@ -91,9 +91,9 @@ const ThermoType& Foam::dieselMixture<ThermoType>::mixture
template<class ThermoType>
void Foam::dieselMixture<ThermoType>::read(const dictionary& thermoDict)
{
fuel_ = ThermoType(thermoDict.lookup("fuel"));
oxidant_ = ThermoType(thermoDict.lookup("oxidant"));
products_ = ThermoType(thermoDict.lookup("burntProducts"));
fuel_ = ThermoType(thermoDict.subDict("fuel"));
oxidant_ = ThermoType(thermoDict.subDict("oxidant"));
products_ = ThermoType(thermoDict.subDict("burntProducts"));
}

View File

@ -50,9 +50,9 @@ Foam::egrMixture<ThermoType>::egrMixture
stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")),
fuel_(thermoDict.lookup("fuel")),
oxidant_(thermoDict.lookup("oxidant")),
products_(thermoDict.lookup("burntProducts")),
fuel_(thermoDict.subDict("fuel")),
oxidant_(thermoDict.subDict("oxidant")),
products_(thermoDict.subDict("burntProducts")),
mixture_("mixture", fuel_),
@ -101,9 +101,9 @@ void Foam::egrMixture<ThermoType>::read(const dictionary& thermoDict)
{
stoicRatio_ = thermoDict.lookup("stoichiometricAirFuelMassRatio");
fuel_ = ThermoType(thermoDict.lookup("fuel"));
oxidant_ = ThermoType(thermoDict.lookup("oxidant"));
products_ = ThermoType(thermoDict.lookup("burntProducts"));
fuel_ = ThermoType(thermoDict.subDict("fuel"));
oxidant_ = ThermoType(thermoDict.subDict("oxidant"));
products_ = ThermoType(thermoDict.subDict("burntProducts"));
}

View File

@ -84,8 +84,8 @@ const ThermoType& Foam::homogeneousMixture<ThermoType>::mixture
template<class ThermoType>
void Foam::homogeneousMixture<ThermoType>::read(const dictionary& thermoDict)
{
reactants_ = ThermoType(thermoDict.lookup("reactants"));
products_ = ThermoType(thermoDict.lookup("products"));
reactants_ = ThermoType(thermoDict.subDict("reactants"));
products_ = ThermoType(thermoDict.subDict("products"));
}

View File

@ -51,9 +51,9 @@ Foam::inhomogeneousMixture<ThermoType>::inhomogeneousMixture
stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")),
fuel_(thermoDict.lookup("fuel")),
oxidant_(thermoDict.lookup("oxidant")),
products_(thermoDict.lookup("burntProducts")),
fuel_(thermoDict.subDict("fuel")),
oxidant_(thermoDict.subDict("oxidant")),
products_(thermoDict.subDict("burntProducts")),
mixture_("mixture", fuel_),
@ -95,9 +95,9 @@ void Foam::inhomogeneousMixture<ThermoType>::read(const dictionary& thermoDict)
{
stoicRatio_ = thermoDict.lookup("stoichiometricAirFuelMassRatio");
fuel_ = ThermoType(thermoDict.lookup("fuel"));
oxidant_ = ThermoType(thermoDict.lookup("oxidant"));
products_ = ThermoType(thermoDict.lookup("burntProducts"));
fuel_ = ThermoType(thermoDict.subDict("fuel"));
oxidant_ = ThermoType(thermoDict.subDict("oxidant"));
products_ = ThermoType(thermoDict.subDict("burntProducts"));
}

View File

@ -38,7 +38,7 @@ const ThermoType& Foam::multiComponentMixture<ThermoType>::constructSpeciesData
speciesData_.set
(
i,
new ThermoType(thermoDict.lookup(species_[i]))
new ThermoType(thermoDict.subDict(species_[i]))
);
}
@ -155,7 +155,7 @@ void Foam::multiComponentMixture<ThermoType>::read
{
forAll(species_, i)
{
speciesData_[i] = ThermoType(thermoDict.lookup(species_[i]));
speciesData_[i] = ThermoType(thermoDict.subDict(species_[i]));
}
}

View File

@ -51,9 +51,9 @@ Foam::veryInhomogeneousMixture<ThermoType>::veryInhomogeneousMixture
stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")),
fuel_(thermoDict.lookup("fuel")),
oxidant_(thermoDict.lookup("oxidant")),
products_(thermoDict.lookup("burntProducts")),
fuel_(thermoDict.subDict("fuel")),
oxidant_(thermoDict.subDict("oxidant")),
products_(thermoDict.subDict("burntProducts")),
mixture_("mixture", fuel_),
@ -96,9 +96,9 @@ void Foam::veryInhomogeneousMixture<ThermoType>::read
const dictionary& thermoDict
)
{
fuel_ = ThermoType(thermoDict.lookup("fuel"));
oxidant_ = ThermoType(thermoDict.lookup("oxidant"));
products_ = ThermoType(thermoDict.lookup("burntProducts"));
fuel_ = ThermoType(thermoDict.subDict("fuel"));
oxidant_ = ThermoType(thermoDict.subDict("oxidant"));
products_ = ThermoType(thermoDict.subDict("burntProducts"));
}