diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index f347de82a0..995d07d7e4 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -126,11 +126,25 @@ void Foam::multiphaseSystem::solveAlphas() } // Ensure that the flux at inflow BCs is preserved - phiAlphaCorr.boundaryField() = min - ( - phase1.phi().boundaryField()*alpha1.boundaryField(), - phiAlphaCorr.boundaryField() - ); + forAll(phiAlphaCorr.boundaryField(), patchi) + { + fvsPatchScalarField& phiAlphaCorrp = + phiAlphaCorr.boundaryField()[patchi]; + + if (!phiAlphaCorrp.coupled()) + { + const scalarField& phi1p = phase1.phi().boundaryField()[patchi]; + const scalarField& alpha1p = alpha1.boundaryField()[patchi]; + + forAll(phiAlphaCorrp, facei) + { + if (phi1p[facei] < 0) + { + phiAlphaCorrp[facei] = alpha1p[facei]*phi1p[facei]; + } + } + } + } MULES::limit ( diff --git a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C index 019a4f54aa..a9049b07bc 100644 --- a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C @@ -179,7 +179,7 @@ bool Foam::OutputFilterFunctionObject::execute template bool Foam::OutputFilterFunctionObject::end() { - if (active()) + if (enabled_) { if (!storeFilter_) { diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index fe3f48e6be..2b5549f3bf 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -927,6 +927,19 @@ Foam::word Foam::GeometricField::select } +template class PatchField, class GeoMesh> +void Foam::GeometricField::writeMinMax +( + Ostream& os +) const +{ + os << "min/max(" << this->name() << ") = " + << min(*this).value() << ", " + << max(*this).value() + << endl; +} + + // writeData member function required by regIOobject template class PatchField, class GeoMesh> bool Foam::GeometricField:: diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H index ba510d77e8..e966f6f81b 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -488,6 +488,9 @@ public: // otherwise the standard parameters by returning the field name word select(bool final) const; + //- Helper function to write the min and max to an Ostream + void writeMinMax(Ostream& os) const; + // Member function *this operators diff --git a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H index d5ee68b61f..b60e7f8cb7 100644 --- a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H +++ b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H @@ -82,6 +82,41 @@ Description } \endverbatim + The effectiveness table is described in terms of the primary and secondary + mass flow rates. For example, the table: + + secondary MFR + | 0.1 0.2 0.3 + -----+----------------- + 0.02 | A B C + primary MFR 0.04 | D E F + 0.06 | G H I + + + Is specified by the following: + + ( + 0.02 + ( + (0.1 A) + (0.2 B) + (0.3 C) + ), + 0.04 + ( + (0.1 D) + (0.2 E) + (0.3 F) + ), + 0.06 + ( + (0.1 G) + (0.2 H) + (0.3 I) + ) + ); + + Note - the table with name "fileName" should have the same units as the secondary mass flow rate and kg/s for phi diff --git a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C index b4d39e4170..6170b41046 100644 --- a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C +++ b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C @@ -189,7 +189,7 @@ void Foam::fv::SemiImplicitSource::addSup UIndirectList(Sp, cells_) = injectionRate_[fieldI].second()/VDash_; - eqn += Su + fvm::Sp(Sp, psi); + eqn += Su + fvm::SuSp(Sp, psi); } diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C index c2bea38236..8a0001f842 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C @@ -110,7 +110,7 @@ void Foam::cloudSolution::read() dict_.lookup("transient") >> transient_; dict_.lookup("coupled") >> coupled_; dict_.lookup("cellValueSourceCorrection") >> cellValueSourceCorrection_; - dict_.lookup("maxCo") >> maxCo_; + dict_.readIfPresent("maxCo", maxCo_); if (steadyState()) { diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H index 0e72be57c4..f45fd4a4f0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ Description - list of injector positions and directions (along injection axes) - number of parcels to inject per injector - parcel velocities - - inner and outer cone angles + - inner and outer half-cone angles - Parcel diameters obtained by distribution model SourceFiles @@ -87,10 +87,10 @@ class ConeInjection //- Parcel velocity magnitude relative to SOI [m/s] const TimeDataEntry Umag_; - //- Inner cone angle relative to SOI [deg] + //- Inner half-cone angle relative to SOI [deg] const TimeDataEntry thetaInner_; - //- Outer cone angle relative to SOI [deg] + //- Outer half-cone angle relative to SOI [deg] const TimeDataEntry thetaOuter_; //- Parcel size distribution model diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H index 87ca3fc8c1..54ae9557be 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description - injector position - direction (along injection axis) - parcel flow rate - - inner and outer cone angles + - inner and outer half-cone angles - Parcel diameters obtained by size distribution model @@ -134,10 +134,10 @@ private: //- Flow rate profile relative to SOI [] const TimeDataEntry flowRateProfile_; - //- Inner cone angle relative to SOI [deg] + //- Inner half-cone angle relative to SOI [deg] const TimeDataEntry thetaInner_; - //- Outer cone angle relative to SOI [deg] + //- Outer half-cone angle relative to SOI [deg] const TimeDataEntry thetaOuter_; //- Parcel size PDF model diff --git a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C index 8532c8a004..fff2c68041 100644 --- a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C +++ b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C @@ -121,7 +121,7 @@ void Foam::writeDictionary::read(const dictionary& dict) digests_.setSize(dictNames_.size(), SHA1Digest()); - Info<< type() << ": monitoring dictionaries:" << nl; + Info<< type() << " " << name_ << ": monitoring dictionaries:" << nl; if (dictNames_.size()) { forAll(dictNames_, i) @@ -151,7 +151,7 @@ void Foam::writeDictionary::execute() { if (firstDict) { - Info<< type() << " output:" << nl << endl; + Info<< type() << " " << name_ << " output:" << nl << endl; IOobject::writeDivider(Info); Info<< endl; diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C index efffb9e2f9..4fd3fd9a68 100644 --- a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C @@ -89,6 +89,8 @@ void Foam::writeRegisteredObject::timeSet() void Foam::writeRegisteredObject::write() { + Info<< type() << " " << name_ << " output:" << nl; + forAll(objectNames_, i) { if (obr_.foundObject(objectNames_[i])) @@ -105,6 +107,8 @@ void Foam::writeRegisteredObject::write() obj.writeOpt() = IOobject::NO_WRITE; } + Info<< " writing object " << obj.name() << nl << endl; + obj.write(); } else diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H index 985d210dcf..d36e0d9431 100644 --- a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H @@ -104,6 +104,7 @@ protected: //- Takes over the writing from Db bool exclusiveWriting_; + //- Refererence to Db const objectRegistry& obr_; // Read from dictionary diff --git a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C index 6bea8e6478..6d338d96bc 100644 --- a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C +++ b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,7 +76,7 @@ void Foam::cloudInfo::read(const dictionary& dict) { functionObjectFile::resetNames(dict.lookup("clouds")); - Info<< type() << ": "; + Info<< type() << " " << name_ << ": "; if (names().size()) { Info<< "applying to clouds:" << nl; diff --git a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H index e659807cd4..9bd1761061 100644 --- a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H +++ b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C index b541295c55..e4074f51a5 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C @@ -65,6 +65,8 @@ void Foam::fieldAverage::initialize() { resetFields(); + Info<< type() << " " << name_ << ":" << nl; + // Add mean fields to the field lists forAll(faItems_, fieldI) @@ -96,6 +98,8 @@ void Foam::fieldAverage::initialize() // ensure first averaging works unconditionally prevTimeIndex_ = -1; + Info<< endl; + initialised_ = true; } @@ -107,6 +111,8 @@ void Foam::fieldAverage::calcAverages() initialize(); } + Info<< type() << " " << name_ << " output:" << nl; + const label currentTimeIndex = static_cast(obr_).time().timeIndex(); @@ -119,7 +125,7 @@ void Foam::fieldAverage::calcAverages() prevTimeIndex_ = currentTimeIndex; } - Info<< "Calculating averages" << nl << endl; + Info<< " Calculating averages" << nl; addMeanSqrToPrime2Mean(); addMeanSqrToPrime2Mean(); @@ -143,6 +149,8 @@ void Foam::fieldAverage::calcAverages() void Foam::fieldAverage::writeAverages() const { + Info<< " Writing average fields" << endl; + writeFields(); writeFields(); writeFields(); @@ -189,8 +197,8 @@ void Foam::fieldAverage::readAveragingProperties() if (resetOnRestart_) { - Info<< "fieldAverage: starting averaging at time " - << obr_.time().timeName() << nl << endl; + Info<< " Starting averaging at time " << obr_.time().timeName() + << nl; } else { @@ -207,14 +215,14 @@ void Foam::fieldAverage::readAveragingProperties() if (!propsDictHeader.headerOk()) { - Info<< "fieldAverage: starting averaging at time " - << obr_.time().timeName() << nl << endl; + Info<< " Starting averaging at time " << obr_.time().timeName() + << nl; return; } IOdictionary propsDict(propsDictHeader); - Info<< "fieldAverage: restarting averaging for fields:" << endl; + Info<< " Restarting averaging for fields:" << nl; forAll(faItems_, fieldI) { const word& fieldName = faItems_[fieldI].fieldName(); @@ -224,13 +232,11 @@ void Foam::fieldAverage::readAveragingProperties() totalIter_[fieldI] = readLabel(fieldDict.lookup("totalIter")); totalTime_[fieldI] = readScalar(fieldDict.lookup("totalTime")); - Info<< " " << fieldName + Info<< " " << fieldName << " iters = " << totalIter_[fieldI] - << " time = " << totalTime_[fieldI] << endl; + << " time = " << totalTime_[fieldI] << nl; } } - - Info<< endl; } } @@ -266,15 +272,15 @@ Foam::fieldAverage::fieldAverage active_ = false; WarningIn ( - "fieldAverage::fieldAverage\n" - "(\n" - "const word&,\n" - "const objectRegistry&,\n" - "const dictionary&,\n" - "const bool\n" + "fieldAverage::fieldAverage" + "(" + "const word&, " + "const objectRegistry&, " + "const dictionary&, " + "const bool " ")" - ) << "No fvMesh available, deactivating." - << nl << endl; + ) << "No fvMesh available, deactivating " << name_ << nl + << endl; } } @@ -293,11 +299,15 @@ void Foam::fieldAverage::read(const dictionary& dict) { initialised_ = false; + Info<< type() << " " << name_ << ":" << nl; + dict.readIfPresent("resetOnRestart", resetOnRestart_); dict.readIfPresent("resetOnOutput", resetOnOutput_); dict.lookup("fields") >> faItems_; readAveragingProperties(); + + Info<< endl; } } @@ -307,6 +317,8 @@ void Foam::fieldAverage::execute() if (active_) { calcAverages(); + + Info<< endl; } } @@ -329,14 +341,16 @@ void Foam::fieldAverage::write() if (resetOnOutput_) { - Info<< "fieldAverage: restarting averaging at time " - << obr_.time().timeName() << nl << endl; + Info<< " Restarting averaging at time " << obr_.time().timeName() + << nl << endl; initialize(); // ensure first averaging works unconditionally prevTimeIndex_ = -1; } + + Info<< endl; } } diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverageTemplates.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverageTemplates.C index 996d0073e7..00b4c9e9e2 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverageTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverageTemplates.C @@ -38,7 +38,7 @@ void Foam::fieldAverage::addMeanFieldType(const label fieldI) const word& fieldName = faItems_[fieldI].fieldName(); const word& meanFieldName = faItems_[fieldI].meanFieldName(); - Info<< "Reading/calculating field " << meanFieldName << nl << endl; + Info<< " Reading/initialising field " << meanFieldName << endl; if (obr_.foundObject(meanFieldName)) { @@ -46,9 +46,9 @@ void Foam::fieldAverage::addMeanFieldType(const label fieldI) } else if (obr_.found(meanFieldName)) { - Info<< "Cannot allocate average field " << meanFieldName + Info<< " Cannot allocate average field " << meanFieldName << " since an object with that name already exists." - << " Disabling averaging." << nl << endl; + << " Disabling averaging for field." << endl; faItems_[fieldI].mean() = false; } @@ -105,7 +105,7 @@ void Foam::fieldAverage::addPrime2MeanFieldType(const label fieldI) const word& meanFieldName = faItems_[fieldI].meanFieldName(); const word& prime2MeanFieldName = faItems_[fieldI].prime2MeanFieldName(); - Info<< "Reading/calculating field " << prime2MeanFieldName << nl << endl; + Info<< " Reading/initialising field " << prime2MeanFieldName << nl; if (obr_.foundObject(prime2MeanFieldName)) { @@ -113,9 +113,9 @@ void Foam::fieldAverage::addPrime2MeanFieldType(const label fieldI) } else if (obr_.found(prime2MeanFieldName)) { - Info<< "Cannot allocate average field " << prime2MeanFieldName + Info<< " Cannot allocate average field " << prime2MeanFieldName << " since an object with that name already exists." - << " Disabling averaging." << nl << endl; + << " Disabling averaging for field." << nl; faItems_[fieldI].prime2Mean() = false; } diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C index 57c26aa472..57cff30637 100644 --- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C +++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C @@ -51,7 +51,15 @@ Foam::fieldCoordinateSystemTransform::fieldCoordinateSystemTransform coordSys_(obr, dict) { // Check if the available mesh is an fvMesh otherise deactivate - if (!isA(obr_)) + if (isA(obr_)) + { + read(dict); + + Info<< type() << " " << name_ << ":" << nl + << " Applying transformation from global Cartesian to local " + << coordSys_ << nl << endl; + } + else { active_ = false; WarningIn @@ -63,15 +71,9 @@ Foam::fieldCoordinateSystemTransform::fieldCoordinateSystemTransform "const dictionary&, " "const bool" ")" - ) << "No fvMesh available, deactivating." + ) << "No fvMesh available, deactivating " << name_ << endl; } - - read(dict); - - Info<< type() << ":" << nl - << " Applying transformation from global Cartesian to local " - << coordSys_ << nl << endl; } @@ -112,6 +114,8 @@ void Foam::fieldCoordinateSystemTransform::timeSet() void Foam::fieldCoordinateSystemTransform::write() { + Info<< type() << " " << name_ << " output:" << nl; + forAll(fieldSet_, fieldI) { // If necessary load field diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C index cf2c4be69f..945b15532e 100644 --- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C @@ -39,25 +39,9 @@ void Foam::fieldCoordinateSystemTransform::transformField { const word& fieldName = field.name() + "Transformed"; - dimensionedTensor R("R", field.dimensions(), coordSys_.R().R()); - - if (obr_.foundObject(fieldName)) + if (!obr_.foundObject(fieldName)) { - Type& transField = - const_cast(obr_.lookupObject(fieldName)); - - transField == field; - - forAll(field, i) - { - Foam::transform(transField, R, transField); - } - - transField.write(); - } - else - { - Type& transField = obr_.store + obr_.store ( new Type ( @@ -72,14 +56,23 @@ void Foam::fieldCoordinateSystemTransform::transformField field ) ); - - forAll(field, i) - { - Foam::transform(transField, R, transField); - } - - transField.write(); } + + Type& transField = + const_cast(obr_.lookupObject(fieldName)); + + transField == field; + + dimensionedTensor R("R", field.dimensions(), coordSys_.R().R()); + + forAll(field, i) + { + Foam::transform(transField, R, transField); + } + + Info<< " writing field " << transField.name() << nl << endl; + + transField.write(); } diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C index 7c3c328389..5c612fe8a3 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C @@ -65,7 +65,7 @@ Foam::fieldMinMax::fieldMinMax name_(name), obr_(obr), active_(true), - log_(false), + log_(true), mode_(mdMag), fieldSet_() { @@ -76,8 +76,13 @@ Foam::fieldMinMax::fieldMinMax WarningIn ( "fieldMinMax::fieldMinMax" - "(const objectRegistry& obr, const dictionary& dict)" - ) << "No fvMesh available, deactivating." + "(" + "const word&, " + "const objectRegistry&, " + "const dictionary&, " + "const bool" + ")" + ) << "No fvMesh available, deactivating " << name_ << endl; } @@ -97,7 +102,7 @@ void Foam::fieldMinMax::read(const dictionary& dict) { if (active_) { - log_ = dict.lookupOrDefault("log", false); + log_ = dict.lookupOrDefault("log", true); mode_ = modeTypeNames_[dict.lookupOrDefault("mode", "magnitude")]; dict.lookup("fields") >> fieldSet_; @@ -153,7 +158,7 @@ void Foam::fieldMinMax::write() if (log_) { - Info<< type() << " output:" << nl; + Info<< type() << " " << name_ << " output:" << nl; } forAll(fieldSet_, fieldI) diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C index 9f651c8ee9..6d0856a916 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C @@ -45,7 +45,7 @@ void Foam::fieldValue::read(const dictionary& dict) { dict_ = dict; - log_ = dict.lookupOrDefault("log", false); + log_ = dict.lookupOrDefault("log", true); dict.lookup("fields") >> fields_; dict.lookup("valueOutput") >> valueOutput_; } @@ -82,7 +82,7 @@ Foam::fieldValue::fieldValue obr_(obr), dict_(dict), active_(true), - log_(false), + log_(true), sourceName_(dict.lookupOrDefault("sourceName", "sampledSurface")), fields_(dict.lookup("fields")), valueOutput_(dict.lookup("valueOutput")), @@ -104,8 +104,8 @@ Foam::fieldValue::fieldValue "const dictionary&, " "const bool" ")" - ) << "No fvMesh available, deactivating." - << nl << endl; + ) << "No fvMesh available, deactivating " << name << nl + << endl; active_ = false; } } diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C index 30027a864a..681ea7a02a 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C @@ -68,7 +68,7 @@ Foam::fieldValues::fieldValueDelta::fieldValueDelta name_(name), obr_(obr), loadFromFiles_(loadFromFiles), - log_(false), + log_(true), operation_(opSubtract), source1Ptr_(NULL), source2Ptr_(NULL) @@ -119,7 +119,7 @@ Foam::fieldValues::fieldValueDelta::~fieldValueDelta() void Foam::fieldValues::fieldValueDelta::read(const dictionary& dict) { - log_ = dict.lookupOrDefault("log", false); + log_ = dict.lookupOrDefault("log", true); source1Ptr_.reset ( fieldValue::New diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C index 4b82fbd331..71258bff20 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C @@ -50,7 +50,11 @@ Foam::nearWallFields::nearWallFields fieldSet_() { // Check if the available mesh is an fvMesh otherise deactivate - if (!isA(obr_)) + if (isA(obr_)) + { + read(dict); + } + else { active_ = false; WarningIn @@ -62,11 +66,10 @@ Foam::nearWallFields::nearWallFields "const dictionary&, " "const bool" ")" - ) << "No fvMesh available, deactivating." + ) << "No fvMesh available, deactivating " << name_ << endl; } - read(dict); } @@ -124,12 +127,16 @@ void Foam::nearWallFields::read(const dictionary& dict) reverseFieldMap_.insert(sampleFldName, fldName); } - Info<< "Creating " << fieldMap_.size() << " fields" << endl; + Info<< type() << " " << name_ << ": Creating " << fieldMap_.size() + << " fields" << endl; + createFields(vsf_); createFields(vvf_); createFields(vSpheretf_); createFields(vSymmtf_); createFields(vtf_); + + Info<< endl; } } @@ -165,6 +172,7 @@ void Foam::nearWallFields::end() void Foam::nearWallFields::timeSet() { + // Do nothing } @@ -178,7 +186,9 @@ void Foam::nearWallFields::write() // Do nothing if (active_) { - Info<< "Writing sampled fields to " << obr_.time().timeName() + Info<< type() << " " << name_ << " output:" << nl; + + Info<< " Writing sampled fields to " << obr_.time().timeName() << endl; sampleFields(vsf_); @@ -208,6 +218,8 @@ void Foam::nearWallFields::write() { vtf_[i].write(); } + + Info<< endl; } } diff --git a/src/postProcessing/functionObjects/field/processorField/processorField.C b/src/postProcessing/functionObjects/field/processorField/processorField.C index 611ebced0f..18603fbed2 100644 --- a/src/postProcessing/functionObjects/field/processorField/processorField.C +++ b/src/postProcessing/functionObjects/field/processorField/processorField.C @@ -50,7 +50,11 @@ Foam::processorField::processorField active_(true) { // Check if the available mesh is an fvMesh otherise deactivate - if (!isA(obr_)) + if (isA(obr_)) + { + read(dict); + } + else { active_ = false; WarningIn @@ -62,11 +66,9 @@ Foam::processorField::processorField "const dictionary&, " "const bool" ")" - ) << "No fvMesh available, deactivating." + ) << "No fvMesh available, deactivating " << name_ << endl; } - - read(dict); } diff --git a/src/postProcessing/functionObjects/field/readFields/readFields.C b/src/postProcessing/functionObjects/field/readFields/readFields.C index b92998684d..3b28809035 100644 --- a/src/postProcessing/functionObjects/field/readFields/readFields.C +++ b/src/postProcessing/functionObjects/field/readFields/readFields.C @@ -50,7 +50,11 @@ Foam::readFields::readFields fieldSet_() { // Check if the available mesh is an fvMesh otherise deactivate - if (!isA(obr_)) + if (isA(obr_)) + { + read(dict); + } + else { active_ = false; WarningIn @@ -62,11 +66,9 @@ Foam::readFields::readFields "const dictionary&, " "const bool" ")" - ) << "No fvMesh available, deactivating." + ) << "No fvMesh available, deactivating " << name_ << endl; } - - read(dict); } diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C index 44bfeebdbc..30920a13b5 100644 --- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C +++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C @@ -149,10 +149,10 @@ void Foam::regionSizeDistribution::writeAlphaFields liquidCore.correctBoundaryConditions(); backgroundAlpha.correctBoundaryConditions(); - Info<< "Volume of liquid-core = " + Info<< " Volume of liquid-core = " << fvc::domainIntegrate(liquidCore).value() << endl; - Info<< "Volume of background = " + Info<< " Volume of background = " << fvc::domainIntegrate(backgroundAlpha).value() << endl; @@ -330,18 +330,25 @@ Foam::regionSizeDistribution::regionSizeDistribution patchNames_(dict.lookup("patches")) { // Check if the available mesh is an fvMesh, otherwise deactivate - if (!isA(obr_)) + if (isA(obr_)) + { + read(dict); + } + else { active_ = false; WarningIn ( "regionSizeDistribution::regionSizeDistribution" - "(const objectRegistry&, const dictionary&)" - ) << "No fvMesh available, deactivating." << nl + "(" + "const word&, " + "const objectRegistry&, " + "const dictionary&, " + "const bool" + ")" + ) << "No fvMesh available, deactivating " << name_ << nl << endl; } - - read(dict); } @@ -402,16 +409,18 @@ void Foam::regionSizeDistribution::write() { if (active_) { + Info<< type() << " " << name_ << " output:" << nl; + const fvMesh& mesh = refCast(obr_); autoPtr alphaPtr; if (obr_.foundObject(alphaName_)) { - Info<< "Looking up field " << alphaName_ << endl; + Info<< " Looking up field " << alphaName_ << endl; } else { - Info<< "Reading field " << alphaName_ << endl; + Info<< " Reading field " << alphaName_ << endl; alphaPtr.reset ( new volScalarField @@ -437,7 +446,7 @@ void Foam::regionSizeDistribution::write() : obr_.lookupObject(alphaName_) ); - Info<< "Volume of alpha = " + Info<< " Volume of alpha = " << fvc::domainIntegrate(alpha).value() << endl; @@ -445,9 +454,9 @@ void Foam::regionSizeDistribution::write() const scalar maxDropletVol = 1.0/6.0*pow(maxDiam_, 3); const scalar delta = (maxDiam_-minDiam_)/nBins_; - Info<< "Mesh volume = " << meshVol << endl; - Info<< "Maximum droplet diameter = " << maxDiam_ << endl; - Info<< "Maximum droplet volume = " << maxDropletVol << endl; + Info<< " Mesh volume = " << meshVol << endl; + Info<< " Maximum droplet diameter = " << maxDiam_ << endl; + Info<< " Maximum droplet volume = " << maxDropletVol << endl; // Determine blocked faces @@ -506,8 +515,8 @@ void Foam::regionSizeDistribution::write() regionSplit regions(mesh, blockedFace); - Info<< "Determined " << regions.nRegions() << " disconnected regions" - << endl; + Info<< " Determined " << regions.nRegions() + << " disconnected regions" << endl; if (debug) @@ -525,7 +534,7 @@ void Foam::regionSizeDistribution::write() mesh, dimensionedScalar("zero", dimless, 0) ); - Info<< "Dumping region as volScalarField to " << region.name() + Info<< " Dumping region as volScalarField to " << region.name() << endl; forAll(regions, cellI) @@ -557,7 +566,7 @@ void Foam::regionSizeDistribution::write() if (debug) { - Info<< token::TAB << "Region" + Info<< " " << token::TAB << "Region" << token::TAB << "Volume(mesh)" << token::TAB << "Volume(" << alpha.name() << "):" << token::TAB << "nCells" @@ -577,7 +586,7 @@ void Foam::regionSizeDistribution::write() ++vIter, ++aIter, ++numIter ) { - Info<< token::TAB << vIter.key() + Info<< " " << token::TAB << vIter.key() << token::TAB << vIter() << token::TAB << aIter() << token::TAB << numIter() @@ -587,7 +596,7 @@ void Foam::regionSizeDistribution::write() alphaSumVol += aIter(); nCells += numIter(); } - Info<< token::TAB << "Total:" + Info<< " " << token::TAB << "Total:" << token::TAB << meshSumVol << token::TAB << alphaSumVol << token::TAB << nCells @@ -599,15 +608,15 @@ void Foam::regionSizeDistribution::write() { - Info<< "Patch connected regions (liquid core):" << endl; - Info<< token::TAB << "Region" + Info<< " Patch connected regions (liquid core):" << endl; + Info<< token::TAB << " Region" << token::TAB << "Volume(mesh)" << token::TAB << "Volume(" << alpha.name() << "):" << endl; forAllConstIter(Map