ENH: Code clean-up

This commit is contained in:
Andrew Heather
2016-09-30 12:30:02 +01:00
parent bd0e982d99
commit 839f14afcd
9 changed files with 41 additions and 17 deletions

View File

@ -28,7 +28,6 @@ License
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "laminar.H"
#include "turbulentTransportModel.H"
#include "LESModel.H"
@ -50,13 +49,32 @@ makeBaseTurbulenceModel
immiscibleIncompressibleTwoPhaseMixture
);
#define makeLaminarModel(Type) \
makeTemplatedTurbulenceModel \
( \
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
laminar, \
Type \
)
#define makeRASModel(Type) \
makeTemplatedTurbulenceModel \
(immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel, RAS, Type)
( \
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
RAS, \
Type \
)
#define makeLESModel(Type) \
makeTemplatedTurbulenceModel \
(immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel, LES, Type)
( \
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
LES, \
Type \
)
#include "Stokes.H"
makeLaminarModel(Stokes);
#include "kEpsilon.H"
makeRASModel(kEpsilon);
@ -70,4 +88,5 @@ makeLESModel(kEqn);
#include "kOmega.H"
makeRASModel(kOmega);
// ************************************************************************* //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -640,11 +640,14 @@ int main(int argc, char *argv[])
geometry,
surfaces
);
// Patch fields
volScalarField::Boundary& cellDistanceBf =
cellDistance.boundaryFieldRef();
forAll(fvm.C().boundaryField(), patchi)
{
const pointField& cc = fvm.C().boundaryField()[patchi];
fvPatchScalarField& fld = cellDistance.boundaryField()[patchi];
fvPatchScalarField& fld = cellDistanceBf[patchi];
scalarField patchDistSqr
(
fld.patch().patchInternalField(distSqr)

View File

@ -5,7 +5,8 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lcompressibleTransportModels \
@ -14,4 +15,5 @@ LIB_LIBS = \
-lincompressibleTransportModels \
-lcompressibleTurbulenceModels \
-lfluidThermophysicalModels \
-lfiniteVolume
-lfiniteVolume \
-lmeshTools

View File

@ -468,7 +468,7 @@ void kOmegaSSTBase<BasicEddyViscosityModel>::correct()
+ fvm::div(alphaRhoPhi, omega_)
- fvm::laplacian(alpha*rho*DomegaEff(F1), omega_)
==
alpha*rho*gamma*GbyNu(GbyNu0, F23(), S2())
alpha()*rho()*gamma*GbyNu(GbyNu0, F23(), S2())
- fvm::SuSp((2.0/3.0)*alpha()*rho()*gamma*divU, omega_)
- fvm::Sp(alpha()*rho()*beta*omega_(), omega_)
- fvm::SuSp

View File

@ -28,7 +28,7 @@ Group
grpWallFunctions
Description
This boundary condition provides a wall constraint on turbulnce specific
This boundary condition provides a wall constraint on turbulence specific
dissipation, omega for both low and high Reynolds number turbulence models.
The near-wall omega may be either blended between the viscous region and

View File

@ -35,8 +35,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef laminar_H
#define laminar_H
#ifndef combustionModels_laminar_H
#define combustionModels_laminar_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -57,7 +57,7 @@ void Foam::motionSmootherAlgo::checkConstraints
}
typename FldType::Boundary& bFld = pf.boundaryField();
typename FldType::Boundary& bFld = pf.boundaryFieldRef();
// Evaluate in reverse order

View File

@ -32,8 +32,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef laminar_H
#define laminar_H
#ifndef regionModels_surfaceFilmModels_laminar_H
#define regionModels_surfaceFilmModels_laminar_H
#include "filmTurbulenceModel.H"

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -80,7 +80,7 @@ Foam::rigidBodyMeshMotionSolver::rigidBodyMeshMotionSolver
mesh.time().timeName(),
"uniform",
mesh
).headerOk()
).typeHeaderOk<IOdictionary>(false)
? IOdictionary
(
IOobject