mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Code clean-up
This commit is contained in:
@ -28,7 +28,6 @@ License
|
|||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "makeTurbulenceModel.H"
|
#include "makeTurbulenceModel.H"
|
||||||
|
|
||||||
#include "laminar.H"
|
|
||||||
#include "turbulentTransportModel.H"
|
#include "turbulentTransportModel.H"
|
||||||
#include "LESModel.H"
|
#include "LESModel.H"
|
||||||
|
|
||||||
@ -50,13 +49,32 @@ makeBaseTurbulenceModel
|
|||||||
immiscibleIncompressibleTwoPhaseMixture
|
immiscibleIncompressibleTwoPhaseMixture
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#define makeLaminarModel(Type) \
|
||||||
|
makeTemplatedTurbulenceModel \
|
||||||
|
( \
|
||||||
|
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
|
||||||
|
laminar, \
|
||||||
|
Type \
|
||||||
|
)
|
||||||
|
|
||||||
#define makeRASModel(Type) \
|
#define makeRASModel(Type) \
|
||||||
makeTemplatedTurbulenceModel \
|
makeTemplatedTurbulenceModel \
|
||||||
(immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel, RAS, Type)
|
( \
|
||||||
|
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
|
||||||
|
RAS, \
|
||||||
|
Type \
|
||||||
|
)
|
||||||
|
|
||||||
#define makeLESModel(Type) \
|
#define makeLESModel(Type) \
|
||||||
makeTemplatedTurbulenceModel \
|
makeTemplatedTurbulenceModel \
|
||||||
(immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel, LES, Type)
|
( \
|
||||||
|
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
|
||||||
|
LES, \
|
||||||
|
Type \
|
||||||
|
)
|
||||||
|
|
||||||
|
#include "Stokes.H"
|
||||||
|
makeLaminarModel(Stokes);
|
||||||
|
|
||||||
#include "kEpsilon.H"
|
#include "kEpsilon.H"
|
||||||
makeRASModel(kEpsilon);
|
makeRASModel(kEpsilon);
|
||||||
@ -70,4 +88,5 @@ makeLESModel(kEqn);
|
|||||||
#include "kOmega.H"
|
#include "kOmega.H"
|
||||||
makeRASModel(kOmega);
|
makeRASModel(kOmega);
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -640,11 +640,14 @@ int main(int argc, char *argv[])
|
|||||||
geometry,
|
geometry,
|
||||||
surfaces
|
surfaces
|
||||||
);
|
);
|
||||||
|
|
||||||
// Patch fields
|
// Patch fields
|
||||||
|
volScalarField::Boundary& cellDistanceBf =
|
||||||
|
cellDistance.boundaryFieldRef();
|
||||||
forAll(fvm.C().boundaryField(), patchi)
|
forAll(fvm.C().boundaryField(), patchi)
|
||||||
{
|
{
|
||||||
const pointField& cc = fvm.C().boundaryField()[patchi];
|
const pointField& cc = fvm.C().boundaryField()[patchi];
|
||||||
fvPatchScalarField& fld = cellDistance.boundaryField()[patchi];
|
fvPatchScalarField& fld = cellDistanceBf[patchi];
|
||||||
scalarField patchDistSqr
|
scalarField patchDistSqr
|
||||||
(
|
(
|
||||||
fld.patch().patchInternalField(distSqr)
|
fld.patch().patchInternalField(distSqr)
|
||||||
|
|||||||
@ -5,7 +5,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
@ -14,4 +15,5 @@ LIB_LIBS = \
|
|||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lcompressibleTurbulenceModels \
|
-lcompressibleTurbulenceModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lfiniteVolume
|
-lfiniteVolume \
|
||||||
|
-lmeshTools
|
||||||
|
|||||||
@ -468,7 +468,7 @@ void kOmegaSSTBase<BasicEddyViscosityModel>::correct()
|
|||||||
+ fvm::div(alphaRhoPhi, omega_)
|
+ fvm::div(alphaRhoPhi, omega_)
|
||||||
- fvm::laplacian(alpha*rho*DomegaEff(F1), 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::SuSp((2.0/3.0)*alpha()*rho()*gamma*divU, omega_)
|
||||||
- fvm::Sp(alpha()*rho()*beta*omega_(), omega_)
|
- fvm::Sp(alpha()*rho()*beta*omega_(), omega_)
|
||||||
- fvm::SuSp
|
- fvm::SuSp
|
||||||
|
|||||||
@ -28,7 +28,7 @@ Group
|
|||||||
grpWallFunctions
|
grpWallFunctions
|
||||||
|
|
||||||
Description
|
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.
|
dissipation, omega for both low and high Reynolds number turbulence models.
|
||||||
|
|
||||||
The near-wall omega may be either blended between the viscous region and
|
The near-wall omega may be either blended between the viscous region and
|
||||||
|
|||||||
@ -35,8 +35,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef laminar_H
|
#ifndef combustionModels_laminar_H
|
||||||
#define laminar_H
|
#define combustionModels_laminar_H
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
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
|
// Evaluate in reverse order
|
||||||
|
|||||||
@ -32,8 +32,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef laminar_H
|
#ifndef regionModels_surfaceFilmModels_laminar_H
|
||||||
#define laminar_H
|
#define regionModels_surfaceFilmModels_laminar_H
|
||||||
|
|
||||||
#include "filmTurbulenceModel.H"
|
#include "filmTurbulenceModel.H"
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -80,7 +80,7 @@ Foam::rigidBodyMeshMotionSolver::rigidBodyMeshMotionSolver
|
|||||||
mesh.time().timeName(),
|
mesh.time().timeName(),
|
||||||
"uniform",
|
"uniform",
|
||||||
mesh
|
mesh
|
||||||
).headerOk()
|
).typeHeaderOk<IOdictionary>(false)
|
||||||
? IOdictionary
|
? IOdictionary
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
Reference in New Issue
Block a user