From b0598526a4ee95efbba72c6e9f73de7c4864ce95 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 28 Nov 2012 11:03:06 +0000 Subject: [PATCH] ENH: Simplified the wallShearStress function object --- .../wallShearStress/wallShearStress.C | 29 +++++-------------- .../wallShearStress/wallShearStress.H | 3 -- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C index 9544c8799b..7e096c6a70 100644 --- a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C +++ b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C @@ -99,7 +99,6 @@ Foam::wallShearStress::wallShearStress obr_(obr), active_(true), log_(false), - phiName_("phi"), patchSet_() { // Check if the available mesh is an fvMesh, otherwise deactivate @@ -136,7 +135,6 @@ void Foam::wallShearStress::read(const dictionary& dict) if (active_) { log_ = dict.lookupOrDefault("log", false); - phiName_ = dict.lookupOrDefault("phiName", "phi"); const fvMesh& mesh = refCast(obr_); const polyBoundaryMesh& pbm = mesh.boundaryMesh(); @@ -231,38 +229,27 @@ void Foam::wallShearStress::write() } - const surfaceScalarField& phi = - obr_.lookupObject(phiName_); - tmp Reff; - if (phi.dimensions() == dimMass/dimTime) + if (mesh.foundObject("turbulenceModel")) { - if (!mesh.foundObject("turbulenceModel")) - { - FatalErrorIn("void Foam::wallShearStress::write()") - << "Unable to find compressible turbulence model in the " - << "database" << exit(FatalError); - } - const cmpModel& model = mesh.lookupObject("turbulenceModel"); Reff = model.devRhoReff(); } - else + else if (mesh.foundObject("turbulenceModel")) { - if (!mesh.foundObject("turbulenceModel")) - { - FatalErrorIn("void Foam::wallShearStress::write()") - << "Unable to find incompressible turbulence model in the " - << "database" << exit(FatalError); - } - const icoModel& model = mesh.lookupObject("turbulenceModel"); Reff = model.devReff(); } + else + { + FatalErrorIn("void Foam::wallShearStress::write()") + << "Unable to find incompressible turbulence model in the " + << "database" << exit(FatalError); + } calcShearStress(mesh, Reff(), wallShearStress); diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H index ac16eca594..6b31c9f612 100644 --- a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H +++ b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H @@ -113,9 +113,6 @@ protected: //- Switch to send output to Info as well as to file Switch log_; - //- Name of mass/volume flux field (optional, default = phi) - word phiName_; - //- Optional list of patches to process labelHashSet patchSet_;