diff --git a/Allwmake b/Allwmake index e9e7995414..e0dded16f0 100755 --- a/Allwmake +++ b/Allwmake @@ -37,7 +37,10 @@ src/Allwmake $targetType $* applications/Allwmake $targetType $* # Optionally build OpenFOAM Doxygen documentation -[ $genDoc -eq 1 ] && doc/Allwmake +if [ $genDoc -eq 1 ] +then + doc/Allwmake +fi # ----------------------------------------------------------------- end-of-file diff --git a/README.md b/README.md new file mode 100644 index 0000000000..fde9c6ac91 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# About OpenFOAM +OpenFOAM is a free, open source CFD software package developed primarily by [OpenCFD](http://www.openfoam.com) since 2004 and is currently distributed by [ESI-OpenCFD](http://www.openfoam.com) and the [OpenFOAM Foundation](http://openfoam.org). It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics. [More...](http://www.openfoam.com/documentation) + +OpenFOAM+ uses the OpenFOAM Foundation version as a common code base, with wider functionality and platform support. Its purpose is to accelerate the public availability of new features which are sponsored by OpenCFD's customers and contributed by the OpenFOAM community. + + +# Copyright +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 3 of the License, or (at your option) any later version. See the file COPYING in this directory or [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/), for a description of the GNU General Public License terms under which you can copy the files. + + +# OpenFOAM Trademark +OpenCFD Limited, owner of the OpenFOAM Trademark, has granted the use of the Trademark to the OpenFOAM Foundation. Violations of the Trademark are continuously monitored and will be duly prosecuted. Please [contact OpenCFD](http://www.openfoam.com/contact) if you have any questions on the use of the OpenFOAM trademark. + + +# Useful Links +- [Download and installation instructions](http://www.openfoam.com/releases) +- [Documentation](http://www.openfoam.com/documentation) +- [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php) +- [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php) +- [Contacting OpenCFD](http://www.openfoam.com/contact) + +Copyright 2016 OpenCFD Ltd diff --git a/README.org b/README.org deleted file mode 100644 index 5842a0ef04..0000000000 --- a/README.org +++ /dev/null @@ -1,30 +0,0 @@ -# -*- mode: org; -*- -# -#+TITLE: README for OpenFOAM-dev -#+AUTHOR: The OpenFOAM Foundation -#+DATE: 9th March 2015 -#+LINK: http://www.openfoam.org -#+OPTIONS: author:nil ^:{} -# Copyright (c) 2015 OpenFOAM Foundation. - -* About OpenFOAM - OpenFOAM is a free, open source computational fluid dynamics (CFD) software - package released by the OpenFOAM Foundation. It has a large user base across - most areas of engineering and science, from both commercial and academic - organisations. OpenFOAM has an extensive range of features to solve anything - from complex fluid flows involving chemical reactions, turbulence and heat - transfer, to solid dynamics and electromagnetics. - -* Copyright - 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 3 of the License, or (at your option) any later - version. See the file =COPYING= in this directory or - [[http://www.gnu.org/licenses/]], for a description of the GNU General Public - License terms under which you can copy the files. - -* [[http://www.OpenFOAM.org/git.php][Download and installation instructions]] -* [[http://www.OpenFOAM.org/docs][Documentation]] -* [[http://OpenFOAM.github.io/Documentation-dev/html][Source code documentation]] -* [[http://www.OpenFOAM.org/bugs][Reporting bugs in OpenFOAM]] -* [[http://www.openfoam.org/contact][Contacting the OpenFOAM Foundation]] diff --git a/applications/solvers/DNS/DNSSolversDoc.H b/applications/solvers/DNS/DNSSolversDoc.H new file mode 100644 index 0000000000..307be76cc5 --- /dev/null +++ b/applications/solvers/DNS/DNSSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpDNSSolvers Direct Numerical Simulation solvers +@{ + \ingroup grpSolvers + This group contains Direct Numerical Simulation (DNS) solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/DNS/dnsFoam/dnsFoam.C b/applications/solvers/DNS/dnsFoam/dnsFoam.C index 38c5b7be8f..444874c82f 100644 --- a/applications/solvers/DNS/dnsFoam/dnsFoam.C +++ b/applications/solvers/DNS/dnsFoam/dnsFoam.C @@ -24,6 +24,9 @@ License Application dnsFoam +Group + grpDNSSolvers + Description Direct numerical simulation solver for boxes of isotropic turbulence diff --git a/applications/solvers/basic/basicSolversDoc.H b/applications/solvers/basic/basicSolversDoc.H new file mode 100644 index 0000000000..c8bb86db95 --- /dev/null +++ b/applications/solvers/basic/basicSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpBasicSolvers Basic solvers +@{ + \ingroup grpSolvers + This group contains basic solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/basic/laplacianFoam/laplacianFoam.C b/applications/solvers/basic/laplacianFoam/laplacianFoam.C index 218d91ac44..846a4b00a0 100644 --- a/applications/solvers/basic/laplacianFoam/laplacianFoam.C +++ b/applications/solvers/basic/laplacianFoam/laplacianFoam.C @@ -24,8 +24,30 @@ License Application laplacianFoam +Group + grpBasicSolvers + Description - Solves a simple Laplace equation, e.g. for thermal diffusion in a solid. + Laplace equation solver for a scalar quantity. + + \heading Solver details + The solver is applicable to, e.g. for thermal diffusion in a solid. The + equation is given by: + + \f[ + \ddt{T} = \div \left( D_T \grad T \right) + \f] + + Where: + \vartable + T | Scalar field which is solved for, e.g. temperature + D_T | Diffusion coefficient + \endvartable + + \heading Required fields + \plaintable + T | Scalar field which is solved for, e.g. temperature + \endplaintable \*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/basic/potentialFoam/Make/options b/applications/solvers/basic/potentialFoam/Make/options index 159afb0f46..b4ad3d8bdf 100644 --- a/applications/solvers/basic/potentialFoam/Make/options +++ b/applications/solvers/basic/potentialFoam/Make/options @@ -1,11 +1,9 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ - -lfvOptions \ -lsampling diff --git a/applications/solvers/basic/potentialFoam/createControls.H b/applications/solvers/basic/potentialFoam/createControls.H deleted file mode 100644 index 7015cae02e..0000000000 --- a/applications/solvers/basic/potentialFoam/createControls.H +++ /dev/null @@ -1,9 +0,0 @@ -const dictionary& potentialFlow -( - mesh.solutionDict().subDict("potentialFlow") -); - -const int nNonOrthCorr -( - potentialFlow.lookupOrDefault("nNonOrthogonalCorrectors", 0) -); diff --git a/applications/solvers/basic/potentialFoam/createFields.H b/applications/solvers/basic/potentialFoam/createFields.H index ce912510ec..36c4dcc08a 100644 --- a/applications/solvers/basic/potentialFoam/createFields.H +++ b/applications/solvers/basic/potentialFoam/createFields.H @@ -12,6 +12,7 @@ volVectorField U mesh ); +// Initialise the velocity internal field to zero U = dimensionedVector("0", U.dimensions(), vector::zero); surfaceScalarField phi @@ -34,7 +35,9 @@ if (args.optionFound("initialiseUBCs")) } -// Default name for the pressure field +// Construct a pressure field +// If it is available read it otherwise construct from the velocity BCs +// converting fixed-value BCs to zero-gradient and vice versa. word pName("p"); // Update name of the pressure field from the command-line option @@ -55,6 +58,9 @@ forAll(U.boundaryField(), patchi) } } +// Note that registerObject is false for the pressure field. The pressure +// field in this solver doesn't have a physical value during the solution. +// It shouldn't be looked up and used by sub models or boundary conditions. Info<< "Constructing pressure field " << pName << nl << endl; volScalarField p ( @@ -64,13 +70,28 @@ volScalarField p runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ), mesh, dimensionedScalar(pName, sqr(dimVelocity), 0), pBCTypes ); +label pRefCell = 0; +scalar pRefValue = 0.0; +if (args.optionFound("writep")) +{ + setRefCell + ( + p, + potentialFlow.dict(), + pRefCell, + pRefValue + ); +} + + Info<< "Constructing velocity potential field Phi\n" << endl; volScalarField Phi ( diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C index 5c56133788..a13d288a21 100644 --- a/applications/solvers/basic/potentialFoam/potentialFoam.C +++ b/applications/solvers/basic/potentialFoam/potentialFoam.C @@ -24,19 +24,69 @@ License Application potentialFoam -Description - Potential flow solver which solves for the velocity potential - from which the flux-field is obtained and velocity field by reconstructing - the flux. +Group + grpBasicSolvers - This application is particularly useful to generate starting fields for - Navier-Stokes codes. +Description + Potential flow solver. + + \heading Solver details + The potential flow solution is typically employed to generate initial fields + for full Navier-Stokes codes. The flow is evolved using the equation: + + \f[ + \laplacian \Phi = \div(\vec{U}) + \f] + + Where: + \vartable + \Phi | Velocity potential [m2/s] + \vec{U} | Velocity [m/s] + \endvartable + + The corresponding pressure field could be calculated from the divergence + of the Euler equation: + + \f[ + \laplacian p + \div(\div(\vec{U}\otimes\vec{U})) = 0 + \f] + + but this generates excessive pressure variation in regions of large + velocity gradient normal to the flow direction. A better option is to + calculate the pressure field corresponding to velocity variation along the + stream-lines: + + \f[ + \laplacian p + \div(\vec{F}\cdot\div(\vec{U}\otimes\vec{U})) = 0 + \f] + where the flow direction tensor \f$\vec{F}\f$ is obtained from + \f[ + \vec{F} = \hat{\vec{U}}\otimes\hat{\vec{U}} + \f] + + \heading Required fields + \plaintable + U | Velocity [m/s] + \endplaintable + + \heading Optional fields + \plaintable + p | Kinematic pressure [m2/s2] + Phi | Velocity potential [m2/s] + | Generated from p (if present) or U if not present + \endplaintable + + \heading Options + \plaintable + -writep | write the Euler pressure + -writePhi | Write the final velocity potential + -initialiseUBCs | Update the velocity boundaries before solving for Phi + \endplaintable \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "pisoControl.H" -#include "fvIOoptionList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,13 +108,13 @@ int main(int argc, char *argv[]) argList::addBoolOption ( "writePhi", - "Write the velocity potential field" + "Write the final velocity potential field" ); argList::addBoolOption ( "writep", - "Calculate and write the pressure field" + "Calculate and write the Euler pressure field" ); argList::addBoolOption @@ -81,7 +131,6 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "createMRF.H" - #include "createFvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -137,7 +186,7 @@ int main(int argc, char *argv[]) Phi.write(); } - // Calculate the pressure field + // Calculate the pressure field from the Euler equation if (args.optionFound("writep")) { Info<< nl << "Calculating approximate pressure field" << endl; diff --git a/applications/solvers/basic/scalarTransportFoam/Make/options b/applications/solvers/basic/scalarTransportFoam/Make/options index 51402dfc99..acbe7a6475 100644 --- a/applications/solvers/basic/scalarTransportFoam/Make/options +++ b/applications/solvers/basic/scalarTransportFoam/Make/options @@ -1,6 +1,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C index 2430732e6d..958de584c3 100644 --- a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C +++ b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,13 +24,37 @@ License Application scalarTransportFoam +Group + grpBasicSolvers + Description - Solves a transport equation for a passive scalar + Passive scalar transport equation solver. + + \heading Solver details + The equation is given by: + + \f[ + \ddt{T} + \div \left(\vec{U} T\right) - \div \left(D_T \grad T \right) + = S_{T} + \f] + + Where: + \vartable + T | Passive scalar + D_T | Diffusion coefficient + S_T | Source + \endvartable + + \heading Required fields + \plaintable + T | Passive scalar + U | Velocity [m/s] + \endplaintable \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "simpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,7 +82,7 @@ int main(int argc, char *argv[]) while (simple.correctNonOrthogonal()) { - solve + fvScalarMatrix TEqn ( fvm::ddt(T) + fvm::div(phi, T) @@ -66,6 +90,11 @@ int main(int argc, char *argv[]) == fvOptions(T) ); + + fvOptions.constrain(TEqn); + + TEqn.solve(); + } runTime.write(); diff --git a/applications/solvers/combustion/PDRFoam/EaEqn.H b/applications/solvers/combustion/PDRFoam/EaEqn.H index 1baaa7180f..8b844a8159 100644 --- a/applications/solvers/combustion/PDRFoam/EaEqn.H +++ b/applications/solvers/combustion/PDRFoam/EaEqn.H @@ -1,7 +1,7 @@ { volScalarField& hea = thermo.he(); - solve + fvScalarMatrix EaEqn ( betav*fvm::ddt(rho, hea) + mvConvection->fvmDiv(phi, hea) + betav*fvc::ddt(rho, K) + fvc::div(phi, K) @@ -16,7 +16,16 @@ : -betav*dpdt ) - fvm::laplacian(Db, hea) + + betav*fvOptions(rho, hea) ); + EaEqn.relax(); + + fvOptions.constrain(EaEqn); + + EaEqn.solve(); + + fvOptions.correct(hea); + thermo.correct(); } diff --git a/applications/solvers/combustion/PDRFoam/EauEqn.H b/applications/solvers/combustion/PDRFoam/EauEqn.H index f031d90732..91bb49b913 100644 --- a/applications/solvers/combustion/PDRFoam/EauEqn.H +++ b/applications/solvers/combustion/PDRFoam/EauEqn.H @@ -2,7 +2,7 @@ if (ign.ignited()) { volScalarField& heau = thermo.heu(); - solve + fvScalarMatrix heauEqn ( betav*fvm::ddt(rho, heau) + mvConvection->fvmDiv(phi, heau) + (betav*fvc::ddt(rho, K) + fvc::div(phi, K))*rho/thermo.rhou() @@ -23,5 +23,13 @@ if (ign.ignited()) // A possible solution would be to solve for ftu as well as ft. //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), heau) //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), heau) + == + betav*fvOptions(rho, heau) ); + + fvOptions.constrain(heauEqn); + + heauEqn.solve(); + + fvOptions.correct(heau); } diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options index 4768728619..405f5bcf62 100644 --- a/applications/solvers/combustion/PDRFoam/Make/options +++ b/applications/solvers/combustion/PDRFoam/Make/options @@ -16,7 +16,7 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/triSurface/lnInclude + -I$(LIB_SRC)/triSurface/lnInclude \ EXE_LIBS = \ -lengine \ @@ -29,4 +29,5 @@ EXE_LIBS = \ -lspecie \ -llaminarFlameSpeedModels \ -lfiniteVolume \ - -ldynamicFvMesh + -ldynamicFvMesh \ + -lfvOptions diff --git a/applications/solvers/combustion/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C index fa8518ba49..7e2ed0b63e 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoam.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoam.C @@ -24,6 +24,9 @@ License Application PDRFoam +Group + grpCombustionSolvers + Description Solver for compressible premixed/partially-premixed combustion with turbulence modelling. @@ -54,16 +57,17 @@ Description regions containing blockages which cannot be resolved by the mesh. The fields used by this solver are: - - betav: Volume porosity - Lobs: Average diameter of obstacle in cell (m) - Aw: Obstacle surface area per unit volume (1/m) - CR: Drag tensor (1/m) - CT: Turbulence generation parameter (1/m) - Nv: Number of obstacles in cell per unit volume (m^-2) - nsv: Tensor whose diagonal indicates the number to substract from - Nv to get the number of obstacles crossing the flow in each - direction. + \plaintable + betav | Volume porosity + Lobs | Average diameter of obstacle in cell (m) + Aw | Obstacle surface area per unit volume (1/m) + CR | Drag tensor (1/m) + CT | Turbulence generation parameter (1/m) + Nv | Number of obstacles in cell per unit volume (m^-2) + nsv | Tensor whose diagonal indicates the number to substract from + | Nv to get the number of obstacles crossing the flow in each + | direction. + \endplaintable \*---------------------------------------------------------------------------*/ @@ -77,6 +81,7 @@ Description #include "Switch.H" #include "bound.H" #include "pimpleControl.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -93,11 +98,13 @@ int main(int argc, char *argv[]) #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createMRF.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "createTimeControls.H" #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); scalar StCoNum = 0.0; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C index 057286f1e9..4e561052fd 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C @@ -87,6 +87,7 @@ int main(int argc, char *argv[]) #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); scalar StCoNum = 0.0; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H index e7bd21a628..7c06ab6e79 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H @@ -168,7 +168,7 @@ public: virtual void writeFields() const { - notImplemented("PDRDragModel::write()"); + NotImplemented; } }; diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C index 8a8ab924a3..3570aebd80 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,10 +45,8 @@ Foam::autoPtr Foam::PDRDragModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn - ( - "PDRDragModel::New" - ) << "Unknown PDRDragModel type " + FatalErrorInFunction + << "Unknown PDRDragModel type " << modelType << nl << nl << "Valid PDRDragModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() diff --git a/applications/solvers/combustion/PDRFoam/UEqn.H b/applications/solvers/combustion/PDRFoam/UEqn.H index 1d949d17b7..983e020cab 100644 --- a/applications/solvers/combustion/PDRFoam/UEqn.H +++ b/applications/solvers/combustion/PDRFoam/UEqn.H @@ -7,13 +7,17 @@ + turbulence->divDevRhoReff(U) == betav*rho*g + + betav*fvOptions(rho, U) ); + fvOptions.constrain(UEqn); + volSymmTensorField invA(inv(I*UEqn.A() + drag->Dcu())); if (pimple.momentumPredictor()) { U = invA & (UEqn.H() - betav*fvc::grad(p)); U.correctBoundaryConditions(); + fvOptions.correct(U); K = 0.5*magSqr(U); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C index bdedac7a33..82411751fb 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,15 +44,8 @@ Foam::autoPtr Foam::XiEqModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn - ( - "XiEqModel::New" - "(" - " const psiuReactionThermo& thermo," - " const compressible::RASModel& turbulence," - " const volScalarField& Su" - ")" - ) << "Unknown XiEqModel type " + FatalErrorInFunction + << "Unknown XiEqModel type " << modelType << nl << nl << "Valid XiEqModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C index d77cfd8da6..0d7f1afcfb 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,15 +44,8 @@ Foam::autoPtr Foam::XiGModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn - ( - "XiGModel::New" - "(" - " const psiuReactionThermo& thermo," - " const compressible::RASModel& turbulence," - " const volScalarField& Su" - ")" - ) << "Unknown XiGModel type " + FatalErrorInFunction + << "Unknown XiGModel type " << modelType << nl << nl << "Valid XiGModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C index 04f9b41cd1..a317eb50ec 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,10 +47,8 @@ Foam::autoPtr Foam::XiModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn - ( - "XiModel::New" - ) << "Unknown XiModel type " + FatalErrorInFunction + << "Unknown XiModel type " << modelType << nl << nl << "Valid XiModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H index 2ba6ae4514..2a02795313 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -116,7 +116,7 @@ public: //- Correct the flame-wrinking Xi virtual void correct() { - notImplemented("transport::correct()"); + NotImplemented; } //- Correct the flame-wrinking Xi using the given convection scheme diff --git a/applications/solvers/combustion/PDRFoam/bEqn.H b/applications/solvers/combustion/PDRFoam/bEqn.H index abec1938c3..8ad1161871 100644 --- a/applications/solvers/combustion/PDRFoam/bEqn.H +++ b/applications/solvers/combustion/PDRFoam/bEqn.H @@ -73,6 +73,8 @@ if (ign.ignited()) + fvm::div(phiSt, b) - fvm::Sp(fvc::div(phiSt), b) - fvm::laplacian(Db, b) + == + betav*fvOptions(rho, b) ); @@ -82,8 +84,14 @@ if (ign.ignited()) // Solve for b // ~~~~~~~~~~~ + bEqn.relax(); + + fvOptions.constrain(bEqn); + bEqn.solve(); + fvOptions.correct(b); + Info<< "min(b) = " << min(b).value() << endl; if (composition.contains("ft")) diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index fb958b3b52..95f42a03d6 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -49,7 +49,7 @@ mesh.setFluxRequired(p.name()); Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - compressible::RASModel::New + compressible::New ( rho, U, diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index 7ae51fd5d1..d4d7782287 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -172,7 +172,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef } else { - FatalErrorIn("laminarFlameSpeedModels::SCOPE::SuRef(scalar phi)") + FatalErrorInFunction << "phi = " << phi << " cannot be handled by SCOPE function with the " "given coefficients" @@ -210,7 +210,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::Ma } else { - FatalErrorIn("laminarFlameSpeedModels::SCOPE::Ma(scalar phi)") + FatalErrorInFunction << "phi = " << phi << " cannot be handled by SCOPE function with the " "given coefficients" diff --git a/applications/solvers/combustion/PDRFoam/pEqn.H b/applications/solvers/combustion/PDRFoam/pEqn.H index 714a3e84e8..499885875b 100644 --- a/applications/solvers/combustion/PDRFoam/pEqn.H +++ b/applications/solvers/combustion/PDRFoam/pEqn.H @@ -25,6 +25,8 @@ if (pimple.transonic()) betav*fvm::ddt(psi, p) + fvm::div(phid, p) - fvm::laplacian(rho*invA, p) + == + betav*fvOptions(psi, p, rho.name()) ); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -53,6 +55,8 @@ else betav*fvm::ddt(psi, p) + fvc::div(phiHbyA) - fvm::laplacian(rho*invA, p) + == + betav*fvOptions(psi, p, rho.name()) ); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); @@ -69,6 +73,7 @@ else U = HbyA - (invA & (betav*fvc::grad(p))); U.correctBoundaryConditions(); +fvOptions.correct(U); K = 0.5*magSqr(U); if (thermo.dpdt()) diff --git a/applications/solvers/combustion/XiFoam/Make/options b/applications/solvers/combustion/XiFoam/Make/options index c30b39fdee..f659b4dcbe 100644 --- a/applications/solvers/combustion/XiFoam/Make/options +++ b/applications/solvers/combustion/XiFoam/Make/options @@ -1,8 +1,4 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude\ -I$(LIB_SRC)/engine/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ @@ -10,13 +6,12 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude + -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ - -lfiniteVolume \ - -lfvOptions \ - -lsampling \ - -lmeshTools \ -lengine \ -lturbulenceModels \ -lcompressibleTurbulenceModels \ @@ -24,4 +19,8 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lreactionThermophysicalModels \ -lspecie \ - -llaminarFlameSpeedModels + -llaminarFlameSpeedModels \ + -lfiniteVolume \ + -lfvOptions \ + -lsampling \ + -lmeshTools diff --git a/applications/solvers/combustion/XiFoam/UEqn.H b/applications/solvers/combustion/XiFoam/UEqn.H index f493177d76..59e51b370b 100644 --- a/applications/solvers/combustion/XiFoam/UEqn.H +++ b/applications/solvers/combustion/XiFoam/UEqn.H @@ -6,8 +6,7 @@ + MRF.DDt(rho, U) + turbulence->divDevRhoReff(U) == - rho*g - + fvOptions(rho, U) + fvOptions(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/combustion/XiFoam/XiDyMFoam/XiDyMFoam.C b/applications/solvers/combustion/XiFoam/XiDyMFoam/XiDyMFoam.C index d4cb0666e2..0f6f2976f1 100644 --- a/applications/solvers/combustion/XiFoam/XiDyMFoam/XiDyMFoam.C +++ b/applications/solvers/combustion/XiFoam/XiDyMFoam/XiDyMFoam.C @@ -24,6 +24,9 @@ License Application XiFoam +Group + grpCombustionSolvers grpMovingMeshSolvers + Description Solver for compressible premixed/partially-premixed combustion with turbulence modelling. @@ -58,7 +61,7 @@ Description #include "Switch.H" #include "pimpleControl.H" #include "CorrectPhi.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index 6090f923ca..a336810139 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -24,6 +24,9 @@ License Application XiFoam +Group + grpCombustionSolvers + Description Solver for compressible premixed/partially-premixed combustion with turbulence modelling. @@ -56,7 +59,7 @@ Description #include "ignition.H" #include "Switch.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -70,7 +73,6 @@ int main(int argc, char *argv[]) pimpleControl pimple(mesh); #include "readCombustionProperties.H" - #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createMRF.H" #include "createFvOptions.H" @@ -79,6 +81,8 @@ int main(int argc, char *argv[]) #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/combustion/chemFoam/Make/options b/applications/solvers/combustion/chemFoam/Make/options index 8a3aee2784..176ec9fd9c 100644 --- a/applications/solvers/combustion/chemFoam/Make/options +++ b/applications/solvers/combustion/chemFoam/Make/options @@ -1,26 +1,14 @@ EXE_INC = \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude\ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ - -lturbulenceModels \ - -lcompressibleTurbulenceModels \ - -lreactionThermophysicalModels \ - -lcompressibleTransportModels \ - -lfluidThermophysicalModels \ -lchemistryModel \ - -lODE \ - -lthermophysicalFunctions \ - -lspecie \ -lfiniteVolume \ -lmeshTools diff --git a/applications/solvers/combustion/chemFoam/chemFoam.C b/applications/solvers/combustion/chemFoam/chemFoam.C index a345551933..60c915d9dd 100644 --- a/applications/solvers/combustion/chemFoam/chemFoam.C +++ b/applications/solvers/combustion/chemFoam/chemFoam.C @@ -24,10 +24,14 @@ License Application chemFoam +Group + grpCombustionSolvers + Description - Solver for chemistry problems - - designed for use on single cell cases to provide comparison against - other chemistry solvers + Solver for chemistry problems designed for use on single cell cases to + provide comparison against other chemistry solvers + + Note: - single cell mesh created on-the-fly - fields created on the fly from the initial conditions @@ -35,7 +39,6 @@ Description #include "fvCFD.H" #include "psiReactionThermo.H" -#include "turbulentFluidThermoModel.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" #include "OFstream.H" diff --git a/applications/solvers/combustion/chemFoam/createControls.H b/applications/solvers/combustion/chemFoam/createControls.H index 14dcf56a16..6aeb2fff15 100644 --- a/applications/solvers/combustion/chemFoam/createControls.H +++ b/applications/solvers/combustion/chemFoam/createControls.H @@ -1,8 +1,2 @@ -if (runTime.controlDict().lookupOrDefault("suppressSolverInfo", false)) -{ - lduMatrix::debug = 0; -} - Switch adjustTimeStep(runTime.controlDict().lookup("adjustTimeStep")); - scalar maxDeltaT(readScalar(runTime.controlDict().lookup("maxDeltaT"))); diff --git a/applications/solvers/combustion/chemFoam/createFields.H b/applications/solvers/combustion/chemFoam/createFields.H index 8855e4501a..ae5d54fc58 100644 --- a/applications/solvers/combustion/chemFoam/createFields.H +++ b/applications/solvers/combustion/chemFoam/createFields.H @@ -1,6 +1,6 @@ if (mesh.nCells() != 1) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Solver only applicable to single cell cases" << exit(FatalError); } @@ -86,20 +86,6 @@ #include "createPhi.H" - Info << "Creating turbulence model.\n" << endl; - autoPtr turbulence - ( - compressible::turbulenceModel::New - ( - rho, - U, - phi, - thermo - ) - ); - OFstream post(args.path()/"chemFoam.out"); post<< "# Time" << token::TAB << "Temperature [K]" << token::TAB << "Pressure [Pa]" << endl; - - diff --git a/applications/solvers/combustion/coldEngineFoam/Make/options b/applications/solvers/combustion/coldEngineFoam/Make/options index 0878858de7..6ef06f8991 100644 --- a/applications/solvers/combustion/coldEngineFoam/Make/options +++ b/applications/solvers/combustion/coldEngineFoam/Make/options @@ -12,7 +12,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lengine \ diff --git a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C index e85010239b..14e35856f3 100644 --- a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C +++ b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C @@ -22,7 +22,10 @@ License along with OpenFOAM. If not, see . Application - engineFoam + coldEngineFoam + +Group + grpCombustionSolvers grpMovingMeshSolvers Description Solver for cold-flow in internal combustion engines. @@ -35,7 +38,7 @@ Description #include "psiThermo.H" #include "turbulentFluidThermoModel.H" #include "OFstream.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -59,6 +62,8 @@ int main(int argc, char *argv[]) #include "setInitialDeltaT.H" #include "startSummary.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/combustion/combustionSolversDoc.H b/applications/solvers/combustion/combustionSolversDoc.H new file mode 100644 index 0000000000..bc68bdb7fe --- /dev/null +++ b/applications/solvers/combustion/combustionSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpCombustionSolvers Combustion solvers +@{ + \ingroup grpSolvers + This group contains combustion solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/combustion/engineFoam/Make/options b/applications/solvers/combustion/engineFoam/Make/options index ab0bbe9ffa..6fe414c1bb 100644 --- a/applications/solvers/combustion/engineFoam/Make/options +++ b/applications/solvers/combustion/engineFoam/Make/options @@ -1,7 +1,6 @@ EXE_INC = \ -I$(FOAM_SOLVERS)/combustion/XiFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/engine/lnInclude \ diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index 4602eac997..a13df4cea3 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -24,6 +24,9 @@ License Application engineFoam +Group + grpCombustionSolvers + Description Solver for internal combustion engines. @@ -59,7 +62,7 @@ Description #include "OFstream.H" #include "mathematicalConstants.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -83,6 +86,8 @@ int main(int argc, char *argv[]) #include "setInitialDeltaT.H" #include "startSummary.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options index fa336e9798..2d2d441e24 100644 --- a/applications/solvers/combustion/fireFoam/Make/options +++ b/applications/solvers/combustion/fireFoam/Make/options @@ -1,6 +1,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ -I${LIB_SRC}/sampling/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C index 31ace4dda8..4d8c59a297 100644 --- a/applications/solvers/combustion/fireFoam/fireFoam.C +++ b/applications/solvers/combustion/fireFoam/fireFoam.C @@ -24,8 +24,11 @@ License Application fireFoam +Group + grpCombustionSolvers + Description - Transient PIMPLE solver for Fires and turbulent diffusion flames with + Transient PIMPLE solver for fires and turbulent diffusion flames with reacting Lagrangian parcels, surface film and pyrolysis modelling. \*---------------------------------------------------------------------------*/ @@ -40,7 +43,7 @@ Description #include "solidChemistryModel.H" #include "psiCombustionModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "fixedFluxPressureFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -67,6 +70,8 @@ int main(int argc, char *argv[]) #include "setInitialDeltaT.H" #include "readPyrolysisTimeControls.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/combustion/reactingFoam/EEqn.H b/applications/solvers/combustion/reactingFoam/EEqn.H index bd47416425..9267c9a9be 100644 --- a/applications/solvers/combustion/reactingFoam/EEqn.H +++ b/applications/solvers/combustion/reactingFoam/EEqn.H @@ -17,8 +17,7 @@ ) - fvm::laplacian(turbulence->alphaEff(), he) == - rho*(U&g) - + reaction->Sh() + reaction->Sh() + fvOptions(rho, he) ); diff --git a/applications/solvers/combustion/reactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/Make/options index b6a03d74d8..6363f6d80d 100644 --- a/applications/solvers/combustion/reactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/Make/options @@ -1,6 +1,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/applications/solvers/combustion/reactingFoam/UEqn.H b/applications/solvers/combustion/reactingFoam/UEqn.H index f493177d76..907c9934e2 100644 --- a/applications/solvers/combustion/reactingFoam/UEqn.H +++ b/applications/solvers/combustion/reactingFoam/UEqn.H @@ -1,23 +1,24 @@ - MRF.correctBoundaryVelocity(U); +// Solve the Momentum equation - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) + fvm::div(phi, U) - + MRF.DDt(rho, U) - + turbulence->divDevRhoReff(U) - == - rho*g - + fvOptions(rho, U) - ); +MRF.correctBoundaryVelocity(U); - UEqn.relax(); +tmp UEqn +( + fvm::ddt(rho, U) + fvm::div(phi, U) + + MRF.DDt(rho, U) + + turbulence->divDevRhoReff(U) + == + fvOptions(rho, U) +); - fvOptions.constrain(UEqn); +UEqn().relax(); - if (pimple.momentumPredictor()) - { - solve(UEqn == -fvc::grad(p)); +fvOptions.constrain(UEqn()); - fvOptions.correct(U); - K = 0.5*magSqr(U); - } +if (pimple.momentumPredictor()) +{ + solve(UEqn() == -fvc::grad(p)); + + fvOptions.correct(U); + K = 0.5*magSqr(U); +} diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index 19c115a8f2..71c805c43b 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -45,6 +45,28 @@ const volScalarField& T = thermo.T(); #include "compressibleCreatePhi.H" +dimensionedScalar rhoMax +( + dimensionedScalar::lookupOrDefault + ( + "rhoMax", + pimple.dict(), + dimDensity, + GREAT + ) +); + +dimensionedScalar rhoMin +( + dimensionedScalar::lookupOrDefault + ( + "rhoMin", + pimple.dict(), + dimDensity, + 0 + ) +); + mesh.setFluxRequired(p.name()); Info << "Creating turbulence model.\n" << nl; diff --git a/applications/solvers/combustion/reactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/pEqn.H index cedab05eab..2f352db5da 100644 --- a/applications/solvers/combustion/reactingFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/pEqn.H @@ -1,10 +1,18 @@ rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); +rho.relax(); -volScalarField rAU(1.0/UEqn.A()); +volScalarField rAU(1.0/UEqn().A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); volVectorField HbyA("HbyA", U); -HbyA = rAU*UEqn.H(); +HbyA = rAU*UEqn().H(); + +if (pimple.nCorrPISO() <= 1) +{ + UEqn.clear(); +} if (pimple.transonic()) { @@ -26,7 +34,7 @@ if (pimple.transonic()) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(rhorAUf, p) == fvOptions(psi, p, rho.name()) ); @@ -58,7 +66,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phiHbyA) - - fvm::laplacian(rho*rAU, p) + - fvm::laplacian(rhorAUf, p) == fvOptions(psi, p, rho.name()) ); @@ -75,6 +83,17 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" +// Explicitly relax pressure for momentum corrector +p.relax(); + +// Recalculate density from the relaxed pressure +rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); +rho.relax(); +Info<< "rho max/min : " << max(rho).value() + << " " << min(rho).value() << endl; + U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); fvOptions.correct(U); diff --git a/applications/solvers/combustion/reactingFoam/pcEqn.H b/applications/solvers/combustion/reactingFoam/pcEqn.H new file mode 100644 index 0000000000..3d7fffc459 --- /dev/null +++ b/applications/solvers/combustion/reactingFoam/pcEqn.H @@ -0,0 +1,125 @@ +rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); +rho.relax(); + +volScalarField rAU(1.0/UEqn().A()); +volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1())); +volVectorField HbyA("HbyA", U); +HbyA = rAU*UEqn().H(); + +if (pimple.nCorrPISO() <= 1) +{ + UEqn.clear(); +} + +if (pimple.transonic()) +{ + surfaceScalarField phid + ( + "phid", + fvc::interpolate(psi) + *( + (fvc::interpolate(HbyA) & mesh.Sf()) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi) + /fvc::interpolate(rho) + ) + ); + + MRF.makeRelative(fvc::interpolate(psi), phid); + + surfaceScalarField phic + ( + "phic", + fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf() + ); + + HbyA -= (rAU - rAtU)*fvc::grad(p); + + volScalarField rhorAtU("rhorAtU", rho*rAtU); + + while (pimple.correctNonOrthogonal()) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvm::div(phid, p) + + fvc::div(phic) + - fvm::laplacian(rhorAtU, p) + == + fvOptions(psi, p, rho.name()) + ); + + pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); + + if (pimple.finalNonOrthogonalIter()) + { + phi == phic + pEqn.flux(); + } + } +} +else +{ + surfaceScalarField phiHbyA + ( + "phiHbyA", + ( + (fvc::interpolate(rho*HbyA) & mesh.Sf()) + + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi) + ) + ); + + MRF.makeRelative(fvc::interpolate(rho), phiHbyA); + + phiHbyA += fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf(); + HbyA -= (rAU - rAtU)*fvc::grad(p); + + volScalarField rhorAtU("rhorAtU", rho*rAtU); + + while (pimple.correctNonOrthogonal()) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvc::div(phiHbyA) + - fvm::laplacian(rhorAtU, p) + == + fvOptions(psi, p, rho.name()) + ); + + pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); + + if (pimple.finalNonOrthogonalIter()) + { + phi = phiHbyA + pEqn.flux(); + } + } +} + +#include "rhoEqn.H" +#include "compressibleContinuityErrs.H" + +// Explicitly relax pressure for momentum corrector +p.relax(); + +U = HbyA - rAtU*fvc::grad(p); +U.correctBoundaryConditions(); +fvOptions.correct(U); +K = 0.5*magSqr(U); + +if (thermo.dpdt()) +{ + dpdt = fvc::ddt(p); +} + +// Recalculate density from the relaxed pressure +rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); + +if (!pimple.transonic()) +{ + rho.relax(); +} + +Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; diff --git a/applications/solvers/combustion/reactingFoam/reactingFoam.C b/applications/solvers/combustion/reactingFoam/reactingFoam.C index 79deedb763..dab20b2ed6 100644 --- a/applications/solvers/combustion/reactingFoam/reactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/reactingFoam.C @@ -24,6 +24,9 @@ License Application reactingFoam +Group + grpCombustionSolvers + Description Solver for combustion with chemical reactions. @@ -34,7 +37,7 @@ Description #include "psiCombustionModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -51,11 +54,12 @@ int main(int argc, char *argv[]) #include "createTimeControls.H" #include "createRDeltaT.H" #include "initContinuityErrs.H" - #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createMRF.H" #include "createFvOptions.H" + turbulence->validate(); + if (!LTS) { #include "compressibleCourantNo.H" @@ -95,7 +99,14 @@ int main(int argc, char *argv[]) // --- Pressure corrector loop while (pimple.correct()) { - #include "pEqn.H" + if (pimple.consistent()) + { + #include "pcEqn.H" + } + else + { + #include "pEqn.H" + } } if (pimple.turbCorr()) diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options index c5ced108f0..e7b46c4e00 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options @@ -1,7 +1,6 @@ EXE_INC = \ -I$(FOAM_SOLVERS)/combustion/reactingFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C index e8645bb47c..63b7b8a61f 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C @@ -24,6 +24,9 @@ License Application rhoReactingBuoyantFoam +Group + grpCombustionSolvers + Description Solver for combustion with chemical reactions using density based thermodynamics package, using enahanced buoyancy treatment. @@ -35,7 +38,7 @@ Description #include "turbulentFluidThermoModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "fixedFluxPressureFvPatchScalarField.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -57,6 +60,8 @@ int main(int argc, char *argv[]) #include "createMRF.H" #include "createFvOptions.H" + turbulence->validate(); + if (!LTS) { #include "compressibleCourantNo.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options index c5ced108f0..e7b46c4e00 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options @@ -1,7 +1,6 @@ EXE_INC = \ -I$(FOAM_SOLVERS)/combustion/reactingFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H index 87ca80dbf6..c3b18e6bd7 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H @@ -5,11 +5,11 @@ // pressure solution - done in 2 parts. Part 1: thermo.rho() -= psi*p; - volScalarField rAU(1.0/UEqn.A()); + volScalarField rAU(1.0/UEqn().A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); volVectorField HbyA("HbyA", U); - HbyA = rAU*UEqn.H(); + HbyA = rAU*UEqn().H(); if (pimple.transonic()) { diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C index 6eb245028d..610bf3a136 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C @@ -24,6 +24,9 @@ License Application rhoReactingFoam +Group + grpCombustionSolvers + Description Solver for combustion with chemical reactions using density based thermodynamics package. @@ -35,7 +38,7 @@ Description #include "turbulentFluidThermoModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -52,11 +55,12 @@ int main(int argc, char *argv[]) #include "createTimeControls.H" #include "createRDeltaT.H" #include "initContinuityErrs.H" - #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createMRF.H" #include "createFvOptions.H" + turbulence->validate(); + if (!LTS) { #include "compressibleCourantNo.H" diff --git a/applications/solvers/combustion/reactingFoam/setRDeltaT.H b/applications/solvers/combustion/reactingFoam/setRDeltaT.H index a01f9bac3b..b84be5a66d 100644 --- a/applications/solvers/combustion/reactingFoam/setRDeltaT.H +++ b/applications/solvers/combustion/reactingFoam/setRDeltaT.H @@ -116,6 +116,9 @@ License ); } + // Update tho boundary values of the reciprocal time-step + rDeltaT.correctBoundaryConditions(); + Info<< " Overall = " << gMin(1/rDeltaT.internalField()) << ", " << gMax(1/rDeltaT.internalField()) << endl; diff --git a/applications/solvers/compressible/compressibleSolvers.H b/applications/solvers/compressible/compressibleSolvers.H new file mode 100644 index 0000000000..85ab71f517 --- /dev/null +++ b/applications/solvers/compressible/compressibleSolvers.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpCompressibleSolvers Compressible flow solvers +@{ + \ingroup grpSolvers + This group contains compressible flow solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C index 22f5555335..d9a4a4e7df 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C @@ -94,15 +94,8 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField || mag(accommodationCoeff_) > 2.0 ) { - FatalIOErrorIn + FatalIOErrorInFunction ( - "smoluchowskiJumpTFvPatchScalarField::" - "smoluchowskiJumpTFvPatchScalarField" - "(" - " const fvPatch&," - " const DimensionedField&," - " const dictionary&" - ")", dict ) << "unphysical accommodationCoeff specified" << "(0 < accommodationCoeff <= 1)" << endl diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index 6ec81dd4dc..4656fe7281 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,14 +96,8 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField || mag(accommodationCoeff_) > 2.0 ) { - FatalIOErrorIn + FatalIOErrorInFunction ( - "maxwellSlipUFvPatchScalarField::maxwellSlipUFvPatchScalarField" - "(" - "const fvPatch&, " - "const DimensionedField&, " - "const dictionary&" - ")", dict ) << "unphysical accommodationCoeff_ specified" << "(0 < accommodationCoeff_ <= 1)" << endl diff --git a/applications/solvers/compressible/rhoCentralFoam/Make/options b/applications/solvers/compressible/rhoCentralFoam/Make/options index 453c346040..24fc2d966e 100644 --- a/applications/solvers/compressible/rhoCentralFoam/Make/options +++ b/applications/solvers/compressible/rhoCentralFoam/Make/options @@ -11,6 +11,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lfvOptions \ -lcompressibleTransportModels \ -lfluidThermophysicalModels \ -lspecie \ diff --git a/applications/solvers/compressible/rhoCentralFoam/readFluxScheme.H b/applications/solvers/compressible/rhoCentralFoam/readFluxScheme.H index 13f8f02c9c..e8c28d65c2 100644 --- a/applications/solvers/compressible/rhoCentralFoam/readFluxScheme.H +++ b/applications/solvers/compressible/rhoCentralFoam/readFluxScheme.H @@ -7,10 +7,8 @@ if (mesh.schemesDict().readIfPresent("fluxScheme", fluxScheme)) } else { - FatalErrorIn - ( - "rhoCentralFoam::readFluxScheme" - ) << "fluxScheme: " << fluxScheme + FatalErrorInFunction + << "fluxScheme: " << fluxScheme << " is not a valid choice. " << "Options are: Tadmor, Kurganov" << abort(FatalError); diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options index fd02717d86..29b8a6faa4 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options @@ -13,6 +13,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lfvOptions \ -lcompressibleTransportModels \ -lfluidThermophysicalModels \ -lspecie \ diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index 38ffddc779..dea76502f1 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C @@ -24,6 +24,9 @@ License Application rhoCentralDyMFoam +Group + grpCompressibleSolvers grpMovingMeshSolvers + Description Density-based compressible flow solver based on central-upwind schemes of Kurganov and Tadmor with support for mesh-motion and topology changes @@ -49,6 +52,8 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "createTimeControls.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "readFluxScheme.H" diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index 4faed39f75..1b71f42b94 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -24,6 +24,9 @@ License Application rhoCentralFoam +Group + grpCompressibleSolvers + Description Density-based compressible flow solver based on central-upwind schemes of Kurganov and Tadmor @@ -51,6 +54,8 @@ int main(int argc, char *argv[]) #include "createTimeControls.H" #include "createRDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "readFluxScheme.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/Make/options index 2a9889aa1a..0bf2d5dee7 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/Make/options @@ -7,7 +7,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lcompressibleTransportModels \ diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options index cff9147b31..9d6c2d3850 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options @@ -8,7 +8,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C index bd30b60a90..667d78cd30 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C @@ -43,7 +43,7 @@ Description #include "bound.H" #include "pimpleControl.H" #include "CorrectPhi.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -65,6 +65,8 @@ int main(int argc, char *argv[]) #include "createRhoUf.H" #include "createControls.H" + turbulence->validate(); + if (!LTS) { #include "compressibleCourantNo.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 382d041fd9..0ff153263f 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -24,6 +24,9 @@ License Application rhoPimpleFoam +Group + grpCompressibleSolvers + Description Transient solver for laminar or turbulent flow of compressible fluids for HVAC and similar applications. @@ -38,7 +41,7 @@ Description #include "turbulentFluidThermoModel.H" #include "bound.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -59,6 +62,8 @@ int main(int argc, char *argv[]) #include "createMRF.H" #include "createFvOptions.H" + turbulence->validate(); + if (!LTS) { #include "compressibleCourantNo.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/Make/options index b30fe8bd00..aecfa919e7 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/Make/options @@ -7,7 +7,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lcompressibleTransportModels \ diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index fdf8a2a769..80f317cd85 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -71,7 +71,7 @@ dimensionedScalar rhoMin Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - compressible::RASModel::New + compressible::New ( rho, U, diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options index ee0ed0de42..0c899c3171 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options @@ -8,7 +8,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lcompressibleTransportModels \ diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H index 149049e63e..537eea2ea3 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H @@ -70,7 +70,7 @@ dimensionedScalar rhoMin Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - compressible::RASModel::New + compressible::New ( rho, U, diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C index a7482b3df1..bc9b2d67cd 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C @@ -24,6 +24,9 @@ License Application rhoPorousSimpleFoam +Group + grpCompressibleSolvers + Description Steady-state solver for turbulent flow of compressible fluids with RANS turbulence modelling, implicit or explicit porosity treatment @@ -34,7 +37,7 @@ Description #include "fvCFD.H" #include "rhoThermo.H" #include "turbulentFluidThermoModel.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "IOporosityModelList.H" #include "simpleControl.H" @@ -54,6 +57,8 @@ int main(int argc, char *argv[]) #include "createZones.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C index d554931e62..07a4ca7d0f 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C @@ -24,6 +24,9 @@ License Application rhoSimpleFoam +Group + grpCompressibleSolvers + Description Steady-state SIMPLE solver for laminar or turbulent RANS flow of compressible fluids. @@ -34,7 +37,7 @@ Description #include "psiThermo.H" #include "turbulentFluidThermoModel.H" #include "simpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,6 +54,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/compressible/sonicFoam/Make/options b/applications/solvers/compressible/sonicFoam/Make/options index 6e90739a0b..f66a8538ae 100644 --- a/applications/solvers/compressible/sonicFoam/Make/options +++ b/applications/solvers/compressible/sonicFoam/Make/options @@ -6,7 +6,6 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options index a638d4dc9c..c6a648d203 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options @@ -9,7 +9,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C index 8d913919d2..ac2614c2dd 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C @@ -39,7 +39,7 @@ Description #include "turbulentFluidThermoModel.H" #include "pimpleControl.H" #include "CorrectPhi.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -60,6 +60,8 @@ int main(int argc, char *argv[]) #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/compressible/sonicFoam/sonicFoam.C b/applications/solvers/compressible/sonicFoam/sonicFoam.C index 95a4b4cc9d..8abeef1614 100644 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicFoam.C @@ -37,7 +37,7 @@ Description #include "psiThermo.H" #include "turbulentFluidThermoModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,6 +54,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C index c60a331b2d..9fda461211 100644 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C @@ -21,6 +21,9 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . +Group + grpCompressibleSolvers + Application sonicLiquidFoam diff --git a/applications/solvers/discreteMethods/discreteMethodsSolversDoc.H b/applications/solvers/discreteMethods/discreteMethodsSolversDoc.H new file mode 100644 index 0000000000..06c67407aa --- /dev/null +++ b/applications/solvers/discreteMethods/discreteMethodsSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpDiscreteMethodsSolvers Discrete method solvers +@{ + \ingroup grpSolvers + This group contains discrete method solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C b/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C index a5e0562155..edf3691fb4 100644 --- a/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C +++ b/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C @@ -24,6 +24,9 @@ License Application dsmcFoam +Group + grpDiscreteMethodsSolvers + Description Direct simulation Monte Carlo (DSMC) solver for 3D, transient, multi- species flows diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C index 50c7f66085..fa2b04f563 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C +++ b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C @@ -24,6 +24,9 @@ License Application mdEquilibrationFoam +Group + grpDiscreteMethodsSolvers + Description Equilibrates and/or preconditions molecular dynamics systems diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C index 68f6530c95..f06436c603 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C +++ b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C @@ -24,6 +24,9 @@ License Application mdFoam +Group + grpDiscreteMethodsSolvers + Description Molecular dynamics solver for fluid dynamics diff --git a/applications/solvers/doc/solver.dox b/applications/solvers/doc/solver.dox new file mode 100644 index 0000000000..4c829de162 --- /dev/null +++ b/applications/solvers/doc/solver.dox @@ -0,0 +1,44 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +\page pageSolvers Solvers + +\section secSolvers Overview +The available solvers are grouped into the following categories: + - \ref grpBasicSolvers + - \ref grpCombustionSolvers + - \ref grpCompressibleSolvers + - \ref grpDiscreteMethodsSolvers + - \ref grpDNSSolvers + - \ref grpElectroMagneticsSolvers + - \ref grpFinancialSolvers + - \ref grpHeatTransferSolvers + - \ref grpIncompressibleSolvers + - \ref grpLagrangianSolvers + - \ref grpMultiphaseSolvers + - \ref grpStressAnalysisSolvers + + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/doc/solversDoc.H b/applications/solvers/doc/solversDoc.H new file mode 100644 index 0000000000..da58bc0ce3 --- /dev/null +++ b/applications/solvers/doc/solversDoc.H @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +\defgroup grpSolvers Solvers +@{ + This group contains solvers +@} + +\defgroup grpMovingMeshSolvers Moving mesh solvers +@{ + \ingroup grpSolvers + This group contains moving mesh solvers solvers +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/electromagnetics/electromagneticsSolversDoc.H b/applications/solvers/electromagnetics/electromagneticsSolversDoc.H new file mode 100644 index 0000000000..773733f5bb --- /dev/null +++ b/applications/solvers/electromagnetics/electromagneticsSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpElectroMagneticsSolvers Electro-magnetics solvers +@{ + \ingroup grpSolvers + This group contains electro-magnetics solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/electromagnetics/electrostaticFoam/electrostaticFoam.C b/applications/solvers/electromagnetics/electrostaticFoam/electrostaticFoam.C index 94cd1f0ca7..5c4a248df0 100644 --- a/applications/solvers/electromagnetics/electrostaticFoam/electrostaticFoam.C +++ b/applications/solvers/electromagnetics/electrostaticFoam/electrostaticFoam.C @@ -24,6 +24,9 @@ License Application electrostaticFoam +Group + grpElectroMagneticsSolvers + Description Solver for electrostatics. diff --git a/applications/solvers/electromagnetics/magneticFoam/createFields.H b/applications/solvers/electromagnetics/magneticFoam/createFields.H index 22d4008921..189ef5d105 100644 --- a/applications/solvers/electromagnetics/magneticFoam/createFields.H +++ b/applications/solvers/electromagnetics/magneticFoam/createFields.H @@ -58,7 +58,7 @@ if (magnetZonei == -1) { - FatalIOErrorIn(args.executable().c_str(), transportProperties) + FatalIOErrorInFunction(transportProperties) << "Cannot find faceZone for magnet " << magnets[i].name() << exit(FatalIOError); } diff --git a/applications/solvers/electromagnetics/magneticFoam/magneticFoam.C b/applications/solvers/electromagnetics/magneticFoam/magneticFoam.C index 1b7d4f4f94..6613d2f206 100644 --- a/applications/solvers/electromagnetics/magneticFoam/magneticFoam.C +++ b/applications/solvers/electromagnetics/magneticFoam/magneticFoam.C @@ -24,6 +24,9 @@ License Application magneticFoam +Group + grpElectroMagneticsSolvers + Description Solver for the magnetic field generated by permanent magnets. diff --git a/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C b/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C index c9cb0242bd..497e977e85 100644 --- a/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C +++ b/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C @@ -24,6 +24,9 @@ License Application mhdFoam +Group + grpElectroMagneticsSolvers + Description Solver for magnetohydrodynamics (MHD): incompressible, laminar flow of a conducting fluid under the influence of a magnetic field. diff --git a/applications/solvers/financial/financialFoam/financialFoam.C b/applications/solvers/financial/financialFoam/financialFoam.C index 16640d7ce7..2c912c7b93 100644 --- a/applications/solvers/financial/financialFoam/financialFoam.C +++ b/applications/solvers/financial/financialFoam/financialFoam.C @@ -24,6 +24,9 @@ License Application financialFoam +Group + grpFinancialSolvers + Description Solves the Black-Scholes equation to price commodities. diff --git a/applications/solvers/financial/financialSolversDoc.H b/applications/solvers/financial/financialSolversDoc.H new file mode 100644 index 0000000000..02197d5e37 --- /dev/null +++ b/applications/solvers/financial/financialSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpFinancialSolvers Financial solvers +@{ + \ingroup grpSolvers + This group contains financial solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options index 9a60cac433..c14a8799f6 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options @@ -7,7 +7,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C index e71cd3febe..bc348b840e 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C @@ -24,6 +24,9 @@ License Application buoyantBoussinesqPimpleFoam +Group + grpHeatTransferSolvers + Description Transient solver for buoyant, turbulent flow of incompressible fluids @@ -49,7 +52,7 @@ Description #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "radiationModel.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "pimpleControl.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -72,6 +75,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H index f98c472e11..b8d07b1f1a 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H @@ -49,7 +49,7 @@ volVectorField U Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); // Kinematic density for buoyancy force diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options index 48d83838ac..9046994122 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options @@ -3,15 +3,16 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ + -lradiationModels \ -lfiniteVolume \ -lsampling \ -lmeshTools \ diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H index c495e58285..fec770c974 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H @@ -9,7 +9,8 @@ fvm::div(phi, T) - fvm::laplacian(alphaEff, T) == - fvOptions(T) + radiation->ST(rhoCpRef, T) + + fvOptions(T) ); TEqn.relax(); @@ -18,6 +19,8 @@ TEqn.solve(); + radiation->correct(); + fvOptions.correct(T); rhok = 1.0 - beta*(T - TRef); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C index 6dff329d1f..8547f274fa 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C @@ -24,6 +24,9 @@ License Application buoyantBoussinesqSimpleFoam +Group + grpHeatTransferSolvers + Description Steady-state solver for buoyant, turbulent flow of incompressible fluids @@ -48,7 +51,8 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" -#include "fvIOoptionList.H" +#include "radiationModel.H" +#include "fvOptions.H" #include "simpleControl.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -63,10 +67,13 @@ int main(int argc, char *argv[]) simpleControl simple(mesh); #include "createFields.H" + #include "createIncompressibleRadiationModel.H" #include "createMRF.H" #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H index 17306f7d46..014bf8045c 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H @@ -49,7 +49,7 @@ volVectorField U Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); // Kinematic density for buoyancy force diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options index 7138a3dad0..934083f2bb 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options @@ -2,7 +2,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C index cd254643b0..5437e7f625 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -24,6 +24,9 @@ License Application buoyantPimpleFoam +Group + grpHeatTransferSolvers + Description Transient solver for buoyant, turbulent flow of compressible fluids for ventilation and heat-transfer. @@ -37,7 +40,7 @@ Description #include "rhoThermo.H" #include "turbulentFluidThermoModel.H" #include "radiationModel.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "pimpleControl.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -51,7 +54,6 @@ int main(int argc, char *argv[]) pimpleControl pimple(mesh); - #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createMRF.H" #include "createFvOptions.H" @@ -61,6 +63,8 @@ int main(int argc, char *argv[]) #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H index 977fb1542a..af2b8926aa 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H @@ -50,9 +50,11 @@ autoPtr turbulence ) ); -Info<< "Calculating field g.h\n" << endl; -volScalarField gh("gh", g & mesh.C()); -surfaceScalarField ghf("ghf", g & mesh.Cf()); + +#include "readGravitationalAcceleration.H" +#include "readhRef.H" +#include "gh.H" + Info<< "Reading field p_rgh\n" << endl; volScalarField p_rgh @@ -88,3 +90,27 @@ volScalarField dpdt Info<< "Creating field kinetic energy K\n" << endl; volScalarField K("K", 0.5*magSqr(U)); + +label pRefCell = 0; +scalar pRefValue = 0.0; + +if (p_rgh.needReference()) +{ + setRefCell + ( + p, + p_rgh, + pimple.dict(), + pRefCell, + pRefValue + ); + + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) + ); +} + +dimensionedScalar initialMass("initialMass", fvc::domainIntegrate(rho)); diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H index e2f99671a3..76b4925917 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -1,4 +1,9 @@ { + bool closedVolume = p_rgh.needReference(); + + dimensionedScalar compressibility = fvc::domainIntegrate(psi); + bool compressible = (compressibility.value() > SMALL); + rho = thermo.rho(); // Thermodynamic density needs to be updated by psi*d(p) after the @@ -36,19 +41,27 @@ )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) ); - fvScalarMatrix p_rghDDtEqn + tmp p_rghDDtEqn ( - fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) - + fvc::div(phiHbyA) - == - fvOptions(psi, p_rgh, rho.name()) + new fvScalarMatrix(p_rgh, dimMass/dimTime) ); + if (compressible) + { + p_rghDDtEqn = + ( + fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) + == + fvOptions(psi, p_rgh, rho.name()) + ); + } + while (pimple.correctNonOrthogonal()) { fvScalarMatrix p_rghEqn ( - p_rghDDtEqn + p_rghDDtEqn() + + fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh) ); @@ -81,6 +94,32 @@ dpdt = fvc::ddt(p); } - #include "rhoEqn.H" + if (compressible) + { + #include "rhoEqn.H" + } #include "compressibleContinuityErrs.H" + + if (closedVolume) + { + if (!compressible) + { + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) + ); + } + else + { + p += (initialMass - fvc::domainIntegrate(thermo.rho())) + /compressibility; + rho = thermo.rho(); + } + p_rgh = p - rho*gh; + } + + Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() + << endl; } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options index ac34158a6e..0d9433bac7 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options @@ -1,6 +1,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index 403fb6fecd..6aa339f56e 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -24,6 +24,9 @@ License Application buoyantSimpleFoam +Group + grpHeatTransferSolvers + Description Steady-state solver for buoyant, turbulent flow of compressible fluids, including radiation, for ventilation and heat-transfer. @@ -35,7 +38,7 @@ Description #include "turbulentFluidThermoModel.H" #include "radiationModel.H" #include "simpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "fixedFluxPressureFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,13 +51,14 @@ int main(int argc, char *argv[]) simpleControl simple(mesh); - #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createMRF.H" #include "createFvOptions.H" #include "createRadiationModel.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index 5b07f643b1..35c6c59560 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -37,9 +37,9 @@ volVectorField U #include "compressibleCreatePhi.H" Info<< "Creating turbulence model\n" << endl; -autoPtr turbulence +autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, @@ -49,9 +49,10 @@ autoPtr turbulence ); -Info<< "Calculating field g.h\n" << endl; -volScalarField gh("gh", g & mesh.C()); -surfaceScalarField ghf("ghf", g & mesh.Cf()); +#include "readGravitationalAcceleration.H" +#include "readhRef.H" +#include "gh.H" + Info<< "Reading field p_rgh\n" << endl; volScalarField p_rgh diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index 85157e8b2f..2d08a681ed 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -34,6 +34,7 @@ )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField()) ); + while (simple.correctNonOrthogonal()) { fvScalarMatrix p_rghEqn @@ -64,12 +65,27 @@ p = p_rgh + rho*gh; + dimensionedScalar compressibility = fvc::domainIntegrate(psi); + bool compressible = (compressibility.value() > SMALL); + // For closed-volume cases adjust the pressure level // to obey overall mass continuity if (closedVolume) { - p += (initialMass - fvc::domainIntegrate(psi*p)) - /fvc::domainIntegrate(psi); + if(!compressible) + { + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) + ); + } + else + { + p += (initialMass - fvc::domainIntegrate(psi*p)) + /fvc::domainIntegrate(psi); + } p_rgh = p - rho*gh; } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index a470461654..2b6f5e7e70 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -15,7 +15,6 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index 7fe33fab37..34fcad63b7 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -24,13 +24,17 @@ License Application chtMultiRegionFoam +Group + grpHeatTransferSolvers + Description Combination of heatConductionFoam and buoyantFoam for conjugate heat - transfer between solid regions and fluid regions. Both regions include - the fvOptions framework. + transfer between solid regions and fluid regions. - It handles secondary fluid or solid circuits which can be coupled - thermally with the main fluid region. i.e radiators, etc. + Note: + - Both regions support the fvOptions framework. + - It handles secondary fluid or solid circuits which can be coupled + thermally with the main fluid region. i.e radiators, etc. \*---------------------------------------------------------------------------*/ @@ -43,7 +47,7 @@ Description #include "solidRegionDiffNo.H" #include "solidThermo.H" #include "radiationModel.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "coordinateSystem.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options index 22155c7aa4..252ecae022 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options @@ -12,7 +12,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C index 6c07dcbdfc..263dae535e 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C @@ -24,6 +24,9 @@ License Application chtMultiRegionSimpleFoam +Group + grpHeatTransferSolvers + Description Steady-state version of chtMultiRegionFoam @@ -36,7 +39,7 @@ Description #include "regionProperties.H" #include "solidThermo.H" #include "radiationModel.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "coordinateSystem.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H index 1811878bd7..aabee1cd37 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H @@ -4,10 +4,11 @@ PtrList rhoFluid(fluidRegions.size()); PtrList UFluid(fluidRegions.size()); PtrList phiFluid(fluidRegions.size()); PtrList gFluid(fluidRegions.size()); -PtrList turbulence(fluidRegions.size()); -PtrList p_rghFluid(fluidRegions.size()); +PtrList hRefFluid(fluidRegions.size()); PtrList ghFluid(fluidRegions.size()); PtrList ghfFluid(fluidRegions.size()); +PtrList turbulence(fluidRegions.size()); +PtrList p_rghFluid(fluidRegions.size()); PtrList radiation(fluidRegions.size()); List initialMassFluid(fluidRegions.size()); @@ -19,7 +20,7 @@ PtrList rhoMax(fluidRegions.size()); PtrList rhoMin(fluidRegions.size()); PtrList MRFfluid(fluidRegions.size()); -PtrList fluidFvOptions(fluidRegions.size()); +PtrList fluidFvOptions(fluidRegions.size()); // Populate fluid field pointer lists forAll(fluidRegions, i) @@ -107,6 +108,54 @@ forAll(fluidRegions, i) ) ); + Info<< " Adding to hRefFluid\n" << endl; + hRefFluid.set + ( + i, + new uniformDimensionedScalarField + ( + IOobject + ( + "hRef", + runTime.constant(), + fluidRegions[i], + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ), + dimensionedScalar("hRef", dimLength, 0) + ) + ); + + dimensionedScalar ghRef + ( + mag(gFluid[i].value()) > SMALL + ? gFluid[i] + & (cmptMag(gFluid[i].value())/mag(gFluid[i].value()))*hRefFluid[i] + : dimensionedScalar("ghRef", gFluid[i].dimensions()*dimLength, 0) + ); + + Info<< " Adding to ghFluid\n" << endl; + ghFluid.set + ( + i, + new volScalarField + ( + "gh", + (gFluid[i] & fluidRegions[i].C()) - ghRef + ) + ); + + Info<< " Adding to ghfFluid\n" << endl; + ghfFluid.set + ( + i, + new surfaceScalarField + ( + "ghf", + (gFluid[i] & fluidRegions[i].Cf()) - ghRef + ) + ); + Info<< " Adding to turbulence\n" << endl; turbulence.set ( @@ -120,20 +169,6 @@ forAll(fluidRegions, i) ).ptr() ); - Info<< " Adding to ghFluid\n" << endl; - ghFluid.set - ( - i, - new volScalarField("gh", gFluid[i] & fluidRegions[i].C()) - ); - - Info<< " Adding to ghfFluid\n" << endl; - ghfFluid.set - ( - i, - new surfaceScalarField("ghf", gFluid[i] & fluidRegions[i].Cf()) - ); - p_rghFluid.set ( i, @@ -219,6 +254,8 @@ forAll(fluidRegions, i) fluidFvOptions.set ( i, - new fv::IOoptionList(fluidRegions[i]) + new fv::options(fluidRegions[i]) ); + + turbulence[i].validate(); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H index a008b0c1d4..6cde0ec06b 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H @@ -13,7 +13,7 @@ const volScalarField& psi = thermo.psi(); IOMRFZoneList& MRF = MRFfluid[i]; - fv::IOoptionList& fvOptions = fluidFvOptions[i]; + fv::options& fvOptions = fluidFvOptions[i]; const dimensionedScalar initialMass ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 2e66546483..be3ec79a2c 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -4,10 +4,11 @@ PtrList rhoFluid(fluidRegions.size()); PtrList UFluid(fluidRegions.size()); PtrList phiFluid(fluidRegions.size()); PtrList gFluid(fluidRegions.size()); -PtrList turbulence(fluidRegions.size()); -PtrList p_rghFluid(fluidRegions.size()); +PtrList hRefFluid(fluidRegions.size()); PtrList ghFluid(fluidRegions.size()); PtrList ghfFluid(fluidRegions.size()); +PtrList turbulence(fluidRegions.size()); +PtrList p_rghFluid(fluidRegions.size()); PtrList radiation(fluidRegions.size()); PtrList KFluid(fluidRegions.size()); PtrList dpdtFluid(fluidRegions.size()); @@ -16,7 +17,7 @@ List initialMassFluid(fluidRegions.size()); List frozenFlowFluid(fluidRegions.size(), false); PtrList MRFfluid(fluidRegions.size()); -PtrList fluidFvOptions(fluidRegions.size()); +PtrList fluidFvOptions(fluidRegions.size()); // Populate fluid field pointer lists forAll(fluidRegions, i) @@ -104,6 +105,54 @@ forAll(fluidRegions, i) ) ); + Info<< " Adding to hRefFluid\n" << endl; + hRefFluid.set + ( + i, + new uniformDimensionedScalarField + ( + IOobject + ( + "hRef", + runTime.constant(), + fluidRegions[i], + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ), + dimensionedScalar("hRef", dimLength, 0) + ) + ); + + dimensionedScalar ghRef + ( + mag(gFluid[i].value()) > SMALL + ? gFluid[i] + & (cmptMag(gFluid[i].value())/mag(gFluid[i].value()))*hRefFluid[i] + : dimensionedScalar("ghRef", gFluid[i].dimensions()*dimLength, 0) + ); + + Info<< " Adding to ghFluid\n" << endl; + ghFluid.set + ( + i, + new volScalarField + ( + "gh", + (gFluid[i] & fluidRegions[i].C()) - ghRef + ) + ); + + Info<< " Adding to ghfFluid\n" << endl; + ghfFluid.set + ( + i, + new surfaceScalarField + ( + "ghf", + (gFluid[i] & fluidRegions[i].Cf()) - ghRef + ) + ); + Info<< " Adding to turbulence\n" << endl; turbulence.set ( @@ -117,20 +166,6 @@ forAll(fluidRegions, i) ).ptr() ); - Info<< " Adding to ghFluid\n" << endl; - ghFluid.set - ( - i, - new volScalarField("gh", gFluid[i] & fluidRegions[i].C()) - ); - - Info<< " Adding to ghfFluid\n" << endl; - ghfFluid.set - ( - i, - new surfaceScalarField("ghf", gFluid[i] & fluidRegions[i].Cf()) - ); - p_rghFluid.set ( i, @@ -209,6 +244,8 @@ forAll(fluidRegions, i) fluidFvOptions.set ( i, - new fv::IOoptionList(fluidRegions[i]) + new fv::options(fluidRegions[i]) ); + + turbulence[i].validate(); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H index 002faddb59..cd42cc00fd 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H @@ -36,12 +36,21 @@ )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField()) ); + tmp p_rghDDtEqn + ( + new fvScalarMatrix(p_rgh, dimMass/dimTime) + ); + { - fvScalarMatrix p_rghDDtEqn - ( - fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) - + fvc::div(phiHbyA) - ); + if (compressible) + { + p_rghDDtEqn = + ( + fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) + == + fvOptions(psi, p_rgh, rho.name()) + ); + } // Thermodynamic density needs to be updated by psi*d(p) after the // pressure solution - done in 2 parts. Part 1: @@ -52,6 +61,7 @@ fvScalarMatrix p_rghEqn ( p_rghDDtEqn + + fvc::div(phiHbyA) - fvm::laplacian(rhorAUf, p_rgh) ); @@ -93,8 +103,11 @@ dpdt = fvc::ddt(p); } - // Solve continuity - #include "rhoEqn.H" + if (compressible) + { + // Solve continuity + #include "rhoEqn.H" + } // Update continuity errors #include "compressibleContinuityErrors.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H index e61f057316..8d3a291bef 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H @@ -23,7 +23,7 @@ radiation::radiationModel& rad = radiation[i]; IOMRFZoneList& MRF = MRFfluid[i]; - fv::IOoptionList& fvOptions = fluidFvOptions[i]; + fv::options& fvOptions = fluidFvOptions[i]; const dimensionedScalar initialMass ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H index ff372500dd..10e9aa08ab 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H @@ -2,7 +2,7 @@ PtrList coordinates(solidRegions.size()); PtrList thermos(solidRegions.size()); PtrList radiations(solidRegions.size()); - PtrList solidHeatSources(solidRegions.size()); + PtrList solidHeatSources(solidRegions.size()); PtrList betavSolid(solidRegions.size()); PtrList aniAlphas(solidRegions.size()); @@ -22,7 +22,7 @@ solidHeatSources.set ( i, - new fv::IOoptionList(solidRegions[i]) + new fv::options(solidRegions[i]) ); if (!thermos[i].isotropic()) diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H index ab168a2016..9eb71909c1 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H @@ -29,4 +29,4 @@ volScalarField& h = thermo.he(); const volScalarField& betav = betavSolid[i]; -fv::IOoptionList& fvOptions = solidHeatSources[i]; +fv::options& fvOptions = solidHeatSources[i]; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H old mode 100755 new mode 100644 diff --git a/applications/solvers/heatTransfer/heatTransferSolversDoc.H b/applications/solvers/heatTransfer/heatTransferSolversDoc.H new file mode 100644 index 0000000000..e85a79b97c --- /dev/null +++ b/applications/solvers/heatTransfer/heatTransferSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpHeatTransferSolvers Heat transfer solvers +@{ + \ingroup grpSolvers + This group contains heat transfer solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/heatTransfer/thermoFoam/Make/options b/applications/solvers/heatTransfer/thermoFoam/Make/options index 7138a3dad0..934083f2bb 100644 --- a/applications/solvers/heatTransfer/thermoFoam/Make/options +++ b/applications/solvers/heatTransfer/thermoFoam/Make/options @@ -2,7 +2,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ diff --git a/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H index 24c6bb8428..cfc3923256 100644 --- a/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H +++ b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H @@ -44,7 +44,7 @@ { autoPtr turbulence ( - compressible::RASModel::New + compressible::New ( rho, U, @@ -59,7 +59,7 @@ { autoPtr turbulence ( - compressible::LESModel::New + compressible::New ( rho, U, diff --git a/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C b/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C index a23ce288e3..a9f906e84c 100644 --- a/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C +++ b/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C @@ -24,6 +24,9 @@ License Application thermoFoam +Group + grpHeatTransferSolvers + Description Evolves the thermodynamics on a frozen flow field @@ -35,7 +38,7 @@ Description #include "turbulentFluidThermoModel.H" #include "LESModel.H" #include "radiationModel.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "simpleControl.H" #include "pimpleControl.H" diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options b/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options index d33d199f06..48a0b023a7 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options @@ -5,11 +5,12 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude + -I$(LIB_SRC)/meshTools/lnInclude \ EXE_LIBS = \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ - -lmeshTools + -lmeshTools \ + -lfvOptions diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C index f57f444121..74fcec0eb3 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C @@ -24,6 +24,9 @@ License Application ajointShapeOptimizationFoam +Group + grpIncompressibleSolvers + Description Steady-state solver for incompressible, turbulent flow of non-Newtonian fluids with optimisation of duct shape by applying "blockage" in regions @@ -49,6 +52,7 @@ Description #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "simpleControl.H" +#include "fvOptions.H" template void zeroCells @@ -76,9 +80,12 @@ int main(int argc, char *argv[]) simpleControl simple(mesh); #include "createFields.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "initAdjointContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -108,12 +115,18 @@ int main(int argc, char *argv[]) fvm::div(phi, U) + turbulence->divDevReff(U) + fvm::Sp(alpha, U) + == + fvOptions(U) ); UEqn().relax(); + fvOptions.constrain(UEqn()); + solve(UEqn() == -fvc::grad(p)); + fvOptions.correct(U); + volScalarField rAU(1.0/UEqn().A()); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn().H(); @@ -150,6 +163,7 @@ int main(int argc, char *argv[]) // Momentum corrector U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); + fvOptions.correct(U); } // Adjoint Pressure-velocity SIMPLE corrector @@ -173,12 +187,18 @@ int main(int argc, char *argv[]) - adjointTransposeConvection + turbulence->divDevReff(Ua) + fvm::Sp(alpha, Ua) + == + fvOptions(Ua) ); UaEqn().relax(); + fvOptions.constrain(UaEqn()); + solve(UaEqn() == -fvc::grad(pa)); + fvOptions.correct(Ua); + volScalarField rAUa(1.0/UaEqn().A()); volVectorField HbyAa("HbyAa", Ua); HbyAa = rAUa*UaEqn().H(); @@ -215,6 +235,7 @@ int main(int argc, char *argv[]) // Adjoint momentum corrector Ua = HbyAa - rAUa*fvc::grad(pa); Ua.correctBoundaryConditions(); + fvOptions.correct(Ua); } laminarTransport.correct(); diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H index fa27e4b38b..cb7da73687 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -82,7 +82,7 @@ singlePhaseTransportModel laminarTransport(U, phi); autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); diff --git a/applications/solvers/incompressible/boundaryFoam/Make/options b/applications/solvers/incompressible/boundaryFoam/Make/options index 770a9fae92..9af500124c 100644 --- a/applications/solvers/incompressible/boundaryFoam/Make/options +++ b/applications/solvers/incompressible/boundaryFoam/Make/options @@ -13,4 +13,5 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ + -lfvOptions \ -lsampling diff --git a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C index 4e35c5258f..62931e8654 100644 --- a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C +++ b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C @@ -24,9 +24,12 @@ License Application boundaryFoam +Group + grpIncompressibleSolvers + Description Steady-state solver for incompressible, 1D turbulent flow, typically to - generate boundary layer conditions at an inlet, for use in a simulation. + generate boundary layer conditions at an inlet. Boundary layer code to calculate the U, k and epsilon distributions. Used to create inlet boundary conditions for experimental comparisons @@ -38,6 +41,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" +#include "fvOptions.H" #include "wallFvPatch.H" #include "makeGraph.H" @@ -52,8 +56,11 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" + #include "createFvOptions.H" #include "interrogateWallPatches.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -67,13 +74,17 @@ int main(int argc, char *argv[]) fvVectorMatrix UEqn ( - divR == gradP + divR == gradP + fvOptions(U) ); UEqn.relax(); + fvOptions.constrain(UEqn); + UEqn.solve(); + fvOptions.correct(U); + // Correct driving force for a constant volume flow rate dimensionedVector UbarStar = flowMask & U.weightedAverage(mesh.V()); diff --git a/applications/solvers/incompressible/boundaryFoam/createFields.H b/applications/solvers/incompressible/boundaryFoam/createFields.H index 15faa59f82..5ecfebfcb4 100644 --- a/applications/solvers/incompressible/boundaryFoam/createFields.H +++ b/applications/solvers/incompressible/boundaryFoam/createFields.H @@ -33,7 +33,7 @@ singlePhaseTransportModel laminarTransport(U, phi); autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); dimensionedVector Ubar("Ubar", dimVelocity, laminarTransport); diff --git a/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H b/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H index 7fd01f0e9e..513ca54a42 100644 --- a/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H +++ b/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H @@ -36,7 +36,7 @@ forAll(patches, patchi) || mag(wallNormal & wallNormal2) < 0.99 ) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "wall faces are not parallel for patches " << patches[patchId].name() << " and " << currPatch.name() << nl @@ -45,7 +45,7 @@ forAll(patches, patchi) } else { - FatalErrorIn(args.executable()) << "number of wall faces > 2" + FatalErrorInFunction << nl << exit(FatalError); } } @@ -54,7 +54,7 @@ forAll(patches, patchi) if (nWallFaces == 0) { - FatalErrorIn(args.executable()) << "No wall patches identified" + FatalErrorInFunction << exit(FatalError); } else diff --git a/applications/solvers/incompressible/icoFoam/icoFoam.C b/applications/solvers/incompressible/icoFoam/icoFoam.C index 80e13faa8d..a7d0da4a8a 100644 --- a/applications/solvers/incompressible/icoFoam/icoFoam.C +++ b/applications/solvers/incompressible/icoFoam/icoFoam.C @@ -24,9 +24,40 @@ License Application icoFoam +Group + grpIncompressibleSolvers + Description Transient solver for incompressible, laminar flow of Newtonian fluids. + \heading Solver details + The solver uses the PISO algorithm to solve the continuity equation: + + \f[ + \div \vec{U} = 0 + \f] + + and momentum equation: + + \f[ + \ddt{\vec{U}} + + \div \left( \vec{U} \vec{U} \right) + - \div \left(\nu \grad \vec{U} \right) + = - \grad p + \f] + + Where: + \vartable + \vec{U} | Velocity + p | Pressure + \endvartable + + \heading Required fields + \plaintable + U | Velocity [m/s] + p | Kinematic pressure, p/rho [m2/s2] + \endplaintable + \*---------------------------------------------------------------------------*/ #include "fvCFD.H" diff --git a/applications/solvers/incompressible/incompressibleSolversDoc.H b/applications/solvers/incompressible/incompressibleSolversDoc.H new file mode 100644 index 0000000000..1ae50df034 --- /dev/null +++ b/applications/solvers/incompressible/incompressibleSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpIncompressibleSolvers Incompressible flow solvers +@{ + \ingroup grpSolvers + This group contains incompressible flow solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C b/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C index 9d3b567d3b..e1153a2772 100644 --- a/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C +++ b/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C @@ -24,6 +24,9 @@ License Application nonNewtonianIcoFoam +Group + grpIncompressibleSolvers + Description Transient solver for incompressible, laminar flow of non-Newtonian fluids. diff --git a/applications/solvers/incompressible/pimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/Make/options index 20feab872f..9af500124c 100644 --- a/applications/solvers/incompressible/pimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/Make/options @@ -5,7 +5,6 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options index 20feab872f..9af500124c 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options @@ -5,7 +5,6 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C index bfa86ea1d9..f31dace8fe 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C @@ -24,6 +24,9 @@ License Application SRFPimpleFoam +Group + grpIncompressibleSolvers + Description Large time-step transient solver for incompressible, flow in a single rotating frame using the PIMPLE (merged PISO-SIMPLE) algorithm. @@ -37,7 +40,7 @@ Description #include "turbulentTransportModel.H" #include "pimpleControl.H" #include "SRFModel.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,6 +57,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options index 90e43d56aa..41aeca934c 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options @@ -5,7 +5,6 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C index cb01c03d63..deb266dd3d 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C @@ -24,6 +24,9 @@ License Application pimpleDyMFoam.C +Group + grpIncompressibleSolvers grpMovingMeshSolvers + Description Transient solver for incompressible, flow of Newtonian fluids on a moving mesh using the PIMPLE (merged PISO-SIMPLE) algorithm. @@ -38,7 +41,7 @@ Description #include "turbulentTransportModel.H" #include "pimpleControl.H" #include "CorrectPhi.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "fixedFluxPressureFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -60,6 +63,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index 72c6178d72..5a56b2b0ef 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -24,21 +24,54 @@ License Application pimpleFoam +Group + grpIncompressibleSolvers + Description Large time-step transient solver for incompressible, flow using the PIMPLE (merged PISO-SIMPLE) algorithm. + \heading Solver details + The solver uses the PIMPLE (merged PISO-SIMPLE) algorithm to solve the + continuity equation: + + \f[ + \div \vec{U} = 0 + \f] + + and momentum equation: + + \f[ + \ddt{\vec{U}} + \div \left( \vec{U} \vec{U} \right) - \div \gvec{R} + = - \grad p + \vec{S}_U + \f] + + Where: + \vartable + \vec{U} | Velocity + p | Pressure + \vec{R} | Stress tensor + \vec{S}_U | Momentum source + \endvartable + Sub-models include: - turbulence modelling, i.e. laminar, RAS or LES - run-time selectable MRF and finite volume options, e.g. explicit porosity + \heading Required fields + \plaintable + U | Velocity [m/s] + p | Kinematic pressure, p/rho [m2/s2] + \ | As required by user selection + \endplaintable + \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "fixedFluxPressureFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,6 +90,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/incompressible/pisoFoam/Make/options b/applications/solvers/incompressible/pisoFoam/Make/options index 20feab872f..9af500124c 100644 --- a/applications/solvers/incompressible/pisoFoam/Make/options +++ b/applications/solvers/incompressible/pisoFoam/Make/options @@ -5,7 +5,6 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/incompressible/pisoFoam/pisoFoam.C b/applications/solvers/incompressible/pisoFoam/pisoFoam.C index 482b695cb9..24e99aba73 100644 --- a/applications/solvers/incompressible/pisoFoam/pisoFoam.C +++ b/applications/solvers/incompressible/pisoFoam/pisoFoam.C @@ -24,20 +24,51 @@ License Application pisoFoam +Group + grpIncompressibleSolvers + Description Transient solver for incompressible flow. + \heading Solver details + The solver uses the PISO algorithm to solve the continuity equation: + + \f[ + \div \vec{U} = 0 + \f] + + and momentum equation: + + \f[ + \ddt{\vec{U}} + \div \left( \vec{U} \vec{U} \right) - \div \gvec{R} + = - \grad p + \f] + + Where: + \vartable + \vec{U} | Velocity + p | Pressure + \vec{R} | Stress tensor + \endvartable + Sub-models include: - turbulence modelling, i.e. laminar, RAS or LES - run-time selectable MRF and finite volume options, e.g. explicit porosity + \heading Required fields + \plaintable + U | Velocity [m/s] + p | Kinematic pressure, p/rho [m2/s2] + \ | As required by user selection + \endplaintable + \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "pisoControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,6 +85,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C b/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C index 47ec8ac9f6..e7693a073e 100644 --- a/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C +++ b/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C @@ -24,6 +24,9 @@ License Application shallowWaterFoam +Group + grpIncompressibleSolvers + Description Transient solver for inviscid shallow-water equations with rotation. diff --git a/applications/solvers/incompressible/simpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/Make/options index bc0201f371..1d9ded80bf 100644 --- a/applications/solvers/incompressible/simpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/Make/options @@ -5,7 +5,6 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options index a888499d85..90df601079 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options @@ -6,7 +6,6 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C index 97617bd925..ea791c8868 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C @@ -24,6 +24,9 @@ License Application SRFSimpleFoam +Group + grpIncompressibleSolvers + Description Steady-state solver for incompressible, turbulent flow of non-Newtonian fluids in a single rotating frame. @@ -35,7 +38,7 @@ Description #include "turbulentTransportModel.H" #include "SRFModel.H" #include "simpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,6 +54,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H index 9d9fb484fc..5658b68ec6 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H @@ -66,5 +66,5 @@ singlePhaseTransportModel laminarTransport(U, phi); autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::New(U, phi, laminarTransport) ); diff --git a/applications/solvers/incompressible/simpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/UEqn.H index 032e0e044b..12b5621636 100644 --- a/applications/solvers/incompressible/simpleFoam/UEqn.H +++ b/applications/solvers/incompressible/simpleFoam/UEqn.H @@ -7,7 +7,7 @@ fvm::div(phi, U) + MRF.DDt(U) + turbulence->divDevReff(U) - == + == fvOptions(U) ); diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options index a888499d85..90df601079 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options @@ -6,7 +6,6 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C index 3c9ef15c95..8010a7325e 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C @@ -24,6 +24,9 @@ License Application porousSimpleFoam +Group + grpIncompressibleSolvers + Description Steady-state solver for incompressible, turbulent flow with implicit or explicit porosity treatment and support for multiple reference @@ -36,7 +39,7 @@ Description #include "turbulentTransportModel.H" #include "simpleControl.H" #include "IOporosityModelList.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,6 +57,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/incompressible/simpleFoam/simpleFoam.C b/applications/solvers/incompressible/simpleFoam/simpleFoam.C index eeb7bc1e34..1b84b48f7b 100644 --- a/applications/solvers/incompressible/simpleFoam/simpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/simpleFoam.C @@ -24,8 +24,40 @@ License Application simpleFoam +Group + grpIncompressibleSolvers + Description - Steady-state solver for incompressible, turbulent flow + Steady-state solver for incompressible flows with turbulence modelling. + + \heading Solver details + The solver uses the SIMPLE algorithm to solve the continuity equation: + + \f[ + \div \vec{U} = 0 + \f] + + and momentum equation: + + \f[ + \div \left( \vec{U} \vec{U} \right) - \div \gvec{R} + = - \grad p + \vec{S}_U + \f] + + Where: + \vartable + \vec{U} | Velocity + p | Pressure + \vec{R} | Stress tensor + \vec{S}_U | Momentum source + \endvartable + + \heading Required fields + \plaintable + U | Velocity [m/s] + p | Kinematic pressure, p/rho [m2/s2] + \ | As required by user selection + \endplaintable \*---------------------------------------------------------------------------*/ @@ -33,7 +65,7 @@ Description #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "simpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,6 +82,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/lagrangian/DPMFoam/DPMFoam.C b/applications/solvers/lagrangian/DPMFoam/DPMFoam.C index 8999e03663..22c16b4c80 100644 --- a/applications/solvers/lagrangian/DPMFoam/DPMFoam.C +++ b/applications/solvers/lagrangian/DPMFoam/DPMFoam.C @@ -24,6 +24,9 @@ License Application DPMFoam +Group + grpLagrangianSolvers + Description Transient solver for the coupled transport of a single kinematic particle cloud including the effect of the volume fraction of particles on the diff --git a/applications/solvers/lagrangian/DPMFoam/MPPICFoam/MPPICFoam.C b/applications/solvers/lagrangian/DPMFoam/MPPICFoam/MPPICFoam.C index 69048cf5a6..4bb369f11b 100644 --- a/applications/solvers/lagrangian/DPMFoam/MPPICFoam/MPPICFoam.C +++ b/applications/solvers/lagrangian/DPMFoam/MPPICFoam/MPPICFoam.C @@ -24,6 +24,9 @@ License Application MPPICFoam +Group + grpLagrangianSolvers + Description Transient solver for the coupled transport of a single kinematic particle cloud including the effect of the volume fraction of particles on the diff --git a/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options b/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options index 21a47f8893..aed6969724 100644 --- a/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options +++ b/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options @@ -20,6 +20,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lfvOptions \ -lmeshTools \ -llagrangian \ -llagrangianIntermediate \ diff --git a/applications/solvers/lagrangian/DPMFoam/Make/options b/applications/solvers/lagrangian/DPMFoam/Make/options index 75f2b0a88c..8ab44318e6 100644 --- a/applications/solvers/lagrangian/DPMFoam/Make/options +++ b/applications/solvers/lagrangian/DPMFoam/Make/options @@ -32,4 +32,5 @@ EXE_LIBS = \ -lsurfaceFilmModels \ -lsampling \ -lfiniteVolume \ + -lfvOptions \ -lmeshTools diff --git a/applications/solvers/lagrangian/coalChemistryFoam/Make/options b/applications/solvers/lagrangian/coalChemistryFoam/Make/options index 35e1cb7fb6..9c23effa57 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/Make/options +++ b/applications/solvers/lagrangian/coalChemistryFoam/Make/options @@ -24,7 +24,6 @@ EXE_INC = \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(FOAM_SOLVERS)/combustion/reactingFoam \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C index 3bfb2be776..dbf2a79605 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C +++ b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C @@ -24,14 +24,16 @@ License Application coalChemistryFoam +Group + grpLagrangianSolvers + Description - Transient solver for: - - compressible, - - turbulent flow, - with - - coal and limestone parcel injections, - - energy source, and - - combustion. + Transient PIMPLE solver for compressible, laminar or turbulent flow with + coal and thermodynamic parcels, and combustion. + + Note: + - includes run-time selectable finite volume options, e.g. sources, + constraints \*---------------------------------------------------------------------------*/ @@ -40,7 +42,7 @@ Description #include "basicThermoCloud.H" #include "coalCloud.H" #include "psiCombustionModel.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" @@ -68,6 +70,8 @@ int main(int argc, char *argv[]) #include "createClouds.H" #include "createRadiationModel.H" + turbulence->validate(); + if (!LTS) { #include "compressibleCourantNo.H" diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index cb41f9a407..2f9a7ce6f4 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -17,7 +17,7 @@ const word inertSpecie(thermo.lookup("inertSpecie")); if (!composition.contains(inertSpecie)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Specified inert specie '" << inertSpecie << "' not found in " << "species list. Available species:" << composition.species() << exit(FatalError); diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options index 1f2e7a32db..0004a128e4 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options @@ -28,6 +28,7 @@ EXE_LIBS = \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ + -lfvOptions \ -lmeshTools \ -lregionModels \ -lsurfaceFilmModels diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options index a6a35147e9..4f94e7f64f 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options @@ -32,6 +32,7 @@ EXE_LIBS = \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ + -lfvOptions \ -lmeshTools \ -lregionModels \ -lsurfaceFilmModels \ diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C index b355148a94..0110832f2d 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C @@ -24,6 +24,9 @@ License Application uncoupledKinematicParcelDyMFoam +Group + grpLagrangianSolvers grpMovingMeshSolvers + Description Transient solver for the passive transport of a single kinematic particle cloud. diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C index befcb57d02..42273c1be5 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C @@ -24,6 +24,9 @@ License Application icoUncoupledKinematicParcelFoam +Group + grpLagrangianSolvers + Description Transient solver for the passive transport of a single kinematic particle cloud. diff --git a/applications/solvers/lagrangian/lagrangianSolversDoc.H b/applications/solvers/lagrangian/lagrangianSolversDoc.H new file mode 100644 index 0000000000..7eb88c4f3f --- /dev/null +++ b/applications/solvers/lagrangian/lagrangianSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpLagrangianSolvers Lagrangian solvers +@{ + \ingroup grpSolvers + This group contains Lagrangian solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options index fedb72a15c..8b2729e8c0 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options @@ -1,6 +1,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I${LIB_SRC}/sampling/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C index 98b33ff285..8014596ae6 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C @@ -24,6 +24,9 @@ License Application reactingParcelFilmFoam +Group + grpLagrangianSolvers + Description Transient PIMPLE solver for compressible, laminar or turbulent flow with reacting Lagrangian parcels, and surface film modelling. @@ -37,7 +40,7 @@ Description #include "psiCombustionModel.H" #include "radiationModel.H" #include "SLGThermo.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "pimpleControl.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -63,6 +66,8 @@ int main(int argc, char *argv[]) #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/Make/options index a797d28efb..755aa59e9a 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/options @@ -23,7 +23,6 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(FOAM_SOLVERS)/combustion/reactingFoam diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index 9d05da0425..54f0e9e9b2 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -17,7 +17,7 @@ const word inertSpecie(thermo.lookup("inertSpecie")); if (!composition.contains(inertSpecie)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Specified inert specie '" << inertSpecie << "' not found in " << "species list. Available species:" << composition.species() << exit(FatalError); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index b3e758df12..8ccd5d5ecd 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -24,10 +24,16 @@ License Application reactingParcelFoam +Group + grpLagrangianSolvers + Description Transient PIMPLE solver for compressible, laminar or turbulent flow with - reacting multiphase Lagrangian parcels, including run-time selectable - finite volume options, e.g. sources, constraints + reacting multiphase Lagrangian parcels. + + Note: + - includes run-time selectable finite volume options, e.g. sources, + constraints \*---------------------------------------------------------------------------*/ @@ -36,7 +42,7 @@ Description #include "basicReactingMultiphaseCloud.H" #include "rhoCombustionModel.H" #include "radiationModel.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "SLGThermo.H" #include "pimpleControl.H" #include "localEulerDdtScheme.H" @@ -63,6 +69,8 @@ int main(int argc, char *argv[]) #include "createMRF.H" #include "createFvOptions.H" + turbulence->validate(); + if (!LTS) { #include "compressibleCourantNo.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options index a797d28efb..755aa59e9a 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options @@ -23,7 +23,6 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(FOAM_SOLVERS)/combustion/reactingFoam diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H index cfabbfb5b0..7a26729e54 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H @@ -17,7 +17,7 @@ const word inertSpecie(thermo.lookup("inertSpecie")); if (!composition.contains(inertSpecie)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Specified inert specie '" << inertSpecie << "' not found in " << "species list. Available species:" << composition.species() << exit(FatalError); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C index 9a49318c23..a04bc4aa5e 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C @@ -24,6 +24,9 @@ License Application simpleReactingParcelFoam +Group + grpLagrangianSolvers + Description Steady state SIMPLE solver for compressible, laminar or turbulent flow with reacting multiphase Lagrangian parcels, including run-time selectable @@ -37,7 +40,7 @@ Description #include "rhoCombustionModel.H" #include "radiationModel.H" #include "IOporosityModelList.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "SLGThermo.H" #include "simpleControl.H" @@ -60,6 +63,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/files b/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/files new file mode 100644 index 0000000000..963e828de6 --- /dev/null +++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/files @@ -0,0 +1,3 @@ +simpleCoalParcelFoam.C + +EXE = $(FOAM_APPBIN)/simpleCoalParcelFoam diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options b/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options new file mode 100644 index 0000000000..efdf721ee3 --- /dev/null +++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options @@ -0,0 +1,57 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I${LIB_SRC}/meshTools/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ + -I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \ + -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam/simpleReactingParcelFoam + + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ + -llagrangian \ + -llagrangianIntermediate \ + -llagrangianTurbulence \ + -lspecie \ + -lfluidThermophysicalModels \ + -lliquidProperties \ + -lliquidMixtureProperties \ + -lsolidProperties \ + -lsolidMixtureProperties \ + -lthermophysicalFunctions \ + -lreactionThermophysicalModels \ + -lSLGThermo \ + -lchemistryModel \ + -lradiationModels \ + -lODE \ + -lregionModels \ + -lsurfaceFilmModels \ + -lcombustionModels \ + -lfvOptions \ + -lsampling \ + -lcoalCombustion + diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/createClouds.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/createClouds.H new file mode 100644 index 0000000000..3a371a0f10 --- /dev/null +++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/createClouds.H @@ -0,0 +1,9 @@ +Info<< "\nConstructing coal cloud" << endl; +coalCloud parcels +( + "reactingCloud1", + rho, + U, + g, + slgThermo +); diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C b/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C new file mode 100644 index 0000000000..5db8e7ede5 --- /dev/null +++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 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 3 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, see . + +Application + simpleReactingParcelFoam + +Description + Steady state SIMPLE solver for laminar or turbulent flow with coal + Lagrangian parcels. + + Note: + - including run-time selectable finite volume options,e.g. sources, + constraints + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "turbulentFluidThermoModel.H" +#include "coalCloud.H" +#include "rhoCombustionModel.H" +#include "radiationModel.H" +#include "IOporosityModelList.H" +#include "fvOptions.H" +#include "SLGThermo.H" +#include "simpleControl.H" + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createMesh.H" + #include "readGravitationalAcceleration.H" + + simpleControl simple(mesh); + + #include "createFields.H" + #include "createRadiationModel.H" + #include "createClouds.H" + #include "createMRF.H" + #include "createFvOptions.H" + #include "initContinuityErrs.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (simple.loop()) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + + parcels.evolve(); + + // --- Pressure-velocity SIMPLE corrector loop + { + #include "UEqn.H" + #include "YEqn.H" + #include "EEqn.H" + #include "pEqn.H" + } + + turbulence->correct(); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return(0); +} + + +// ************************************************************************* // diff --git a/applications/solvers/lagrangian/sprayFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/Make/options index 5e01b76369..af719ec4c2 100644 --- a/applications/solvers/lagrangian/sprayFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/Make/options @@ -24,7 +24,6 @@ EXE_INC = \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/lagrangian/sprayFoam/createFields.H b/applications/solvers/lagrangian/sprayFoam/createFields.H index 7cc45050ce..e043feb221 100644 --- a/applications/solvers/lagrangian/sprayFoam/createFields.H +++ b/applications/solvers/lagrangian/sprayFoam/createFields.H @@ -17,7 +17,7 @@ const word inertSpecie(thermo.lookup("inertSpecie")); if (!composition.contains(inertSpecie)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Specified inert specie '" << inertSpecie << "' not found in " << "species list. Available species:" << composition.species() << exit(FatalError); diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options index 6ffe1ddd9f..75d59e0933 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options @@ -26,7 +26,6 @@ EXE_INC = \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C index 38ac4e515b..ff36ee4c48 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C @@ -24,6 +24,9 @@ License Application sprayDyMFoam +Group + grpLagrangianSolvers grpMovingMeshSolvers + Description Transient PIMPLE solver for compressible, laminar or turbulent flow with spray parcels and support for moving meshes. @@ -39,7 +42,7 @@ Description #include "SLGThermo.H" #include "pimpleControl.H" #include "CorrectPhi.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -63,6 +66,8 @@ int main(int argc, char *argv[]) #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options index 576c892149..69fd826ce6 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options @@ -27,7 +27,6 @@ EXE_INC = \ -I$(LIB_SRC)/engine/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude diff --git a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C index 730d0f3fb4..7d2b3b2100 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C @@ -24,6 +24,9 @@ License Application sprayEngineFoam +Group + grpLagrangianSolvers grpMovingMeshSolvers + Description Transient PIMPLE solver for compressible, laminar or turbulent engine flow swith spray parcels. @@ -39,7 +42,7 @@ Description #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -65,6 +68,8 @@ int main(int argc, char *argv[]) #include "setInitialDeltaT.H" #include "startSummary.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C index 066ce82f68..28e6caa581 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C @@ -24,6 +24,9 @@ License Application sprayFoam +Group + grpLagrangianSolvers + Description Transient PIMPLE solver for compressible, laminar or turbulent flow with spray parcels. @@ -37,7 +40,7 @@ Description #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,6 +64,8 @@ int main(int argc, char *argv[]) #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options index 0726b90a3f..f9056dd790 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options @@ -25,6 +25,7 @@ EXE_LIBS = \ -lturbulenceModels \ -lcompressibleTurbulenceModels \ -lfiniteVolume \ + -lfvOptions \ -lmeshTools \ -lregionModels \ -lsurfaceFilmModels diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C index 6545c4d72b..c6b592fb45 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C @@ -24,6 +24,9 @@ License Application uncoupledKinematicParcelFoam +Group + grpLagrangianSolvers + Description Transient solver for the passive transport of a single kinematic particle cloud. diff --git a/applications/solvers/multiphase/cavitatingFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/Make/options index c4628e3498..02d5a1cc3e 100644 --- a/applications/solvers/multiphase/cavitatingFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/Make/options @@ -14,4 +14,5 @@ EXE_LIBS = \ -lincompressibleTurbulenceModels \ -lbarotropicCompressibilityModel \ -lfiniteVolume \ + -lfvOptions \ -lmeshTools diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options index 5ec5c9a72c..b5d7b2cdfa 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options @@ -17,6 +17,7 @@ EXE_LIBS = \ -lincompressibleTurbulenceModels \ -lbarotropicCompressibilityModel \ -lfiniteVolume \ + -lfvOptions \ -ldynamicMesh \ -ldynamicFvMesh \ -lmeshTools diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C index 189208de95..e2305c4f70 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C @@ -24,6 +24,9 @@ License Application cavitatingFoam +Group + grpMultiphaseSolvers grpMovingMeshSolvers + Description Transient cavitation code based on the homogeneous equilibrium model from which the compressibility of the liquid/vapour "mixture" is obtained. @@ -59,6 +62,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C index b521f5b9c6..3fd2ea3780 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C @@ -24,6 +24,9 @@ License Application cavitatingFoam +Group + grpMultiphaseSolvers + Description Transient cavitation code based on the homogeneous equilibrium model from which the compressibility of the liquid/vapour "mixture" is obtained. @@ -55,6 +58,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options index af8f0442e1..e24e6697f9 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -20,4 +20,5 @@ EXE_LIBS = \ -lturbulenceModels \ -lcompressibleTurbulenceModels \ -lfiniteVolume \ + -lfvOptions \ -lmeshTools diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options index 01b2a8d5a1..cc7d5a2832 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options @@ -25,4 +25,5 @@ EXE_LIBS = \ -ldynamicMesh \ -lmeshTools \ -ldynamicFvMesh \ - -lfiniteVolume + -lfiniteVolume \ + -lfvOptions diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C index 4e40addf20..0f6bf83172 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C @@ -24,6 +24,9 @@ License Application compressibleInterDyMFoam +Group + grpMultiphaseSolvers grpMovingMeshSolvers + Description Solver for 2 compressible, non-isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach, @@ -66,6 +69,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index 7736099eaa..bb7548164b 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -24,6 +24,9 @@ License Application compressibleInterFoam +Group + grpMultiphaseSolvers + Description Solver for 2 compressible, non-isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach. @@ -61,6 +64,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C index e9c5322c79..a3217a073b 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -152,7 +152,7 @@ Foam::tmp Foam::twoPhaseMixtureThermo::THE const labelList& cells ) const { - notImplemented("twoPhaseMixtureThermo::THE(...)"); + NotImplemented; return T0; } @@ -165,7 +165,7 @@ Foam::tmp Foam::twoPhaseMixtureThermo::THE const label patchi ) const { - notImplemented("twoPhaseMixtureThermo::THE(...)"); + NotImplemented; return T0; } @@ -267,6 +267,26 @@ Foam::tmp Foam::twoPhaseMixtureThermo::CpByCpv } +Foam::tmp Foam::twoPhaseMixtureThermo::nu() const +{ + return mu()/(alpha1()*thermo1_->rho() + alpha2()*thermo2_->rho()); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::nu +( + const label patchi +) const +{ + return + mu(patchi) + /( + alpha1().boundaryField()[patchi]*thermo1_->rho(patchi) + + alpha2().boundaryField()[patchi]*thermo2_->rho(patchi) + ); +} + + Foam::tmp Foam::twoPhaseMixtureThermo::kappa() const { return alpha1()*thermo1_->kappa() + alpha2()*thermo2_->kappa(); diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H index b8320bd105..3cde04bb46 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H @@ -122,14 +122,14 @@ public: // Non-const access allowed for transport equations virtual volScalarField& he() { - notImplemented("twoPhaseMixtureThermo::he()"); + NotImplemented; return thermo1_->he(); } //- Enthalpy/Internal energy [J/kg] virtual const volScalarField& he() const { - notImplemented("twoPhaseMixtureThermo::he() const"); + NotImplemented; return thermo1_->he(); } @@ -239,6 +239,12 @@ public: // Fields derived from transport state variables + //- Kinematic viscosity of mixture [m^2/s] + virtual tmp nu() const; + + //- Kinematic viscosity of mixture for patch [m^2/s] + virtual tmp nu(const label patchi) const; + //- Thermal diffusivity for temperature of mixture [J/m/s/K] virtual tmp kappa() const; diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options index 59a9ba5a26..b237353985 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options @@ -19,4 +19,5 @@ EXE_LIBS = \ -lturbulenceModels \ -lcompressibleTurbulenceModels \ -lfiniteVolume \ + -lfvOptions \ -lmeshTools diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C index 4fd75efebf..667941ecc5 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C @@ -24,6 +24,9 @@ License Application compressibleMultiphaseInterFoam +Group + grpMultiphaseSolvers + Description Solver for n compressible, non-isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach. @@ -56,6 +59,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C index 7733cf1364..55af594283 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C @@ -270,7 +270,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::THE const labelList& cells ) const { - notImplemented("multiphaseMixtureThermo::THE(...)"); + NotImplemented; return T0; } @@ -283,7 +283,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::THE const label patchi ) const { - notImplemented("multiphaseMixtureThermo::THE(...)"); + NotImplemented; return T0; } @@ -303,6 +303,28 @@ Foam::tmp Foam::multiphaseMixtureThermo::rho() const } +Foam::tmp Foam::multiphaseMixtureThermo::rho +( + const label patchi +) const +{ + PtrDictionary::const_iterator phasei = phases_.begin(); + + tmp trho + ( + phasei().boundaryField()[patchi]*phasei().thermo().rho(patchi) + ); + + for (++phasei; phasei != phases_.end(); ++phasei) + { + trho() += + phasei().boundaryField()[patchi]*phasei().thermo().rho(patchi); + } + + return trho; +} + + Foam::tmp Foam::multiphaseMixtureThermo::Cp() const { PtrDictionary::const_iterator phasei = phases_.begin(); @@ -501,6 +523,21 @@ Foam::tmp Foam::multiphaseMixtureThermo::CpByCpv } +Foam::tmp Foam::multiphaseMixtureThermo::nu() const +{ + return mu()/rho(); +} + + +Foam::tmp Foam::multiphaseMixtureThermo::nu +( + const label patchi +) const +{ + return mu(patchi)/rho(patchi); +} + + Foam::tmp Foam::multiphaseMixtureThermo::kappa() const { PtrDictionary::const_iterator phasei = phases_.begin(); @@ -680,10 +717,8 @@ Foam::multiphaseMixtureThermo::surfaceTensionForce() const if (sigma == sigmas_.end()) { - FatalErrorIn - ( - "multiphaseMixtureThermo::surfaceTensionForce() const" - ) << "Cannot find interface " << interfacePair(alpha1, alpha2) + FatalErrorInFunction + << "Cannot find interface " << interfacePair(alpha1, alpha2) << " in list of sigma values" << exit(FatalError); } @@ -811,12 +846,8 @@ void Foam::multiphaseMixtureThermo::correctContactAngle if (tp == acap.thetaProps().end()) { - FatalErrorIn - ( - "multiphaseMixtureThermo::correctContactAngle" - "(const phaseModel& alpha1, const phaseModel& alpha2, " - "fvPatchVectorFieldField& nHatb) const" - ) << "Cannot find interface " << interfacePair(alpha1, alpha2) + FatalErrorInFunction + << "Cannot find interface " << interfacePair(alpha1, alpha2) << "\n in table of theta properties for patch " << acap.patch().name() << exit(FatalError); diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H index a769a45914..b62ea97f68 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H @@ -253,14 +253,14 @@ public: // Non-const access allowed for transport equations virtual volScalarField& he() { - notImplemented("multiphaseMixtureThermo::he()"); + NotImplemented; return phases_[0].thermo().he(); } //- Enthalpy/Internal energy [J/kg] virtual const volScalarField& he() const { - notImplemented("multiphaseMixtureThermo::he() const"); + NotImplemented; return phases_[0].thermo().he(); } @@ -315,6 +315,9 @@ public: //- Density [kg/m^3] virtual tmp rho() const; + //- Density for patch [kg/m^3] + virtual tmp rho(const label patchi) const; + //- Heat capacity at constant pressure [J/kg/K] virtual tmp Cp() const; @@ -373,6 +376,12 @@ public: // Fields derived from transport state variables + //- Kinematic viscosity of mixture [m^2/s] + virtual tmp nu() const; + + //- Kinematic viscosity of mixture for patch [m^2/s] + virtual tmp nu(const label patchi) const; + //- Thermal diffusivity for temperature of mixture [J/m/s/K] virtual tmp kappa() const; diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C index 1559f25a48..2d3a7b6163 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,7 +80,7 @@ Foam::phaseModel::phaseModel Foam::autoPtr Foam::phaseModel::clone() const { - notImplemented("phaseModel::clone() const"); + NotImplemented; return autoPtr(NULL); } diff --git a/applications/solvers/multiphase/driftFluxFoam/Make/options b/applications/solvers/multiphase/driftFluxFoam/Make/options index b237960a08..a92f599820 100644 --- a/applications/solvers/multiphase/driftFluxFoam/Make/options +++ b/applications/solvers/multiphase/driftFluxFoam/Make/options @@ -5,7 +5,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ diff --git a/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C b/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C index 3b88b1b956..d35c3a262b 100644 --- a/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C +++ b/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C @@ -24,6 +24,9 @@ License Application driftFluxFoam +Group + grpMultiphaseSolvers + Description Solver for 2 incompressible fluids using the mixture approach with the drift-flux approximation for relative motion of the phases. @@ -41,7 +44,7 @@ Description #include "turbulenceModel.H" #include "CompressibleTurbulenceModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "fixedFluxPressureFvPatchScalarField.H" #include "gaussLaplacianScheme.H" #include "uncorrectedSnGrad.H" @@ -63,6 +66,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C index ecd9c25623..b36e3f6e77 100644 --- a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,11 +46,8 @@ Foam::autoPtr Foam::mixtureViscosityModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn - ( - "mixtureViscosityModel::New(const volVectorField&, " - "const surfaceScalarField&)" - ) << "Unknown mixtureViscosityModel type " + FatalErrorInFunction + << "Unknown mixtureViscosityModel type " << modelType << nl << nl << "Valid mixtureViscosityModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() diff --git a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C index 578b23f38b..be4de6b2c0 100644 --- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C +++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,13 +82,8 @@ Foam::autoPtr Foam::relativeVelocityModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn - ( - "relativeVelocityModel::New" - "(" - "const dictionary&" - ")" - ) << "Unknown time scale model type " << modelType + FatalErrorInFunction + << "Unknown time scale model type " << modelType << ", constructor not in hash table" << nl << nl << " Valid time scale model types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index df659a93d2..cfe4a92072 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -7,7 +7,6 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/multiphase/interFoam/alphaEqn.H b/applications/solvers/multiphase/interFoam/alphaEqn.H index a2e9097e30..6a24830137 100644 --- a/applications/solvers/multiphase/interFoam/alphaEqn.H +++ b/applications/solvers/multiphase/interFoam/alphaEqn.H @@ -25,7 +25,7 @@ { if (nAlphaSubCycles > 1) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Sub-cycling is not supported " "with the CrankNicolson ddt scheme" << exit(FatalError); @@ -36,7 +36,7 @@ } else { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Only Euler and CrankNicolson ddt schemes are supported" << exit(FatalError); } diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options index 2e8c289ff7..33aac0ab4a 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options @@ -11,7 +11,6 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C index f30a195806..7f3f677349 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C @@ -24,6 +24,9 @@ License Application interDyMFoam +Group + grpMultiphaseSolvers grpMovingMeshSolvers + Description Solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach, @@ -42,7 +45,7 @@ Description #include "immiscibleIncompressibleTwoPhaseMixture.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "CorrectPhi.H" #include "fixedFluxPressureFvPatchScalarField.H" #include "localEulerDdtScheme.H" @@ -82,6 +85,8 @@ int main(int argc, char *argv[]) #include "correctPhi.H" #include "createUf.H" + turbulence->validate(); + if (!LTS) { #include "CourantNo.H" diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index 26f22af205..c6dc2f47e4 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -24,6 +24,9 @@ License Application interFoam +Group + grpMultiphaseSolvers + Description Solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach. @@ -46,7 +49,7 @@ Description #include "immiscibleIncompressibleTwoPhaseMixture.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "CorrectPhi.H" #include "fixedFluxPressureFvPatchScalarField.H" #include "localEulerDdtScheme.H" @@ -70,6 +73,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "correctPhi.H" + turbulence->validate(); + if (!LTS) { #include "readTimeControls.H" diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options index 7198616b30..53234dcaee 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options @@ -11,7 +11,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H b/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H index 1a0ae893c2..59180b8723 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H @@ -79,10 +79,12 @@ autoPtr turbulence incompressible::turbulenceModel::New(U, phi, mixture) ); + #include "readGravitationalAcceleration.H" #include "readhRef.H" #include "gh.H" + volScalarField p ( IOobject diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C index 86a05e71f1..201b6bb926 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C @@ -24,6 +24,9 @@ License Application interMixingFoam +Group + grpMultiphaseSolvers + Description Solver for 3 incompressible fluids, two of which are miscible, using a VOF method to capture the interface. @@ -36,7 +39,7 @@ Description #include "immiscibleIncompressibleThreePhaseMixture.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "CorrectPhi.H" #include "fixedFluxPressureFvPatchScalarField.H" #include "localEulerDdtScheme.H" @@ -60,6 +63,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "correctPhi.H" + turbulence->validate(); + if (!LTS) { #include "readTimeControls.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options index 254f3ad8be..a29ad660e8 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options @@ -8,7 +8,6 @@ EXE_INC = \ -IphaseChangeTwoPhaseMixtures/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude\ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options index 0512ee1946..0a4397e063 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options @@ -11,7 +11,6 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude\ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C index 93e4ebc0d1..a3b3e64cbc 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C @@ -24,6 +24,9 @@ License Application interPhaseChangeDyMFoam +Group + grpMultiphaseSolvers grpMovingMeshSolvers + Description Solver for 2 incompressible, isothermal immiscible fluids with phase-change (e.g. cavitation). Uses a VOF (volume of fluid) phase-fraction based @@ -49,7 +52,7 @@ Description #include "phaseChangeTwoPhaseMixture.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "CorrectPhi.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -86,6 +89,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C index 8552126034..525efbc3ab 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C @@ -24,6 +24,9 @@ License Application interPhaseChangeFoam +Group + grpMultiphaseSolvers + Description Solver for 2 incompressible, isothermal immiscible fluids with phase-change (e.g. cavitation). Uses a VOF (volume of fluid) phase-fraction based @@ -47,7 +50,7 @@ Description #include "phaseChangeTwoPhaseMixture.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "fixedFluxPressureFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -66,6 +69,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C index 0a86459705..0825368e5c 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,10 +62,8 @@ Foam::phaseChangeTwoPhaseMixture::New if (cstrIter == componentsConstructorTablePtr_->end()) { - FatalErrorIn - ( - "phaseChangeTwoPhaseMixture::New" - ) << "Unknown phaseChangeTwoPhaseMixture type " + FatalErrorInFunction + << "Unknown phaseChangeTwoPhaseMixture type " << phaseChangeTwoPhaseMixtureTypeName << endl << endl << "Valid phaseChangeTwoPhaseMixtures are : " << endl << componentsConstructorTablePtr_->sortedToc() diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options index a18d189f7c..2cb9a28a02 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options @@ -22,4 +22,5 @@ EXE_LIBS = \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lfiniteVolume \ + -lfvOptions \ -lmeshTools diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index 72542bc01b..3bdd49ec7a 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ Foam::autoPtr Foam::dragModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("dragModel::New") + FatalErrorInFunction << "Unknown dragModelType type " << dragModelType << endl << endl << "Valid dragModel types are : " << endl diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C index aaa972032d..deabfc900f 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ Foam::autoPtr Foam::heatTransferModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("heatTransferModel::New") + FatalErrorInFunction << "Unknown heatTransferModelType type " << heatTransferModelType << endl << endl << "Valid heatTransferModel types are : " << endl diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C index 8244f739d7..2ec41b40f8 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C @@ -24,6 +24,9 @@ License Application multiphaseEulerFoam +Group + grpMultiphaseSolvers + Description Solver for a system of many compressible fluid phases including heat-transfer. @@ -61,6 +64,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C index b9014f3f46..b58f00291b 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ Foam::autoPtr Foam::diameterModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("diameterModel::New") + FatalErrorInFunction << "Unknown diameterModelType type " << diameterModelType << endl << endl << "Valid diameterModel types are : " << endl diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 767600e394..d0cd5c9b18 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -295,12 +295,8 @@ void Foam::multiphaseSystem::correctContactAngle if (tp == acap.thetaProps().end()) { - FatalErrorIn - ( - "multiphaseSystem::correctContactAngle" - "(const phaseModel& phase1, const phaseModel& phase2, " - "fvPatchVectorFieldField& nHatb) const" - ) << "Cannot find interface " << interfacePair(phase1, phase2) + FatalErrorInFunction + << "Cannot find interface " << interfacePair(phase1, phase2) << "\n in table of theta properties for patch " << acap.patch().name() << exit(FatalError); @@ -478,12 +474,8 @@ Foam::multiphaseSystem::multiphaseSystem if (cAlpha == cAlphas_.end()) { - WarningIn - ( - "multiphaseSystem::multiphaseSystem" - "(const volVectorField& U," - "const surfaceScalarField& phi)" - ) << "Compression coefficient not specified for " + WarningInFunction + << "Compression coefficient not specified for " "phase pair (" << phase1.name() << ' ' << phase2.name() << ") for which a surface tension " diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C index 3da5610b3c..10dd3e0a56 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C @@ -201,7 +201,7 @@ Foam::phaseModel::~phaseModel() Foam::autoPtr Foam::phaseModel::clone() const { - notImplemented("phaseModel::clone() const"); + NotImplemented; return autoPtr(NULL); } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/Make/options index 2eb366fd98..0cd432b02c 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/Make/options @@ -7,7 +7,6 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options index f6419312ce..1a210c20e6 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options @@ -11,7 +11,6 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C index a04341c7ba..a4413f6295 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C @@ -24,6 +24,9 @@ License Application multiphaseInterFoam +Group + grpMultiphaseSolvers grpMovingMeshSolvers + Description Solver for n incompressible fluids which captures the interfaces and includes surface-tension and contact-angle effects for each phase. @@ -37,7 +40,7 @@ Description #include "multiphaseMixture.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "CorrectPhi.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -76,6 +79,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index 0fb8ff1208..130c9f1cb6 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -24,6 +24,9 @@ License Application multiphaseInterFoam +Group + grpMultiphaseSolvers + Description Solver for n incompressible fluids which captures the interfaces and includes surface-tension and contact-angle effects for each phase. @@ -36,7 +39,7 @@ Description #include "multiphaseMixture.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "CorrectPhi.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -59,6 +62,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index f1305897ba..1bbd3177af 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -288,7 +288,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const if (sigma == sigmas_.end()) { - FatalErrorIn("multiphaseMixture::surfaceTensionForce() const") + FatalErrorInFunction << "Cannot find interface " << interfacePair(alpha1, alpha2) << " in list of sigma values" << exit(FatalError); @@ -442,12 +442,8 @@ void Foam::multiphaseMixture::correctContactAngle if (tp == acap.thetaProps().end()) { - FatalErrorIn - ( - "multiphaseMixture::correctContactAngle" - "(const phase& alpha1, const phase& alpha2, " - "fvPatchVectorFieldField& nHatb) const" - ) << "Cannot find interface " << interfacePair(alpha1, alpha2) + FatalErrorInFunction + << "Cannot find interface " << interfacePair(alpha1, alpha2) << "\n in table of theta properties for patch " << acap.patch().name() << exit(FatalError); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C index f3adfa9b61..ae68ff1682 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C @@ -67,7 +67,7 @@ Foam::phase::phase Foam::autoPtr Foam::phase::clone() const { - notImplemented("phase::clone() const"); + NotImplemented; return autoPtr(NULL); } diff --git a/applications/solvers/multiphase/multiphaseSolversDoc.H b/applications/solvers/multiphase/multiphaseSolversDoc.H new file mode 100644 index 0000000000..1efb73e01b --- /dev/null +++ b/applications/solvers/multiphase/multiphaseSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpMultiphaseSolvers Multiphase solvers +@{ + \ingroup grpSolvers + This group contains multiphase solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options index 72a106ba1e..2026e36fb6 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options @@ -5,7 +5,6 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options index df44bd78a0..4c789c10bb 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options @@ -9,7 +9,6 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C index b740ab2b9b..7687ba6aab 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C @@ -24,6 +24,9 @@ License Application potentialFreeSurfaceDyMFoam +Group + grpMultiphaseSolvers grpMovingMeshSolvers + Description Incompressible Navier-Stokes solver with inclusion of a wave height field to enable single-phase free-surface approximations. @@ -42,7 +45,7 @@ Description #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "CorrectPhi.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -79,6 +82,8 @@ int main(int argc, char *argv[]) #include "correctPhi.H" #include "createUf.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C index b98bdb694d..0bbb2c1807 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C @@ -24,6 +24,9 @@ License Application potentialFreeSurfaceFoam +Group + grpMultiphaseSolvers + Description Incompressible Navier-Stokes solver with inclusion of a wave height field to enable single-phase free-surface approximations @@ -38,7 +41,7 @@ Description #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "fixedFluxPressureFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,6 +61,8 @@ int main(int argc, char *argv[]) #include "createFvOptions.H" #include "initContinuityErrs.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/Make/files b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/Make/files index 35878ec93a..0642107d64 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/Make/files +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/Make/files @@ -16,6 +16,7 @@ saturationModels/saturationModel/newSaturationModel.C saturationModels/Antoine/Antoine.C saturationModels/AntoineExtended/AntoineExtended.C saturationModels/ArdenBuck/ArdenBuck.C +saturationModels/polynomial/polynomial.C saturationModels/constantSaturationConditions/constantSaturationConditions.C LIB = $(FOAM_LIBBIN)/libreactingEulerianInterfacialCompositionModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C index 06754e2f86..03b21be490 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C @@ -50,16 +50,8 @@ Foam::interfaceCompositionModels::Henry::Henry { if (k_.size() != this->speciesNames_.size()) { - FatalErrorIn - ( - "template " - "Foam::interfaceCompositionModels::Henry:: " - "Henry " - "( " - "const dictionary& dict, " - "const phasePair& pair " - ")" - ) << "Differing number of species and solubilities" + FatalErrorInFunction + << "Differing number of species and solubilities" << exit(FatalError); } } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.C index 169580e3cf..6818c243f1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.C @@ -63,17 +63,8 @@ NonRandomTwoLiquid { if (this->speciesNames_.size() != 2) { - FatalErrorIn - ( - "template" - "Foam::interfaceCompositionModels::" - "NonRandomTwoLiquid::" - "NonRandomTwoLiquid" - "( " - "const dictionary& dict, " - "const phasePair& pair " - ")" - ) << "NonRandomTwoLiquid model is suitable for two species only." + FatalErrorInFunction + << "NonRandomTwoLiquid model is suitable for two species only." << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.C index c0d9b64e39..435bb7df2a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.C @@ -64,16 +64,8 @@ Foam::interfaceCompositionModels::Saturated::Saturated { if (this->speciesNames_.size() != 1) { - FatalErrorIn - ( - "template" - "Foam::interfaceCompositionModels::Saturated::" - "Saturated" - "( " - "const dictionary& dict, " - "const phasePair& pair " - ")" - ) << "Saturated model is suitable for one species only." + FatalErrorInFunction + << "Saturated model is suitable for one species only." << exit(FatalError); } } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C index 8b04d8f5f1..16b3055687 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C @@ -54,7 +54,7 @@ Foam::interfaceCompositionModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("interfaceCompositionModel::New") + FatalErrorInFunction << "Unknown interfaceCompositionModelType type " << interfaceCompositionModelType << endl << endl << "Valid interfaceCompositionModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C index d8ee288ef0..1251c98fe0 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C @@ -44,7 +44,7 @@ Foam::autoPtr Foam::massTransferModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("massTransferModel::New") + FatalErrorInFunction << "Unknown massTransferModelType type " << massTransferModelType << endl << endl << "Valid massTransferModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.C index 0c273ee866..90f1c989c5 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.C @@ -95,7 +95,7 @@ Foam::saturationModels::Antoine::Tsat const volScalarField& p ) const { - return B_/(A_ - log10(p)) - C_; + return B_/(log(p) - A_) - C_; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.H index ec9ba27b25..6252aaf817 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.H +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.H @@ -61,7 +61,7 @@ class Antoine { protected: - // Private data + // Protected data //- Constant A dimensionedScalar A_; diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/AntoineExtended/AntoineExtended.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/AntoineExtended/AntoineExtended.C index f05ee21b83..8e0ad9b316 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/AntoineExtended/AntoineExtended.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/AntoineExtended/AntoineExtended.C @@ -108,10 +108,7 @@ Foam::saturationModels::AntoineExtended::Tsat const volScalarField& p ) const { - notImplemented - ( - "saturationModels::AntoineExtended::Tsat(const volScalarField& p)" - ); + NotImplemented; return volScalarField::null(); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/ArdenBuck/ArdenBuck.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/ArdenBuck/ArdenBuck.C index 4c27901589..273a63ca5f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/ArdenBuck/ArdenBuck.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/ArdenBuck/ArdenBuck.C @@ -115,10 +115,7 @@ Foam::saturationModels::ArdenBuck::Tsat const volScalarField& p ) const { - notImplemented - ( - "saturationModels::ArdenBuck::Tsat(const volScalarField& p)" - ); + NotImplemented; return volScalarField::null(); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C new file mode 100644 index 0000000000..886fefe8e8 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C @@ -0,0 +1,136 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "polynomial.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace saturationModels +{ + defineTypeNameAndDebug(polynomial, 0); + addToRunTimeSelectionTable(saturationModel, polynomial, dictionary); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::saturationModels::polynomial::polynomial(const dictionary& dict) +: + saturationModel(), + C_(dict.lookup("C<8>")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::saturationModels::polynomial::~polynomial() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::saturationModels::polynomial::pSat +( + const volScalarField& T +) const +{ + NotImplemented; + return volScalarField::null(); +} + + +Foam::tmp +Foam::saturationModels::polynomial::pSatPrime +( + const volScalarField& T +) const +{ + NotImplemented; + return volScalarField::null(); +} + + +Foam::tmp +Foam::saturationModels::polynomial::lnPSat +( + const volScalarField& T +) const +{ + NotImplemented; + return volScalarField::null(); +} + + +Foam::tmp +Foam::saturationModels::polynomial::Tsat +( + const volScalarField& p +) const +{ + tmp tTsat + ( + new volScalarField + ( + IOobject + ( + "Tsat", + p.mesh().time().timeName(), + p.mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + p.mesh(), + dimensionedScalar("zero", dimTemperature, 0) + ) + ); + + volScalarField& Tsat = tTsat(); + + forAll(Tsat,celli) + { + Tsat[celli] = C_.value(p[celli]); + } + + forAll(Tsat.boundaryField(), patchi) + { + scalarField& Tsatp = Tsat.boundaryField()[patchi]; + const scalarField& pp = p.boundaryField()[patchi]; + + forAll(Tsatp, facei) + { + Tsatp[facei] = C_.value(pp[facei]); + } + } + + return tTsat; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.H new file mode 100644 index 0000000000..c2715040e2 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.H @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::saturationModels::polynomial + +Description + Polynomial equation for the saturation vapour temperature in terms of + the vapour pressure (in Pa). + + \f[ + T_sat = \sum_i C_i p^i + \f] + + where \f$p\f$ is the pressure in Pa and \f$C\f$ are the coefficients. + + Currently this class only provides \f$T_sat\f$, the inverse function to + return the vapour pressure for a given temperature are not implemented. + +SourceFiles + polynomial.C + +\*---------------------------------------------------------------------------*/ + +#ifndef polynomial_H +#define polynomial_H + +#include "saturationModel.H" +#include "Polynomial.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace saturationModels +{ + +/*---------------------------------------------------------------------------*\ + Class polynomial Declaration +\*---------------------------------------------------------------------------*/ + +class polynomial +: + public saturationModel +{ + // Private data + + //- Polynomial coefficients + Polynomial<8> C_; + + +public: + + //- Runtime type information + TypeName("polynomial"); + + // Constructors + + //- Construct from a dictionary + polynomial(const dictionary& dict); + + + //- Destructor + virtual ~polynomial(); + + + // Member Functions + + //- Saturation pressure + virtual tmp pSat(const volScalarField& T) const; + + //- Saturation pressure derivetive w.r.t. temperature + virtual tmp pSatPrime(const volScalarField& T) const; + + //- Natural log of the saturation pressure + virtual tmp lnPSat(const volScalarField& T) const; + + //- Saturation temperature + virtual tmp Tsat(const volScalarField& p) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace saturationModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C index 93770692a5..920d7c62c8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C @@ -42,7 +42,7 @@ Foam::autoPtr Foam::saturationModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("saturationModel::New") + FatalErrorInFunction << "Unknown saturationModelType type " << saturationModelType << endl << endl << "Valid saturationModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C index 0b01665863..82359c0508 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C @@ -45,7 +45,7 @@ Foam::surfaceTensionModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("surfaceTensionModel::New") + FatalErrorInFunction << "Unknown surfaceTensionModelType type " << surfaceTensionModelType << endl << endl << "Valid surfaceTensionModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files index 9a526d3625..1293886cde 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files @@ -25,6 +25,7 @@ liftModels/constantLiftCoefficient/constantLiftCoefficient.C liftModels/Moraga/Moraga.C liftModels/LegendreMagnaudet/LegendreMagnaudet.C liftModels/TomiyamaLift/TomiyamaLift.C +liftModels/wallDampedLift/wallDampedLift.C heatTransferModels/heatTransferModel/heatTransferModel.C heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -61,4 +62,12 @@ aspectRatioModels/Wellek/Wellek.C wallDependentModel/wallDependentModel.C +wallDampingModels/wallDampingModel/wallDampingModel.C +wallDampingModels/wallDampingModel/newWallDampingModel.C +wallDampingModels/noWallDamping/noWallDamping.C +wallDampingModels/interpolated/interpolatedWallDamping.C +wallDampingModels/linear/linearWallDamping.C +wallDampingModels/cosine/cosineWallDamping.C +wallDampingModels/sine/sineWallDamping.C + LIB = $(FOAM_LIBBIN)/libreactingEulerianInterfacialModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C index ff4cb63441..568c1b2682 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C @@ -45,7 +45,7 @@ Foam::aspectRatioModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("aspectRatioModel::New") + FatalErrorInFunction << "Unknown aspectRatioModelType type " << aspectRatioModelType << endl << endl << "Valid aspectRatioModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C index 386b06d6aa..a670b67e44 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C @@ -77,7 +77,7 @@ Foam::aspectRatioModels::constantAspectRatio::E() const ( IOobject ( - "zero", + aspectRatioModel::typeName + ":E", mesh.time().timeName(), mesh ), diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index 041468a15b..e077e31b2d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -44,7 +44,7 @@ Foam::autoPtr Foam::dragModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("dragModel::New") + FatalErrorInFunction << "Unknown dragModelType type " << dragModelType << endl << endl << "Valid dragModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C index 2f3e0db699..00ca3d49ee 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C @@ -66,7 +66,7 @@ Foam::dragModels::segregated::~segregated() Foam::tmp Foam::dragModels::segregated::CdRe() const { - FatalErrorIn("Foam::dragModels::segregated::CdRe() const") + FatalErrorInFunction << "Not implemented." << "Drag coefficient not defined for the segregated model." << exit(FatalError); diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C index 24f02b69b4..8cdb07f297 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -44,7 +44,7 @@ Foam::autoPtr Foam::heatTransferModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("heatTransferModel::New") + FatalErrorInFunction << "Unknown heatTransferModelType type " << heatTransferModelType << endl << endl << "Valid heatTransferModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/Moraga/Moraga.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/Moraga/Moraga.C index 5548dfd70a..fa364a68c1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/Moraga/Moraga.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/Moraga/Moraga.C @@ -79,11 +79,8 @@ Foam::tmp Foam::liftModels::Moraga::Cl() const || max(sqrSr).value() > 0.04 ) { - WarningIn - ( - "Foam::tmp " - "Foam::liftModels::Moraga::Cl() const" - ) << "Re and/or Sr are out of the range of applicability of the " + WarningInFunction + << "Re and/or Sr are out of the range of applicability of the " << "Moraga model. Clamping to range bounds" << endl; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C index c53ff96e3d..3da4caee7c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C @@ -44,7 +44,7 @@ Foam::autoPtr Foam::liftModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("liftModel::New") + FatalErrorInFunction << "Unknown liftModelType type " << liftModelType << endl << endl << "Valid liftModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/wallDampedLift/wallDampedLift.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/wallDampedLift/wallDampedLift.C new file mode 100644 index 0000000000..b21b2ae03a --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/wallDampedLift/wallDampedLift.C @@ -0,0 +1,91 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "wallDampedLift.H" +#include "phasePair.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace liftModels +{ + defineTypeNameAndDebug(wallDamped, 0); + addToRunTimeSelectionTable(liftModel, wallDamped, dictionary); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::liftModels::wallDamped::wallDamped +( + const dictionary& dict, + const phasePair& pair +) +: + liftModel(dict, pair), + liftModel_(liftModel::New(dict.subDict("lift"), pair)), + wallDampingModel_ + ( + wallDampingModel::New(dict.subDict("wallDamping"), pair) + ) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::liftModels::wallDamped::~wallDamped() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::liftModels::wallDamped::Cl() const +{ + return wallDampingModel_->damp(liftModel_->Cl()); +} + + +Foam::tmp Foam::liftModels::wallDamped::Fi() const +{ + return wallDampingModel_->damp(liftModel_->Fi()); +} + + +Foam::tmp Foam::liftModels::wallDamped::F() const +{ + return wallDampingModel_->damp(liftModel_->F()); +} + + +Foam::tmp Foam::liftModels::wallDamped::Ff() const +{ + return wallDampingModel_->damp(liftModel_->Ff()); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/wallDampedLift/wallDampedLift.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/wallDampedLift/wallDampedLift.H new file mode 100644 index 0000000000..8a13850dd8 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/wallDampedLift/wallDampedLift.H @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::liftModels::wallDamped + +Description + +SourceFiles + wallDamped.C + +\*---------------------------------------------------------------------------*/ + +#ifndef wallDampedLift_H +#define wallDampedLift_H + +#include "liftModel.H" +#include "wallDampingModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class phasePair; + +namespace liftModels +{ + +/*---------------------------------------------------------------------------*\ + Class wallDamped Declaration +\*---------------------------------------------------------------------------*/ + +class wallDamped +: + public liftModel +{ + // Private data + + //- The lift model to damp + autoPtr liftModel_; + + //- The wall-damping model + autoPtr wallDampingModel_; + + +public: + + //- Runtime type information + TypeName("wallDamped"); + + + // Constructors + + //- Construct from a dictionary and a phase pair + wallDamped + ( + const dictionary& dict, + const phasePair& pair + ); + + + //- Destructor + virtual ~wallDamped(); + + + // Member Functions + + //- Return lift coefficient + virtual tmp Cl() const; + + //- Return phase-intensive lift force + virtual tmp Fi() const; + + //- Return lift force + virtual tmp F() const; + + //- Return face lift force + virtual tmp Ff() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace liftModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C index 651286c3ee..a7181b4396 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C @@ -45,7 +45,7 @@ Foam::swarmCorrection::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("swarmCorrection::New") + FatalErrorInFunction << "Unknown swarmCorrectionType type " << swarmCorrectionType << endl << endl << "Valid swarmCorrection types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C index 093013cca3..1f0fc837cb 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C @@ -25,7 +25,7 @@ License #include "Burns.H" #include "phasePair.H" -#include "PhaseCompressibleTurbulenceModel.H" +#include "phaseCompressibleTurbulenceModel.H" #include "addToRunTimeSelectionTable.H" #include "dragModel.H" diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C index a6f8a16fbd..98463216e8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C @@ -25,7 +25,7 @@ License #include "Gosman.H" #include "phasePair.H" -#include "PhaseCompressibleTurbulenceModel.H" +#include "phaseCompressibleTurbulenceModel.H" #include "addToRunTimeSelectionTable.H" #include "dragModel.H" diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/LopezDeBertodano/LopezDeBertodano.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/LopezDeBertodano/LopezDeBertodano.C index 848911fe2d..68c0e1627d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/LopezDeBertodano/LopezDeBertodano.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/LopezDeBertodano/LopezDeBertodano.C @@ -25,7 +25,7 @@ License #include "LopezDeBertodano.H" #include "phasePair.H" -#include "PhaseCompressibleTurbulenceModel.H" +#include "phaseCompressibleTurbulenceModel.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C index fb8126c5d2..5488561463 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C @@ -25,7 +25,7 @@ License #include "constantTurbulentDispersionCoefficient.H" #include "phasePair.H" -#include "PhaseCompressibleTurbulenceModel.H" +#include "phaseCompressibleTurbulenceModel.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C index 14d560969b..e440e3d1ee 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C @@ -45,7 +45,7 @@ Foam::turbulentDispersionModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("turbulentDispersionModel::New") + FatalErrorInFunction << "Unknown turbulentDispersionModelType type " << turbulentDispersionModelType << endl << endl << "Valid turbulentDispersionModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C index 72f620a424..4c4ced9ddc 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C @@ -44,7 +44,7 @@ Foam::autoPtr Foam::virtualMassModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("virtualMassModel::New") + FatalErrorInFunction << "Unknown virtualMassModelType type " << virtualMassModelType << endl << endl << "Valid virtualMassModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/cosine/cosineWallDamping.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/cosine/cosineWallDamping.C new file mode 100644 index 0000000000..c204cf32f6 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/cosine/cosineWallDamping.C @@ -0,0 +1,86 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "cosineWallDamping.H" +#include "phasePair.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallDampingModels +{ + defineTypeNameAndDebug(cosine, 0); + addToRunTimeSelectionTable + ( + wallDampingModel, + cosine, + dictionary + ); +} +} + + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +Foam::tmp +Foam::wallDampingModels::cosine::limiter() const +{ + return + ( + 0.5* + ( + 1 + - cos + ( + constant::mathematical::pi + *min(yWall()/(Cd_*pair_.dispersed().d()), scalar(1)) + ) + ) + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallDampingModels::cosine::cosine +( + const dictionary& dict, + const phasePair& pair +) +: + interpolated(dict, pair), + Cd_("Cd", dimless, dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallDampingModels::cosine::~cosine() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/cosine/cosineWallDamping.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/cosine/cosineWallDamping.H new file mode 100644 index 0000000000..0042c4e97a --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/cosine/cosineWallDamping.H @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::wallDampingModels::cosine + +Description + +SourceFiles + cosineWallDamping.C + +\*---------------------------------------------------------------------------*/ + +#ifndef cosineWallDamping_H +#define cosineWallDamping_H + +#include "interpolatedWallDamping.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class phasePair; + +namespace wallDampingModels +{ + +/*---------------------------------------------------------------------------*\ + Class cosine Declaration +\*---------------------------------------------------------------------------*/ + +class cosine +: + public interpolated +{ + // Private data + + //- Diameter coefficient + const dimensionedScalar Cd_; + + +protected: + + // Protected member functions + + //- Return the force limiter field + virtual tmp limiter() const; + + +public: + + //- Runtime type information + TypeName("cosine"); + + + // Constructors + + //- Construct from components + cosine + ( + const dictionary& dict, + const phasePair& pair + ); + + + //- Destructor + virtual ~cosine(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace wallDampingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/interpolated/interpolatedWallDamping.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/interpolated/interpolatedWallDamping.C new file mode 100644 index 0000000000..b1a9522636 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/interpolated/interpolatedWallDamping.C @@ -0,0 +1,91 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "interpolatedWallDamping.H" +#include "phasePair.H" +#include "surfaceInterpolate.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallDampingModels +{ + defineTypeNameAndDebug(interpolated, 0); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallDampingModels::interpolated::interpolated +( + const dictionary& dict, + const phasePair& pair +) +: + wallDampingModel(dict, pair) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallDampingModels::interpolated::~interpolated() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallDampingModels::interpolated::damp +( + const tmp& F +) const +{ + return limiter()*F; +} + + +Foam::tmp +Foam::wallDampingModels::interpolated::damp +( + const tmp& F +) const +{ + return limiter()*F; +} + + +Foam::tmp +Foam::wallDampingModels::interpolated::damp +( + const tmp& Ff +) const +{ + return fvc::interpolate(limiter())*Ff; +} + + +// ************************************************************************* // diff --git a/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/interpolated/interpolatedWallDamping.H similarity index 53% rename from src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.H rename to applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/interpolated/interpolatedWallDamping.H index d8cacd876b..d9eeef2609 100644 --- a/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/interpolated/interpolatedWallDamping.H @@ -22,89 +22,95 @@ License along with OpenFOAM. If not, see . Class - Foam::SpecificCompressibleTurbulenceModel + Foam::wallDampingModels::interpolated Description - Templated abstract base class for specific (RAS/LES) compressible - turbulence models SourceFiles - SpecificCompressibleTurbulenceModel.C + interpolatedWallDamping.C \*---------------------------------------------------------------------------*/ -#ifndef SpecificCompressibleTurbulenceModel_H -#define SpecificCompressibleTurbulenceModel_H +#ifndef interpolatedWallDamping_H +#define interpolatedWallDamping_H -#include "CompressibleTurbulenceModel.H" +#include "wallDampingModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +class phasePair; + +namespace wallDampingModels +{ + /*---------------------------------------------------------------------------*\ - Class SpecificCompressibleTurbulenceModel Declaration + Class interpolated Declaration \*---------------------------------------------------------------------------*/ -template -class SpecificCompressibleTurbulenceModel +class interpolated : - public BasicCompressibleTurbulenceModel + public wallDampingModel { +protected: + + // Protected member functions + + //- Return the force limiter field + virtual tmp limiter() const = 0; + public: - typedef typename BasicCompressibleTurbulenceModel::transportModel - transportModel; + //- Runtime type information + TypeName("interpolated"); + // Constructors //- Construct from components - SpecificCompressibleTurbulenceModel + interpolated ( - const word& type, - const geometricOneField& alpha, - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& alphaRhoPhi, - const surfaceScalarField& phi, - const transportModel& transport, - const word& propertiesName + const dictionary& dict, + const phasePair& pair ); //- Destructor - virtual ~SpecificCompressibleTurbulenceModel() - {} + virtual ~interpolated(); - // Selectors + // Member Functions - //- Return a reference to the selected RAS model - static autoPtr New + //- Return damped coefficient + virtual tmp damp ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& propertiesName = turbulenceModel::propertiesName - ); + const tmp& + ) const; + + //- Return damped force + virtual tmp damp + ( + const tmp& + ) const; + + //- Return damped face force + virtual tmp damp + ( + const tmp& + ) const; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace wallDampingModels } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#ifdef NoRepository -# include "SpecificCompressibleTurbulenceModel.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/linear/linearWallDamping.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/linear/linearWallDamping.C new file mode 100644 index 0000000000..bdb34973f2 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/linear/linearWallDamping.C @@ -0,0 +1,75 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "linearWallDamping.H" +#include "phasePair.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallDampingModels +{ + defineTypeNameAndDebug(linear, 0); + addToRunTimeSelectionTable + ( + wallDampingModel, + linear, + dictionary + ); +} +} + + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +Foam::tmp +Foam::wallDampingModels::linear::limiter() const +{ + return min(yWall()/(Cd_*pair_.dispersed().d()), scalar(1)); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallDampingModels::linear::linear +( + const dictionary& dict, + const phasePair& pair +) +: + interpolated(dict, pair), + Cd_("Cd", dimless, dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallDampingModels::linear::~linear() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/linear/linearWallDamping.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/linear/linearWallDamping.H new file mode 100644 index 0000000000..582baa3bdd --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/linear/linearWallDamping.H @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::wallDampingModels::linear + +Description + +SourceFiles + linearWallDamping.C + +\*---------------------------------------------------------------------------*/ + +#ifndef linearWallDamping_H +#define linearWallDamping_H + +#include "interpolatedWallDamping.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class phasePair; + +namespace wallDampingModels +{ + +/*---------------------------------------------------------------------------*\ + Class linear Declaration +\*---------------------------------------------------------------------------*/ + +class linear +: + public interpolated +{ + // Private data + + //- Diameter coefficient + const dimensionedScalar Cd_; + + +protected: + + // Protected member functions + + //- Return the force limiter field + virtual tmp limiter() const; + + +public: + + //- Runtime type information + TypeName("linear"); + + + // Constructors + + //- Construct from components + linear + ( + const dictionary& dict, + const phasePair& pair + ); + + + //- Destructor + virtual ~linear(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace wallDampingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/noWallDamping/noWallDamping.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/noWallDamping/noWallDamping.C new file mode 100644 index 0000000000..0a177a6090 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/noWallDamping/noWallDamping.C @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "noWallDamping.H" +#include "phasePair.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallDampingModels +{ + defineTypeNameAndDebug(noWallDamping, 0); + addToRunTimeSelectionTable + ( + wallDampingModel, + noWallDamping, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallDampingModels::noWallDamping::noWallDamping +( + const dictionary& dict, + const phasePair& pair +) +: + wallDampingModel(dict, pair) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallDampingModels::noWallDamping::~noWallDamping() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::wallDampingModels::noWallDamping::damp +( + const tmp& Cl +) const +{ + return Cl; +} + + +Foam::tmp +Foam::wallDampingModels::noWallDamping::damp +( + const tmp& F +) const +{ + return F; +} + + +Foam::tmp +Foam::wallDampingModels::noWallDamping::damp +( + const tmp& Ff +) const +{ + return Ff; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/noWallDamping/noWallDamping.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/noWallDamping/noWallDamping.H new file mode 100644 index 0000000000..7c4100934c --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/noWallDamping/noWallDamping.H @@ -0,0 +1,108 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::wallDampingModels::noWallDamping + +Description + +SourceFiles + noWallDamping.C + +\*---------------------------------------------------------------------------*/ + +#ifndef noWallDamping_H +#define noWallDamping_H + +#include "wallDampingModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class phasePair; + +namespace wallDampingModels +{ + +/*---------------------------------------------------------------------------*\ + Class noWallDamping Declaration +\*---------------------------------------------------------------------------*/ + +class noWallDamping +: + public wallDampingModel +{ +public: + + //- Runtime type information + TypeName("none"); + + + // Constructors + + //- Construct from components + noWallDamping + ( + const dictionary& dict, + const phasePair& pair + ); + + + //- Destructor + virtual ~noWallDamping(); + + + // Member Functions + + //- Return damped coefficient + virtual tmp damp + ( + const tmp& + ) const; + + //- Return damped force + virtual tmp damp + ( + const tmp& + ) const; + + //- Return damped face force + virtual tmp damp + ( + const tmp& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace wallDampingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/sine/sineWallDamping.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/sine/sineWallDamping.C new file mode 100644 index 0000000000..eb975aa85f --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/sine/sineWallDamping.C @@ -0,0 +1,79 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "sineWallDamping.H" +#include "phasePair.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace wallDampingModels +{ + defineTypeNameAndDebug(sine, 0); + addToRunTimeSelectionTable + ( + wallDampingModel, + sine, + dictionary + ); +} +} + + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +Foam::tmp +Foam::wallDampingModels::sine::limiter() const +{ + return sin + ( + constant::mathematical::piByTwo + *min(yWall()/(Cd_*pair_.dispersed().d()), scalar(1)) + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallDampingModels::sine::sine +( + const dictionary& dict, + const phasePair& pair +) +: + interpolated(dict, pair), + Cd_("Cd", dimless, dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallDampingModels::sine::~sine() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/sine/sineWallDamping.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/sine/sineWallDamping.H new file mode 100644 index 0000000000..7a87afe14e --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/sine/sineWallDamping.H @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::wallDampingModels::sine + +Description + +SourceFiles + sineWallDamping.C + +\*---------------------------------------------------------------------------*/ + +#ifndef sineWallDamping_H +#define sineWallDamping_H + +#include "interpolatedWallDamping.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class phasePair; + +namespace wallDampingModels +{ + +/*---------------------------------------------------------------------------*\ + Class sine Declaration +\*---------------------------------------------------------------------------*/ + +class sine +: + public interpolated +{ + // Private data + + //- Diameter coefficient + const dimensionedScalar Cd_; + + +protected: + + // Protected member functions + + //- Return the force limiter field + virtual tmp limiter() const; + + +public: + + //- Runtime type information + TypeName("sine"); + + + // Constructors + + //- Construct from components + sine + ( + const dictionary& dict, + const phasePair& pair + ); + + + //- Destructor + virtual ~sine(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace wallDampingModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C new file mode 100644 index 0000000000..a5b0748679 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "wallDampingModel.H" +#include "phasePair.H" + +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // + +Foam::autoPtr Foam::wallDampingModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + word wallDampingModelType(dict.lookup("type")); + + Info<< "Selecting wallDampingModel for " + << pair << ": " << wallDampingModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(wallDampingModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorInFunction + << "Unknown wallDampingModelType type " + << wallDampingModelType << endl << endl + << "Valid wallDampingModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return cstrIter()(dict, pair); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.C new file mode 100644 index 0000000000..4ba2e6fcd8 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.C @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "wallDampingModel.H" +#include "phasePair.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(wallDampingModel, 0); + defineRunTimeSelectionTable(wallDampingModel, dictionary); +} + +const Foam::dimensionSet Foam::wallDampingModel::dimF(1, -2, -2, 0, 0); + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::wallDampingModel::wallDampingModel +( + const dictionary& dict, + const phasePair& pair +) +: + wallDependentModel(pair.phase1().mesh()), + pair_(pair) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::wallDampingModel::~wallDampingModel() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.H new file mode 100644 index 0000000000..395a363af2 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/wallDampingModel.H @@ -0,0 +1,146 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::wallDampingModel + +Description + +SourceFiles + wallDampingModel.C + newWallDampingModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef wallDampingModel_H +#define wallDampingModel_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "wallDependentModel.H" +#include "volFields.H" +#include "dictionary.H" +#include "runTimeSelectionTables.H" + +namespace Foam +{ + +class phasePair; + +/*---------------------------------------------------------------------------*\ + Class wallDampingModel Declaration +\*---------------------------------------------------------------------------*/ + +class wallDampingModel +: + public wallDependentModel +{ +protected: + + // Protected data + + //- Phase pair + const phasePair& pair_; + + +public: + + //- Runtime type information + TypeName("wallDampingModel"); + + + // Declare runtime construction + + declareRunTimeSelectionTable + ( + autoPtr, + wallDampingModel, + dictionary, + ( + const dictionary& dict, + const phasePair& pair + ), + (dict, pair) + ); + + + // Static data members + + //- Coefficient dimensions + static const dimensionSet dimF; + + + // Constructors + + //- Construct from components + wallDampingModel + ( + const dictionary& dict, + const phasePair& pair + ); + + + //- Destructor + virtual ~wallDampingModel(); + + + // Selectors + + static autoPtr New + ( + const dictionary& dict, + const phasePair& pair + ); + + + // Member Functions + + //- Return damped coefficient + virtual tmp damp + ( + const tmp& + ) const = 0; + + //- Return damped force + virtual tmp damp + ( + const tmp& + ) const = 0; + + //- Return damped face force + virtual tmp damp + ( + const tmp& + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C index 9f7d905c19..08dfd7065d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C @@ -44,7 +44,7 @@ Foam::autoPtr Foam::wallLubricationModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("wallLubricationModel::New") + FatalErrorInFunction << "Unknown wallLubricationModelType type " << wallLubricationModelType << endl << endl << "Valid wallLubricationModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C index 2dcc6d0a5e..e288235568 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C @@ -43,7 +43,7 @@ Foam::autoPtr Foam::blendingMethod::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("blendingMethod::New") + FatalErrorInFunction << "Unknown blendingMethodType type " << blendingMethodType << endl << endl << "Valid blendingMethod types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/linear/linear.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/linear/linear.C index d9bfe2b598..5106653535 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/linear/linear.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/linear/linear.C @@ -93,14 +93,8 @@ Foam::blendingMethods::linear::linear < minPartlyContinuousAlpha_[*iter] ) { - FatalErrorIn - ( - "Foam::blendingMethods::linear::linear" - "(" - "const dictionary& dict," - "const wordList& phaseNames" - ")" - ) << "The supplied fully continuous volume fraction for " + FatalErrorInFunction + << "The supplied fully continuous volume fraction for " << *iter << " is less than the partly continuous value." << endl << exit(FatalError); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/options b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/options index db17065417..b93dd16af6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/options @@ -10,7 +10,6 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C index 175a993e30..8950f3d958 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C @@ -67,26 +67,7 @@ ThermalPhaseChangePhaseSystem IOobject::groupName("iDmdt", pair.name()), this->mesh().time().timeName(), this->mesh(), - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - this->mesh(), - dimensionedScalar("zero", dimDensity/dimTime, 0) - ) - ); - - // Initially assume no mass transfer - wDmdt_.insert - ( - pair, - new volScalarField - ( - IOobject - ( - IOobject::groupName("wDmdt", pair.name()), - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), this->mesh(), @@ -115,6 +96,101 @@ Foam::ThermalPhaseChangePhaseSystem::saturation() const } +template +Foam::autoPtr +Foam::ThermalPhaseChangePhaseSystem::heatTransfer() const +{ + typedef compressible::alphatPhaseChangeWallFunctionFvPatchScalarField + alphatPhaseChangeWallFunction; + + autoPtr eqnsPtr = + Foam::HeatAndMassTransferPhaseSystem::heatTransfer(); + + phaseSystem::heatTransferTable& eqns = eqnsPtr(); + + // Accumulate mDotL contributions from boundaries + forAllConstIter + ( + phaseSystem::phasePairTable, + this->phasePairs_, + phasePairIter + ) + { + const phasePair& pair(phasePairIter()); + + if (pair.ordered()) + { + continue; + } + + const phaseModel& phase = pair.phase1(); + const phaseModel& otherPhase = pair.phase2(); + + volScalarField mDotL + ( + IOobject + ( + "mDotL", + phase.mesh().time().timeName(), + phase.mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + phase.mesh(), + dimensionedScalar("",dimensionSet(1,-1,-3,0,0),0.0) + ); + + if + ( + otherPhase.mesh().foundObject + ( + "alphat." + otherPhase.name() + ) + ) + { + const volScalarField& alphat = + otherPhase.mesh().lookupObject + ( + "alphat." + otherPhase.name() + ); + + const fvPatchList& patches = this->mesh().boundary(); + forAll(patches, patchi) + { + const fvPatch& currPatch = patches[patchi]; + + if + ( + isA + ( + alphat.boundaryField()[patchi] + ) + ) + { + const scalarField& patchMDotL = + refCast + ( + alphat.boundaryField()[patchi] + ).mDotL(); + + forAll(patchMDotL,facei) + { + label faceCelli = currPatch.faceCells()[facei]; + mDotL[faceCelli] = patchMDotL[facei]; + } + } + } + } + + *eqns[otherPhase.name()] -= mDotL; + + } + + return eqnsPtr; +} + + template Foam::autoPtr Foam::ThermalPhaseChangePhaseSystem::massTransfer() const @@ -189,6 +265,8 @@ void Foam::ThermalPhaseChangePhaseSystem::correctThermo() BasePhaseSystem::correctThermo(); + + forAllConstIter ( phaseSystem::phasePairTable, @@ -206,6 +284,18 @@ void Foam::ThermalPhaseChangePhaseSystem::correctThermo() const phaseModel& phase1 = pair.phase1(); const phaseModel& phase2 = pair.phase2(); + Info<< phase1.name() << " min/max T " + << min(phase1.thermo().T()).value() + << " - " + << max(phase1.thermo().T()).value() + << endl; + + Info<< phase2.name() << " min/max T " + << min(phase2.thermo().T()).value() + << " - " + << max(phase2.thermo().T()).value() + << endl; + const volScalarField& T1(phase1.thermo().T()); const volScalarField& T2(phase2.thermo().T()); @@ -214,7 +304,6 @@ void Foam::ThermalPhaseChangePhaseSystem::correctThermo() volScalarField& dmdt(*this->dmdt_[pair]); volScalarField& iDmdt(*this->iDmdt_[pair]); - volScalarField& wDmdt(*this->wDmdt_[pair]); volScalarField& Tf = *this->Tf_[pair]; @@ -287,6 +376,21 @@ void Foam::ThermalPhaseChangePhaseSystem::correctThermo() << endl; // Accumulate dmdt contributions from boundaries + volScalarField wDmdt + ( + IOobject + ( + IOobject::groupName("wDmdt", pair.name()), + this->mesh().time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE, + false + ), + this->mesh(), + dimensionedScalar("zero", dimDensity/dimTime, 0) + ); + if ( phase2.mesh().foundObject @@ -295,9 +399,6 @@ void Foam::ThermalPhaseChangePhaseSystem::correctThermo() ) ) { - scalar wDmdtRelax(this->mesh().fieldRelaxationFactor("wDmdt")); - wDmdt *= (1 - wDmdtRelax); - const volScalarField& alphat = phase2.mesh().lookupObject ( @@ -326,7 +427,7 @@ void Foam::ThermalPhaseChangePhaseSystem::correctThermo() forAll(patchDmdt,facei) { label faceCelli = currPatch.faceCells()[facei]; - wDmdt[faceCelli] += wDmdtRelax*patchDmdt[facei]; + wDmdt[faceCelli] += patchDmdt[facei]; } } } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H index e67b8209fe..b54c183150 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H @@ -77,10 +77,6 @@ protected: HashPtrTable iDmdt_; - //- Wall Mass transfer rate - HashPtrTable - wDmdt_; - public: @@ -99,6 +95,9 @@ public: //- Return the saturationModel const saturationModel& saturation() const; + //- Return the heat transfer matrices + virtual autoPtr heatTransfer() const; + //- Return the mass transfer matrices virtual autoPtr massTransfer() const; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C index 8db37d2bf0..b58f00291b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C @@ -48,7 +48,7 @@ Foam::autoPtr Foam::diameterModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("diameterModel::New") + FatalErrorInFunction << "Unknown diameterModelType type " << diameterModelType << endl << endl << "Valid diameterModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C index 8d705049f7..b737cd0322 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C @@ -37,7 +37,6 @@ Foam::AnisothermalPhaseModel::AnisothermalPhaseModel ) : BasePhaseModel(fluid, phaseName, index), - divU_(NULL), K_ ( IOobject @@ -88,10 +87,7 @@ Foam::AnisothermalPhaseModel::heEqn() const volScalarField& contErr(this->continuityError()); - const volScalarField alphaEff - ( - this->thermo_->alphaEff(this->turbulence().mut()) - ); + const volScalarField alphaEff(this->turbulence().alphaEff()); volScalarField& he = this->thermo_->he(); @@ -136,25 +132,6 @@ bool Foam::AnisothermalPhaseModel::compressible() const } -template -const Foam::tmp& -Foam::AnisothermalPhaseModel::divU() const -{ - return divU_; -} - - -template -void -Foam::AnisothermalPhaseModel::divU -( - const tmp& divU -) -{ - divU_ = divU; -} - - template const Foam::volScalarField& Foam::AnisothermalPhaseModel::K() const diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H index a8c4be694a..1b7ec2f615 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H @@ -54,9 +54,6 @@ class AnisothermalPhaseModel { // Private data - //- Dilatation rate - tmp divU_; - //- Kinetic energy volScalarField K_; @@ -94,12 +91,6 @@ public: //- Return true if the phase is compressible otherwise false virtual bool compressible() const; - //- Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi)) - virtual const tmp& divU() const; - - //- Set the phase dilatation rate (d(alpha)/dt + div(alpha*phi)) - virtual void divU(const tmp& divU); - //- Return the phase kinetic energy virtual const volScalarField& K() const; }; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 2f0c8726fd..0b87f228ff 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -25,7 +25,7 @@ License #include "MovingPhaseModel.H" #include "phaseSystem.H" -#include "PhaseCompressibleTurbulenceModel.H" +#include "phaseCompressibleTurbulenceModel.H" #include "fixedValueFvPatchFields.H" #include "slipFvPatchFields.H" #include "partialSlipFvPatchFields.H" @@ -174,9 +174,10 @@ Foam::MovingPhaseModel::MovingPhaseModel fluid.mesh(), dimensionedVector("0", dimAcceleration, vector::zero) ), + divU_(NULL), turbulence_ ( - PhaseCompressibleTurbulenceModel::New + phaseCompressibleTurbulenceModel::New ( *this, this->thermo().rho(), @@ -317,6 +318,25 @@ Foam::MovingPhaseModel::DUDt() const } +template +const Foam::tmp& +Foam::MovingPhaseModel::divU() const +{ + return divU_; +} + + +template +void +Foam::MovingPhaseModel::divU +( + const tmp& divU +) +{ + divU_ = divU; +} + + template Foam::tmp Foam::MovingPhaseModel::continuityError() const @@ -374,7 +394,7 @@ Foam::MovingPhaseModel::alphaRhoPhi() template -const Foam::PhaseCompressibleTurbulenceModel& +const Foam::phaseCompressibleTurbulenceModel& Foam::MovingPhaseModel::turbulence() const { return turbulence_; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H index b78762fd53..6c5da0bde9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H @@ -47,15 +47,13 @@ SourceFiles #define MovingPhaseModel_H #include "phaseModel.H" +#include "phaseCompressibleTurbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -template -class PhaseCompressibleTurbulenceModel; - /*---------------------------------------------------------------------------*\ Class phaseModel Declaration \*---------------------------------------------------------------------------*/ @@ -82,8 +80,11 @@ class MovingPhaseModel //- Lagrangian acceleration field (needed for virtual-mass) volVectorField DUDt_; + //- Dilatation rate + tmp divU_; + //- Turbulence model - autoPtr > turbulence_; + autoPtr turbulence_; //- Continuity error volScalarField continuityError_; @@ -153,6 +154,12 @@ public: //- Return the substantive acceleration virtual tmp DUDt() const; + //- Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi)) + virtual const tmp& divU() const; + + //- Set the phase dilatation rate (d(alpha)/dt + div(alpha*phi)) + virtual void divU(const tmp& divU); + //- Constant access the continuity error virtual tmp continuityError() const; @@ -178,8 +185,7 @@ public: // Turbulence //- Return the turbulence model - virtual const PhaseCompressibleTurbulenceModel& - turbulence() const; + virtual const phaseCompressibleTurbulenceModel& turbulence() const; }; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModel.H new file mode 100644 index 0000000000..862f75646e --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModel.H @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Typedef + Foam::phaseCompressibleTurbulenceModel + +Description + Typedef for phaseCompressibleTurbulenceModel + +\*---------------------------------------------------------------------------*/ + +#ifndef phaseCompressibleTurbulenceModel_H +#define phaseCompressibleTurbulenceModel_H + +#include "phaseCompressibleTurbulenceModelFwd.H" +#include "PhaseCompressibleTurbulenceModel.H" +#include "ThermalDiffusivity.H" +#include "phaseModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef ThermalDiffusivity > + phaseCompressibleTurbulenceModel; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModelFwd.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModelFwd.H new file mode 100644 index 0000000000..9600f6ef9b --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModelFwd.H @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Typedef + Foam::phaseCompressibleTurbulenceModel + +Description + Forward declaration of typedef for phaseCompressibleTurbulenceModel + +\*---------------------------------------------------------------------------*/ + +#ifndef phaseCompressibleTurbulenceModelFwd_H +#define phaseCompressibleTurbulenceModelFwd_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + class phaseModel; + + template + class PhaseCompressibleTurbulenceModel; + + template + class ThermalDiffusivity; + + typedef ThermalDiffusivity > + phaseCompressibleTurbulenceModel; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.C index be28005744..9d94f7627e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.C @@ -56,13 +56,7 @@ Foam::PurePhaseModel::YiEqn volScalarField& Yi ) { - notImplemented - ( - "template " - "Foam::tmp " - "Foam::PurePhaseModel::YiEqn" - "(volScalarField& Yi) const" - ); + NotImplemented; return tmp(); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C index 0a577313b2..6c1ca526db 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C @@ -45,7 +45,7 @@ Foam::autoPtr Foam::phaseModel::New if (cstrIter == phaseSystemConstructorTablePtr_->end()) { - FatalErrorIn("phaseModel::New") + FatalErrorInFunction << "Unknown phaseModelType type " << phaseModelType << endl << endl << "Valid phaseModel types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C index eb2e871530..8d73c1286c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C @@ -76,7 +76,7 @@ Foam::phaseModel::phaseModel Foam::autoPtr Foam::phaseModel::clone() const { - notImplemented("phaseModel::clone() const"); + NotImplemented; return autoPtr(NULL); } @@ -167,7 +167,7 @@ bool Foam::phaseModel::compressible() const const Foam::tmp& Foam::phaseModel::divU() const { - notImplemented("Foam::phaseModel::divU()"); + NotImplemented; static tmp divU_(NULL); return divU_; } @@ -175,7 +175,7 @@ const Foam::tmp& Foam::phaseModel::divU() const void Foam::phaseModel::divU(const tmp& divU) { - WarningIn("phaseModel::divU(const tmp& divU)") + WarningInFunction << "Attempt to set the dilatation rate of an incompressible phase" << endl; } @@ -183,7 +183,7 @@ void Foam::phaseModel::divU(const tmp& divU) const Foam::volScalarField& Foam::phaseModel::K() const { - notImplemented("Foam::phaseModel::K()"); + NotImplemented; return volScalarField::null(); } @@ -196,7 +196,7 @@ const Foam::surfaceScalarField& Foam::phaseModel::DbyA() const void Foam::phaseModel::DbyA(const tmp& DbyA) { - WarningIn("phaseModel::DbyA(const surfaceScalarField& DbyA)") + WarningInFunction << "Attempt to set the dilatation rate of an incompressible phase" << endl; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H index 27d78390ca..719ef80a8c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H @@ -38,6 +38,7 @@ SourceFiles #include "surfaceFields.H" #include "fvMatricesFwd.H" #include "rhoThermo.H" +#include "phaseCompressibleTurbulenceModelFwd.H" #include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,9 +49,6 @@ namespace Foam class phaseSystem; class diameterModel; -template -class PhaseCompressibleTurbulenceModel; - /*---------------------------------------------------------------------------*\ Class phaseModel Declaration \*---------------------------------------------------------------------------*/ @@ -342,7 +340,7 @@ public: // Turbulence //- Return the turbulence model - virtual const PhaseCompressibleTurbulenceModel& + virtual const phaseCompressibleTurbulenceModel& turbulence() const = 0; }; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair/orderedPhasePair.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair/orderedPhasePair.C index 8c2bb470ad..d6ea3da0b5 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair/orderedPhasePair.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair/orderedPhasePair.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "orderedPhasePair.H" -#include "aspectRatioModel.H" +#include "phaseSystem.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -73,15 +73,7 @@ Foam::word Foam::orderedPhasePair::name() const Foam::tmp Foam::orderedPhasePair::E() const { - return - phase1().mesh().lookupObject - ( - IOobject::groupName - ( - aspectRatioModel::typeName, - orderedPhasePair::name() - ) - ).E(); + return phase1().fluid().E(*this); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair/orderedPhasePair.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair/orderedPhasePair.H index 4779fd333d..be4e23261d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair/orderedPhasePair.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair/orderedPhasePair.H @@ -41,8 +41,6 @@ SourceFiles namespace Foam { -class aspectRatioModel; - /*---------------------------------------------------------------------------*\ Class orderedPhasePair Declaration \*---------------------------------------------------------------------------*/ @@ -51,17 +49,6 @@ class orderedPhasePair : public phasePair { - // Private data - - //- Aspect ratio model - autoPtr aspectRatio_; - - - // Private member functions - - //- Set the aspect ratio model, if there is one - void setAspectRatioModel(const dictTable aspectRatioTable); - public: diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePair.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePair.C index 16478646d7..70ddd04270 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePair.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePair.C @@ -67,7 +67,7 @@ Foam::phasePair::~phasePair() const Foam::phaseModel& Foam::phasePair::dispersed() const { - FatalErrorIn("Foam::phasePair::dispersed() const") + FatalErrorInFunction << "Requested dispersed phase from an unordered pair." << exit(FatalError); @@ -77,7 +77,7 @@ const Foam::phaseModel& Foam::phasePair::dispersed() const const Foam::phaseModel& Foam::phasePair::continuous() const { - FatalErrorIn("Foam::phasePair::dispersed() const") + FatalErrorInFunction << "Requested continuous phase from an unordered pair." << exit(FatalError); @@ -191,7 +191,7 @@ Foam::tmp Foam::phasePair::Ta() const Foam::tmp Foam::phasePair::E() const { - FatalErrorIn("Foam::phasePair::E() const") + FatalErrorInFunction << "Requested aspect ratio of the dispersed phase in an unordered pair" << exit(FatalError); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePairKey/phasePairKey.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePairKey/phasePairKey.C index 13ae288f08..da6627b922 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePairKey/phasePairKey.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePairKey/phasePairKey.C @@ -133,14 +133,8 @@ Foam::Istream& Foam::operator>>(Istream& is, phasePairKey& key) } else { - FatalErrorIn - ( - "friend Istream& operator>>" - "(" - "Istream& is, " - "phasePairKey& key" - ")" - ) << "Phase pair type is not recognised. " + FatalErrorInFunction + << "Phase pair type is not recognised. " << temp << "Use (phaseDispersed in phaseContinuous) for an ordered" << "pair, or (phase1 and pase2) for an unordered pair." diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C index aa9380758d..4efd86189b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C @@ -221,6 +221,36 @@ Foam::tmp Foam::phaseSystem::U() const } +Foam::tmp +Foam::phaseSystem::E(const phasePairKey& key) const +{ + if (aspectRatioModels_.found(key)) + { + return aspectRatioModels_[key]->E(); + } + else + { + return tmp + ( + new volScalarField + ( + IOobject + ( + aspectRatioModel::typeName + ":E", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar("zero", dimless, 1) + ) + ); + } +} + + Foam::tmp Foam::phaseSystem::sigma(const phasePairKey& key) const { diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H index 001f1acdd3..c5ec2aa501 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H @@ -45,7 +45,7 @@ SourceFiles #include "PtrListDictionary.H" #include "IOMRFZoneList.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "volFields.H" #include "surfaceFields.H" @@ -177,7 +177,7 @@ protected: IOMRFZoneList MRF_; //- Optional FV-options - mutable fv::IOoptionList fvOptions_; + mutable fv::options fvOptions_; //- Blending methods blendingMethodTable blendingMethods_; @@ -310,6 +310,9 @@ public: //- Access the rate of change of the pressure inline volScalarField& dpdt(); + //- Return the aspect-ratio + tmp E(const phasePairKey& key) const; + //- Return the surface tension coefficient tmp sigma(const phasePairKey& key) const; @@ -317,7 +320,7 @@ public: inline const IOMRFZoneList& MRF() const; //- Optional FV-options - inline fv::IOoptionList& fvOptions() const; + inline fv::options& fvOptions() const; //- Access a sub model between a phase pair template diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H index 0f9aef5033..125d286d9d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H @@ -82,7 +82,7 @@ inline const Foam::IOMRFZoneList& Foam::phaseSystem::MRF() const } -inline Foam::fv::IOoptionList& Foam::phaseSystem::fvOptions() const +inline Foam::fv::options& Foam::phaseSystem::fvOptions() const { return fvOptions_; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H index 386331e0ee..422f6324b1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H @@ -1,3 +1,4 @@ +for (int Ecorr=0; Ecorr Foam::multiphaseSystem::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("multiphaseSystem::New") + FatalErrorInFunction << "Unknown multiphaseSystemType type " << multiphaseSystemType << endl << endl << "Valid multiphaseSystem types are : " << endl diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C index cb90ee1196..f23b5649fc 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C @@ -24,6 +24,9 @@ License Application reactingMultiphaseEulerFoam +Group + grpMultiphaseSolvers + Description Solver for a system of any number of compressible fluid phases with a common pressure, but otherwise separate properties. The type of phase model @@ -76,6 +79,11 @@ int main(int argc, char *argv[]) //#include "pUf/createDDtU.H" + int nEnergyCorrectors + ( + pimple.dict().lookupOrDefault("nEnergyCorrectors", 1) + ); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H index 684e5ede43..3060c444de 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H @@ -1,3 +1,4 @@ +for (int Ecorr=0; Ecorr("nEnergyCorrectors", 1) + ); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/files b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/files index 10a0e8679a..300e1902a9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/files +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/files @@ -35,6 +35,10 @@ kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C +derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C +derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C +derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C +derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libtwoPhaseReactingTurbulenceModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/options index f003ce2281..3c3db948dd 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/options @@ -10,5 +10,4 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C old mode 100644 new mode 100755 index a37553e338..0b026f4e64 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C @@ -24,15 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H" -#include "compressibleTurbulenceModel.H" #include "fvPatchFieldMapper.H" -#include "volFields.H" #include "addToRunTimeSelectionTable.H" -#include "twoPhaseSystem.H" -#include "phaseSystem.H" -#include "ThermalPhaseChangePhaseSystem.H" -#include "MomentumTransferPhaseSystem.H" -#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,86 +34,6 @@ namespace Foam namespace compressible { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -scalar alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::maxExp_ - = 50.0; -scalar alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::tolerance_ - = 0.01; -label alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::maxIters_ - = 10; - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::checkType() -{ - if (!isA(patch())) - { - FatalErrorIn - ( - "alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField" - "::checkType()" - ) - << "Patch type for patch " << patch().name() << " must be wall\n" - << "Current patch type is " << patch().type() << nl - << exit(FatalError); - } -} - - -tmp -alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::Psmooth -( - const scalarField& Prat -) const -{ - return 9.24*(pow(Prat, 0.75) - 1.0)*(1.0 + 0.28*exp(-0.007*Prat)); -} - - -tmp -alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::yPlusTherm -( - const scalarField& P, - const scalarField& Prat -) const -{ - - tmp typtf(new scalarField(this->size())); - scalarField& yptf = typtf(); - - forAll(yptf, faceI) - { - scalar ypt = 11.0; - - for (int i=0; i& iF ) : - alphatPhaseChangeWallFunctionFvPatchScalarField(p, iF), - Prt_(0.85), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - fixedDmdt_(0.0) + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF), + relax_(1.0), + fixedDmdt_(0.0), + L_(0.0) { checkType(); } @@ -149,61 +60,57 @@ alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField const dictionary& dict ) : - alphatPhaseChangeWallFunctionFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault("Prt", 0.85)), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)), - fixedDmdt_(dict.lookupOrDefault("fixedDmdt", 0.0)) + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict), + relax_(dict.lookupOrDefault("relax", 1.0)), + fixedDmdt_(dict.lookupOrDefault("fixedDmdt", 0.0)), + L_(dict.lookupOrDefault("L", 0.0)) {} alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField:: alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField ( - const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField& ptf, + const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField& psf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - alphatPhaseChangeWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - Prt_(ptf.Prt_), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - fixedDmdt_(ptf.fixedDmdt_) + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + ( + psf, + p, + iF, + mapper + ), + fixedDmdt_(psf.fixedDmdt_), + L_(psf.L_) {} alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField:: alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField ( - const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField& awfpsf + const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField& psf ) : - alphatPhaseChangeWallFunctionFvPatchScalarField(awfpsf), - Prt_(awfpsf.Prt_), - Cmu_(awfpsf.Cmu_), - kappa_(awfpsf.kappa_), - E_(awfpsf.E_), - fixedDmdt_(awfpsf.fixedDmdt_) + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(psf), + relax_(psf.relax_), + fixedDmdt_(psf.fixedDmdt_), + L_(psf.L_) {} - alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField:: alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField ( - const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField& awfpsf, + const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField& psf, const DimensionedField& iF ) : - alphatPhaseChangeWallFunctionFvPatchScalarField(awfpsf, iF), - Prt_(awfpsf.Prt_), - Cmu_(awfpsf.Cmu_), - kappa_(awfpsf.kappa_), - E_(awfpsf.E_), - fixedDmdt_(awfpsf.fixedDmdt_) + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(psf, iF), + relax_(psf.relax_), + fixedDmdt_(psf.fixedDmdt_), + L_(psf.L_) {} @@ -216,125 +123,10 @@ void alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::updateCoeffs() return; } - // Lookup the fluid model - const ThermalPhaseChangePhaseSystem - < - MomentumTransferPhaseSystem - >& fluid = - refCast - < - const ThermalPhaseChangePhaseSystem - < - MomentumTransferPhaseSystem - > - > - ( - db().lookupObject("phaseProperties") - ); + dmdt_ = (1 - relax_)*dmdt_ + relax_*fixedDmdt_; + mDotL_ = dmdt_*L_; - const phaseModel& liquid - ( - fluid.phase1().name() == dimensionedInternalField().group() - ? fluid.phase1() - : fluid.phase2() - ); - - const label patchi = patch().index(); - - // Retrieve turbulence properties from model - const compressibleTurbulenceModel& turbModel = - db().lookupObject - ( - IOobject::groupName - ( - compressibleTurbulenceModel::propertiesName, - dimensionedInternalField().group() - ) - ); - - const scalar Cmu25 = pow025(Cmu_); - - const scalarField& y = turbModel.y()[patchi]; - - const tmp tmuw = turbModel.mu(patchi); - const scalarField& muw = tmuw(); - - const tmp talphaw = liquid.thermo().alpha(patchi); - const scalarField& alphaw = talphaw(); - - scalarField& alphatw = *this; - - const tmp tk = turbModel.k(); - const volScalarField& k = tk(); - const fvPatchScalarField& kw = k.boundaryField()[patchi]; - - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - const scalarField magGradUw(mag(Uw.snGrad())); - - const fvPatchScalarField& rhow = turbModel.rho().boundaryField()[patchi]; - const fvPatchScalarField& hew = - liquid.thermo().he().boundaryField()[patchi]; - - const fvPatchScalarField& Tw = - liquid.thermo().T().boundaryField()[patchi]; - - scalarField Tp(Tw.patchInternalField()); - - // Heat flux [W/m2] - lagging alphatw - const scalarField qDot - ( - (alphatw + alphaw)*hew.snGrad() - ); - - scalarField uTau(Cmu25*sqrt(kw)); - - scalarField yPlus(uTau*y/(muw/rhow)); - - scalarField Pr(muw/alphaw); - - // Molecular-to-turbulent Prandtl number ratio - scalarField Prat(Pr/Prt_); - - // Thermal sublayer thickness - scalarField P(this->Psmooth(Prat)); - - scalarField yPlusTherm(this->yPlusTherm(P, Prat)); - - scalarField alphatConv(this->size(), 0.0); - - // Populate boundary values - forAll(alphatw, faceI) - { - // Evaluate new effective thermal diffusivity - scalar alphaEff = 0.0; - if (yPlus[faceI] < yPlusTherm[faceI]) - { - scalar A = qDot[faceI]*rhow[faceI]*uTau[faceI]*y[faceI]; - scalar B = qDot[faceI]*Pr[faceI]*yPlus[faceI]; - scalar C = Pr[faceI]*0.5*rhow[faceI]*uTau[faceI]*sqr(magUp[faceI]); - alphaEff = A/(B + C + VSMALL); - } - else - { - scalar A = qDot[faceI]*rhow[faceI]*uTau[faceI]*y[faceI]; - scalar B = - qDot[faceI]*Prt_*(1.0/kappa_*log(E_*yPlus[faceI]) + P[faceI]); - scalar magUc = - uTau[faceI]/kappa_*log(E_*yPlusTherm[faceI]) - mag(Uw[faceI]); - scalar C = - 0.5*rhow[faceI]*uTau[faceI] - *(Prt_*sqr(magUp[faceI]) + (Pr[faceI] - Prt_)*sqr(magUc)); - alphaEff = A/(B + C + VSMALL); - } - - // Update convective heat transfer turbulent thermal diffusivity - alphatConv[faceI] = max(0.0, alphaEff - alphaw[faceI]); - } - - dmdt_ = fixedDmdt_; - - operator==(alphatConv); + operator==(calcAlphat(*this)); fixedValueFvPatchScalarField::updateCoeffs(); } @@ -346,11 +138,9 @@ void alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::write ) const { fvPatchField::write(os); - os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl; - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + os.writeKeyword("relax") << relax_ << token::END_STATEMENT << nl; os.writeKeyword("fixedDmdt") << fixedDmdt_ << token::END_STATEMENT << nl; + os.writeKeyword("L") << L_ << token::END_STATEMENT << nl; dmdt_.writeEntry("dmdt", os); writeEntry("value", os); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H old mode 100644 new mode 100755 index bd9426fdb6..4238f77444 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H @@ -22,17 +22,19 @@ License along with OpenFOAM. If not, see . Class - Foam::compressible::alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField + Foam::compressible:: + alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField Group grpCmpWallFunctions Description - A simple alphatPhaseChangeWallFunctionFvPatchScalarField with a fixed - volumetric phase-change mass flux. + A simple alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField with + a fixed volumetric phase-change mass flux. SeeAlso - Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField + Foam::compressible:: + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField SourceFiles alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C @@ -42,7 +44,7 @@ SourceFiles #ifndef compressibleAlphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField_H #define compressibleAlphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField_H -#include "alphatPhaseChangeWallFunctionFvPatchScalarField.H" +#include "alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,47 +59,18 @@ namespace compressible class alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField : - public alphatPhaseChangeWallFunctionFvPatchScalarField + public alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField { // Private data - //- Turbulent Prandtl number - scalar Prt_; + //- dmdt relaxationFactor + scalar relax_; - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- E coefficient + //- Volumetric phase-change mass flux in near wall cells scalar fixedDmdt_; - - // Solution parameters - - static scalar maxExp_; - static scalar tolerance_; - static label maxIters_; - - - // Private Member Functions - - //- Check the type of the patch - void checkType(); - - //- 'P' function - tmp Psmooth(const scalarField& Prat) const; - - //- Calculate y+ at the edge of the thermal laminar sublayer - tmp yPlusTherm - ( - const scalarField& P, - const scalarField& Prat - ) const; + //- Latent heat + scalar L_; public: @@ -178,13 +151,6 @@ public: // Member functions - //- Return the rate of phase-change - virtual const scalarField& dmdt() const - { - return dmdt_; - } - - // Evaluation functions //- Update the coefficients associated with the patch field diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C new file mode 100755 index 0000000000..0d4a1128c0 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C @@ -0,0 +1,360 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H" +#include "fvPatchFieldMapper.H" +#include "addToRunTimeSelectionTable.H" + +#include "twoPhaseSystem.H" +#include "ThermalPhaseChangePhaseSystem.H" +#include "MomentumTransferPhaseSystem.H" +#include "compressibleTurbulenceModel.H" +#include "ThermalDiffusivity.H" +#include "PhaseCompressibleTurbulenceModel.H" +#include "wallFvPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +scalar alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::maxExp_ + = 50.0; +scalar alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::tolerance_ + = 0.01; +label alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::maxIters_ + = 10; + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::checkType() +{ + if (!isA(patch())) + { + FatalErrorInFunction + << "Patch type for patch " << patch().name() << " must be wall\n" + << "Current patch type is " << patch().type() << nl + << exit(FatalError); + } +} + + +tmp +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::Psmooth +( + const scalarField& Prat +) const +{ + return 9.24*(pow(Prat, 0.75) - 1.0)*(1.0 + 0.28*exp(-0.007*Prat)); +} + + +tmp +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm +( + const scalarField& P, + const scalarField& Prat +) const +{ + tmp typsf(new scalarField(this->size())); + scalarField& ypsf = typsf(); + + forAll(ypsf, faceI) + { + scalar ypt = 11.0; + + for (int i=0; i +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat +( + const scalarField& prevAlphat +) const +{ + // Lookup the fluid model + const ThermalPhaseChangePhaseSystem + < + MomentumTransferPhaseSystem + >& fluid = + refCast + < + const ThermalPhaseChangePhaseSystem + < + MomentumTransferPhaseSystem + > + > + ( + db().lookupObject("phaseProperties") + ); + + const phaseModel& liquid + ( + fluid.phase1().name() == dimensionedInternalField().group() + ? fluid.phase1() + : fluid.phase2() + ); + + const label patchi = patch().index(); + + // Retrieve turbulence properties from model + const phaseCompressibleTurbulenceModel& turbModel = liquid.turbulence(); + + const scalar Cmu25 = pow025(Cmu_); + + const scalarField& y = turbModel.y()[patchi]; + + const tmp tmuw = turbModel.mu(patchi); + const scalarField& muw = tmuw(); + + const tmp talphaw = liquid.thermo().alpha(patchi); + const scalarField& alphaw = talphaw(); + + const tmp tk = turbModel.k(); + const volScalarField& k = tk(); + const fvPatchScalarField& kw = k.boundaryField()[patchi]; + + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; + const scalarField magUp(mag(Uw.patchInternalField() - Uw)); + const scalarField magGradUw(mag(Uw.snGrad())); + + const fvPatchScalarField& rhow = turbModel.rho().boundaryField()[patchi]; + const fvPatchScalarField& hew = + liquid.thermo().he().boundaryField()[patchi]; + + const fvPatchScalarField& Tw = + liquid.thermo().T().boundaryField()[patchi]; + + scalarField Tp(Tw.patchInternalField()); + + // Heat flux [W/m2] - lagging alphatw + const scalarField qDot + ( + (prevAlphat + alphaw)*hew.snGrad() + ); + + scalarField uTau(Cmu25*sqrt(kw)); + + scalarField yPlus(uTau*y/(muw/rhow)); + + scalarField Pr(muw/alphaw); + + // Molecular-to-turbulent Prandtl number ratio + scalarField Prat(Pr/Prt_); + + // Thermal sublayer thickness + scalarField P(this->Psmooth(Prat)); + + scalarField yPlusTherm(this->yPlusTherm(P, Prat)); + + tmp talphatConv(new scalarField(this->size())); + scalarField& alphatConv = talphatConv(); + + // Populate boundary values + forAll(alphatConv, faceI) + { + // Evaluate new effective thermal diffusivity + scalar alphaEff = 0.0; + if (yPlus[faceI] < yPlusTherm[faceI]) + { + scalar A = qDot[faceI]*rhow[faceI]*uTau[faceI]*y[faceI]; + scalar B = qDot[faceI]*Pr[faceI]*yPlus[faceI]; + scalar C = Pr[faceI]*0.5*rhow[faceI]*uTau[faceI]*sqr(magUp[faceI]); + alphaEff = A/(B + C + VSMALL); + } + else + { + scalar A = qDot[faceI]*rhow[faceI]*uTau[faceI]*y[faceI]; + scalar B = + qDot[faceI]*Prt_*(1.0/kappa_*log(E_*yPlus[faceI]) + P[faceI]); + scalar magUc = + uTau[faceI]/kappa_*log(E_*yPlusTherm[faceI]) - mag(Uw[faceI]); + scalar C = + 0.5*rhow[faceI]*uTau[faceI] + *(Prt_*sqr(magUp[faceI]) + (Pr[faceI] - Prt_)*sqr(magUc)); + alphaEff = A/(B + C + VSMALL); + } + + // Update convective heat transfer turbulent thermal diffusivity + alphatConv[faceI] = max(0.0, alphaEff - alphaw[faceI]); + } + + return talphatConv; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField:: +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + alphatPhaseChangeWallFunctionFvPatchScalarField(p, iF), + Prt_(0.85), + Cmu_(0.09), + kappa_(0.41), + E_(9.8) +{ + checkType(); +} + + +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField:: +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + alphatPhaseChangeWallFunctionFvPatchScalarField(p, iF, dict), + Prt_(dict.lookupOrDefault("Prt", 0.85)), + Cmu_(dict.lookupOrDefault("Cmu", 0.09)), + kappa_(dict.lookupOrDefault("kappa", 0.41)), + E_(dict.lookupOrDefault("E", 9.8)) +{} + + +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField:: +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField +( + const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + alphatPhaseChangeWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + Prt_(ptf.Prt_), + Cmu_(ptf.Cmu_), + kappa_(ptf.kappa_), + E_(ptf.E_) +{} + + +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField:: +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField +( + const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField& awfpsf +) +: + alphatPhaseChangeWallFunctionFvPatchScalarField(awfpsf), + Prt_(awfpsf.Prt_), + Cmu_(awfpsf.Cmu_), + kappa_(awfpsf.kappa_), + E_(awfpsf.E_) +{} + + +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField:: +alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField +( + const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField& awfpsf, + const DimensionedField& iF +) +: + alphatPhaseChangeWallFunctionFvPatchScalarField(awfpsf, iF), + Prt_(awfpsf.Prt_), + Cmu_(awfpsf.Cmu_), + kappa_(awfpsf.kappa_), + E_(awfpsf.E_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + operator==(calcAlphat(*this)); + + fixedValueFvPatchScalarField::updateCoeffs(); +} + + +void alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::write +( + Ostream& os +) const +{ + fvPatchField::write(os); + os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl; + os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; + os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; + os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + dmdt_.writeEntry("dmdt", os); + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField +( + fvPatchScalarField, + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H new file mode 100755 index 0000000000..76bc4e451d --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H @@ -0,0 +1,232 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::compressible:: + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + +Group + grpCmpWallFunctions + +Description + This boundary condition provides a thermal wall function for turbulent + thermal diffusivity (usually\c alphat) based on the Jayatilleke model for + the Eulerian multiphase solvers. + + \heading Patch usage + + \table + Property | Description | Required | Default value + Prt | Turbulent Prandtl number | no | 0.85 + Cmu | Model coefficient | no | 0.09 + kappa | von Karman constant | no | 0.41 + E | Model coefficient | no | 9.8 + \endtable + + Example of the boundary condition specification: + \verbatim + myPatch + { + type alphatPhaseChangeJayatillekeWallFunction; + Prt 0.85; + kappa 0.41; + E 9.8; + value uniform 0; // optional value entry + } + \endverbatim + +SeeAlso + Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField + +SourceFiles + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef compressiblealphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField_H +#define compressiblealphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField_H + +#include "alphatPhaseChangeWallFunctionFvPatchScalarField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + +/*---------------------------------------------------------------------------*\ + Class alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField +: + public alphatPhaseChangeWallFunctionFvPatchScalarField +{ + +protected: + + // Protected data + + //- Turbulent Prandtl number + scalar Prt_; + + //- Cmu coefficient + scalar Cmu_; + + //- Von Karman constant + scalar kappa_; + + //- E coefficient + scalar E_; + + // Solution parameters + + static scalar maxExp_; + static scalar tolerance_; + static label maxIters_; + + + // Protected Member Functions + + //- Check the type of the patch + void checkType(); + + //- 'P' function + tmp Psmooth(const scalarField& Prat) const; + + //- Calculate y+ at the edge of the thermal laminar sublayer + tmp yPlusTherm + ( + const scalarField& P, + const scalarField& Prat + ) const; + + //- Update turbulent thermal diffusivity + tmp calcAlphat + ( + const scalarField& prevAlphat + ) const; + + +public: + + //- Runtime type information + TypeName("compressible::alphatPhaseChangeJayatillekeWallFunction"); + + + // Constructors + + //- Construct from patch and internal field + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + // onto a new patch + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + ( + const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + ( + const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + ( + *this + ) + ); + } + + //- Construct as copy setting internal field reference + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + ( + const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + ( + *this, + iF + ) + ); + } + + + // Member functions + + // Evaluation functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + + // I-O + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C new file mode 100755 index 0000000000..924f8209a4 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C @@ -0,0 +1,388 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "alphatWallBoilingWallFunctionFvPatchScalarField.H" +#include "fvPatchFieldMapper.H" +#include "addToRunTimeSelectionTable.H" + +#include "twoPhaseSystem.H" +#include "phaseSystem.H" +#include "ThermalPhaseChangePhaseSystem.H" +#include "MomentumTransferPhaseSystem.H" +#include "compressibleTurbulenceModel.H" +#include "ThermalDiffusivity.H" +#include "PhaseCompressibleTurbulenceModel.H" +#include "saturationModel.H" +#include "wallFvPatch.H" +#include "uniformDimensionedFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +alphatWallBoilingWallFunctionFvPatchScalarField:: +alphatWallBoilingWallFunctionFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF), + relax_(0.5), + AbyV_(p.size(), 0.0), + alphatConv_(p.size(), 0.0) +{ + AbyV_ = this->patch().magSf(); + forAll(AbyV_,facei) + { + label faceCelli = this->patch().faceCells()[facei]; + AbyV_[facei] /= iF.mesh().V()[faceCelli]; + } +} + + +alphatWallBoilingWallFunctionFvPatchScalarField:: +alphatWallBoilingWallFunctionFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict), + relax_(dict.lookupOrDefault("relax", 0.5)), + AbyV_(p.size(), 0.0), + alphatConv_(p.size(), 0.0) +{ + if (dict.found("alphatConv")) + { + alphatConv_ = scalarField("alphatConv", dict, p.size()); + } + + AbyV_ = this->patch().magSf(); + forAll(AbyV_,facei) + { + label faceCelli = this->patch().faceCells()[facei]; + AbyV_[facei] /= iF.mesh().V()[faceCelli]; + } +} + + +alphatWallBoilingWallFunctionFvPatchScalarField:: +alphatWallBoilingWallFunctionFvPatchScalarField +( + const alphatWallBoilingWallFunctionFvPatchScalarField& psf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField + ( + psf, + p, + iF, + mapper + ), + relax_(psf.relax_), + AbyV_(psf.AbyV_), + alphatConv_(psf.alphatConv_, mapper) +{} + + +alphatWallBoilingWallFunctionFvPatchScalarField:: +alphatWallBoilingWallFunctionFvPatchScalarField +( + const alphatWallBoilingWallFunctionFvPatchScalarField& psf +) +: + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(psf), + relax_(psf.relax_), + AbyV_(psf.AbyV_), + alphatConv_(psf.alphatConv_) +{} + + +alphatWallBoilingWallFunctionFvPatchScalarField:: +alphatWallBoilingWallFunctionFvPatchScalarField +( + const alphatWallBoilingWallFunctionFvPatchScalarField& psf, + const DimensionedField& iF +) +: + alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(psf, iF), + relax_(psf.relax_), + AbyV_(psf.AbyV_), + alphatConv_(psf.alphatConv_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + // Lookup the fluid model + const ThermalPhaseChangePhaseSystem + >& + fluid + = refCast + < + const ThermalPhaseChangePhaseSystem + < + MomentumTransferPhaseSystem + > + > + ( + db().lookupObject("phaseProperties") + ); + + const phaseModel& liquid + ( + fluid.phase1().name() == dimensionedInternalField().group() + ? fluid.phase1() + : fluid.phase2() + ); + + const phaseModel& vapor(fluid.otherPhase(liquid)); + + const label patchi = patch().index(); + + // Retrieve turbulence properties from model + const phaseCompressibleTurbulenceModel& turbModel = liquid.turbulence(); + + const tmp tnutw = turbModel.nut(patchi); + + const scalar Cmu25(pow025(Cmu_)); + + const scalarField& y = turbModel.y()[patchi]; + + const tmp tmuw = turbModel.mu(patchi); + const scalarField& muw = tmuw(); + + const tmp talphaw = liquid.thermo().alpha(patchi); + const scalarField& alphaw = talphaw(); + + const tmp tk = turbModel.k(); + const volScalarField& k = tk(); + const fvPatchScalarField& kw = k.boundaryField()[patchi]; + + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; + const scalarField magUp(mag(Uw.patchInternalField() - Uw)); + const scalarField magGradUw(mag(Uw.snGrad())); + + const fvPatchScalarField& rhow = turbModel.rho().boundaryField()[patchi]; + const fvPatchScalarField& hew = + liquid.thermo().he().boundaryField()[patchi]; + + const fvPatchScalarField& Tw = + liquid.thermo().T().boundaryField()[patchi]; + const scalarField Tc(Tw.patchInternalField()); + + scalarField uTau(Cmu25*sqrt(kw)); + + scalarField yPlus(uTau*y/(muw/rhow)); + + scalarField Pr(muw/alphaw); + + // Molecular-to-turbulent Prandtl number ratio + scalarField Prat(Pr/Prt_); + + // Thermal sublayer thickness + scalarField P(this->Psmooth(Prat)); + + scalarField yPlusTherm(this->yPlusTherm(P, Prat)); + + const scalarField rhoc(rhow.patchInternalField()); + + tmp trhoVapor = vapor.thermo().rho(); + const volScalarField& rhoVapor = trhoVapor(); + const fvPatchScalarField& rhoVaporw = + rhoVapor.boundaryField()[patchi]; + const scalarField rhoVaporp(rhoVaporw.patchInternalField()); + + tmp tCp = liquid.thermo().Cp(); + const volScalarField& Cp = tCp(); + const fvPatchScalarField& Cpw = Cp.boundaryField()[patchi]; + + // Saturation temperature + const tmp tTsat = + fluid.saturation().Tsat(liquid.thermo().p()); + const volScalarField& Tsat = tTsat(); + const fvPatchScalarField& Tsatw(Tsat.boundaryField()[patchi]); + const scalarField Tsatc(Tsatw.patchInternalField()); + + // Gravitational acceleration + const uniformDimensionedVectorField& g = + db().lookupObject("g"); + + const fvPatchScalarField& pw = + liquid.thermo().p().boundaryField()[patchi]; + + const scalarField L + ( + vapor.thermo().he(pw,Tsatc,patchi)-hew.patchInternalField() + ); + + // Liquid temperature at y+=250 is estimated from logarithmic + // thermal wall function (Koncar, Krepper & Egorov, 2005) + scalarField Tplus_y250(Prt_*(log(E_*250)/kappa_ + P)); + scalarField Tplus(Prt_*(log(E_*yPlus)/kappa_ + P)); + scalarField Tl(Tw - (Tplus_y250/Tplus)*(Tw - Tc)); + Tl = max(Tc - 40, min(Tc, Tl)); + + // Nucleation site density: + // Reformulation of Lemmert & Chawla (Egorov & Menter, 2004) + const scalarField N + ( + 0.8*9.922e5*pow(max((Tw - Tsatw)/10, scalar(0)), 1.805) + ); + + // Bubble departure diameter: + // Tolubinski and Kostanchuk (1970) + const scalarField Tsub(max(Tsatw - Tl, scalar(0))); + const scalarField Ddep + ( + max(min(0.0006*exp(-Tsub/45), scalar(0.0014)), scalar(1e-6)) + ); + + // Bubble departure frequency: + // Cole (1960) + const scalarField F + ( + sqrt + ( + 4*mag(g).value()*(max(rhoc - rhoVaporp, scalar(0.1)))/(3*Ddep*rhow) + ) + ); + + // Area fractions: + + // Del Valle & Kenning (1985) + const scalarField Ja(rhoc*Cpw*Tsub/(rhoVaporp*L)); + const scalarField Al(4.8*exp(-Ja/80)); + + // Liquid phase fraction at the wall + const scalarField liquidw(liquid.boundaryField()[patchi]); + + // Damp boiling at high void fractions. + const scalarField W(min(liquidw/0.2, scalar(0.1))); + + const scalarField A2(W*min(M_PI*sqr(Ddep)*N*Al/4, scalar(1))); + const scalarField A1(max(1 - A2, scalar(1e-4))); + const scalarField A2E(W*min(M_PI*sqr(Ddep)*N*Al/4, scalar(5))); + + // Wall evaporation heat flux [kg/s3 = J/m2s] + const scalarField Qe((1.0/6.0)*A2E*Ddep*rhoVaporw*F*L); + + // Volumetric mass source in the near wall cell due to the wall boiling + dmdt_ = (1 - relax_)*dmdt_ + relax_*Qe*AbyV_/L; + + // Volumetric source in the near wall cell due to the wall boiling + mDotL_ = dmdt_*L; + + // Quenching heat transfer coefficient + const scalarField hQ + ( + 2*(alphaw*Cpw)*F*sqrt((0.8/F)/(M_PI*alphaw/rhow)) + ); + + // Quenching heat flux + const scalarField Qq(A2*hQ*max(Tw - Tl, scalar(0))); + + // Convective heat flux + alphatConv_ = calcAlphat(alphatConv_); + //const scalarField Qc(A1*(alphatConv_ + alphaw)*hew.snGrad()); + + // Effective thermal diffusivity that corresponds to the calculated + // convective, quenching and evaporative heat fluxes + + operator== + ( + A1*alphatConv_ + (Qq + Qe)/max(liquidw*hew.snGrad(), scalar(1e-16)) + ); + + if(debug) + { + Info<< " L: " << gMin(L) << " - " << gMax(L) << endl; + Info<< " Tl: " << gMin(Tl) << " - " << gMax(Tl) << endl; + Info<< " N: " << gMin(N) << " - " << gMax(N) << endl; + Info<< " Ddep: " << gMin(Ddep) << " - " << gMax(Ddep) << endl; + Info<< " F: " << gMin(F) << " - " << gMax(F) << endl; + Info<< " Al: " << gMin(Al) << " - " << gMax(Al) << endl; + Info<< " A1: " << gMin(A1) << " - " << gMax(A1) << endl; + Info<< " A2: " << gMin(A2) << " - " << gMax(A2) << endl; + Info<< " A2E: " << gMin(A2E) << " - " << gMax(A2E) << endl; + Info<< " dmdtW: " << gMin(dmdt_) << " - " << gMax(dmdt_) << endl; + const scalarField Qc(A1*(alphatConv_ + alphaw)*hew.snGrad()); + Info<< " Qc: " << gMin(Qc) << " - " << gMax(Qc) << endl; + Info<< " Qq: " << gMin(Qq) << " - " << gMax(Qq) << endl; + Info<< " Qe: " << gMin(Qe) << " - " << gMax(Qe) << endl; + const scalarField QEff(liquidw*(*this + alphaw)*hew.snGrad()); + Info<< " QEff: " << gMin(QEff) << " - " << gMax(QEff) << endl; + Info<< " alphat: " << gMin(*this) << " - " << gMax(*this) << endl; + Info<< " alphatConv: " << gMin(alphatConv_) + << " - " << gMax(alphatConv_) << endl; + } + + fixedValueFvPatchScalarField::updateCoeffs(); +} + + +void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const +{ + fvPatchField::write(os); + os.writeKeyword("relax") << relax_ << token::END_STATEMENT << nl; + dmdt_.writeEntry("dmdt", os); + alphatConv_.writeEntry("alphatConv", os); + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField +( + fvPatchScalarField, + alphatWallBoilingWallFunctionFvPatchScalarField +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H new file mode 100755 index 0000000000..c469abdae9 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H @@ -0,0 +1,187 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField + +Group + grpCmpWallFunctions + +Description + A thermal wall function for simulation of subcooled nucleate wall boiling. + + Implements a version of the well-known RPI wall boiling model + (Kurul & Podowski, 1991). The model implementation is similar to the model + described by Peltola & Pättikangas (2012). + + References: + \verbatim + "On the modeling of multidimensional effects in boiling channels" + Kurul, N., Podowski, M.Z., + ANS Proceedings, National Heat Transfer Conference, + Minneapolis, Minnesota, USA, July 28-31, 1991, + ISBN: 0-89448-162-1, pp. 30-40 + \endverbatim + + \verbatim + "Development and validation of a boiling model for OpenFOAM + multiphase solver" + Peltola, J., Pättikangas, T.J.H., + CFD4NRS-4 Conference Proceedings, paper 59, + Daejeon, Korea, September 10-12 2012 + \endverbatim + +SeeAlso + Foam::fixedValueFvPatchField + +SourceFiles + alphatWallBoilingWallFunctionFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef compressiblealphatWallBoilingWallFunctionFvPatchScalarField_H +#define compressiblealphatWallBoilingWallFunctionFvPatchScalarField_H + +#include "alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + +/*---------------------------------------------------------------------------*\ + Class alphatWallBoilingWallFunctionFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class alphatWallBoilingWallFunctionFvPatchScalarField +: + public alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField +{ + // Private data + + //- dmdt relaxationFactor + scalar relax_; + + //- Patch face area by cell volume + scalarField AbyV_; + + //- Convective turbulent thermal diffusivity + scalarField alphatConv_; + + +public: + + //- Runtime type information + TypeName("compressible::alphatWallBoilingWallFunction"); + + + // Constructors + + //- Construct from patch and internal field + alphatWallBoilingWallFunctionFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + alphatWallBoilingWallFunctionFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // alphatWallBoilingWallFunctionFvPatchScalarField + // onto a new patch + alphatWallBoilingWallFunctionFvPatchScalarField + ( + const alphatWallBoilingWallFunctionFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + alphatWallBoilingWallFunctionFvPatchScalarField + ( + const alphatWallBoilingWallFunctionFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new alphatWallBoilingWallFunctionFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + alphatWallBoilingWallFunctionFvPatchScalarField + ( + const alphatWallBoilingWallFunctionFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new alphatWallBoilingWallFunctionFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + + // I-O + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C new file mode 100644 index 0000000000..2f7abc7015 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C @@ -0,0 +1,130 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "copiedFixedValueFvPatchScalarField.H" +#include "fvPatchFieldMapper.H" +#include "volFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedValueFvPatchScalarField(p, iF), + sourceFieldName_("default") +{} + + +Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedValueFvPatchScalarField(p, iF, dict), + sourceFieldName_(dict.lookup("sourceFieldName")) +{} + + +Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField +( + const copiedFixedValueFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedValueFvPatchScalarField(ptf, p, iF, mapper), + sourceFieldName_(ptf.sourceFieldName_) +{} + + +Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField +( + const copiedFixedValueFvPatchScalarField& awfpsf +) +: + fixedValueFvPatchScalarField(awfpsf), + sourceFieldName_(awfpsf.sourceFieldName_) +{} + + +Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField +( + const copiedFixedValueFvPatchScalarField& awfpsf, + const DimensionedField& iF +) +: + fixedValueFvPatchScalarField(awfpsf, iF), + sourceFieldName_(awfpsf.sourceFieldName_) +{} + + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::copiedFixedValueFvPatchScalarField::updateCoeffs() +{ + if (this->updated()) + { + return; + } + + operator== + ( + patch().lookupPatchField(sourceFieldName_) + ); + + fixedValueFvPatchScalarField::updateCoeffs(); +} + + +void Foam::copiedFixedValueFvPatchScalarField::write(Ostream& os) const +{ + fvPatchField::write(os); + os.writeKeyword("sourceFieldName") + << sourceFieldName_ << token::END_STATEMENT << nl; + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + copiedFixedValueFvPatchScalarField + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H new file mode 100644 index 0000000000..2db6a151ce --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H @@ -0,0 +1,136 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::copiedFixedValueFvPatchScalarField + +Group + grpCmpWallFunctions + +Description + Copies the boundary values from a user specified field. + +SeeAlso + Foam::fixedValueFvPatchField + +SourceFiles + copiedFixedValueFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef copiedFixedValueFvPatchScalarField_H +#define copiedFixedValueFvPatchScalarField_H + +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class copiedFixedValueFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class copiedFixedValueFvPatchScalarField +: + public fixedValueFvPatchScalarField +{ +protected: + + // Protected data + + word sourceFieldName_; + +public: + + //- Runtime type information + TypeName("copiedFixedValue"); + + + // Constructors + + //- Construct from patch and internal field + copiedFixedValueFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + copiedFixedValueFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // copiedFixedValueFvPatchScalarField + // onto a new patch + copiedFixedValueFvPatchScalarField + ( + const copiedFixedValueFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + copiedFixedValueFvPatchScalarField + ( + const copiedFixedValueFvPatchScalarField& + ); + + //- Construct as copy setting internal field reference + copiedFixedValueFvPatchScalarField + ( + const copiedFixedValueFvPatchScalarField&, + const DimensionedField& + ); + + + // Member functions + + // Evaluation functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + + // I-O + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C new file mode 100644 index 0000000000..c991a1a333 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C @@ -0,0 +1,204 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\*---------------------------------------------------------------------------*/ + +#include "fixedMultiPhaseHeatFluxFvPatchScalarField.H" +#include "fvPatchFieldMapper.H" +#include "addToRunTimeSelectionTable.H" + +#include "twoPhaseSystem.H" +#include "ThermalPhaseChangePhaseSystem.H" +#include "MomentumTransferPhaseSystem.H" +#include "compressibleTurbulenceModel.H" +#include "ThermalDiffusivity.H" +#include "PhaseCompressibleTurbulenceModel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::fixedMultiPhaseHeatFluxFvPatchScalarField:: +fixedMultiPhaseHeatFluxFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedValueFvPatchScalarField(p, iF), + q_(p.size(), 0.0), + relax_(1.0) +{} + + +Foam::fixedMultiPhaseHeatFluxFvPatchScalarField:: +fixedMultiPhaseHeatFluxFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedValueFvPatchScalarField(p, iF, dict), + q_("q", dict, p.size()), + relax_(dict.lookupOrDefault("relax", 1.0)) +{} + + +Foam::fixedMultiPhaseHeatFluxFvPatchScalarField:: +fixedMultiPhaseHeatFluxFvPatchScalarField +( + const fixedMultiPhaseHeatFluxFvPatchScalarField& psf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedValueFvPatchScalarField(psf, p, iF, mapper), + q_(psf.q_, mapper), + relax_(psf.relax_) +{} + + +Foam::fixedMultiPhaseHeatFluxFvPatchScalarField:: +fixedMultiPhaseHeatFluxFvPatchScalarField +( + const fixedMultiPhaseHeatFluxFvPatchScalarField& psf +) +: + fixedValueFvPatchScalarField(psf), + q_(psf.q_), + relax_(psf.relax_) +{} + + +Foam::fixedMultiPhaseHeatFluxFvPatchScalarField:: +fixedMultiPhaseHeatFluxFvPatchScalarField +( + const fixedMultiPhaseHeatFluxFvPatchScalarField& psf, + const DimensionedField& iF +) +: + fixedValueFvPatchScalarField(psf, iF), + q_(psf.q_), + relax_(psf.relax_) +{} + + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + // Lookup the fluid model + const ThermalPhaseChangePhaseSystem + < + MomentumTransferPhaseSystem + >& fluid = + refCast + < + const ThermalPhaseChangePhaseSystem + < + MomentumTransferPhaseSystem + > + > + ( + db().lookupObject("phaseProperties") + ); + + const scalarField& Tp = *this; + + scalarField A(Tp.size(), scalar(0)); + scalarField B(Tp.size(), scalar(0)); + scalarField Q(Tp.size(), scalar(0)); + + forAll(fluid.phases(), phasei) + { + const phaseModel& phase = fluid.phases()[phasei]; + const fluidThermo& thermo = phase.thermo(); + + const fvPatchScalarField& alpha = + phase.boundaryField()[patch().index()]; + + const fvPatchScalarField& T = + thermo.T().boundaryField()[patch().index()]; + + const scalarField kappaEff + ( + thermo.kappaEff + ( + phase.turbulence().alphat(patch().index()), + patch().index() + ) + ); + + if (debug) + { + scalarField q0(T.snGrad()*alpha*kappaEff); + Q += q0; + + Info<< patch().name() << " " << phase.name() + << ": Heat flux " << gMin(q0) << " - " << gMax(q0) << endl; + } + + A += T.patchInternalField()*alpha*kappaEff*patch().deltaCoeffs(); + B += alpha*kappaEff*patch().deltaCoeffs(); + } + + if (debug) + { + Info<< patch().name() << " " << ": overall heat flux " + << gMin(Q) << " - " << gMax(Q) << endl; + } + + operator==((1 - relax_)*Tp + relax_*(q_ + A)/(B)); + + fixedValueFvPatchScalarField::updateCoeffs(); +} + + +void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::write(Ostream& os) const +{ + fvPatchField::write(os); + os.writeKeyword("relax") << relax_ << token::END_STATEMENT << nl; + q_.writeEntry("q", os); + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + fixedMultiPhaseHeatFluxFvPatchScalarField + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H new file mode 100644 index 0000000000..c3eb42d691 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H @@ -0,0 +1,145 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +Class + Foam::fixedMultiPhaseHeatFluxFvPatchScalarField + +Group + grpCmpWallFunctions + +Description + Calculates a wall temperature that produces the specified overall wall heat + flux across all the phases in an Eulerian multi-phase simulation. + + Intended to be used with copiedFixedValue to ensure that phase wall + temperature are consistent: + - Set 'fixedMultiPhaseHeatFlux' boundary for one of the phases + - Use 'copiedFixedValue' for all the other phases. + +SeeAlso + Foam::fixedValueFvPatchField + +SourceFiles + fixedMultiPhaseHeatFluxFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedMultiPhaseHeatFluxFvPatchScalarField_H +#define fixedMultiPhaseHeatFluxFvPatchScalarField_H + +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class fixedMultiPhaseHeatFluxFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class fixedMultiPhaseHeatFluxFvPatchScalarField +: + public fixedValueFvPatchScalarField +{ + // Private data + + //- Heat power [W] or flux [W/m2] + scalarField q_; + + //- Relaxation factor + scalar relax_; + + +public: + + //- Runtime type information + TypeName("fixedMultiPhaseHeatFlux"); + + + // Constructors + + //- Construct from patch and internal field + fixedMultiPhaseHeatFluxFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + fixedMultiPhaseHeatFluxFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // fixedMultiPhaseHeatFluxFvPatchScalarField + // onto a new patch + fixedMultiPhaseHeatFluxFvPatchScalarField + ( + const fixedMultiPhaseHeatFluxFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + fixedMultiPhaseHeatFluxFvPatchScalarField + ( + const fixedMultiPhaseHeatFluxFvPatchScalarField& + ); + + //- Construct as copy setting internal field reference + fixedMultiPhaseHeatFluxFvPatchScalarField + ( + const fixedMultiPhaseHeatFluxFvPatchScalarField&, + const DimensionedField& + ); + + + // Member functions + + // Evaluation functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + + // I-O + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C index ea28dd01b5..c3d306738d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C @@ -89,16 +89,8 @@ JohnsonJacksonParticleSlipFvPatchVectorField || (specularityCoefficient_.value() > 1) ) { - FatalErrorIn - ( - "(" - "Foam::JohnsonJacksonParticleSlipFvPatchVectorField::" - "JohnsonJacksonParticleSlipFvPatchVectorField" - "const fvPatch& p," - "const DimensionedField& iF," - "const dictionary& dict" - ")" - ) << "The specularity coefficient has to be between 0 and 1" + FatalErrorInFunction + << "The specularity coefficient has to be between 0 and 1" << abort(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C index 93d97c650c..f4d7dd4ee9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C @@ -97,16 +97,8 @@ JohnsonJacksonParticleThetaFvPatchScalarField || (restitutionCoefficient_.value() > 1) ) { - FatalErrorIn - ( - "Foam::JohnsonJacksonParticleThetaFvPatchScalarField::" - "JohnsonJacksonParticleThetaFvPatchScalarField" - "(" - "const fvPatch& p," - "const DimensionedField& iF," - "const dictionary& dict" - ")" - ) << "The restitution coefficient has to be between 0 and 1" + FatalErrorInFunction + << "The restitution coefficient has to be between 0 and 1" << abort(FatalError); } @@ -116,16 +108,8 @@ JohnsonJacksonParticleThetaFvPatchScalarField || (specularityCoefficient_.value() > 1) ) { - FatalErrorIn - ( - "Foam::JohnsonJacksonParticleThetaFvPatchScalarField::" - "JohnsonJacksonParticleThetaFvPatchScalarField" - "(" - "const fvPatch& p," - "const DimensionedField& iF," - "const dictionary& dict" - ")" - ) << "The specularity coefficient has to be between 0 and 1" + FatalErrorInFunction + << "The specularity coefficient has to be between 0 and 1" << abort(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index bbf37904ca..83017e1557 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -43,10 +43,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel : eddyViscosity < - RASModel - > > > + RASModel > > ( type, @@ -189,10 +186,7 @@ bool Foam::RASModels::kineticTheoryModel::read() ( eddyViscosity < - RASModel - > > > + RASModel > >::read() ) { @@ -219,7 +213,7 @@ bool Foam::RASModels::kineticTheoryModel::read() Foam::tmp Foam::RASModels::kineticTheoryModel::k() const { - notImplemented("kineticTheoryModel::k()"); + NotImplemented; return nut_; } @@ -227,7 +221,7 @@ Foam::RASModels::kineticTheoryModel::k() const Foam::tmp Foam::RASModels::kineticTheoryModel::epsilon() const { - notImplemented("kineticTheoryModel::epsilon()"); + NotImplemented; return nut_; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H index 9aadb83d12..e18d41fb40 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H @@ -47,8 +47,7 @@ SourceFiles #include "RASModel.H" #include "eddyViscosity.H" -#include "PhaseCompressibleTurbulenceModel.H" -#include "ThermalDiffusivity.H" +#include "phaseCompressibleTurbulenceModel.H" #include "EddyDiffusivity.H" #include "phaseModel.H" #include "dragModel.H" @@ -74,10 +73,7 @@ class kineticTheoryModel : public eddyViscosity < - RASModel - > > > + RASModel > > { // Private data diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phaseCompressibleTurbulenceModels.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phaseCompressibleTurbulenceModels.C index eb0a070044..7b534db6d2 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phaseCompressibleTurbulenceModels.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phaseCompressibleTurbulenceModels.C @@ -23,15 +23,10 @@ License \*---------------------------------------------------------------------------*/ -#include "PhaseCompressibleTurbulenceModel.H" -#include "phaseModel.H" -#include "twoPhaseSystem.H" +#include "phaseCompressibleTurbulenceModel.H" #include "addToRunTimeSelectionTable.H" #include "makeTurbulenceModel.H" -#include "ThermalDiffusivity.H" -#include "EddyDiffusivity.H" - #include "laminar.H" #include "RASModel.H" #include "LESModel.H" diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C index adb23d40d2..79df9e4922 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C @@ -42,10 +42,7 @@ Foam::RASModels::phasePressureModel::phasePressureModel : eddyViscosity < - RASModel - > > > + RASModel > > ( type, @@ -93,10 +90,7 @@ bool Foam::RASModels::phasePressureModel::read() ( eddyViscosity < - RASModel - > > > + RASModel > >::read() ) { @@ -117,7 +111,7 @@ bool Foam::RASModels::phasePressureModel::read() Foam::tmp Foam::RASModels::phasePressureModel::k() const { - notImplemented("phasePressureModel::k()"); + NotImplemented; return nut_; } @@ -125,7 +119,7 @@ Foam::RASModels::phasePressureModel::k() const Foam::tmp Foam::RASModels::phasePressureModel::epsilon() const { - notImplemented("phasePressureModel::epsilon()"); + NotImplemented; return nut_; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H index 68734e5b4f..c7e9842f37 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H @@ -53,8 +53,7 @@ SourceFiles #include "RASModel.H" #include "eddyViscosity.H" -#include "PhaseCompressibleTurbulenceModel.H" -#include "ThermalDiffusivity.H" +#include "phaseCompressibleTurbulenceModel.H" #include "EddyDiffusivity.H" #include "phaseModel.H" @@ -73,10 +72,7 @@ class phasePressureModel : public eddyViscosity < - RASModel - > > > + RASModel > > { // Private data diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/Make/options index 7321f6ef68..3fa406f3d3 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/Make/options @@ -11,7 +11,6 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C index aaee131eeb..e085403f76 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C @@ -31,7 +31,7 @@ License #include "fvcDdt.H" #include "fvcDiv.H" #include "fvcAverage.H" -#include "fvOptionList.H" +#include "fvOptions.H" #include "mathematicalConstants.H" #include "fundamentalConstants.H" #include "addToRunTimeSelectionTable.H" @@ -155,12 +155,7 @@ void Foam::diameterModels::IATE::correct() R -= sources_[j].R(); } - // const_cast needed because the operators and functions of fvOptions - // are currently non-const. - fv::optionList& fvOptions = const_cast - ( - phase_.mesh().lookupObject("fvOptions") - ); + fv::options& fvOptions(fv::options::New(phase_.mesh())); // Construct the interfacial curvature equation fvScalarMatrix kappaiEqn diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C index 9c62dfc819..dd110902b1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C @@ -25,7 +25,7 @@ License #include "IATEsource.H" #include "fvMatrix.H" -#include "PhaseCompressibleTurbulenceModel.H" +#include "phaseCompressibleTurbulenceModel.H" #include "uniformDimensionedFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -55,11 +55,8 @@ Foam::diameterModels::IATEsource::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn - ( - "IATEsource::New" - "(const word& type, const IATE&, const dictionary&)" - ) << "Unknown IATE source type " + FatalErrorInFunction + << "Unknown IATE source type " << type << nl << nl << "Valid IATE source types : " << endl << dictionaryConstructorTablePtr_->sortedToc() diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H index 8c8a68ef63..b9f0f15af2 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H @@ -114,7 +114,7 @@ public: autoPtr clone() const { - notImplemented("autoPtr clone() const"); + NotImplemented; return autoPtr(NULL); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C index 0324fb2f56..5477ae7c58 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C @@ -56,7 +56,7 @@ Foam::autoPtr Foam::twoPhaseSystem::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("twoPhaseSystem::New") + FatalErrorInFunction << "Unknown twoPhaseSystemType type " << twoPhaseSystemType << endl << endl << "Valid twoPhaseSystem types are : " << endl diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options index 256d739187..04e5d53a91 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options @@ -14,4 +14,5 @@ EXE_LIBS = \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lfiniteVolume \ + -lfvOptions \ -lmeshTools diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C index d8519d6182..02b05c03d6 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C @@ -24,6 +24,9 @@ License Application twoLiquidMixingFoam +Group + grpMultiphaseSolvers + Description Solver for mixing 2 incompressible fluids. @@ -55,6 +58,8 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" + turbulence->validate(); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options b/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options index 7faa436e57..6bc8c07441 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options @@ -10,7 +10,6 @@ EXE_INC = \ -IinterfacialModels/lnInclude \ -ItwoPhaseSystem/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C index ff4cb63441..568c1b2682 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C @@ -45,7 +45,7 @@ Foam::aspectRatioModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("aspectRatioModel::New") + FatalErrorInFunction << "Unknown aspectRatioModelType type " << aspectRatioModelType << endl << endl << "Valid aspectRatioModel types are : " << endl diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index ce06feab07..e077e31b2d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Foam::autoPtr Foam::dragModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("dragModel::New") + FatalErrorInFunction << "Unknown dragModelType type " << dragModelType << endl << endl << "Valid dragModel types are : " << endl diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C index 4b1fc88ddc..ca0a145f5b 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C @@ -66,7 +66,7 @@ Foam::dragModels::segregated::~segregated() Foam::tmp Foam::dragModels::segregated::CdRe() const { - FatalErrorIn("Foam::dragModels::segregated::CdRe() const") + FatalErrorInFunction << "Not implemented." << "Drag coefficient not defined for the segregated model." << exit(FatalError); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C index bceb23cacc..8cdb07f297 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Foam::autoPtr Foam::heatTransferModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("heatTransferModel::New") + FatalErrorInFunction << "Unknown heatTransferModelType type " << heatTransferModelType << endl << endl << "Valid heatTransferModel types are : " << endl diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/Moraga/Moraga.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/Moraga/Moraga.C index 5548dfd70a..fa364a68c1 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/Moraga/Moraga.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/Moraga/Moraga.C @@ -79,11 +79,8 @@ Foam::tmp Foam::liftModels::Moraga::Cl() const || max(sqrSr).value() > 0.04 ) { - WarningIn - ( - "Foam::tmp " - "Foam::liftModels::Moraga::Cl() const" - ) << "Re and/or Sr are out of the range of applicability of the " + WarningInFunction + << "Re and/or Sr are out of the range of applicability of the " << "Moraga model. Clamping to range bounds" << endl; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C index e8a476d441..3da4caee7c 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Foam::autoPtr Foam::liftModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("liftModel::New") + FatalErrorInFunction << "Unknown liftModelType type " << liftModelType << endl << endl << "Valid liftModel types are : " << endl diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C index 8c8f096a2e..a7181b4396 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ Foam::swarmCorrection::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("swarmCorrection::New") + FatalErrorInFunction << "Unknown swarmCorrectionType type " << swarmCorrectionType << endl << endl << "Valid swarmCorrection types are : " << endl diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C index fa267e80d5..e440e3d1ee 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ Foam::turbulentDispersionModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("turbulentDispersionModel::New") + FatalErrorInFunction << "Unknown turbulentDispersionModelType type " << turbulentDispersionModelType << endl << endl << "Valid turbulentDispersionModel types are : " << endl diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C index 82b9b47f17..4c4ced9ddc 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Foam::autoPtr Foam::virtualMassModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("virtualMassModel::New") + FatalErrorInFunction << "Unknown virtualMassModelType type " << virtualMassModelType << endl << endl << "Valid virtualMassModel types are : " << endl diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C index b9766e7d52..08dfd7065d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Foam::autoPtr Foam::wallLubricationModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("wallLubricationModel::New") + FatalErrorInFunction << "Unknown wallLubricationModelType type " << wallLubricationModelType << endl << endl << "Valid wallLubricationModel types are : " << endl diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options index 1035e5526e..84786bdc5d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options @@ -8,5 +8,4 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C index ea28dd01b5..c3d306738d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C @@ -89,16 +89,8 @@ JohnsonJacksonParticleSlipFvPatchVectorField || (specularityCoefficient_.value() > 1) ) { - FatalErrorIn - ( - "(" - "Foam::JohnsonJacksonParticleSlipFvPatchVectorField::" - "JohnsonJacksonParticleSlipFvPatchVectorField" - "const fvPatch& p," - "const DimensionedField& iF," - "const dictionary& dict" - ")" - ) << "The specularity coefficient has to be between 0 and 1" + FatalErrorInFunction + << "The specularity coefficient has to be between 0 and 1" << abort(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C index 93d97c650c..f4d7dd4ee9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C @@ -97,16 +97,8 @@ JohnsonJacksonParticleThetaFvPatchScalarField || (restitutionCoefficient_.value() > 1) ) { - FatalErrorIn - ( - "Foam::JohnsonJacksonParticleThetaFvPatchScalarField::" - "JohnsonJacksonParticleThetaFvPatchScalarField" - "(" - "const fvPatch& p," - "const DimensionedField& iF," - "const dictionary& dict" - ")" - ) << "The restitution coefficient has to be between 0 and 1" + FatalErrorInFunction + << "The restitution coefficient has to be between 0 and 1" << abort(FatalError); } @@ -116,16 +108,8 @@ JohnsonJacksonParticleThetaFvPatchScalarField || (specularityCoefficient_.value() > 1) ) { - FatalErrorIn - ( - "Foam::JohnsonJacksonParticleThetaFvPatchScalarField::" - "JohnsonJacksonParticleThetaFvPatchScalarField" - "(" - "const fvPatch& p," - "const DimensionedField& iF," - "const dictionary& dict" - ")" - ) << "The specularity coefficient has to be between 0 and 1" + FatalErrorInFunction + << "The specularity coefficient has to be between 0 and 1" << abort(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index bbf37904ca..99879c41d5 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -219,7 +219,7 @@ bool Foam::RASModels::kineticTheoryModel::read() Foam::tmp Foam::RASModels::kineticTheoryModel::k() const { - notImplemented("kineticTheoryModel::k()"); + NotImplemented; return nut_; } @@ -227,7 +227,7 @@ Foam::RASModels::kineticTheoryModel::k() const Foam::tmp Foam::RASModels::kineticTheoryModel::epsilon() const { - notImplemented("kineticTheoryModel::epsilon()"); + NotImplemented; return nut_; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C index adb23d40d2..2eba4bdab7 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C @@ -117,7 +117,7 @@ bool Foam::RASModels::phasePressureModel::read() Foam::tmp Foam::RASModels::phasePressureModel::k() const { - notImplemented("phasePressureModel::k()"); + NotImplemented; return nut_; } @@ -125,7 +125,7 @@ Foam::RASModels::phasePressureModel::k() const Foam::tmp Foam::RASModels::phasePressureModel::epsilon() const { - notImplemented("phasePressureModel::epsilon()"); + NotImplemented; return nut_; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C index 646b340c82..b367381a84 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C @@ -24,6 +24,9 @@ License Application twoPhaseEulerFoam +Group + grpMultiphaseSolvers + Description Solver for a system of 2 compressible fluid phases with one phase dispersed, e.g. gas bubbles in a liquid including heat-transfer. @@ -34,7 +37,7 @@ Description #include "twoPhaseSystem.H" #include "PhaseCompressibleTurbulenceModel.H" #include "pimpleControl.H" -#include "fvIOoptionList.H" +#include "fvOptions.H" #include "fixedFluxPressureFvPatchScalarField.H" #include "fixedValueFvsPatchFields.H" diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C index 95b277fd99..e288235568 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,7 +43,7 @@ Foam::autoPtr Foam::blendingMethod::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("blendingMethod::New") + FatalErrorInFunction << "Unknown blendingMethodType type " << blendingMethodType << endl << endl << "Valid blendingMethod types are : " << endl diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/linear/linear.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/linear/linear.C index 48dcd0855e..f89804bb7d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/linear/linear.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/linear/linear.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -93,14 +93,8 @@ Foam::blendingMethods::linear::linear > maxPartlyDispersedAlpha_[*iter] ) { - FatalErrorIn - ( - "Foam::blendingMethods::linear::linear" - "(" - "const dictionary& dict," - "const wordList& phaseNames" - ")" - ) << "The supplied fully dispersed volume fraction for " + FatalErrorInFunction + << "The supplied fully dispersed volume fraction for " << *iter << " is greater than the partly dispersed value." << endl << exit(FatalError); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/Make/options b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/Make/options index ee40ebbc68..7c0e7485a9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/Make/options +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/Make/options @@ -8,7 +8,6 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C index 6999c184cd..afa96a571a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATE.C @@ -32,7 +32,7 @@ License #include "fvcDdt.H" #include "fvcDiv.H" #include "fvcAverage.H" -#include "fvOptionList.H" +#include "fvOptions.H" #include "mathematicalConstants.H" #include "fundamentalConstants.H" #include "addToRunTimeSelectionTable.H" @@ -156,12 +156,7 @@ void Foam::diameterModels::IATE::correct() R -= sources_[j].R(); } - // const_cast needed because the operators and functions of fvOptions - // are currently non-const. - fv::optionList& fvOptions = const_cast - ( - phase_.U().mesh().lookupObject("fvOptions") - ); + fv::options& fvOptions(fv::options::New(phase_.mesh())); // Construct the interfacial curvature equation fvScalarMatrix kappaiEqn diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C index 84db282908..27fd28d68d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,11 +56,8 @@ Foam::diameterModels::IATEsource::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn - ( - "IATEsource::New" - "(const word& type, const IATE&, const dictionary&)" - ) << "Unknown IATE source type " + FatalErrorInFunction + << "Unknown IATE source type " << type << nl << nl << "Valid IATE source types : " << endl << dictionaryConstructorTablePtr_->sortedToc() diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H index f21f4f3876..fc2456871e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H @@ -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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -113,7 +113,7 @@ public: autoPtr clone() const { - notImplemented("autoPtr clone() const"); + NotImplemented; return autoPtr(NULL); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C index b9014f3f46..b58f00291b 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ Foam::autoPtr Foam::diameterModel::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("diameterModel::New") + FatalErrorInFunction << "Unknown diameterModelType type " << diameterModelType << endl << endl << "Valid diameterModel types are : " << endl diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/orderedPhasePair/orderedPhasePair.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/orderedPhasePair/orderedPhasePair.C index 808208ea99..5e983b7c19 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/orderedPhasePair/orderedPhasePair.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/orderedPhasePair/orderedPhasePair.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,7 +85,7 @@ Foam::tmp Foam::orderedPhasePair::E() const { if (!aspectRatio_.valid()) { - FatalErrorIn("Foam::orderedPhasePair::E() const") + FatalErrorInFunction << "Aspect ratio model not specified for " << *this << "." << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/phasePair/phasePair.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/phasePair/phasePair.C index 0f77a41ad0..ef4f6abb8e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/phasePair/phasePair.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/phasePair/phasePair.C @@ -82,7 +82,7 @@ Foam::phasePair::~phasePair() const Foam::phaseModel& Foam::phasePair::dispersed() const { - FatalErrorIn("Foam::phasePair::dispersed() const") + FatalErrorInFunction << "Requested dispersed phase from an unordered pair." << exit(FatalError); @@ -92,7 +92,7 @@ const Foam::phaseModel& Foam::phasePair::dispersed() const const Foam::phaseModel& Foam::phasePair::continuous() const { - FatalErrorIn("Foam::phasePair::dispersed() const") + FatalErrorInFunction << "Requested continuous phase from an unordered pair." << exit(FatalError); @@ -185,7 +185,7 @@ Foam::tmp Foam::phasePair::Ta() const Foam::tmp Foam::phasePair::E() const { - FatalErrorIn("Foam::phasePair::E() const") + FatalErrorInFunction << "Requested aspect ratio of the dispersed phase in an unordered pair" << exit(FatalError); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/phasePairKey/phasePairKey.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/phasePairKey/phasePairKey.C index 4280dd5fb3..d203fb0349 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/phasePairKey/phasePairKey.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phasePair/phasePairKey/phasePairKey.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,14 +125,8 @@ Foam::Istream& Foam::operator>>(Istream& is, phasePairKey& key) } else { - FatalErrorIn - ( - "friend Istream& operator>>" - "(" - "Istream& is, " - "phasePairKey& key" - ")" - ) << "Phase pair type is not recognised. " + FatalErrorInFunction + << "Phase pair type is not recognised. " << temp << "Use (phaseDispersed in phaseContinuous) for an ordered" << "pair, or (phase1 and pase2) for an unordered pair." diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H index 4f85d6dad8..eca43adbf7 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H @@ -61,10 +61,8 @@ } else { - FatalErrorIn - ( - "readMechanicalProperties.H" - ) << "Valid type entries are uniform or field for rho" + FatalErrorInFunction + << "Valid type entries are uniform or field for rho" << abort(FatalError); } @@ -119,10 +117,8 @@ } else { - FatalErrorIn - ( - "readMechanicalProperties.H" - ) << "Valid type entries are uniform or field for E" + FatalErrorInFunction + << "Valid type entries are uniform or field for E" << abort(FatalError); } @@ -175,10 +171,8 @@ } else { - FatalErrorIn - ( - "readMechanicalProperties.H" - ) << "Valid type entries are uniform or field for nu" + FatalErrorInFunction + << "Valid type entries are uniform or field for nu" << abort(FatalError); } diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H index afcff762e4..45327c2b4b 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H @@ -96,10 +96,8 @@ if (thermalStress) } else { - FatalErrorIn - ( - "readThermalProperties.H" - ) << "Valid type entries are uniform or field for C" + FatalErrorInFunction + << "Valid type entries are uniform or field for C" << abort(FatalError); } @@ -154,10 +152,8 @@ if (thermalStress) } else { - FatalErrorIn - ( - "readThermalProperties.H" - ) << "Valid type entries are uniform or field for K" + FatalErrorInFunction + << "Valid type entries are uniform or field for K" << abort(FatalError); } @@ -212,10 +208,8 @@ if (thermalStress) } else { - FatalErrorIn - ( - "readThermalProperties.H" - ) << "Valid type entries are uniform or field for alpha" + FatalErrorInFunction + << "Valid type entries are uniform or field for alpha" << abort(FatalError); } diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C b/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C index e2c6c94337..a52d35ae0f 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C @@ -24,6 +24,9 @@ License Application solidDisplacementFoam +Group + grpStressAnalysisSolvers + Description Transient segregated finite-volume solver of linear-elastic, small-strain deformation of a solid body, with optional thermal @@ -93,7 +96,7 @@ int main(int argc, char *argv[]) //DEqn.setComponentReference(1, 0, vector::X, 0); //DEqn.setComponentReference(1, 0, vector::Z, 0); - initialResidual = DEqn.solve().initialResidual(); + initialResidual = DEqn.solve().max().initialResidual(); if (!compactNormalStress) { diff --git a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/solidEquilibriumDisplacementFoam.C b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/solidEquilibriumDisplacementFoam.C index 240593d814..4abd493e2f 100644 --- a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/solidEquilibriumDisplacementFoam.C +++ b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/solidEquilibriumDisplacementFoam.C @@ -24,6 +24,9 @@ License Application solidEquilibriumDisplacementFoam +Group + grpStressAnalysisSolvers + Description Steady-state segregated finite-volume solver of linear-elastic, small-strain deformation of a solid body, with optional thermal diff --git a/applications/solvers/stressAnalysis/stressAnalysisSolversDoc.H b/applications/solvers/stressAnalysis/stressAnalysisSolversDoc.H new file mode 100644 index 0000000000..fe3e73b0d4 --- /dev/null +++ b/applications/solvers/stressAnalysis/stressAnalysisSolversDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ 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 3 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, see . + +\defgroup grpStressAnalysisSolvers Stress analysis solvers +@{ + \ingroup grpSolvers + This group contains stress analysis solvers. +@} + +\*---------------------------------------------------------------------------*/ diff --git a/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C b/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C index 2dd7905294..940bc871ab 100644 --- a/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C +++ b/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,7 +130,7 @@ int main(int argc, char *argv[]) ); if (!ok) { - WarningIn(args.executable()) + WarningInFunction << "At level " << level << " there are " << coarseSize << " agglomerated cells but " << newCoarseSize diff --git a/applications/test/Hashing/hashingTests b/applications/test/Hashing/hashingTests index 64c358f577..07841607eb 100644 --- a/applications/test/Hashing/hashingTests +++ b/applications/test/Hashing/hashingTests @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/test/codeStream/codeStreamDict1 b/applications/test/codeStream/codeStreamDict1 index 65e9f77554..8360f3ff4f 100644 --- a/applications/test/codeStream/codeStreamDict1 +++ b/applications/test/codeStream/codeStreamDict1 @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/dataEntry/dataEntryProperties b/applications/test/dataEntry/dataEntryProperties index b2511690f4..faf14cc894 100644 --- a/applications/test/dataEntry/dataEntryProperties +++ b/applications/test/dataEntry/dataEntryProperties @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/dictionary/testDict b/applications/test/dictionary/testDict index 6e52395a48..a128a0b2e7 100644 --- a/applications/test/dictionary/testDict +++ b/applications/test/dictionary/testDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/dictionary/testDict2 b/applications/test/dictionary/testDict2 index 0612545363..4d9bf211e0 100644 --- a/applications/test/dictionary/testDict2 +++ b/applications/test/dictionary/testDict2 @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/dictionary/testDictRegex b/applications/test/dictionary/testDictRegex index 4a24a74ef3..4b079d9a68 100644 --- a/applications/test/dictionary/testDictRegex +++ b/applications/test/dictionary/testDictRegex @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/error/Test-error.C b/applications/test/error/Test-error.C index a6789502c6..b9be1924a5 100644 --- a/applications/test/error/Test-error.C +++ b/applications/test/error/Test-error.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,15 +40,15 @@ int main(int argc, char *argv[]) try { - WarningIn("main") << "warning 1" << endl; - IOWarningIn("main", Serr) << "warning 2" << endl; + WarningInFunction << "warning 1" << endl; + IOWarningInFunction(Serr) << "warning 2" << endl; dictionary dict; - IOWarningIn("main", dict) << "warning 3" << endl; + IOWarningInFunction(dict) << "warning 3" << endl; - FatalErrorIn("main") << "error 1" << endl; - FatalErrorIn("main") << "error 2" << exit(FatalError); + FatalErrorInFunction << "error 1" << endl; + FatalErrorInFunction << "error 2" << exit(FatalError); } catch (Foam::error& fErr) { diff --git a/applications/test/fieldMapping/Test-fieldMapping.C b/applications/test/fieldMapping/Test-fieldMapping.C index e4bc196777..38a4b110f9 100644 --- a/applications/test/fieldMapping/Test-fieldMapping.C +++ b/applications/test/fieldMapping/Test-fieldMapping.C @@ -225,7 +225,7 @@ int main(int argc, char *argv[]) { if (mesh.V().size() != mesh.nCells()) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Volume not mapped. V:" << mesh.V().size() << " nCells:" << mesh.nCells() << exit(FatalError); @@ -238,7 +238,7 @@ int main(int argc, char *argv[]) if (mag(newVol-totalVol)/totalVol > 1e-10) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Volume loss: old volume:" << totalVol << " new volume:" << newVol << exit(FatalError); @@ -260,7 +260,7 @@ int main(int argc, char *argv[]) if (notEqual(max, 1.0, 1e-10) || notEqual(min, 1.0, 1e-10)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Uniform volVectorField not preserved." << " Min and max should both be 1.0. min:" << min << " max:" << max @@ -284,7 +284,7 @@ int main(int argc, char *argv[]) if (notEqual(max, 0.0, 1e-10) || notEqual(min, 0.0, 1e-10)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Linear profile not preserved." << " Min and max should both be 0.0. min:" << min << " max:" << max @@ -307,7 +307,7 @@ int main(int argc, char *argv[]) if (notEqual(max, 1.0, 1e-10) || notEqual(min, 1.0, 1e-10)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Uniform surfaceScalarField not preserved." << " Min and max should both be 1.0. min:" << min << " max:" << max diff --git a/applications/test/fieldMapping/pipe1D/constant/manualDecomposition b/applications/test/fieldMapping/pipe1D/constant/manualDecomposition index 8f08c2826f..e8e262c7c8 100644 --- a/applications/test/fieldMapping/pipe1D/constant/manualDecomposition +++ b/applications/test/fieldMapping/pipe1D/constant/manualDecomposition @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/fieldMapping/pipe1D/constant/transportProperties b/applications/test/fieldMapping/pipe1D/constant/transportProperties index fa1c1ca0b1..de00c3587c 100644 --- a/applications/test/fieldMapping/pipe1D/constant/transportProperties +++ b/applications/test/fieldMapping/pipe1D/constant/transportProperties @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/fieldMapping/pipe1D/constant/polyMesh/blockMeshDict b/applications/test/fieldMapping/pipe1D/system/blockMeshDict similarity index 90% rename from applications/test/fieldMapping/pipe1D/constant/polyMesh/blockMeshDict rename to applications/test/fieldMapping/pipe1D/system/blockMeshDict index 14bfd1bc80..455cdb1f9b 100644 --- a/applications/test/fieldMapping/pipe1D/constant/polyMesh/blockMeshDict +++ b/applications/test/fieldMapping/pipe1D/system/blockMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/fieldMapping/pipe1D/system/controlDict b/applications/test/fieldMapping/pipe1D/system/controlDict index ff7a82a791..3abb252df0 100644 --- a/applications/test/fieldMapping/pipe1D/system/controlDict +++ b/applications/test/fieldMapping/pipe1D/system/controlDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/fieldMapping/pipe1D/system/fvSchemes b/applications/test/fieldMapping/pipe1D/system/fvSchemes index e2faee5674..e6c6a7e1d5 100644 --- a/applications/test/fieldMapping/pipe1D/system/fvSchemes +++ b/applications/test/fieldMapping/pipe1D/system/fvSchemes @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/fieldMapping/pipe1D/system/fvSolution b/applications/test/fieldMapping/pipe1D/system/fvSolution index cc4750f16c..9749de42c6 100644 --- a/applications/test/fieldMapping/pipe1D/system/fvSolution +++ b/applications/test/fieldMapping/pipe1D/system/fvSolution @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/globalIndex/Test-globalIndex.C b/applications/test/globalIndex/Test-globalIndex.C index 11078c858b..0de4f04b3c 100644 --- a/applications/test/globalIndex/Test-globalIndex.C +++ b/applications/test/globalIndex/Test-globalIndex.C @@ -53,14 +53,14 @@ int main(int argc, char *argv[]) if (globalNumbering.localSize() != mesh.nCells()) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Problem." << abort(FatalError); } if (!Pstream::parRun()) { - WarningIn(args.executable()) + WarningInFunction << "globalIndex class is only useful in parallel code." << endl; } @@ -77,14 +77,14 @@ int main(int argc, char *argv[]) if (procI != Pstream::myProcNo() || localCellI != cellI) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Problem. cellI:" << cellI << " localCellI:" << localCellI << " procI:" << procI << abort(FatalError); } if (!globalNumbering.isLocal(globalCellI)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Problem. cellI:" << cellI << " globalCellI:" << globalCellI << " not local" << abort(FatalError); } @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) if (mesh.nCells() < 1) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Test needs to be run on a case with at least one" << " cell per processor." << abort(FatalError); } @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) if (procI != Pstream::myProcNo()-1) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Problem. global:" << prevProcCellI << " expected on processor:" << Pstream::myProcNo()-1 << " but is calculated to be on procI:" << procI @@ -118,14 +118,14 @@ int main(int argc, char *argv[]) if (globalNumbering.isLocal(prevProcCellI)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Problem. globalCellI:" << prevProcCellI << " calculated as local" << abort(FatalError); } if (!globalNumbering.isLocal(procI, prevProcCellI)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Problem. globalCellI:" << prevProcCellI << " not calculated as local on processor:" << procI << abort(FatalError); @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) if (procI != Pstream::myProcNo()+1) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Problem. global:" << nextProcCellI << " expected on processor:" << Pstream::myProcNo()+1 << " but is calculated to be on procI:" << procI @@ -149,14 +149,14 @@ int main(int argc, char *argv[]) if (globalNumbering.isLocal(nextProcCellI)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Problem. globalCellI:" << nextProcCellI << " calculated as local" << abort(FatalError); } if (!globalNumbering.isLocal(procI, nextProcCellI)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Problem. globalCellI:" << nextProcCellI << " not calculated as local on processor:" << procI << abort(FatalError); diff --git a/applications/test/hexRef8/Test-hexRef8.C b/applications/test/hexRef8/Test-hexRef8.C index 44a6094076..f79628fd8c 100644 --- a/applications/test/hexRef8/Test-hexRef8.C +++ b/applications/test/hexRef8/Test-hexRef8.C @@ -309,7 +309,7 @@ int main(int argc, char *argv[]) { if (mesh.V().size() != mesh.nCells()) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Volume not mapped. V:" << mesh.V().size() << " nCells:" << mesh.nCells() << exit(FatalError); @@ -322,7 +322,7 @@ int main(int argc, char *argv[]) if (mag(newVol-totalVol)/totalVol > 1e-10) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Volume loss: old volume:" << totalVol << " new volume:" << newVol << exit(FatalError); @@ -344,7 +344,7 @@ int main(int argc, char *argv[]) if (notEqual(max, 1.0, 1e-10) || notEqual(min, 1.0, 1e-10)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Uniform volVectorField not preserved." << " Min and max should both be 1.0. min:" << min << " max:" << max @@ -389,7 +389,7 @@ int main(int argc, char *argv[]) if (notEqual(max, 1.0, 1e-10) || notEqual(min, 1.0, 1e-10)) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Uniform surfaceScalarField not preserved." << " Min and max should both be 1.0. min:" << min << " max:" << max diff --git a/applications/test/hexRef8/block/constant/manualDecomposition b/applications/test/hexRef8/block/constant/manualDecomposition index 8f08c2826f..e8e262c7c8 100644 --- a/applications/test/hexRef8/block/constant/manualDecomposition +++ b/applications/test/hexRef8/block/constant/manualDecomposition @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/hexRef8/block/constant/transportProperties b/applications/test/hexRef8/block/constant/transportProperties index fa1c1ca0b1..de00c3587c 100644 --- a/applications/test/hexRef8/block/constant/transportProperties +++ b/applications/test/hexRef8/block/constant/transportProperties @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/hexRef8/block/constant/polyMesh/blockMeshDict b/applications/test/hexRef8/block/system/blockMeshDict similarity index 89% rename from applications/test/hexRef8/block/constant/polyMesh/blockMeshDict rename to applications/test/hexRef8/block/system/blockMeshDict index bff37d4ece..594ef61bd1 100644 --- a/applications/test/hexRef8/block/constant/polyMesh/blockMeshDict +++ b/applications/test/hexRef8/block/system/blockMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/hexRef8/block/system/controlDict b/applications/test/hexRef8/block/system/controlDict index 0c8cfee218..fd61f98f94 100644 --- a/applications/test/hexRef8/block/system/controlDict +++ b/applications/test/hexRef8/block/system/controlDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/hexRef8/block/system/decomposeParDict b/applications/test/hexRef8/block/system/decomposeParDict index be54c7d925..037184638b 100644 --- a/applications/test/hexRef8/block/system/decomposeParDict +++ b/applications/test/hexRef8/block/system/decomposeParDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/hexRef8/block/system/fvSchemes b/applications/test/hexRef8/block/system/fvSchemes index e2faee5674..e6c6a7e1d5 100644 --- a/applications/test/hexRef8/block/system/fvSchemes +++ b/applications/test/hexRef8/block/system/fvSchemes @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/hexRef8/block/system/fvSolution b/applications/test/hexRef8/block/system/fvSolution index cc4750f16c..9749de42c6 100644 --- a/applications/test/hexRef8/block/system/fvSolution +++ b/applications/test/hexRef8/block/system/fvSolution @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C index ea27cfc7df..88c0a24571 100644 --- a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C +++ b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C @@ -169,7 +169,7 @@ int main(int argc, char *argv[]) if (data != procI) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "From processor " << procI << " received " << data << " but expected " << procI << exit(FatalError); diff --git a/applications/test/patchRegion/cavity_pinched/constant/transportProperties b/applications/test/patchRegion/cavity_pinched/constant/transportProperties index fa1c1ca0b1..de00c3587c 100644 --- a/applications/test/patchRegion/cavity_pinched/constant/transportProperties +++ b/applications/test/patchRegion/cavity_pinched/constant/transportProperties @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/patchRegion/cavity_pinched/constant/polyMesh/blockMeshDict b/applications/test/patchRegion/cavity_pinched/system/blockMeshDict similarity index 91% rename from applications/test/patchRegion/cavity_pinched/constant/polyMesh/blockMeshDict rename to applications/test/patchRegion/cavity_pinched/system/blockMeshDict index 165a600c7b..5f58428dd6 100644 --- a/applications/test/patchRegion/cavity_pinched/constant/polyMesh/blockMeshDict +++ b/applications/test/patchRegion/cavity_pinched/system/blockMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/patchRegion/cavity_pinched/system/collapseDict b/applications/test/patchRegion/cavity_pinched/system/collapseDict index a059a67f14..bbc0f45fe4 100644 --- a/applications/test/patchRegion/cavity_pinched/system/collapseDict +++ b/applications/test/patchRegion/cavity_pinched/system/collapseDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/patchRegion/cavity_pinched/system/controlDict b/applications/test/patchRegion/cavity_pinched/system/controlDict index 4fc602f95c..d75e3a693c 100644 --- a/applications/test/patchRegion/cavity_pinched/system/controlDict +++ b/applications/test/patchRegion/cavity_pinched/system/controlDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/patchRegion/cavity_pinched/system/decomposeParDict b/applications/test/patchRegion/cavity_pinched/system/decomposeParDict index 8f0581f952..20d2aa2375 100644 --- a/applications/test/patchRegion/cavity_pinched/system/decomposeParDict +++ b/applications/test/patchRegion/cavity_pinched/system/decomposeParDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/patchRegion/cavity_pinched/system/fvSchemes b/applications/test/patchRegion/cavity_pinched/system/fvSchemes index 700ae4ff14..4194d5f291 100644 --- a/applications/test/patchRegion/cavity_pinched/system/fvSchemes +++ b/applications/test/patchRegion/cavity_pinched/system/fvSchemes @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/patchRegion/cavity_pinched/system/fvSolution b/applications/test/patchRegion/cavity_pinched/system/fvSolution index a0130726c4..74dd4bc398 100644 --- a/applications/test/patchRegion/cavity_pinched/system/fvSolution +++ b/applications/test/patchRegion/cavity_pinched/system/fvSolution @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/primitivePatch/Test-PrimitivePatch.C b/applications/test/primitivePatch/Test-PrimitivePatch.C index 60d321b2b7..3f5e9161e3 100644 --- a/applications/test/primitivePatch/Test-PrimitivePatch.C +++ b/applications/test/primitivePatch/Test-PrimitivePatch.C @@ -71,7 +71,7 @@ void checkFaceEdges if (edges[myEdges[fp]] != edge(f[fp], f[fp1])) { - FatalErrorIn("checkFaceEdges") + FatalErrorInFunction << "Edges of face not in face point order:" << "face:" << faceI << " localF:" << f << " faceEdges:" << myEdges diff --git a/applications/test/regex/testRegexps b/applications/test/regex/testRegexps index 904eb5d861..6f2d0e2935 100644 --- a/applications/test/regex/testRegexps +++ b/applications/test/regex/testRegexps @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/test/router/Gather/GatherBase.C b/applications/test/router/Gather/GatherBase.C index 553e41a818..e3f281db7e 100644 --- a/applications/test/router/Gather/GatherBase.C +++ b/applications/test/router/Gather/GatherBase.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,11 +70,8 @@ IndexType GatherBase::offset { if (values.size() != indices.size()) { - FatalErrorIn - ( - "GatherBase::offset(const List&, " - "const List&, AddOp)" - ) << "Input data and indices lists not equal size." << endl + FatalErrorInFunction + << "Input data and indices lists not equal size." << endl << "data size:" << values.size() << " indices:" << indices.size() << abort(FatalError); diff --git a/applications/test/router/Test-processorRouter.C b/applications/test/router/Test-processorRouter.C index 580277ee7e..2c6e5b1e6d 100644 --- a/applications/test/router/Test-processorRouter.C +++ b/applications/test/router/Test-processorRouter.C @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) if (!Pstream::parRun()) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Please run in parallel" << exit(FatalError); } diff --git a/applications/test/router/router.C b/applications/test/router/router.C index 84420a907c..0b55495bea 100644 --- a/applications/test/router/router.C +++ b/applications/test/router/router.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,12 +125,8 @@ void Foam::router::fixWeights if (minNodeI == -1) { - WarningIn - ( - "Foam::router::fixWeights" - "(const label startNodeI, const label endNodeI," - "const label nodeI, const label prevNodeI)" - ) << "Cannot route from node " << nodeI + WarningInFunction + << "Cannot route from node " << nodeI << " since all neigbours of node " << "already allocated:" << endl; @@ -138,12 +134,7 @@ void Foam::router::fixWeights { label nbrNodeI = myNeighbours[neighbourI]; - WarningIn - ( - "Foam::router::fixWeights" - "(const label startNodeI, const label endNodeI," - "const label nodeI, const label prevNodeI)" - ) << " neighbour:" << nbrNodeI + WarningInFunction << " weight:" << weights_[nbrNodeI] << endl; } return; @@ -292,7 +283,7 @@ bool Foam::router::route(const labelList& path, const label pathValue) { if (pathValue >= 0) { - FatalErrorIn("router::route(const labelList&, const label)") + FatalErrorInFunction << "Illegal pathValue " << pathValue << exit(FatalError); } @@ -382,7 +373,7 @@ Foam::labelList Foam::router::getRoute(const label pathValue) const if (pathNodeI == -1) { - FatalErrorIn("router::getRoute(const label)") + FatalErrorInFunction << "No route with value " << pathValue << endl; } diff --git a/applications/test/router/routerDict b/applications/test/router/routerDict index 9e6da7cbc2..25110af8f2 100644 --- a/applications/test/router/routerDict +++ b/applications/test/router/routerDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/spline/test-splines b/applications/test/spline/test-splines index f6fd1e29c0..9f56fa0c67 100644 --- a/applications/test/spline/test-splines +++ b/applications/test/spline/test-splines @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ ( diff --git a/applications/test/syncTools/Test-syncTools.C b/applications/test/syncTools/Test-syncTools.C index f7379b8cd5..f9a7764384 100644 --- a/applications/test/syncTools/Test-syncTools.C +++ b/applications/test/syncTools/Test-syncTools.C @@ -29,7 +29,6 @@ Description \*---------------------------------------------------------------------------*/ - #include "syncTools.H" #include "argList.H" #include "polyMesh.H" @@ -81,7 +80,7 @@ void testPackedList(const polyMesh& mesh, Random& rndGen) || maxEdgeValues[i] != label(maxBits.get(i)) ) { - FatalErrorIn("testPackedList()") + FatalErrorInFunction << "edge:" << i << " minlabel:" << edgeValues[i] << " minbits:" << bits.get(i) @@ -128,7 +127,7 @@ void testPackedList(const polyMesh& mesh, Random& rndGen) || maxPointValues[i] != label(maxBits.get(i)) ) { - FatalErrorIn("testPackedList()") + FatalErrorInFunction << "point:" << i << " at:" << mesh.points()[i] << " minlabel:" << pointValues[i] @@ -170,7 +169,7 @@ void testPackedList(const polyMesh& mesh, Random& rndGen) || maxFaceValues[faceI] != label(maxBits.get(faceI)) ) { - FatalErrorIn("testPackedList()") + FatalErrorInFunction << "face:" << faceI << " minlabel:" << faceValues[faceI] << " minbits:" << bits.get(faceI) @@ -187,7 +186,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) { Info<< nl << "Testing Map synchronisation." << endl; - WarningIn("testSparseData()") + WarningInFunction << "Position test of sparse data only correct for cases without cyclics" << " with shared points." << endl; @@ -252,7 +251,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) if (fullPt != sparsePt) { - FatalErrorIn("testSparseData()") + FatalErrorInFunction << "point:" << meshPointI << " full:" << fullPt << " sparse:" << sparsePt @@ -270,7 +269,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) if (fullPt != sparsePt) { - FatalErrorIn("testSparseData()") + FatalErrorInFunction << "point:" << meshPointI << " full:" << fullPt << " sparse:" << sparsePt @@ -335,7 +334,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) if (fullPt != sparsePt) { - FatalErrorIn("testSparseData()") + FatalErrorInFunction << "edge:" << meshEdgeI << " points:" << mesh.edges()[meshEdgeI] << " full:" << fullPt @@ -359,7 +358,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) if (fullPt != sparsePt) { - FatalErrorIn("testSparseData()") + FatalErrorInFunction << "Extra edge:" << meshEdgeI << " points:" << mesh.edges()[meshEdgeI] << " full:" << fullPt @@ -392,7 +391,7 @@ void testPointSync(const polyMesh& mesh, Random& rndGen) { if (mag(syncedPoints[pointI] - mesh.points()[pointI]) > SMALL) { - FatalErrorIn("testPointSync()") + FatalErrorInFunction << "Point " << pointI << " original location " << mesh.points()[pointI] << " synced location " << syncedPoints[pointI] @@ -428,13 +427,11 @@ void testPointSync(const polyMesh& mesh, Random& rndGen) { if (nMasters[pointI] != 1) { - //FatalErrorIn("testPointSync()") - WarningIn("testPointSync()") + WarningInFunction << "Point " << pointI << " original location " << mesh.points()[pointI] << " has " << nMasters[pointI] << " masters." - //<< exit(FatalError); << endl; } } @@ -470,7 +467,7 @@ void testEdgeSync(const polyMesh& mesh, Random& rndGen) if (mag(syncedMids[edgeI] - eMid) > SMALL) { - FatalErrorIn("testEdgeSync()") + FatalErrorInFunction << "Edge " << edgeI << " original midpoint " << eMid << " synced location " << syncedMids[edgeI] @@ -507,13 +504,11 @@ void testEdgeSync(const polyMesh& mesh, Random& rndGen) if (nMasters[edgeI] != 1) { const edge& e = edges[edgeI]; - //FatalErrorIn("testEdgeSync()") - WarningIn("testEdgeSync()") + WarningInFunction << "Edge " << edgeI << " at:" << mesh.points()[e[0]] << mesh.points()[e[1]] << " has " << nMasters[edgeI] << " masters." - //<< exit(FatalError); << endl; } } @@ -541,7 +536,7 @@ void testFaceSync(const polyMesh& mesh, Random& rndGen) { if (mag(syncedFc[faceI] - mesh.faceCentres()[faceI]) > SMALL) { - FatalErrorIn("testFaceSync()") + FatalErrorInFunction << "Face " << faceI << " original centre " << mesh.faceCentres()[faceI] << " synced centre " << syncedFc[faceI] @@ -576,7 +571,7 @@ void testFaceSync(const polyMesh& mesh, Random& rndGen) { if (nMasters[faceI] != 1) { - FatalErrorIn("testFaceSync()") + FatalErrorInFunction << "Face " << faceI << " centre " << mesh.faceCentres()[faceI] << " has " << nMasters[faceI] diff --git a/applications/test/tetTetOverlap/Test-tetTetOverlap.C b/applications/test/tetTetOverlap/Test-tetTetOverlap.C index df6f2b8f83..e314931614 100644 --- a/applications/test/tetTetOverlap/Test-tetTetOverlap.C +++ b/applications/test/tetTetOverlap/Test-tetTetOverlap.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -152,7 +152,7 @@ int main(int argc, char *argv[]) if (mag(volInside+volOutside-tetA.mag()) > SMALL) { - FatalErrorIn("Test-tetetOverlap") + FatalErrorInFunction << "Tet volumes do not sum up to input tet." << exit(FatalError); } diff --git a/applications/test/volField/Test-volField.C b/applications/test/volField/Test-volField.C index 25d8fbabff..37e4d303bf 100644 --- a/applications/test/volField/Test-volField.C +++ b/applications/test/volField/Test-volField.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -83,13 +83,35 @@ int main(int argc, char *argv[]) zeroGradientFvPatchSymmTensorField::typeName ); - solve + SolverPerformance sP = ( - fvm::ddt(st) - + fvm::div(phi, st) - - fvm::laplacian(dimensionedScalar("D", sqr(dimLength)/dimTime, 1), st) + solve + ( + fvm::ddt(st) + + fvm::div(phi, st) + - fvm::laplacian + ( + dimensionedScalar("D", sqr(dimLength)/dimTime, 1), + st + ) + == + dimensioned + ( + "source", + dimless/dimTime, + symmTensor(0, 2, 0, 1, 1.5, 0) + ) + ) ); + Info<< nl + << "Detailed SolverPerformance: " << nl + << " " << sP << endl; + + Info<< nl + << "solverPerformanceDict: " + << mesh.solverPerformanceDict() << endl; + return 0; } diff --git a/applications/test/volField/cavity/0/U b/applications/test/volField/cavity/0/U index 4287c89701..fb1764b108 100644 --- a/applications/test/volField/cavity/0/U +++ b/applications/test/volField/cavity/0/U @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/volField/cavity/0/p b/applications/test/volField/cavity/0/p index 56032f8b68..c295efa4f2 100644 --- a/applications/test/volField/cavity/0/p +++ b/applications/test/volField/cavity/0/p @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/volField/cavity/constant/transportProperties b/applications/test/volField/cavity/constant/transportProperties index fa1c1ca0b1..de00c3587c 100644 --- a/applications/test/volField/cavity/constant/transportProperties +++ b/applications/test/volField/cavity/constant/transportProperties @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/volField/cavity/constant/polyMesh/blockMeshDict b/applications/test/volField/cavity/system/blockMeshDict similarity index 92% rename from applications/test/volField/cavity/constant/polyMesh/blockMeshDict rename to applications/test/volField/cavity/system/blockMeshDict index f8f86ab8d6..cb67af8ad1 100644 --- a/applications/test/volField/cavity/constant/polyMesh/blockMeshDict +++ b/applications/test/volField/cavity/system/blockMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/volField/cavity/system/controlDict b/applications/test/volField/cavity/system/controlDict index d2fa09cc52..78ef7651b9 100644 --- a/applications/test/volField/cavity/system/controlDict +++ b/applications/test/volField/cavity/system/controlDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/volField/cavity/system/fvSchemes b/applications/test/volField/cavity/system/fvSchemes index 7a50b1146f..f06f5f99b8 100644 --- a/applications/test/volField/cavity/system/fvSchemes +++ b/applications/test/volField/cavity/system/fvSchemes @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/volField/cavity/system/fvSolution b/applications/test/volField/cavity/system/fvSolution index d95ff952c0..cfa2532bdb 100644 --- a/applications/test/volField/cavity/system/fvSolution +++ b/applications/test/volField/cavity/system/fvSolution @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/test/wordRe/testRegexps b/applications/test/wordRe/testRegexps index 89865a5a54..de46745172 100644 --- a/applications/test/wordRe/testRegexps +++ b/applications/test/wordRe/testRegexps @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/advanced/PDRMesh/Make/options b/applications/utilities/mesh/advanced/PDRMesh/Make/options index acd5a23a15..4e7c20058c 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/Make/options +++ b/applications/utilities/mesh/advanced/PDRMesh/Make/options @@ -10,4 +10,5 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lmeshTools \ -ldynamicMesh \ - -lfiniteVolume + -lfiniteVolume \ + -lfvOptions diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index 1f2c9533d2..085e658729 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -531,7 +531,7 @@ label findPatch(const polyBoundaryMesh& patches, const word& patchName) if (patchI == -1) { - FatalErrorIn("findPatch(const polyBoundaryMesh&, const word&)") + FatalErrorInFunction << "Illegal patch " << patchName << nl << "Valid patches are " << patches.names() << exit(FatalError); @@ -544,7 +544,7 @@ label findPatch(const polyBoundaryMesh& patches, const word& patchName) if (newPatch != patchI) { - FatalErrorIn("findPatch(const polyBoundaryMesh&, const word&)") + FatalErrorInFunction << "Patch " << patchName << " should have the same patch index on all processors." << nl << "On my processor it has index " << patchI @@ -652,7 +652,7 @@ int main(int argc, char *argv[]) { if (wantedPatch[iter.key()] != -1) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Face " << iter.key() << " is in faceSet " << setsAndPatches[setI][0] << " destined for patch " << setsAndPatches[setI][1] @@ -690,7 +690,7 @@ int main(int argc, char *argv[]) { if (coupledWantedPatch[iter.key()] != -1) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Face " << iter.key() << " is in faceSet " << coupledAndPatches[setI][0] << " destined for patch " << coupledAndPatches[setI][1] @@ -1152,7 +1152,7 @@ int main(int argc, char *argv[]) if (cellRegion.nRegions() > 1) { - WarningIn(args.executable()) + WarningInFunction << "Removing blocked faces and cells created " << cellRegion.nRegions() << " regions that are not connected via a face." << nl @@ -1168,7 +1168,7 @@ int main(int argc, char *argv[]) if (startFrom != "latestTime") { - WarningIn(args.executable()) + WarningInFunction << "To run splitMeshRegions please set your" << " startFrom entry to latestTime" << endl; } diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMeshDict b/applications/utilities/mesh/advanced/PDRMesh/PDRMeshDict index 62471e0ec6..619def16bb 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMeshDict +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C index 56e2f11467..26e716eb3f 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C +++ b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C @@ -365,7 +365,7 @@ bool limitRefinementLevel { if (refLevel[cellI] - refLevel[nbr] >= limitDiff) { - FatalErrorIn("limitRefinementLevel") + FatalErrorInFunction << "Level difference between neighbouring cells " << cellI << " and " << nbr << " greater than or equal to " << limitDiff << endl @@ -705,7 +705,7 @@ int main(int argc, char *argv[]) if (nCutLayers > 0 && selectInside) { - WarningIn(args.executable()) + WarningInFunction << "Illogical settings : Both nCutLayers>0 and selectInside true." << endl << "This would mean that inside cells get removed but should be" @@ -728,7 +728,7 @@ int main(int argc, char *argv[]) if (queryMesh.findCell(outsidePoint, -1, false) == -1) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "outsidePoint " << outsidePoint << " is not inside any cell" << exit(FatalError); diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict index adfee94118..6ebd9d3ba4 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict +++ b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseDict b/applications/utilities/mesh/advanced/collapseEdges/collapseDict index e89aa85241..66d27f6e89 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseDict +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseDict @@ -1,25 +1,18 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: http://www.openfoam.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ - FoamFile { version 2.0; format ascii; - - root ""; - case ""; - instance ""; - local ""; - class dictionary; + location "system"; object collapseDict; } - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // If on, after collapsing check the quality of the mesh. If bad faces are diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C index 134c735919..9df985f42e 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C @@ -98,7 +98,7 @@ int main(int argc, char *argv[]) if (collapseFaces && collapseFaceSet) { - FatalErrorIn("main(int, char*[])") + FatalErrorInFunction << "Both face zone collapsing and face collapsing have been" << "selected. Choose only one of:" << nl << " -collapseFaces" << nl diff --git a/applications/utilities/mesh/advanced/collapseEdges/meshQualityDict b/applications/utilities/mesh/advanced/collapseEdges/meshQualityDict index 43eb9a5836..c4cfd99212 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/meshQualityDict +++ b/applications/utilities/mesh/advanced/collapseEdges/meshQualityDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index f4d5d13418..9854ec2fef 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -177,7 +177,7 @@ label mergePatchFaces if (newVertI < 0) { - FatalErrorIn("mergePatchFaces") + FatalErrorInFunction << "In set:" << setI << " old face labels:" << allFaceSets[setI] << " new face vertices:" << setFaceVerts[i] << " are unmapped vertices!" diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index c3f8bed837..abd5eb45ad 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -399,7 +399,7 @@ int main(int argc, char *argv[]) || (collapseEdge && cellsToSplit) ) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Used more than one mesh modifying module " << "(boundary cutting, cell splitting, edge collapsing)" << nl << "Please do them in separate passes." << exit(FatalError); diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMeshDict b/applications/utilities/mesh/advanced/modifyMesh/modifyMeshDict index b388da5dac..36d3fe724d 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMeshDict +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index 2872db86d9..ba5b7f8548 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) if (!patchSet.size()) { - FatalErrorIn(args.executable()) + FatalErrorInFunction << "Cannot find any patches in set " << patches << endl << "Valid patches are " << mesh.boundaryMesh().names() << exit(FatalError); diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index 52fdf0bfaa..26e65a8ae5 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -240,7 +240,7 @@ int main(int argc, char *argv[]) if (!readLevel && refHeader.typeHeaderOk(true)) { - WarningIn(args.executable()) + WarningInFunction << "Detected " << refHeader.name() << " file in " << polyMesh::defaultRegion << " directory. Please remove to" << " recreate it or use the -readLevel option to use it" diff --git a/applications/utilities/mesh/advanced/selectCells/selectCells.C b/applications/utilities/mesh/advanced/selectCells/selectCells.C index 86eddffcf4..c71929e500 100644 --- a/applications/utilities/mesh/advanced/selectCells/selectCells.C +++ b/applications/utilities/mesh/advanced/selectCells/selectCells.C @@ -174,7 +174,7 @@ void cutBySurface } else { - FatalErrorIn("cutBySurface") + FatalErrorInFunction << "Multiple mesh regions in original mesh" << endl << "Please use splitMeshRegions to separate these" << exit(FatalError); @@ -393,7 +393,7 @@ int main(int argc, char *argv[]) label cellI = queryMesh.findCell(outsidePoint, -1, false); if (returnReduce(cellI, maxOp