Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
a96b0970
Commit
a96b0970
authored
Jun 24, 2008
by
Andrew Heather
Committed by
graham
Jun 24, 2008
Browse files
updated and relocated turbulence eps and omega boundary conditions
parent
688169d9
Changes
13
Hide whitespace changes
Inline
Side-by-side
src/finiteVolume/Make/files
View file @
a96b0970
...
...
@@ -103,8 +103,6 @@ $(derivedFvPatchFields)/timeVaryingUniformTotalPressure/timeVaryingUniformTotalP
$(derivedFvPatchFields)/totalTemperature/totalTemperatureFvPatchScalarField.C
$(derivedFvPatchFields)/turbulentInlet/turbulentInletFvPatchFields.C
$(derivedFvPatchFields)/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C
$(derivedFvPatchFields)/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
$(derivedFvPatchFields)/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
$(derivedFvPatchFields)/uniformFixedValue/uniformFixedValueFvPatchFields.C
$(derivedFvPatchFields)/waveTransmissive/waveTransmissiveFvPatchFields.C
...
...
src/turbulenceModels/RAS/compressible/Make/files
View file @
a96b0970
/* RAS turbulence models */
RASModel/RASModel.C
RASModel/newRASModel.C
laminar/laminar.C
...
...
@@ -10,6 +11,11 @@ realizableKE/realizableKE.C
SpalartAllmaras/SpalartAllmaras.C
kOmegaSST/kOmegaSST.C
/* Wall functions */
wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C
/* Patch fields */
derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libcompressibleRASModels
src/turbulenceModels/RAS/compressible/RASModel/RASModel.H
View file @
a96b0970
...
...
@@ -245,7 +245,7 @@ public:
}
//- Const access to the coefficients dictionary
const
dictionary
&
coeffDict
()
const
dictionary
&
coeffDict
()
const
{
return
coeffDict_
;
}
...
...
src/
finiteVolume/fields/f
vPatchFields/
derived/
turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
→
src/
turbulenceModels/RAS/compressible/derivedF
vPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
View file @
a96b0970
...
...
@@ -29,6 +29,7 @@ License
#include
"fvPatchFieldMapper.H"
#include
"surfaceFields.H"
#include
"volFields.H"
#include
"RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -105,17 +106,10 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
}
// Lookup Cmu corresponding to the turbulence model selected
const
dictionary
&
RASProperties
=
db
().
lookupObject
<
IOdictionary
>
(
"RASProperties"
);
const
compressible
::
RASModel
&
RAS
=
db
().
lookupObject
<
compressible
::
RASModel
>
(
"RASProperties"
);
scalar
Cmu
=
readScalar
(
RAS
.
coeffDict
().
lookup
(
"Cmu"
));
const
dictionary
&
RASCoeffs
=
RASProperties
.
subDict
(
word
(
RASProperties
.
lookup
(
"RASModel"
))
+
"Coeffs"
);
scalar
Cmu
=
readScalar
(
RASCoeffs
.
lookup
(
"Cmu"
));
scalar
Cmu75
=
pow
(
Cmu
,
0
.
75
);
const
fvPatchField
<
scalar
>&
k
=
...
...
src/
finiteVolume/fields/f
vPatchFields/
derived/
turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H
→
src/
turbulenceModels/RAS/compressible/derivedF
vPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H
View file @
a96b0970
File moved
src/
finiteVolume/fields/f
vPatchFields/
derived/
turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
→
src/
turbulenceModels/RAS/compressible/derivedF
vPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
View file @
a96b0970
...
...
@@ -29,6 +29,7 @@ License
#include
"fvPatchFieldMapper.H"
#include
"surfaceFields.H"
#include
"volFields.H"
#include
"RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -110,17 +111,10 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
}
// Lookup Cmu corresponding to the turbulence model selected
const
dictionary
&
RASProperties
=
db
().
lookupObject
<
IOdictionary
>
(
"RASProperties"
);
const
compressible
::
RASModel
&
RAS
=
db
().
lookupObject
<
compressible
::
RASModel
>
(
"RASProperties"
);
scalar
Cmu
=
readScalar
(
RAS
.
coeffDict
().
lookup
(
"Cmu"
));
const
dictionary
&
RASCoeffs
=
RASProperties
.
subDict
(
word
(
RASProperties
.
lookup
(
"RASModel"
))
+
"Coeffs"
);
scalar
Cmu
=
readScalar
(
RASCoeffs
.
lookup
(
"Cmu"
));
scalar
Cmu25
=
pow
(
Cmu
,
0
.
25
);
const
fvPatchField
<
scalar
>&
kp
=
...
...
src/
finiteVolume/fields/f
vPatchFields/
derived/
turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H
→
src/
turbulenceModels/RAS/compressible/derivedF
vPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H
View file @
a96b0970
File moved
src/turbulenceModels/RAS/incompressible/Make/files
View file @
a96b0970
/* RAS turbulence models */
RASModel/RASModel.C
RASModel/newRASModel.C
laminar/laminar.C
...
...
@@ -16,8 +17,13 @@ NonlinearKEShih/NonlinearKEShih.C
LienLeschzinerLowRe/LienLeschzinerLowRe.C
LamBremhorstKE/LamBremhorstKE.C
/* Wall functions */
wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C
wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C
/* Patch fields */
derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libincompressibleRASModels
src/turbulenceModels/RAS/incompressible/RASModel/RASModel.H
View file @
a96b0970
...
...
@@ -232,7 +232,7 @@ public:
}
//- Const access to the coefficients dictionary
const
dictionary
&
coeffDict
()
const
dictionary
&
coeffDict
()
const
{
return
coeffDict_
;
}
...
...
src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
0 → 100644
View file @
a96b0970
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2006-2007 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include
"turbulentMixingLengthDissipationRateInletFvPatchScalarField.H"
#include
"addToRunTimeSelectionTable.H"
#include
"fvPatchFieldMapper.H"
#include
"surfaceFields.H"
#include
"volFields.H"
#include
"RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
turbulentMixingLengthDissipationRateInletFvPatchScalarField
::
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
:
fixedValueFvPatchField
<
scalar
>
(
p
,
iF
),
mixingLength_
(
0
.
001
)
{}
turbulentMixingLengthDissipationRateInletFvPatchScalarField
::
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const
turbulentMixingLengthDissipationRateInletFvPatchScalarField
&
ptf
,
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
const
fvPatchFieldMapper
&
mapper
)
:
fixedValueFvPatchField
<
scalar
>
(
ptf
,
p
,
iF
,
mapper
),
mixingLength_
(
ptf
.
mixingLength_
)
{}
turbulentMixingLengthDissipationRateInletFvPatchScalarField
::
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
const
dictionary
&
dict
)
:
fixedValueFvPatchField
<
scalar
>
(
p
,
iF
,
dict
),
mixingLength_
(
readScalar
(
dict
.
lookup
(
"mixingLength"
)))
{}
turbulentMixingLengthDissipationRateInletFvPatchScalarField
::
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const
turbulentMixingLengthDissipationRateInletFvPatchScalarField
&
ptf
)
:
fixedValueFvPatchField
<
scalar
>
(
ptf
),
mixingLength_
(
ptf
.
mixingLength_
)
{}
turbulentMixingLengthDissipationRateInletFvPatchScalarField
::
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const
turbulentMixingLengthDissipationRateInletFvPatchScalarField
&
ptf
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
:
fixedValueFvPatchField
<
scalar
>
(
ptf
,
iF
),
mixingLength_
(
ptf
.
mixingLength_
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void
turbulentMixingLengthDissipationRateInletFvPatchScalarField
::
updateCoeffs
()
{
if
(
updated
())
{
return
;
}
// Lookup Cmu corresponding to the turbulence model selected
const
incompressible
::
RASModel
&
RAS
=
db
().
lookupObject
<
incompressible
::
RASModel
>
(
"RASProperties"
);
scalar
Cmu
=
readScalar
(
RAS
.
coeffDict
().
lookup
(
"Cmu"
));
scalar
Cmu75
=
pow
(
Cmu
,
0
.
75
);
const
fvPatchField
<
scalar
>&
k
=
patch
().
lookupPatchField
<
volScalarField
,
scalar
>
(
"k"
);
operator
==
(
Cmu75
*
k
*
sqrt
(
k
)
/
mixingLength_
);
fixedValueFvPatchField
<
scalar
>::
updateCoeffs
();
}
void
turbulentMixingLengthDissipationRateInletFvPatchScalarField
::
write
(
Ostream
&
os
)
const
{
fvPatchField
<
scalar
>::
write
(
os
);
os
.
writeKeyword
(
"mixingLength"
)
<<
mixingLength_
<<
token
::
END_STATEMENT
<<
nl
;
writeEntry
(
"value"
,
os
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField
(
fvPatchScalarField
,
turbulentMixingLengthDissipationRateInletFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// ************************************************************************* //
src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H
0 → 100644
View file @
a96b0970
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2006-2007 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::turbulentMixingLengthDissipationRateInletFvPatchScalarField
Description
Calculate epsilon via the mixing length [m]
Example of the boundary condition specification:
@verbatim
inlet
{
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.005; // 5 mm
value uniform 200; // placeholder
}
@endverbatim
SourceFiles
turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef turbulentMixingLengthDissipationRateInletFvPatchScalarField_H
#define turbulentMixingLengthDissipationRateInletFvPatchScalarField_H
#include
"fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
/*---------------------------------------------------------------------------*\
Class turbulentMixingLengthDissipationRateInletFvPatch Declaration
\*---------------------------------------------------------------------------*/
class
turbulentMixingLengthDissipationRateInletFvPatchScalarField
:
public
fixedValueFvPatchScalarField
{
// Private data
//- turbulent length scale
scalar
mixingLength_
;
public:
//- Runtime type information
TypeName
(
"turbulentMixingLengthDissipationRateInlet"
);
// Constructors
//- Construct from patch and internal field
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const
fvPatch
&
,
const
DimensionedField
<
scalar
,
volMesh
>&
);
//- Construct from patch, internal field and dictionary
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const
fvPatch
&
,
const
DimensionedField
<
scalar
,
volMesh
>&
,
const
dictionary
&
);
//- Construct by mapping given
// turbulentMixingLengthDissipationRateInletFvPatchScalarField
// onto a new patch
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const
turbulentMixingLengthDissipationRateInletFvPatchScalarField
&
,
const
fvPatch
&
,
const
DimensionedField
<
scalar
,
volMesh
>&
,
const
fvPatchFieldMapper
&
);
//- Construct as copy
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const
turbulentMixingLengthDissipationRateInletFvPatchScalarField
&
);
//- Construct and return a clone
virtual
tmp
<
fvPatchScalarField
>
clone
()
const
{
return
tmp
<
fvPatchScalarField
>
(
new
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
*
this
)
);
}
//- Construct as copy setting internal field reference
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
const
turbulentMixingLengthDissipationRateInletFvPatchScalarField
&
,
const
DimensionedField
<
scalar
,
volMesh
>&
);
//- Construct and return a clone setting internal field reference
virtual
tmp
<
fvPatchScalarField
>
clone
(
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
const
{
return
tmp
<
fvPatchScalarField
>
(
new
turbulentMixingLengthDissipationRateInletFvPatchScalarField
(
*
this
,
iF
)
);
}
// Member functions
//- Update the coefficients associated with the patch field
virtual
void
updateCoeffs
();
//- Write
virtual
void
write
(
Ostream
&
)
const
;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
0 → 100644
View file @
a96b0970
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2006-2007 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include
"turbulentMixingLengthFrequencyInletFvPatchScalarField.H"
#include
"addToRunTimeSelectionTable.H"
#include
"fvPatchFieldMapper.H"
#include
"surfaceFields.H"
#include
"volFields.H"
#include
"RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
turbulentMixingLengthFrequencyInletFvPatchScalarField
::
turbulentMixingLengthFrequencyInletFvPatchScalarField
(
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
:
fixedValueFvPatchField
<
scalar
>
(
p
,
iF
),
mixingLength_
(
0
.
0
),
kName_
(
"undefined-k"
)
{}
turbulentMixingLengthFrequencyInletFvPatchScalarField
::
turbulentMixingLengthFrequencyInletFvPatchScalarField
(
const
turbulentMixingLengthFrequencyInletFvPatchScalarField
&
ptf
,
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
const
fvPatchFieldMapper
&
mapper
)
:
fixedValueFvPatchField
<
scalar
>
(
ptf
,
p
,
iF
,
mapper
),
mixingLength_
(
ptf
.
mixingLength_
),
kName_
(
ptf
.
kName_
)
{}
turbulentMixingLengthFrequencyInletFvPatchScalarField
::
turbulentMixingLengthFrequencyInletFvPatchScalarField
(
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
const
dictionary
&
dict
)
:
fixedValueFvPatchField
<
scalar
>
(
p
,
iF
,
dict
),
mixingLength_
(
readScalar
(
dict
.
lookup
(
"mixingLength"
))),
kName_
(
dict
.
lookup
(
"k"
))
{}
turbulentMixingLengthFrequencyInletFvPatchScalarField
::
turbulentMixingLengthFrequencyInletFvPatchScalarField
(
const
turbulentMixingLengthFrequencyInletFvPatchScalarField
&
ptf
)
:
fixedValueFvPatchField
<
scalar
>
(
ptf
),
mixingLength_
(
ptf
.
mixingLength_
),
kName_
(
ptf
.
kName_
)
{}
turbulentMixingLengthFrequencyInletFvPatchScalarField
::
turbulentMixingLengthFrequencyInletFvPatchScalarField
(
const
turbulentMixingLengthFrequencyInletFvPatchScalarField
&
ptf
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
:
fixedValueFvPatchField
<
scalar
>
(
ptf
,
iF
),
mixingLength_
(
ptf
.
mixingLength_
),
kName_
(
ptf
.
kName_
)
{}