diff --git a/applications/modules/XiFluid/XiFluid.C b/applications/modules/XiFluid/XiFluid.C index b49984bbb4..cd52675300 100644 --- a/applications/modules/XiFluid/XiFluid.C +++ b/applications/modules/XiFluid/XiFluid.C @@ -116,30 +116,18 @@ Foam::solvers::XiFluid::XiFluid(fvMesh& mesh) combustionProperties.lookup("SuModel") ), - sigmaExt - ( - combustionProperties.lookup("sigmaExt") - ), + sigmaExt("sigmaExt", dimless/dimTime, combustionProperties), XiModel ( combustionProperties.lookup("XiModel") ), - XiCoef - ( - combustionProperties.lookup("XiCoef") - ), + XiCoef("XiCoef", dimless, combustionProperties), - XiShapeCoef - ( - combustionProperties.lookup("XiShapeCoef") - ), + XiShapeCoef("XiShapeCoef", dimless, combustionProperties), - uPrimeCoef - ( - combustionProperties.lookup("uPrimeCoef") - ), + uPrimeCoef("uPrimeCoef", dimless, combustionProperties), ign(combustionProperties, runTime, mesh), diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H index a02f911ede..5003d18f18 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H @@ -59,21 +59,22 @@ Description Where: \table - Property | Description | Required | Default value - type | Type of functionObject | yes | - libs | Libraries containing implementation | yes | - region | Name of region for multi-region cases | no | - enabled | On/off switch | no | yes - log | Log information to standard output | no | no - startTime| Start time | no | - endTime | End time | no | - executeAtStart | Execute at start time switch | no | yes - executeControl | See time controls below | no | timeStep - executeInterval | Steps between each execution | no | - executeTimes | List of execution times | no | - writeControl | See time controls below | no | timeStep - writeInterval | Steps between each write | no | - writeTimes | List of write times | no | + Property | Description | Required | Default value + type | Type of functionObject | yes | + libs | Shared libraries | no | + region | Name of region | no | + enabled | On/off switch | no | yes + log | Print data to log | no | no + startTime | Start time | no | + endTime | End time | no | + executeAtStart | Execute at start time switch | no | yes + executeControl | See time controls below | no | timeStep + executeInterval | Steps between each execution | no | + executeTimes | List of execution times | no | + writeControl | See time controls below | no | timeStep + writeInterval | Steps between each write | no | + writeTimes | List of write times | no | + writeFrequencies | List of write frequencies | no | \endtable Time controls: diff --git a/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C b/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C index b33a53f406..d6cf8f3893 100644 --- a/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C +++ b/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C @@ -83,7 +83,6 @@ void Foam::timeControl::read(const dictionary& dict) { word controlName(prefix_ + "Control"); word intervalName(prefix_ + "Interval"); - const word timesName(prefix_ + "Times"); // For backward compatibility support the deprecated 'outputControl' option // now superseded by 'writeControl' for compatibility with Time @@ -147,8 +146,69 @@ void Foam::timeControl::read(const dictionary& dict) case timeControls::runTimes: { - times_ = dict.lookup(timesName); - timeDelta_ = dict.lookupOrDefault("timeDelta", 1e-6); + const word timesName(prefix_ + "Times"); + const word frequenciesName(prefix_ + "Frequencies"); + const bool repeat = dict.lookupOrDefault("writeRepeat", false); + + timeDelta_ = dict.lookupOrDefault + ( + "timeDelta", + 1e-3*time_.deltaTValue() + ); + + if (dict.found(timesName)) + { + times_ = dict.lookup(timesName); + } + else if (dict.found(frequenciesName)) + { + List> frequencies + ( + dict.lookup(frequenciesName) + ); + + if (!repeat) + { + frequencies.append + ( + {time_.endTime().value(), frequencies.last().second()} + ); + } + + const scalar frequenciesDuration = + frequencies.last().first() - frequencies.first().first(); + + DynamicList times(1, frequencies[0].first()); + label i = 0; + label repeati = 0; + while (times[i] < time_.endTime().value()) + { + for(label pi=0; pi::egrMixture phaseName ), - stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")), + stoicRatio_("stoichiometricAirFuelMassRatio", dimless, thermoDict), fuel_("fuel", thermoDict.subDict("fuel")), oxidant_("oxidant", thermoDict.subDict("oxidant")), @@ -100,7 +100,12 @@ const ThermoType& Foam::egrMixture::mixture template void Foam::egrMixture::read(const dictionary& thermoDict) { - stoicRatio_ = thermoDict.lookup("stoichiometricAirFuelMassRatio"); + stoicRatio_ = dimensionedScalar + ( + "stoichiometricAirFuelMassRatio", + dimless, + thermoDict + ); fuel_ = ThermoType("fuel", thermoDict.subDict("fuel")); oxidant_ = ThermoType("oxidant", thermoDict.subDict("oxidant")); diff --git a/src/thermophysicalModels/multicomponentThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C b/src/thermophysicalModels/multicomponentThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C index 6c1fd6ad58..80ec4c51d0 100644 --- a/src/thermophysicalModels/multicomponentThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C +++ b/src/thermophysicalModels/multicomponentThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C @@ -54,7 +54,7 @@ Foam::inhomogeneousMixture::inhomogeneousMixture phaseName ), - stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")), + stoicRatio_("stoichiometricAirFuelMassRatio", dimless, thermoDict), fuel_("fuel", thermoDict.subDict("fuel")), oxidant_("oxidant", thermoDict.subDict("oxidant")), @@ -98,7 +98,12 @@ const ThermoType& Foam::inhomogeneousMixture::mixture template void Foam::inhomogeneousMixture::read(const dictionary& thermoDict) { - stoicRatio_ = thermoDict.lookup("stoichiometricAirFuelMassRatio"); + stoicRatio_ = dimensionedScalar + ( + "stoichiometricAirFuelMassRatio", + dimless, + thermoDict + ); fuel_ = ThermoType("fuel", thermoDict.subDict("fuel")); oxidant_ = ThermoType("oxidant", thermoDict.subDict("oxidant")); diff --git a/src/thermophysicalModels/multicomponentThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C b/src/thermophysicalModels/multicomponentThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C index dc3a4dd66e..342186c449 100644 --- a/src/thermophysicalModels/multicomponentThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C +++ b/src/thermophysicalModels/multicomponentThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C @@ -55,7 +55,7 @@ Foam::veryInhomogeneousMixture::veryInhomogeneousMixture phaseName ), - stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")), + stoicRatio_("stoichiometricAirFuelMassRatio", dimless, thermoDict), fuel_("fuel", thermoDict.subDict("fuel")), oxidant_("oxidant", thermoDict.subDict("oxidant")), diff --git a/tutorials/XiFluid/kivaTest/constant/combustionProperties b/tutorials/XiFluid/kivaTest/constant/combustionProperties index a6f5c3d530..6f821e5e8d 100644 --- a/tutorials/XiFluid/kivaTest/constant/combustionProperties +++ b/tutorials/XiFluid/kivaTest/constant/combustionProperties @@ -18,21 +18,21 @@ laminarFlameSpeedCorrelation Gulders; fuel IsoOctane; -Su Su [0 1 -1 0 0 0 0] 0; +Su 0; SuModel unstrained; -equivalenceRatio equivalenceRatio [0 0 0 0 0 0 0] 1; +equivalenceRatio 1; -sigmaExt sigmaExt [0 0 -1 0 0 0 0] 100000; +sigmaExt 100000; XiModel transport; -XiCoef XiCoef [0 0 0 0 0 0 0] 0.62; +XiCoef 0.62; -XiShapeCoef XiShapeCoef [0 0 0 0 0 0 0] 1; +XiShapeCoef 1; -uPrimeCoef uPrimeCoef [0 0 0 0 0 0 0] 1; +uPrimeCoef 1; GuldersCoeffs { diff --git a/tutorials/XiFluid/kivaTest/constant/physicalProperties b/tutorials/XiFluid/kivaTest/constant/physicalProperties index 090f33287b..c6ce37ae76 100644 --- a/tutorials/XiFluid/kivaTest/constant/physicalProperties +++ b/tutorials/XiFluid/kivaTest/constant/physicalProperties @@ -26,7 +26,7 @@ thermoType // energy absoluteInternalEnergy; } -stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.0336; +stoichiometricAirFuelMassRatio 15.0336; fuel { diff --git a/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/combustionProperties b/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/combustionProperties index f27c4e2e13..29f836b83f 100644 --- a/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/combustionProperties +++ b/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/combustionProperties @@ -16,21 +16,21 @@ FoamFile #include "combustionPropertiesInclude" -Su Su [0 1 -1 0 0 0 0] 0.434; +Su 0.434; SuModel unstrained; -equivalenceRatio equivalenceRatio [0 0 0 0 0 0 0] 1; +equivalenceRatio 1; -sigmaExt sigmaExt [0 0 -1 0 0 0 0] 100000; +sigmaExt 100000; XiModel transport; -XiCoef XiCoef [0 0 0 0 0 0 0] 0.62; +XiCoef 0.62; -XiShapeCoef XiShapeCoef [0 0 0 0 0 0 0] 1; +XiShapeCoef 1; -uPrimeCoef uPrimeCoef [0 0 0 0 0 0 0] 1; +uPrimeCoef 1; GuldersCoeffs { diff --git a/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/physicalProperties b/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/physicalProperties index dd62cb60c4..c0565f9358 100644 --- a/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/physicalProperties +++ b/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/physicalProperties @@ -25,7 +25,7 @@ thermoType energy absoluteEnthalpy; } -stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.675; +stoichiometricAirFuelMassRatio 15.675; reactants { diff --git a/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/physicalProperties.hydrogen b/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/physicalProperties.hydrogen index 1964d6e99f..c5712f614d 100644 --- a/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/physicalProperties.hydrogen +++ b/tutorials/XiFluid/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/physicalProperties.hydrogen @@ -25,7 +25,7 @@ thermoType energy absoluteEnthalpy; } -stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 34.074; +stoichiometricAirFuelMassRatio 34.074; reactants { diff --git a/tutorials/legacy/basic/financialFoam/europeanCall/constant/financialProperties b/tutorials/legacy/basic/financialFoam/europeanCall/constant/financialProperties index 70c579aa16..db035f1298 100644 --- a/tutorials/legacy/basic/financialFoam/europeanCall/constant/financialProperties +++ b/tutorials/legacy/basic/financialFoam/europeanCall/constant/financialProperties @@ -14,16 +14,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -strike [0 1 0 0 0 0 0] 40; +strike 40; -r [0 0 -1 0 0 0 0] 0.1; +r 0.1; -sigma [0 0 -0.5 0 0 0 0] 0.2; +sigma 0.2; -s [0 0 -1 0 0 0 0] 0; +s 0; -xi [0 0 -0.5 0 0 0 0] 0.1; +xi 0.1; -eta [0 0 0 0 0 0 0] 0; +eta 0; // ************************************************************************* // diff --git a/tutorials/legacy/combustion/PDRFoam/flamePropagationWithObstacles/constant/physicalProperties b/tutorials/legacy/combustion/PDRFoam/flamePropagationWithObstacles/constant/physicalProperties index dc558d8dc1..9c5e6cba2b 100644 --- a/tutorials/legacy/combustion/PDRFoam/flamePropagationWithObstacles/constant/physicalProperties +++ b/tutorials/legacy/combustion/PDRFoam/flamePropagationWithObstacles/constant/physicalProperties @@ -25,7 +25,7 @@ thermoType energy absoluteEnthalpy; } -stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.5776; +stoichiometricAirFuelMassRatio 15.5776; fuel {