From da760d57aff70ed0b76005465546d8082c55296f Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 29 Jul 2014 15:17:50 +0100 Subject: [PATCH 1/3] sonicFoam family: updated --- .../solvers/compressible/sonicFoam/UEqn.H | 2 + .../solvers/compressible/sonicFoam/pEqn.H | 6 +- .../sonicFoam/sonicDyMFoam/Make/options | 16 +++-- .../sonicFoam/sonicDyMFoam/pEqn.H | 17 ++--- .../sonicFoam/sonicDyMFoam/sonicDyMFoam.C | 67 +++++++++++++++---- .../compressible/sonicFoam/sonicFoam.C | 8 ++- .../compressibleContinuityErrs.H | 3 - .../sonicLiquidFoam/sonicLiquidFoam.C | 6 +- 8 files changed, 87 insertions(+), 38 deletions(-) diff --git a/applications/solvers/compressible/sonicFoam/UEqn.H b/applications/solvers/compressible/sonicFoam/UEqn.H index c4065161..d091cd54 100644 --- a/applications/solvers/compressible/sonicFoam/UEqn.H +++ b/applications/solvers/compressible/sonicFoam/UEqn.H @@ -1,3 +1,5 @@ +// Solve the Momentum equation + fvVectorMatrix UEqn ( fvm::ddt(rho, U) diff --git a/applications/solvers/compressible/sonicFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/pEqn.H index 693f9d60..ea6481de 100644 --- a/applications/solvers/compressible/sonicFoam/pEqn.H +++ b/applications/solvers/compressible/sonicFoam/pEqn.H @@ -9,8 +9,8 @@ HbyA = rAU*UEqn.H(); surfaceScalarField phid ( "phid", - fvc::interpolate(psi)* - ( + fvc::interpolate(psi) + *( (mesh.Sf() & fvc::interpolate(HbyA)) + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho) ) @@ -30,8 +30,6 @@ while (pimple.correctNonOrthogonal()) fvOptions(psi, p, rho.name()) ); - fvOptions.constrain(pEqn); - pEqn.solve(); if (pimple.finalNonOrthogonalIter()) diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options index d374c750..761311a8 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options @@ -1,13 +1,16 @@ EXE_INC = \ -I.. \ + -I../../rhoPimpleFoam/rhoPimpleDyMFoam \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ - -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ EXE_LIBS = \ -lfluidThermophysicalModels \ @@ -15,8 +18,11 @@ EXE_LIBS = \ -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ + -lfiniteVolume \ -lmeshTools \ -lsampling \ -lfvOptions \ - -lfiniteVolume \ - -ldynamicMesh + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ + -ldynamicMesh \ + -lmeshTools diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H index 76e2a09a..b68ee693 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H @@ -11,17 +11,16 @@ surfaceScalarField phid "phid", fvc::interpolate(psi) *( - ( - (fvc::interpolate(HbyA) & mesh.Sf()) - + rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho) - ) + (mesh.Sf() & fvc::interpolate(HbyA)) + + rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho) ) ); fvc::makeRelative(phid, psi, U); fvOptions.makeRelative(fvc::interpolate(psi), phid); -for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) +// Non-orthogonal pressure corrector loop +while (pimple.correctNonOrthogonal()) { fvScalarMatrix pEqn ( @@ -32,13 +31,15 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) fvOptions(psi, p, rho.name()) ); - fvOptions.constrain(pEqn); - pEqn.solve(); - phi = pEqn.flux(); + if (pimple.finalNonOrthogonalIter()) + { + phi = pEqn.flux(); + } } +#include "rhoEqn.H" #include "compressibleContinuityErrs.H" U = HbyA - rAU*fvc::grad(p); diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C index 746f95d9..5a8e0b92 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C @@ -24,6 +24,9 @@ License Application sonicDyMFoam +Group + grpCompressibleSolvers grpMovingMeshSolvers + Description Transient solver for trans-sonic/supersonic, laminar or turbulent flow of a compressible gas with mesh motion.. @@ -31,9 +34,9 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "psiThermo.H" #include "turbulenceModel.H" -#include "motionSolver.H" #include "pimpleControl.H" #include "fvIOoptionList.H" @@ -43,30 +46,68 @@ int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" - #include "createMesh.H" - #include "createFields.H" - #include "createFvOptions.H" - #include "createRhoUf.H" + #include "createDynamicFvMesh.H" #include "initContinuityErrs.H" pimpleControl pimple(mesh); + #include "readControls.H" + #include "createFields.H" + #include "createFvOptions.H" + #include "createPcorrTypes.H" + #include "createRhoUf.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; - autoPtr motionPtr = motionSolver::New(mesh); - - while (runTime.loop()) + while (runTime.run()) { - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "readPISOControls.H" + #include "readControls.H" #include "compressibleCourantNo.H" - mesh.movePoints(motionPtr->newPoints()); + #include "setDeltaT.H" + + { + // Store divrhoU from the previous time-step/mesh for the correctPhi + volScalarField divrhoU + ( + "divrhoU", + fvc::div(fvc::absolute(phi, rho, U)) + ); + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + // Store momentum to set rhoUf for introduced faces. + volVectorField rhoU("rhoU", rho*U); + + // Do any mesh changes + mesh.update(); + + if (mesh.changing() && correctPhi) + { + // Calculate absolute flux from the mapped surface velocity + phi = mesh.Sf() & rhoUf; + + #include "correctPhi.H" + + // Make the fluxes relative to the mesh-motion + fvc::makeRelative(phi, rho, U); + } + } + + if (mesh.changing() && checkMeshCourantNo) + { + #include "meshCourantNo.H" + } #include "rhoEqn.H" + Info<< "rhoEqn max/min : " << max(rho).value() + << " " << min(rho).value() << endl; // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) @@ -86,8 +127,6 @@ int main(int argc, char *argv[]) } } - rho = thermo.rho(); - runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/compressible/sonicFoam/sonicFoam.C b/applications/solvers/compressible/sonicFoam/sonicFoam.C index 04aab1d0..875e7afa 100644 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicFoam.C @@ -24,6 +24,9 @@ License Application sonicFoam +Group + grpCompressibleSolvers + Description Transient solver for trans-sonic/supersonic, laminar or turbulent flow of a compressible gas. @@ -43,12 +46,13 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" + + pimpleControl pimple(mesh); + #include "createFields.H" #include "createFvOptions.H" #include "initContinuityErrs.H" - pimpleControl pimple(mesh); - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/compressibleContinuityErrs.H b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/compressibleContinuityErrs.H index e264660c..9851dfb7 100644 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/compressibleContinuityErrs.H +++ b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/compressibleContinuityErrs.H @@ -1,6 +1,3 @@ -{ - solve(fvm::ddt(rho) + fvc::div(phi)); -} { scalar sumLocalContErr = (sum(mag(rho - rho0 - psi*(p - p0)))/sum(rho)).value(); diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C index acfb4d3b..e0d18008 100644 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C @@ -40,13 +40,14 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" + + pimpleControl pimple(mesh); + #include "readThermodynamicProperties.H" #include "readTransportProperties.H" #include "createFields.H" #include "initContinuityErrs.H" - pimpleControl pimple(mesh); - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -108,6 +109,7 @@ int main(int argc, char *argv[]) phi += pEqn.flux(); + solve(fvm::ddt(rho) + fvc::div(phi)); #include "compressibleContinuityErrs.H" U -= rAU*fvc::grad(p); From 07bcafe956c4418993d4508d26579fe10554c89b Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 30 Jul 2014 12:37:01 +0100 Subject: [PATCH 2/3] fvPatches: Updated handling for delta() on coupled patches --- .../fvPatches/basic/coupled/coupledFvPatch.C | 24 ++++++------- .../constraint/cyclic/cyclicFvPatch.C | 12 +++---- .../constraint/cyclicACMI/cyclicACMIFvPatch.C | 13 +++---- .../constraint/cyclicAMI/cyclicAMIFvPatch.C | 15 ++++---- .../constraint/processor/processorFvPatch.C | 35 ++++++++----------- .../fvMesh/fvPatches/fvPatch/fvPatch.C | 3 +- 6 files changed, 48 insertions(+), 54 deletions(-) diff --git a/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.C index cfefade9..bc434e21 100644 --- a/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/basic/coupled/coupledFvPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,32 +21,30 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . -Description - coupledFvPatch is an abstract base class for patches that couple regions - of the computational domain e.g. cyclic and processor-processor links. - \*---------------------------------------------------------------------------*/ #include "coupledFvPatch.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(coupledFvPatch, 0); + defineTypeNameAndDebug(coupledFvPatch, 0); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -coupledFvPatch::~coupledFvPatch() +Foam::coupledFvPatch::~coupledFvPatch() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::coupledFvPatch::delta() const +{ + return Cf() - Cn(); +} -} // End namespace Foam // ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C index d127cf3a..5b6ed731 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,13 +39,12 @@ namespace Foam // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -// Make patch weighting factors void Foam::cyclicFvPatch::makeWeights(scalarField& w) const { const cyclicFvPatch& nbrPatch = neighbFvPatch(); - const scalarField deltas(nf() & fvPatch::delta()); - const scalarField nbrDeltas(nbrPatch.nf() & nbrPatch.fvPatch::delta()); + const scalarField deltas(nf()&coupledFvPatch::delta()); + const scalarField nbrDeltas(nbrPatch.nf()&nbrPatch.coupledFvPatch::delta()); forAll(deltas, facei) { @@ -57,11 +56,10 @@ void Foam::cyclicFvPatch::makeWeights(scalarField& w) const } -// Return delta (P to N) vectors across coupled patch Foam::tmp Foam::cyclicFvPatch::delta() const { - const vectorField patchD(fvPatch::delta()); - const vectorField nbrPatchD(neighbFvPatch().fvPatch::delta()); + const vectorField patchD(coupledFvPatch::delta()); + const vectorField nbrPatchD(neighbFvPatch().coupledFvPatch::delta()); tmp tpdv(new vectorField(patchD.size())); vectorField& pdv = tpdv(); diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C index fe674cf9..b87157e3 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.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) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,6 +36,7 @@ namespace Foam addToRunTimeSelectionTable(fvPatch, cyclicACMIFvPatch, polyPatch); } + // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // void Foam::cyclicACMIFvPatch::updateAreas() const @@ -82,13 +83,13 @@ void Foam::cyclicACMIFvPatch::makeWeights(scalarField& w) const const cyclicACMIFvPatch& nbrPatch = neighbFvPatch(); const fvPatch& nbrPatchNonOverlap = nonOverlapPatch(); - const scalarField deltas(nf() & fvPatch::delta()); + const scalarField deltas(nf() & coupledFvPatch::delta()); const scalarField nbrDeltas ( interpolate ( - nbrPatch.nf() & nbrPatch.fvPatch::delta(), + nbrPatch.nf() & nbrPatch.coupledFvPatch::delta(), nbrPatchNonOverlap.nf() & nbrPatchNonOverlap.delta() ) ); @@ -124,13 +125,13 @@ Foam::tmp Foam::cyclicACMIFvPatch::delta() const const cyclicACMIFvPatch& nbrPatchCoupled = neighbFvPatch(); const fvPatch& nbrPatchNonOverlap = nonOverlapPatch(); - const vectorField patchD(fvPatch::delta()); + const vectorField patchD(coupledFvPatch::delta()); vectorField nbrPatchD ( interpolate ( - nbrPatchCoupled.fvPatch::delta(), + nbrPatchCoupled.coupledFvPatch::delta(), nbrPatchNonOverlap.delta() ) ); @@ -175,7 +176,7 @@ Foam::tmp Foam::cyclicACMIFvPatch::delta() const } else { - return fvPatch::delta(); + return coupledFvPatch::delta(); } } diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C index 584e9d77..5d893513 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C @@ -51,7 +51,7 @@ void Foam::cyclicAMIFvPatch::makeWeights(scalarField& w) const { const cyclicAMIFvPatch& nbrPatch = neighbFvPatch(); - const scalarField deltas(nf() & fvPatch::delta()); + const scalarField deltas(nf() & coupledFvPatch::delta()); tmp tnbrDeltas; if (applyLowWeightCorrection()) @@ -59,13 +59,14 @@ void Foam::cyclicAMIFvPatch::makeWeights(scalarField& w) const tnbrDeltas = interpolate ( - nbrPatch.nf() & nbrPatch.fvPatch::delta(), + nbrPatch.nf() & nbrPatch.coupledFvPatch::delta(), scalarField(this->size(), 1.0) ); } else { - tnbrDeltas = interpolate(nbrPatch.nf() & nbrPatch.fvPatch::delta()); + tnbrDeltas = + interpolate(nbrPatch.nf() & nbrPatch.coupledFvPatch::delta()); } const scalarField& nbrDeltas = tnbrDeltas(); @@ -92,7 +93,7 @@ Foam::tmp Foam::cyclicAMIFvPatch::delta() const if (coupled()) { - const vectorField patchD(fvPatch::delta()); + const vectorField patchD(coupledFvPatch::delta()); tmp tnbrPatchD; if (applyLowWeightCorrection()) @@ -100,13 +101,13 @@ Foam::tmp Foam::cyclicAMIFvPatch::delta() const tnbrPatchD = interpolate ( - nbrPatch.fvPatch::delta(), + nbrPatch.coupledFvPatch::delta(), vectorField(this->size(), vector::zero) ); } else { - tnbrPatchD = interpolate(nbrPatch.fvPatch::delta()); + tnbrPatchD = interpolate(nbrPatch.coupledFvPatch::delta()); } const vectorField& nbrPatchD = tnbrPatchD(); @@ -140,7 +141,7 @@ Foam::tmp Foam::cyclicAMIFvPatch::delta() const } else { - return fvPatch::delta(); + return coupledFvPatch::delta(); } } diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.C index 9a2c1568..66f0b756 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/processor/processorFvPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,20 +27,18 @@ License #include "addToRunTimeSelectionTable.H" #include "transformField.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(processorFvPatch, 0); -addToRunTimeSelectionTable(fvPatch, processorFvPatch, polyPatch); + defineTypeNameAndDebug(processorFvPatch, 0); + addToRunTimeSelectionTable(fvPatch, processorFvPatch, polyPatch); +} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -void processorFvPatch::makeWeights(scalarField& w) const +void Foam::processorFvPatch::makeWeights(scalarField& w) const { if (Pstream::parRun()) { @@ -56,7 +54,8 @@ void processorFvPatch::makeWeights(scalarField& w) const - procPolyPatch_.neighbFaceCellCentres()) ); - w = neighbFaceCentresCn/((nf()&fvPatch::delta()) + neighbFaceCentresCn); + w = neighbFaceCentresCn + /((nf()&coupledFvPatch::delta()) + neighbFaceCentresCn); } else { @@ -65,7 +64,7 @@ void processorFvPatch::makeWeights(scalarField& w) const } -tmp processorFvPatch::delta() const +Foam::tmp Foam::processorFvPatch::delta() const { if (Pstream::parRun()) { @@ -73,7 +72,7 @@ tmp processorFvPatch::delta() const if (parallel()) { return - fvPatch::delta() + coupledFvPatch::delta() - ( procPolyPatch_.neighbFaceCentres() - procPolyPatch_.neighbFaceCellCentres() @@ -82,7 +81,7 @@ tmp processorFvPatch::delta() const else { return - fvPatch::delta() + coupledFvPatch::delta() - transform ( forwardT(), @@ -95,12 +94,12 @@ tmp processorFvPatch::delta() const } else { - return fvPatch::delta(); + return coupledFvPatch::delta(); } } -tmp processorFvPatch::interfaceInternalField +Foam::tmp Foam::processorFvPatch::interfaceInternalField ( const labelUList& internalData ) const @@ -109,7 +108,7 @@ tmp processorFvPatch::interfaceInternalField } -void processorFvPatch::initInternalFieldTransfer +void Foam::processorFvPatch::initInternalFieldTransfer ( const Pstream::commsTypes commsType, const labelUList& iF @@ -119,7 +118,7 @@ void processorFvPatch::initInternalFieldTransfer } -tmp processorFvPatch::internalFieldTransfer +Foam::tmp Foam::processorFvPatch::internalFieldTransfer ( const Pstream::commsTypes commsType, const labelUList& @@ -129,8 +128,4 @@ tmp processorFvPatch::internalFieldTransfer } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C index e7dd4120..d7f1bcd3 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,6 +40,7 @@ namespace Foam addToRunTimeSelectionTable(fvPatch, fvPatch, polyPatch); } + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::fvPatch::fvPatch(const polyPatch& p, const fvBoundaryMesh& bm) From 929c23fc19fbd6e81d15affe775bf38f876024fd Mon Sep 17 00:00:00 2001 From: william Date: Wed, 30 Jul 2014 12:59:35 +0100 Subject: [PATCH 3/3] BUG: mantis #1362: wrong sign in turbulent dispersion models --- .../interfacialModels/turbulentDispersionModels/Gosman/Gosman.C | 2 +- .../constantTurbulentDispersionCoefficient.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C index b7374bc8..7f7cc565 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C @@ -83,7 +83,7 @@ Foam::turbulentDispersionModels::Gosman::F() const ); return - - 0.75 + 0.75 *drag.CdRe() *pair_.dispersed() *pair_.continuous().nu() diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C index 5def478d..ba202d84 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C @@ -74,7 +74,7 @@ Foam::turbulentDispersionModels::constantTurbulentDispersionCoefficient:: F() const { return - - Ctd_ + Ctd_ *pair_.dispersed() *pair_.continuous().rho() *pair_.continuous().turbulence().k()