src/atmosphericModels: New library containing models specific to atmospheric flows
Converted the atmBoundaryLayerInlet boundary conditions to inletOutlet to handle changes in inflow orientation without the need for re-meshing.
This commit is contained in:
@ -33,7 +33,6 @@ $(nutWallFunctions)/nutWallFunction/nutWallFunctionFvPatchScalarField.C
|
||||
|
||||
$(nutWallFunctions)/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C
|
||||
$(nutWallFunctions)/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C
|
||||
$(nutWallFunctions)/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C
|
||||
|
||||
$(nutWallFunctions)/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C
|
||||
$(nutWallFunctions)/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C
|
||||
@ -64,11 +63,5 @@ RASBCs = RAS/derivedFvPatchFields
|
||||
$(RASBCs)/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
|
||||
$(RASBCs)/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
|
||||
|
||||
/* Atmospheric boundary layer BCs */
|
||||
$(RASBCs)/atmBoundaryLayer/atmBoundaryLayer.C
|
||||
$(RASBCs)/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
|
||||
$(RASBCs)/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C
|
||||
$(RASBCs)/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C
|
||||
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libturbulenceModels
|
||||
|
||||
7
src/atmosphericModels/Make/files
Normal file
7
src/atmosphericModels/Make/files
Normal file
@ -0,0 +1,7 @@
|
||||
derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
|
||||
derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
|
||||
derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C
|
||||
derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C
|
||||
derivedFvPatchFields/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libatmosphericModels
|
||||
18
src/atmosphericModels/Make/options
Normal file
18
src/atmosphericModels/Make/options
Normal file
@ -0,0 +1,18 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-ltriSurface \
|
||||
-lfvOptions
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,7 +43,7 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
inletOutletFvPatchScalarField(p, iF),
|
||||
atmBoundaryLayer()
|
||||
{}
|
||||
|
||||
@ -56,10 +56,23 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
inletOutletFvPatchScalarField(p, iF),
|
||||
atmBoundaryLayer(patch().Cf(), dict)
|
||||
{
|
||||
scalarField::operator=(epsilon(patch().Cf()));
|
||||
phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||
|
||||
refValue() = epsilon(patch().Cf());
|
||||
refGrad() = 0;
|
||||
valueFraction() = 1;
|
||||
|
||||
if (dict.found("value"))
|
||||
{
|
||||
scalarField::operator=(scalarField("value", dict, p.size()));
|
||||
}
|
||||
else
|
||||
{
|
||||
scalarField::operator=(refValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -72,7 +85,7 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(psf, p, iF, mapper),
|
||||
inletOutletFvPatchScalarField(psf, p, iF, mapper),
|
||||
atmBoundaryLayer(psf, mapper)
|
||||
{}
|
||||
|
||||
@ -84,7 +97,7 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(psf, iF),
|
||||
inletOutletFvPatchScalarField(psf, iF),
|
||||
atmBoundaryLayer(psf)
|
||||
{}
|
||||
|
||||
@ -96,7 +109,7 @@ void atmBoundaryLayerInletEpsilonFvPatchScalarField::autoMap
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::autoMap(m);
|
||||
inletOutletFvPatchScalarField::autoMap(m);
|
||||
atmBoundaryLayer::autoMap(m);
|
||||
}
|
||||
|
||||
@ -107,7 +120,7 @@ void atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::rmap(psf, addr);
|
||||
inletOutletFvPatchScalarField::rmap(psf, addr);
|
||||
|
||||
const atmBoundaryLayerInletEpsilonFvPatchScalarField& blpsf =
|
||||
refCast<const atmBoundaryLayerInletEpsilonFvPatchScalarField>(psf);
|
||||
@ -120,6 +133,7 @@ void atmBoundaryLayerInletEpsilonFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
atmBoundaryLayer::write(os);
|
||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -60,7 +60,7 @@ SourceFiles
|
||||
#define atmBoundaryLayerInletEpsilonFvPatchScalarField_H
|
||||
|
||||
#include "fvPatchFields.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "inletOutletFvPatchFields.H"
|
||||
#include "atmBoundaryLayer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -74,7 +74,7 @@ namespace Foam
|
||||
|
||||
class atmBoundaryLayerInletEpsilonFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField,
|
||||
public inletOutletFvPatchScalarField,
|
||||
public atmBoundaryLayer
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,7 +43,7 @@ atmBoundaryLayerInletKFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
inletOutletFvPatchScalarField(p, iF),
|
||||
atmBoundaryLayer()
|
||||
{}
|
||||
|
||||
@ -56,10 +56,23 @@ atmBoundaryLayerInletKFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
inletOutletFvPatchScalarField(p, iF),
|
||||
atmBoundaryLayer(patch().Cf(), dict)
|
||||
{
|
||||
scalarField::operator=(k(patch().Cf()));
|
||||
phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||
|
||||
refValue() = k(patch().Cf());
|
||||
refGrad() = 0;
|
||||
valueFraction() = 1;
|
||||
|
||||
if (dict.found("value"))
|
||||
{
|
||||
scalarField::operator=(scalarField("value", dict, p.size()));
|
||||
}
|
||||
else
|
||||
{
|
||||
scalarField::operator=(refValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -72,7 +85,7 @@ atmBoundaryLayerInletKFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(psf, p, iF, mapper),
|
||||
inletOutletFvPatchScalarField(psf, p, iF, mapper),
|
||||
atmBoundaryLayer(psf, mapper)
|
||||
{}
|
||||
|
||||
@ -84,7 +97,7 @@ atmBoundaryLayerInletKFvPatchScalarField
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(psf, iF),
|
||||
inletOutletFvPatchScalarField(psf, iF),
|
||||
atmBoundaryLayer(psf)
|
||||
{}
|
||||
|
||||
@ -96,7 +109,7 @@ void atmBoundaryLayerInletKFvPatchScalarField::autoMap
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::autoMap(m);
|
||||
inletOutletFvPatchScalarField::autoMap(m);
|
||||
atmBoundaryLayer::autoMap(m);
|
||||
}
|
||||
|
||||
@ -107,7 +120,7 @@ void atmBoundaryLayerInletKFvPatchScalarField::rmap
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::rmap(psf, addr);
|
||||
inletOutletFvPatchScalarField::rmap(psf, addr);
|
||||
|
||||
const atmBoundaryLayerInletKFvPatchScalarField& blpsf =
|
||||
refCast<const atmBoundaryLayerInletKFvPatchScalarField>(psf);
|
||||
@ -120,6 +133,7 @@ void atmBoundaryLayerInletKFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
atmBoundaryLayer::write(os);
|
||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -60,7 +60,7 @@ SourceFiles
|
||||
#define atmBoundaryLayerInletKFvPatchScalarField_H
|
||||
|
||||
#include "fvPatchFields.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "inletOutletFvPatchFields.H"
|
||||
#include "atmBoundaryLayer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -74,7 +74,7 @@ namespace Foam
|
||||
|
||||
class atmBoundaryLayerInletKFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField,
|
||||
public inletOutletFvPatchScalarField,
|
||||
public atmBoundaryLayer
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,7 +43,7 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
||||
const DimensionedField<vector, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
inletOutletFvPatchVectorField(p, iF),
|
||||
atmBoundaryLayer()
|
||||
{}
|
||||
|
||||
@ -56,10 +56,23 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF, dict, false),
|
||||
inletOutletFvPatchVectorField(p, iF),
|
||||
atmBoundaryLayer(patch().Cf(), dict)
|
||||
{
|
||||
vectorField::operator=(U(patch().Cf()));
|
||||
phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||
|
||||
refValue() = U(patch().Cf());
|
||||
refGrad() = Zero;
|
||||
valueFraction() = 1;
|
||||
|
||||
if (dict.found("value"))
|
||||
{
|
||||
vectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
else
|
||||
{
|
||||
vectorField::operator=(refValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -72,7 +85,7 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(pvf, p, iF, mapper),
|
||||
inletOutletFvPatchVectorField(pvf, p, iF, mapper),
|
||||
atmBoundaryLayer(pvf, mapper)
|
||||
{}
|
||||
|
||||
@ -84,7 +97,7 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
||||
const DimensionedField<vector, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(pvf, iF),
|
||||
inletOutletFvPatchVectorField(pvf, iF),
|
||||
atmBoundaryLayer(pvf)
|
||||
{}
|
||||
|
||||
@ -96,7 +109,7 @@ void atmBoundaryLayerInletVelocityFvPatchVectorField::autoMap
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchVectorField::autoMap(m);
|
||||
inletOutletFvPatchVectorField::autoMap(m);
|
||||
atmBoundaryLayer::autoMap(m);
|
||||
}
|
||||
|
||||
@ -107,7 +120,7 @@ void atmBoundaryLayerInletVelocityFvPatchVectorField::rmap
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchVectorField::rmap(pvf, addr);
|
||||
inletOutletFvPatchVectorField::rmap(pvf, addr);
|
||||
|
||||
const atmBoundaryLayerInletVelocityFvPatchVectorField& blpvf =
|
||||
refCast<const atmBoundaryLayerInletVelocityFvPatchVectorField>(pvf);
|
||||
@ -120,6 +133,7 @@ void atmBoundaryLayerInletVelocityFvPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchVectorField::write(os);
|
||||
atmBoundaryLayer::write(os);
|
||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -61,7 +61,7 @@ SourceFiles
|
||||
#define atmBoundaryLayerInletVelocityFvPatchVectorField_H
|
||||
|
||||
#include "fvPatchFields.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "inletOutletFvPatchFields.H"
|
||||
#include "atmBoundaryLayer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -75,7 +75,7 @@ namespace Foam
|
||||
|
||||
class atmBoundaryLayerInletVelocityFvPatchVectorField
|
||||
:
|
||||
public fixedValueFvPatchVectorField,
|
||||
public inletOutletFvPatchVectorField,
|
||||
public atmBoundaryLayer
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -44,4 +44,6 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
libs ("libatmosphericModels.so");
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user