Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
commit
bb6c9705b9
@ -47,13 +47,13 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(p, iF),
|
fixedValueFvPatchScalarField(p, iF),
|
||||||
Ustar_(0),
|
z_(vector::zero),
|
||||||
z_(pTraits<vector>::zero),
|
|
||||||
z0_(0),
|
|
||||||
kappa_(0.41),
|
kappa_(0.41),
|
||||||
Uref_(0),
|
Uref_(0),
|
||||||
Href_(0),
|
Href_(0),
|
||||||
zGround_(0)
|
z0_(0),
|
||||||
|
zGround_(0),
|
||||||
|
Ustar_(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -67,13 +67,13 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
Ustar_(ptf.Ustar_),
|
|
||||||
z_(ptf.z_),
|
z_(ptf.z_),
|
||||||
z0_(ptf.z0_),
|
|
||||||
kappa_(ptf.kappa_),
|
kappa_(ptf.kappa_),
|
||||||
Uref_(ptf.Uref_),
|
Uref_(ptf.Uref_),
|
||||||
Href_(ptf.Href_),
|
Href_(ptf.Href_),
|
||||||
zGround_(ptf.zGround_)
|
z0_(ptf.z0_),
|
||||||
|
zGround_(ptf.zGround_),
|
||||||
|
Ustar_(ptf.Ustar_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -86,13 +86,13 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(p, iF),
|
fixedValueFvPatchScalarField(p, iF),
|
||||||
Ustar_(p.size()),
|
|
||||||
z_(dict.lookup("z")),
|
z_(dict.lookup("z")),
|
||||||
z0_(readScalar(dict.lookup("z0"))),
|
|
||||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||||
Uref_(readScalar(dict.lookup("Uref"))),
|
Uref_(readScalar(dict.lookup("Uref"))),
|
||||||
Href_(readScalar(dict.lookup("Href"))),
|
Href_(readScalar(dict.lookup("Href"))),
|
||||||
zGround_("zGround", dict, p.size())
|
z0_("z0", dict, p.size()),
|
||||||
|
zGround_("zGround", dict, p.size()),
|
||||||
|
Ustar_(p.size())
|
||||||
{
|
{
|
||||||
if (mag(z_) < SMALL)
|
if (mag(z_) < SMALL)
|
||||||
{
|
{
|
||||||
@ -128,18 +128,47 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(blpsf, iF),
|
fixedValueFvPatchScalarField(blpsf, iF),
|
||||||
Ustar_(blpsf.Ustar_),
|
|
||||||
z_(blpsf.z_),
|
z_(blpsf.z_),
|
||||||
z0_(blpsf.z0_),
|
|
||||||
kappa_(blpsf.kappa_),
|
kappa_(blpsf.kappa_),
|
||||||
Uref_(blpsf.Uref_),
|
Uref_(blpsf.Uref_),
|
||||||
Href_(blpsf.Href_),
|
Href_(blpsf.Href_),
|
||||||
zGround_(blpsf.zGround_)
|
z0_(blpsf.z0_),
|
||||||
|
zGround_(blpsf.zGround_),
|
||||||
|
Ustar_(blpsf.Ustar_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void atmBoundaryLayerInletEpsilonFvPatchScalarField::autoMap
|
||||||
|
(
|
||||||
|
const fvPatchFieldMapper& m
|
||||||
|
)
|
||||||
|
{
|
||||||
|
fixedValueFvPatchScalarField::autoMap(m);
|
||||||
|
z0_.autoMap(m);
|
||||||
|
zGround_.autoMap(m);
|
||||||
|
Ustar_.autoMap(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap
|
||||||
|
(
|
||||||
|
const fvPatchScalarField& ptf,
|
||||||
|
const labelList& addr
|
||||||
|
)
|
||||||
|
{
|
||||||
|
fixedValueFvPatchScalarField::rmap(ptf, addr);
|
||||||
|
|
||||||
|
const atmBoundaryLayerInletEpsilonFvPatchScalarField& blptf =
|
||||||
|
refCast<const atmBoundaryLayerInletEpsilonFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
|
z0_.rmap(blptf.z0_, addr);
|
||||||
|
zGround_.rmap(blptf.zGround_, addr);
|
||||||
|
Ustar_.rmap(blptf.Ustar_, addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void atmBoundaryLayerInletEpsilonFvPatchScalarField::updateCoeffs()
|
void atmBoundaryLayerInletEpsilonFvPatchScalarField::updateCoeffs()
|
||||||
{
|
{
|
||||||
const vectorField& c = patch().Cf();
|
const vectorField& c = patch().Cf();
|
||||||
@ -153,16 +182,14 @@ void atmBoundaryLayerInletEpsilonFvPatchScalarField::write(Ostream& os) const
|
|||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
os.writeKeyword("z")
|
os.writeKeyword("z")
|
||||||
<< z_ << token::END_STATEMENT << nl;
|
<< z_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("z0")
|
|
||||||
<< z0_ << token::END_STATEMENT << nl;
|
|
||||||
os.writeKeyword("kappa")
|
os.writeKeyword("kappa")
|
||||||
<< kappa_ << token::END_STATEMENT << nl;
|
<< kappa_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("Uref")
|
os.writeKeyword("Uref")
|
||||||
<< Uref_ << token::END_STATEMENT << nl;
|
<< Uref_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("Href")
|
os.writeKeyword("Href")
|
||||||
<< Href_ << token::END_STATEMENT << nl;
|
<< Href_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("zGround")
|
z0_.writeEntry("z0", os);
|
||||||
<< zGround_ << token::END_STATEMENT << nl;
|
zGround_.writeEntry("zGround", os);
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,15 +87,9 @@ class atmBoundaryLayerInletEpsilonFvPatchScalarField
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Frictional velocity
|
|
||||||
scalarField Ustar_;
|
|
||||||
|
|
||||||
//- Direction of the z-coordinate
|
//- Direction of the z-coordinate
|
||||||
vector z_;
|
vector z_;
|
||||||
|
|
||||||
//- Surface roughness lenght
|
|
||||||
scalarField z0_;
|
|
||||||
|
|
||||||
//- Von Karman constant
|
//- Von Karman constant
|
||||||
const scalar kappa_;
|
const scalar kappa_;
|
||||||
|
|
||||||
@ -105,8 +99,14 @@ class atmBoundaryLayerInletEpsilonFvPatchScalarField
|
|||||||
//- Reference hight
|
//- Reference hight
|
||||||
const scalar Href_;
|
const scalar Href_;
|
||||||
|
|
||||||
|
//- Surface roughness length
|
||||||
|
scalarField z0_;
|
||||||
|
|
||||||
//- Minimum corrdinate value in z direction
|
//- Minimum corrdinate value in z direction
|
||||||
const scalarField zGround_;
|
scalarField zGround_;
|
||||||
|
|
||||||
|
//- Frictional velocity
|
||||||
|
scalarField Ustar_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -173,6 +173,8 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
//- Return max value
|
//- Return max value
|
||||||
scalarField Ustar() const
|
scalarField Ustar() const
|
||||||
{
|
{
|
||||||
@ -185,9 +187,29 @@ public:
|
|||||||
return z_;
|
return z_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Mapping functions
|
||||||
|
|
||||||
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
|
virtual void autoMap
|
||||||
|
(
|
||||||
|
const fvPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||||
|
virtual void rmap
|
||||||
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
|
const labelList&
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update coefficients
|
//- Update coefficients
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
@ -21,6 +21,7 @@ internalField uniform 0;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
#include "include/ABLConditions"
|
||||||
|
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
@ -37,7 +38,7 @@ boundaryField
|
|||||||
"terrain_.*"
|
"terrain_.*"
|
||||||
{
|
{
|
||||||
type nutkAtmRoughWallFunction;
|
type nutkAtmRoughWallFunction;
|
||||||
z0 $Z0;
|
z0 $z0;
|
||||||
value uniform 0.0;
|
value uniform 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +49,6 @@ boundaryField
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include "include/sideAndTopPatches"
|
#include "include/sideAndTopPatches"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user