From d0e99ff347ada3d1c5f8ccc8da0f8c9ac8a2360a Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 28 Jan 2009 15:11:43 +0000 Subject: [PATCH] Adding new buoyantBoussinesqSimpleFoam - incompressible, Boussinesq variant of buoyantSimpleFoam - requires new fixedFluxBoussinesqBuoyantPressure bc on pd at walls to balance the flux generated by the temperature gradient --- .../buoyantBoussinesqSimpleFoam/Make/files | 3 + .../buoyantBoussinesqSimpleFoam/Make/options | 12 ++ .../buoyantBoussinesqSimpleFoam/TEqn.H | 19 +++ .../buoyantBoussinesqSimpleFoam/UEqn.H | 20 +++ .../buoyantBoussinesqSimpleFoam.C | 105 ++++++++++++ .../convergenceCheck.H | 9 ++ .../createFields.H | 67 ++++++++ .../initConvergenceCheck.H | 7 + .../buoyantBoussinesqSimpleFoam/pdEqn.H | 41 +++++ .../readTransportProperties.H | 13 ++ .../writeAdditionalFields.H | 29 ++++ src/finiteVolume/Make/files | 1 + ...ssinesqBuoyantPressureFvPatchScalarField.C | 149 ++++++++++++++++++ ...ssinesqBuoyantPressureFvPatchScalarField.H | 148 +++++++++++++++++ 14 files changed, 623 insertions(+) create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/files create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/convergenceCheck.H create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/initConvergenceCheck.H create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pdEqn.H create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H create mode 100644 src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C create mode 100644 src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.H diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/files b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/files new file mode 100644 index 0000000000..677ada2ca2 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/files @@ -0,0 +1,3 @@ +buoyantBoussinesqSimpleFoam.C + +EXE = $(FOAM_APPBIN)/buoyantBoussinesqSimpleFoam diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options new file mode 100644 index 0000000000..a53061a93c --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options @@ -0,0 +1,12 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lincompressibleRASModels \ + -lincompressibleTransportModels diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H new file mode 100644 index 0000000000..faddea825b --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H @@ -0,0 +1,19 @@ +{ + volScalarField kappaEff + ( + "kappaEff", + turbulence->nu() + turbulence->nut()/Pr + ); + + fvScalarMatrix TEqn + ( + fvm::div(phi, T) + - fvm::Sp(fvc::div(phi), T) + - fvm::laplacian(kappaEff, T) + ); + + TEqn.relax(); + + eqnResidual = TEqn.solve().initialResidual(); + maxResidual = max(eqnResidual, maxResidual); +} diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H new file mode 100644 index 0000000000..4b6887fff0 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H @@ -0,0 +1,20 @@ + // Solve the Momentum equation + + tmp UEqn + ( + fvm::div(phi, U) + - fvm::Sp(fvc::div(phi), U) + + turbulence->divDevReff(U) + ); + + UEqn().relax(); + + eqnResidual = solve + ( + UEqn() + == + -fvc::grad(pd) + + beta*gh*fvc::grad(T) + ).initialResidual(); + + maxResidual = max(eqnResidual, maxResidual); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C new file mode 100644 index 0000000000..5e9deff764 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Application + buoyantBoussinesqSimpleFoam + +Description + Steady-state solver for buoyant, turbulent flow of incompressible fluids + + Uses the Boussinesq approximation: + \f[ + rho_{eff} = 1 - beta(T - T_{ref}) + \f] + + where: + \f$ rho_{eff} \f$ = the effective (driving) density + beta = thermal expansion coefficient [1/K] + T = temperature [K] + \f$ T_{ref} \f$ = reference temperature [K] + + Valid when: + \f[ + rho_{eff} << 1 + \f] + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "singlePhaseTransportModel.H" +#include "RASModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + +# include "setRootCase.H" +# include "createTime.H" +# include "createMesh.H" +# include "readEnvironmentalProperties.H" +# include "createFields.H" +# include "initContinuityErrs.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + for (runTime++; !runTime.end(); runTime++) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + +# include "readSIMPLEControls.H" +# include "initConvergenceCheck.H" + + pd.storePrevIter(); + + // Pressure-velocity SIMPLE corrector + { +# include "UEqn.H" +# include "TEqn.H" +# include "pdEqn.H" + } + + turbulence->correct(); + + if (runTime.write()) + { +# include "writeAdditionalFields.H" + } + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + +# include "convergenceCheck.H" + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/convergenceCheck.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/convergenceCheck.H new file mode 100644 index 0000000000..8958063193 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/convergenceCheck.H @@ -0,0 +1,9 @@ +// check convergence + +if (maxResidual < convergenceCriterion) +{ + Info<< "reached convergence criterion: " << convergenceCriterion << endl; + runTime.writeAndEnd(); + Info<< "latestTime = " << runTime.timeName() << endl; +} + diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H new file mode 100644 index 0000000000..03a5be6fd6 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H @@ -0,0 +1,67 @@ + Info<< "Reading thermophysical properties\n" << endl; + + Info<< "Reading field T\n" << endl; + volScalarField T + ( + IOobject + ( + "T", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + // kinematic pd + Info<< "Reading field pd\n" << endl; + volScalarField pd + ( + IOobject + ( + "pd", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + Info<< "Reading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + +# include "createPhi.H" + +# include "readTransportProperties.H" + + Info<< "Creating turbulence model\n" << endl; + autoPtr turbulence + ( + incompressible::RASModel::New(U, phi, laminarTransport) + ); + + Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); + + label pdRefCell = 0; + scalar pdRefValue = 0.0; + setRefCell + ( + pd, + mesh.solutionDict().subDict("SIMPLE"), + pdRefCell, + pdRefValue + ); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/initConvergenceCheck.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/initConvergenceCheck.H new file mode 100644 index 0000000000..b56197f22a --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/initConvergenceCheck.H @@ -0,0 +1,7 @@ +// initialize values for convergence checks + + scalar eqnResidual = 1, maxResidual = 0; + scalar convergenceCriterion = 0; + + simple.readIfPresent("convergence", convergenceCriterion); + diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pdEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pdEqn.H new file mode 100644 index 0000000000..edf3e26d11 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pdEqn.H @@ -0,0 +1,41 @@ +volScalarField rUA = 1.0/UEqn().A(); +U = rUA*UEqn().H(); +UEqn.clear(); + +phi = fvc::interpolate(U) & mesh.Sf(); +adjustPhi(phi, U, pd); +phi += fvc::interpolate(beta*gh*rUA)*fvc::snGrad(T)*mesh.magSf(); + +for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) +{ + fvScalarMatrix pdEqn + ( + fvm::laplacian(rUA, pd) == fvc::div(phi) + ); + + pdEqn.setReference(pdRefCell, pdRefValue); + + // retain the residual from the first iteration + if (nonOrth == 0) + { + eqnResidual = pdEqn.solve().initialResidual(); + maxResidual = max(eqnResidual, maxResidual); + } + else + { + pdEqn.solve(); + } + + if (nonOrth == nNonOrthCorr) + { + phi -= pdEqn.flux(); + } +} + +#include "continuityErrs.H" + +// Explicitly relax pressure for momentum corrector +pd.relax(); + +U -= rUA*(fvc::grad(pd) - beta*gh*fvc::grad(T)); +U.correctBoundaryConditions(); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H new file mode 100644 index 0000000000..eeaa44e155 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H @@ -0,0 +1,13 @@ + singlePhaseTransportModel laminarTransport(U, phi); + + // thermal expansion coefficient [1/K] + dimensionedScalar beta(laminarTransport.lookup("beta")); + + // reference temperature [K] + dimensionedScalar TRef(laminarTransport.lookup("TRef")); + + // reference kinematic pressure [m2/s2] + dimensionedScalar pRef(laminarTransport.lookup("pRef")); + + // Prandtl number + dimensionedScalar Pr(laminarTransport.lookup("Pr")); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H new file mode 100644 index 0000000000..f4b9caf780 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H @@ -0,0 +1,29 @@ +{ + volScalarField rhoEff + ( + IOobject + ( + "rhoEff", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + 1.0 - beta*(T - TRef) + ); + rhoEff.write(); + + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pd + rhoEff*gh + pRef + ); + p.write(); +} diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 199daec554..85471d1ce9 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -93,6 +93,7 @@ $(derivedFvPatchFields)/directMappedFixedValue/directMappedFixedValueFvPatchFiel $(derivedFvPatchFields)/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C $(derivedFvPatchFields)/fan/fanFvPatchFields.C $(derivedFvPatchFields)/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C +$(derivedFvPatchFields)/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C $(derivedFvPatchFields)/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C $(derivedFvPatchFields)/fixedInternalValueFvPatchField/fixedInternalValueFvPatchFields.C $(derivedFvPatchFields)/fixedNormalSlip/fixedNormalSlipFvPatchFields.C diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C new file mode 100644 index 0000000000..9a75eed168 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C @@ -0,0 +1,149 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.H" +#include "addToRunTimeSelectionTable.H" +#include "fvPatchFieldMapper.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +fixedFluxBoussinesqBuoyantPressureFvPatchScalarField:: +fixedFluxBoussinesqBuoyantPressureFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedGradientFvPatchScalarField(p, iF) +{} + + +fixedFluxBoussinesqBuoyantPressureFvPatchScalarField:: +fixedFluxBoussinesqBuoyantPressureFvPatchScalarField +( + const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedGradientFvPatchScalarField(ptf, p, iF, mapper) +{} + + +fixedFluxBoussinesqBuoyantPressureFvPatchScalarField:: +fixedFluxBoussinesqBuoyantPressureFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& +) +: + fixedGradientFvPatchScalarField(p, iF) +{ + fvPatchField::operator=(patchInternalField()); + gradient() = 0.0; +} + + +fixedFluxBoussinesqBuoyantPressureFvPatchScalarField:: +fixedFluxBoussinesqBuoyantPressureFvPatchScalarField +( + const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField& wbppsf +) +: + fixedGradientFvPatchScalarField(wbppsf) +{} + + +fixedFluxBoussinesqBuoyantPressureFvPatchScalarField:: +fixedFluxBoussinesqBuoyantPressureFvPatchScalarField +( + const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField& wbppsf, + const DimensionedField& iF +) +: + fixedGradientFvPatchScalarField(wbppsf, iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void fixedFluxBoussinesqBuoyantPressureFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + const dictionary& environmentalProperties + = db().lookupObject("environmentalProperties"); + + dimensionedVector g(environmentalProperties.lookup("g")); + + const dictionary& transportProperties + = db().lookupObject("transportProperties"); + + dimensionedScalar beta(transportProperties.lookup("beta")); + + const fvPatchField& T = + patch().lookupPatchField("T"); + + gradient() = beta.value()*T.snGrad()*(g.value() & patch().Cf()); + + fixedGradientFvPatchScalarField::updateCoeffs(); +} + + +void fixedFluxBoussinesqBuoyantPressureFvPatchScalarField::write +( + Ostream& os +) const +{ + fixedGradientFvPatchScalarField::write(os); + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField +( + fvPatchScalarField, + fixedFluxBoussinesqBuoyantPressureFvPatchScalarField +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.H new file mode 100644 index 0000000000..094f880560 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.H @@ -0,0 +1,148 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::fixedFluxBoussinesqBuoyantPressureFvPatchScalarField + +Description + Boundary condition on pressure for use with buoyant solvers employing the + Boussinesq approximation to balance the flux generated by the temperature + gradient. + +SourceFiles + fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedFluxBoussinesqBuoyantPressureFvPatchScalarFields_H +#define fixedFluxBoussinesqBuoyantPressureFvPatchScalarFields_H + +#include "fvPatchFields.H" +#include "fixedGradientFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class fixedFluxBoussinesqBuoyantPressureFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class fixedFluxBoussinesqBuoyantPressureFvPatchScalarField +: + public fixedGradientFvPatchScalarField +{ +public: + + //- Runtime type information + TypeName("fixedFluxBoussinesqBuoyantPressure"); + + + // Constructors + + //- Construct from patch and internal field + fixedFluxBoussinesqBuoyantPressureFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + fixedFluxBoussinesqBuoyantPressureFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // fixedFluxBoussinesqBuoyantPressureFvPatchScalarField onto a new + // patch + fixedFluxBoussinesqBuoyantPressureFvPatchScalarField + ( + const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + fixedFluxBoussinesqBuoyantPressureFvPatchScalarField + ( + const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new fixedFluxBoussinesqBuoyantPressureFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + fixedFluxBoussinesqBuoyantPressureFvPatchScalarField + ( + const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new fixedFluxBoussinesqBuoyantPressureFvPatchScalarField + ( + *this, + iF + ) + ); + } + + + // Member functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //