diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index 7cc76e0f8d..8c5ec52bed 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -51,199 +51,16 @@ PDRkEpsilon::PDRkEpsilon const volVectorField& U, const surfaceScalarField& phi, const basicThermo& thermophysicalModel, - const word& turbulenceModelName + const word& turbulenceModelName, + const word& modelName ) : - RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName), - - Cmu_ - ( - dimensioned::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - C1_ - ( - dimensioned::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.44 - ) - ), - C2_ - ( - dimensioned::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.92 - ) - ), - sigmak_ - ( - dimensioned::lookupOrAddToDict - ( - "sigmak", - coeffDict_, - 1.0 - ) - ), - sigmaEps_ - ( - dimensioned::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - Prt_ - ( - dimensioned::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - autoCreateMut("mut", mesh_) - ), - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ) -{ - bound(epsilon_, epsilonMin_); - - mut_ = Cmu_*rho_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} + kEpsilon(rho, U, phi, thermophysicalModel, turbulenceModelName, modelName) +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp PDRkEpsilon::R() const -{ - return tmp - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - (mut_/rho_)*dev(twoSymm(fvc::grad(U_))), - k_.boundaryField().types() - ) - ); -} - - -tmp PDRkEpsilon::devRhoReff() const -{ - return tmp - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -muEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp PDRkEpsilon::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) - ); -} - - -bool PDRkEpsilon::read() -{ - if (RASModel::read()) - { - Cmu_.readIfPresent(coeffDict_); - C1_.readIfPresent(coeffDict_); - C2_.readIfPresent(coeffDict_); - sigmak_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - void PDRkEpsilon::correct() { if (!turbulence_) @@ -272,7 +89,7 @@ void PDRkEpsilon::correct() volScalarField G("RASModel::G", mut_*(tgradU() && dev(twoSymm(tgradU())))); tgradU.clear(); - // Update espsilon and G at the wall + // Update epsilon and G at the wall epsilon_.boundaryField().updateCoeffs(); // Add the blockage generation term so that it is included consistently @@ -321,6 +138,7 @@ void PDRkEpsilon::correct() solve(kEqn); bound(k_, kMin_); + // Re-calculate viscosity mut_ = rho_*Cmu_*sqr(k_)/epsilon_; mut_.correctBoundaryConditions(); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index c5e641012c..4f3d63db67 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,12 +25,13 @@ Class Foam::compressible::RASModels::PDRkEpsilon Description - Standard k-epsilon turbulence model with additional source terms + Standard k-epsilon turbulence model for compressible flow + with additional source terms corresponding to PDR basic drag model (\link basic.H \endlink) The default model coefficients correspond to the following: @verbatim - kEpsilonCoeffs + PDRkEpsilonCoeffs { Cmu 0.09; C1 1.44; @@ -53,7 +54,6 @@ Description SourceFiles PDRkEpsilon.C - PDRkEpsilonCorrect.C \*---------------------------------------------------------------------------*/ @@ -61,6 +61,7 @@ SourceFiles #define compressiblePDRkEpsilon_H #include "RASModel.H" +#include "kEpsilon.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -77,26 +78,8 @@ namespace RASModels class PDRkEpsilon : - public RASModel + public kEpsilon { - // Private data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar sigmak_; - dimensionedScalar sigmaEps_; - dimensionedScalar Prt_; - - // Fields - - volScalarField k_; - volScalarField epsilon_; - volScalarField mut_; - volScalarField alphat_; - public: @@ -113,7 +96,8 @@ public: const volVectorField& U, const surfaceScalarField& phi, const basicThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName + const word& turbulenceModelName = turbulenceModel::typeName, + const word& modelName = typeName ); @@ -124,62 +108,9 @@ public: // Member Functions - //- Return the effective diffusivity for k - tmp DkEff() const - { - return tmp - ( - new volScalarField("DkEff", mut_/sigmak_ + mu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp DepsilonEff() const - { - return tmp - ( - new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) - ); - } - - //- Return the turbulence viscosity - virtual tmp mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp alphat() const - { - return alphat_; - } - - //- Return the turbulence kinetic energy - virtual tmp k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp divDevRhoReff(volVectorField& U) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - //- Read turbulenceProperties dictionary - virtual bool read(); }; diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H index 3bdeea0452..2084d4dbda 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H @@ -13,7 +13,6 @@ ); TEqn.relax(); - TEqn.solve(); rhok = 1.0 - beta*(T - TRef); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H index 292f44b4bd..9a53619af5 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H @@ -8,15 +8,18 @@ UEqn().relax(); - solve - ( - UEqn() - == - fvc::reconstruct + if (momentumPredictor) + { + solve ( + UEqn() + == + fvc::reconstruct ( - fvc::interpolate(rhok)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() + ( + - ghf*fvc::snGrad(rhok) + - fvc::snGrad(p_rgh) + )*mesh.magSf() ) - ) - ); + ); + } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C index f10d18c512..1740760a82 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) #include "readSIMPLEControls.H" - p.storePrevIter(); + p_rgh.storePrevIter(); // Pressure-velocity SIMPLE corrector { diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H index 0e668e9d98..b84f0735b0 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H @@ -14,12 +14,12 @@ mesh ); - Info<< "Reading field p\n" << endl; - volScalarField p + Info<< "Reading field p_rgh\n" << endl; + volScalarField p_rgh ( IOobject ( - "p", + "p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -42,9 +42,9 @@ mesh ); -# include "createPhi.H" + #include "createPhi.H" -# include "readTransportProperties.H" + #include "readTransportProperties.H" Info<< "Creating turbulence model\n" << endl; autoPtr turbulence @@ -52,20 +52,6 @@ incompressible::RASModel::New(U, phi, laminarTransport) ); - Info<< "Calculating field beta*(g.h)\n" << endl; - surfaceScalarField betaghf("betagh", beta*(g & mesh.Cf())); - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell - ( - p, - mesh.solutionDict().subDict("SIMPLE"), - pRefCell, - pRefValue - ); - - // Kinematic density for buoyancy force volScalarField rhok ( @@ -77,3 +63,47 @@ ), 1.0 - beta*(T - TRef) ); + + Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); + surfaceScalarField ghf("ghf", g & mesh.Cf()); + + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + p_rgh + rhok*gh + ); + + label p_rghRefCell = 0; + scalar p_rghRefValue = 0.0; + setRefCell + ( + p_rgh, + mesh.solutionDict().subDict("SIMPLE"), + p_rghRefCell, + p_rghRefValue + ); + + scalar pRefValue = 0.0; + + if (p_rgh.needReference()) + { + pRefValue = readScalar + ( + mesh.solutionDict().subDict("SIMPLE").lookup("pRefValue") + ); + + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, p_rghRefCell) + ); + } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H index 9b23330944..5664bb2154 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H @@ -6,45 +6,56 @@ UEqn.clear(); phi = fvc::interpolate(U) & mesh.Sf(); - adjustPhi(phi, U, p); + adjustPhi(phi, U, p_rgh); - surfaceScalarField buoyancyPhi = - rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); - phi += buoyancyPhi; + surfaceScalarField buoyancyPhi = rUAf*ghf*fvc::snGrad(rhok)*mesh.magSf(); + phi -= buoyancyPhi; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pEqn + fvScalarMatrix p_rghEqn ( - fvm::laplacian(rUAf, p) == fvc::div(phi) + fvm::laplacian(rUAf, p_rgh) == fvc::div(phi) ); - pEqn.setReference(pRefCell, pRefValue); + p_rghEqn.setReference(p_rghRefCell, p_rghRefValue); // retain the residual from the first iteration if (nonOrth == 0) { - pEqn.solve(); + p_rghEqn.solve(); } else { - pEqn.solve(); + p_rghEqn.solve(); } if (nonOrth == nNonOrthCorr) { // Calculate the conservative fluxes - phi -= pEqn.flux(); + phi -= p_rghEqn.flux(); // Explicitly relax pressure for momentum corrector - p.relax(); + p_rgh.relax(); // Correct the momentum source with the pressure gradient flux // calculated from the relaxed pressure - U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rUAf); + U -= rUA*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rUAf); U.correctBoundaryConditions(); } } #include "continuityErrs.H" + + p = p_rgh + rhok*gh; + + if (p_rgh.needReference()) + { + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, p_rghRefCell) + ); + } } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H index 5609883607..5fbfb3f764 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H @@ -8,13 +8,18 @@ UEqn().relax(); - solve - ( - UEqn() - == - fvc::reconstruct + if (momentumPredictor) + { + solve ( - fvc::interpolate(rho)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ) - ); + UEqn() + == + fvc::reconstruct + ( + ( + - ghf*fvc::snGrad(rho) + - fvc::snGrad(p_rgh) + )*mesh.magSf() + ) + ); + } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index dd33d3ec07..c3e9dc8a85 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -55,14 +55,17 @@ int main(int argc, char *argv[]) #include "readSIMPLEControls.H" - p.storePrevIter(); + p_rgh.storePrevIter(); rho.storePrevIter(); // Pressure-velocity SIMPLE corrector { #include "UEqn.H" #include "hEqn.H" + for (int i=0; i<3; i++) + { #include "pEqn.H" + } } turbulence->correct(); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index b304ace104..cf23150332 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -23,6 +23,19 @@ volScalarField& h = thermo.h(); const volScalarField& psi = thermo.psi(); + Info<< "Reading field p_rgh\n" << endl; + volScalarField p_rgh + ( + IOobject + ( + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); Info<< "Reading field U\n" << endl; volVectorField U @@ -53,17 +66,40 @@ ) ); - thermo.correct(); + Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); + surfaceScalarField ghf("ghf", g & mesh.Cf()); - label pRefCell = 0; - scalar pRefValue = 0.0; + p = p_rgh + rho*gh; + thermo.correct(); + rho = thermo.rho(); + p_rgh = p - rho*gh; + + label p_rghRefCell = 0; + scalar p_rghRefValue = 0.0; setRefCell ( - p, + p_rgh, mesh.solutionDict().subDict("SIMPLE"), - pRefCell, - pRefValue + p_rghRefCell, + p_rghRefValue ); + scalar pRefValue = 0.0; + + if (p_rgh.needReference()) + { + pRefValue = readScalar + ( + mesh.solutionDict().subDict("SIMPLE").lookup("pRefValue") + ); + + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, p_rghRefCell) + ); + } dimensionedScalar initialMass = fvc::domainIntegrate(rho); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H index b91a17ee7c..6e607f89e8 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H @@ -10,7 +10,6 @@ ); hEqn.relax(); - hEqn.solve(); thermo.correct(); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index de368a646e..3088b42c69 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -5,50 +5,52 @@ surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA)); U = rUA*UEqn().H(); - UEqn.clear(); + //UEqn.clear(); phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); - bool closedVolume = adjustPhi(phi, U, p); + bool closedVolume = adjustPhi(phi, U, p_rgh); - surfaceScalarField buoyancyPhi = - rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); - phi += buoyancyPhi; + surfaceScalarField buoyancyPhi = rhorUAf*ghf*fvc::snGrad(rho)*mesh.magSf(); + phi -= buoyancyPhi; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pEqn + fvScalarMatrix p_rghEqn ( - fvm::laplacian(rhorUAf, p) == fvc::div(phi) + fvm::laplacian(rhorUAf, p_rgh) == fvc::div(phi) ); - pEqn.setReference(pRefCell, pRefValue); - pEqn.solve(); + p_rghEqn.setReference(p_rghRefCell, p_rghRefValue); + p_rghEqn.solve(); if (nonOrth == nNonOrthCorr) { - // For closed-volume cases adjust the pressure and density levels - // to obey overall mass continuity - if (closedVolume) - { - p += (initialMass - fvc::domainIntegrate(psi*p)) - /fvc::domainIntegrate(psi); - } - // Calculate the conservative fluxes - phi -= pEqn.flux(); + phi -= p_rghEqn.flux(); // Explicitly relax pressure for momentum corrector - p.relax(); + p_rgh.relax(); // Correct the momentum source with the pressure gradient flux // calculated from the relaxed pressure - U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rhorUAf); + U -= rUA*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorUAf); U.correctBoundaryConditions(); } } #include "continuityErrs.H" + p = p_rgh + rho*gh; + + // For closed-volume cases adjust the pressure and density levels + // to obey overall mass continuity + if (closedVolume) + { + p += (initialMass - fvc::domainIntegrate(psi*p)) + /fvc::domainIntegrate(psi); + p_rgh == p - rho*gh; + } + rho = thermo.rho(); rho.relax(); Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options index 0e21fc2d64..d7a537fc10 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -1,4 +1,4 @@ -EXE_INC = \ +EXE_INC = -ggdb3 \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index 537f9263d8..b70c3fd2b5 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Application - compressibleLesInterFoam + compressibleInterFoam Description Solver for 2 compressible, isothermal immiscible fluids using a VOF diff --git a/applications/solvers/multiphase/interMixingFoam/alphaEqns.H b/applications/solvers/multiphase/interMixingFoam/alphaEqns.H index d302ff5147..00295354d4 100644 --- a/applications/solvers/multiphase/interMixingFoam/alphaEqns.H +++ b/applications/solvers/multiphase/interMixingFoam/alphaEqns.H @@ -75,8 +75,8 @@ alpha1, phiAlpha1BD, phiAlpha1, - zero(), - zero(), + zeroField(), + zeroField(), 1, 0, 3 @@ -112,8 +112,8 @@ alpha2, phiAlpha2BD, phiAlpha2, - zero(), - zero(), + zeroField(), + zeroField(), 1, 0, 3 diff --git a/applications/test/DynamicList/DynamicListTest.C b/applications/test/DynamicList/DynamicListTest.C index 822ee3cacb..a4e3ae25ff 100644 --- a/applications/test/DynamicList/DynamicListTest.C +++ b/applications/test/DynamicList/DynamicListTest.C @@ -31,6 +31,41 @@ Description using namespace Foam; +template +void printInfo +( + const word& tag, + const UList& lst, + const bool showSize = false +) +{ + Info<< "<" << tag; + if (showSize) + { + Info<< " size=\"" << lst.size() << "\""; + } + Info<< ">" << lst << "" << endl; +} + + +template +void printInfo +( + const word& tag, + const DynamicList& lst, + const bool showSize = false +) +{ + Info<< "<" << tag; + if (showSize) + { + Info<< " size=\"" << lst.size() + << "\" capacity=\"" << lst.capacity() << "\""; + } + Info<< ">" << lst << "" << endl; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: @@ -104,10 +139,8 @@ int main(int argc, char *argv[]) List