mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
atmBoundaryLayerInletVelocity: removed spurious limit U <= Uref
Rewrote using field algebra rather than looping over cells Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1384
This commit is contained in:
@ -2,7 +2,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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -111,31 +111,16 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure direction vectors are normalized
|
||||||
n_ /= mag(n_);
|
n_ /= mag(n_);
|
||||||
z_ /= mag(z_);
|
z_ /= mag(z_);
|
||||||
|
|
||||||
forAll (Ustar_, i)
|
Ustar_ = kappa_*Uref_/(log((Href_ + z0_)/max(z0_, 0.001)));
|
||||||
{
|
scalarField Un
|
||||||
Ustar_[i] = kappa_*Uref_/(log((Href_ + z0_[i])/max(z0_[i] , 0.001)));
|
(
|
||||||
}
|
(Ustar_/kappa_)
|
||||||
|
*log(((z_ & patch().Cf()) - zGround_ + z0_)/max(z0_, 0.001))
|
||||||
const vectorField& c = patch().Cf();
|
);
|
||||||
const scalarField coord(c & z_);
|
|
||||||
scalarField Un(coord.size());
|
|
||||||
|
|
||||||
forAll(coord, i)
|
|
||||||
{
|
|
||||||
if ((coord[i] - zGround_[i]) < Href_)
|
|
||||||
{
|
|
||||||
Un[i] =
|
|
||||||
(Ustar_[i]/kappa_)
|
|
||||||
* log((coord[i] - zGround_[i] + z0_[i])/max(z0_[i], 0.001));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Un[i] = Uref_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
vectorField::operator=(n_*Un);
|
vectorField::operator=(n_*Un);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user