From cfa96a8519754d19db6e8438fc08816d03870d81 Mon Sep 17 00:00:00 2001 From: andy <a.heather@opencfd.co.uk> Date: Thu, 14 Oct 2010 12:12:29 +0100 Subject: [PATCH] ENH: combustible mixtures to be read from dictionary --- .../mixtures/dieselMixture/dieselMixture.C | 12 ++++++------ .../reactionThermo/mixtures/egrMixture/egrMixture.C | 12 ++++++------ .../mixtures/homogeneousMixture/homogeneousMixture.C | 4 ++-- .../inhomogeneousMixture/inhomogeneousMixture.C | 12 ++++++------ .../multiComponentMixture/multiComponentMixture.C | 4 ++-- .../veryInhomogeneousMixture.C | 12 ++++++------ 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C index 014ef3da510..8c698065a18 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C @@ -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")); } diff --git a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C index 06cf80a47f4..7550ebf4421 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C @@ -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")); } diff --git a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C index e72edf4b242..51705086b25 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C @@ -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")); } diff --git a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C index 2ef52c112d0..a4cfa2e9c0b 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C @@ -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")); } diff --git a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C index a30dd5dd1ba..19f78a00c55 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C @@ -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])); } } diff --git a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C index 3684fc3e094..942f98cc7b6 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C @@ -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")); } -- GitLab