From 2d2d8d4081ac0cf7cb03cd51ca849c7b325538d6 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 1 Aug 2011 22:50:06 +0100 Subject: [PATCH 1/4] chtMultiRegionSimpleFoam: revert change to hEqn to support liquids --- .../chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/hEqn.H | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/hEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/hEqn.H index 2fde518a6c..03b2580425 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/hEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/hEqn.H @@ -5,8 +5,8 @@ - fvm::Sp(fvc::div(phi), h) - fvm::laplacian(turb.alphaEff(), h) == - fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)") - - (rho/psi)*fvc::div(phi/fvc::interpolate(rho)) + fvc::div(phi/fvc::interpolate(rho), p, "div(U,p)") + - p*fvc::div(phi/fvc::interpolate(rho)) + rad.Sh(thermo) ); From 80ebb46a82f1aa56eea996fe4681db87ff346239 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 1 Aug 2011 22:50:24 +0100 Subject: [PATCH 2/4] dlLibraryTable: updated warning messaging --- .../dlLibraryTable/dlLibraryTableTemplates.C | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTableTemplates.C b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTableTemplates.C index 13a9ae919f..abb2e36565 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTableTemplates.C +++ b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTableTemplates.C @@ -57,13 +57,23 @@ bool Foam::dlLibraryTable::open bool opened = dlLibraryTable::open(libName); allOpened = opened && allOpened; - if (opened && (!tablePtr || tablePtr->size() <= nEntries)) + if (!opened) { WarningIn ( "dlLibraryTable::open" - "(const dictionary& dict, const word& libsEntry, " - "const TablePtr tablePtr)" + "(const dictionary&, const word&, " + "const TablePtr&)" + ) << "Could not open library " << libName + << endl << endl; + } + else if (debug && (!tablePtr || tablePtr->size() <= nEntries)) + { + WarningIn + ( + "dlLibraryTable::open" + "(const dictionary&, const word&, " + "const TablePtr&)" ) << "library " << libName << " did not introduce any new entries" << endl << endl; From ed8f50127f1db16808279bb57a93c255d7a856ee Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 1 Aug 2011 22:50:45 +0100 Subject: [PATCH 3/4] Removed unused declarations --- .../spraySubModels/atomizationModel/LISA/LISA.C | 4 ---- src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.C | 3 --- .../linearAxialAngularSpring/linearAxialAngularSpring.C | 7 ++----- .../tabulatedAxialAngularSpring.C | 6 ++---- .../pyrolysisModels/reactingOneDim/reactingOneDim.C | 4 +--- 5 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C index bbce1c49d2..4801ac1a99 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C +++ b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C @@ -109,10 +109,6 @@ void Foam::LISA::atomizeParcel scalar rhoFuel = fuels.rho(1.0e+5, p.T(), p.X()); scalar nuFuel = muFuel/rhoFuel; - vector uDir = p.U()/mag(p.U()); - - scalar uGas = mag(vel & uDir); - // Might be the relative velocity between Liquid and Gas, but using the // absolute velocity of the parcel as suggested by the authors // scalar U = mag(p.Urel(vel)); diff --git a/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.C b/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.C index a705c37096..79f3713d3e 100644 --- a/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.C +++ b/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.C @@ -154,9 +154,6 @@ bool Foam::SHF::update scalar reLiquid = 0.5*Urmag*d/mu; scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL); - vector acceleration = Urel/tMom; - vector trajectory = U/mag(U); - scalar weGasCorr = weGas/(1.0 + weCorrCoeff_*ohnesorge); // droplet deformation characteristic time diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/linearAxialAngularSpring/linearAxialAngularSpring.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/linearAxialAngularSpring/linearAxialAngularSpring.C index fb168c8813..b462678e39 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/linearAxialAngularSpring/linearAxialAngularSpring.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/linearAxialAngularSpring/linearAxialAngularSpring.C @@ -85,7 +85,6 @@ Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::restrain vector refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 1, 0); vector oldDir = refQ_ & refDir; - vector newDir = motion.orientation() & refDir; if (mag(oldDir & axis_) > 0.95 || mag(newDir & axis_) > 0.95) @@ -93,10 +92,8 @@ Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::restrain // Directions getting close to the axis, change reference refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1); - - vector oldDir = refQ_ & refDir; - - vector newDir = motion.orientation() & refDir; + oldDir = refQ_ & refDir; + newDir = motion.orientation() & refDir; } // Removing any axis component from oldDir and newDir and normalising diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C index 50cdb1460b..b80b809cd7 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C @@ -95,10 +95,8 @@ Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::restrain // Directions getting close to the axis, change reference refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1); - - vector oldDir = refQ_ & refDir; - - vector newDir = motion.orientation() & refDir; + oldDir = refQ_ & refDir; + newDir = motion.orientation() & refDir; } // Removing any axis component from oldDir and newDir and normalising diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index 6b95d77d03..7f4fd76c73 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -457,7 +457,7 @@ scalar reactingOneDim::addMassSources(const label patchI, const label faceI) scalar reactingOneDim::solidRegionDiffNo() const { scalar DiNum = 0.0; - scalar meanDiNum = 0.0; + if (regionMesh().nInternalFaces() > 0) { surfaceScalarField KrhoCpbyDelta @@ -468,8 +468,6 @@ scalar reactingOneDim::solidRegionDiffNo() const ); DiNum = max(KrhoCpbyDelta.internalField())*time_.deltaTValue(); - - meanDiNum = average(KrhoCpbyDelta.internalField())*time().deltaTValue(); } return DiNum; From 884a6352325091cb801232fb7db40b01ad7838ea Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 1 Aug 2011 22:51:49 +0100 Subject: [PATCH 4/4] Added ; --- src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C index 40f83f39f8..2c7096d208 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C @@ -193,7 +193,7 @@ void Foam::fvMeshSubset::doCoupledPatches if (nUncoupled > 0) { Info<< "Uncoupled " << nUncoupled << " faces on coupled patches. " - << "(processorPolyPatch, cyclicPolyPatch)" << nl + << "(processorPolyPatch, cyclicPolyPatch)" << nl; } }