mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -128,10 +128,14 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
void Foam::radiation::greyDiffusiveViewFactorFixedValueFvPatchScalarField::
|
||||
updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Do nothing
|
||||
|
||||
if (debug)
|
||||
@ -149,6 +153,7 @@ updateCoeffs()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -142,6 +142,8 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs()
|
||||
htc[faceI] = 0.037*pow(Re, 0.8)*cbrt(Pr[faceI])*kappaw[faceI]/L_;
|
||||
}
|
||||
}
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -116,7 +116,8 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
||||
|
||||
z_ /= mag(z_);
|
||||
|
||||
evaluate();
|
||||
const vectorField& c = patch().Cf();
|
||||
scalarField::operator=(pow3(Ustar_)/(kappa_*((c & z_) - zGround_ + z0_)));
|
||||
}
|
||||
|
||||
|
||||
@ -169,14 +170,6 @@ void atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap
|
||||
}
|
||||
|
||||
|
||||
void atmBoundaryLayerInletEpsilonFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
const vectorField& c = patch().Cf();
|
||||
tmp<scalarField> coord = (c & z_);
|
||||
scalarField::operator=(pow3(Ustar_)/(kappa_*(coord - zGround_ + z0_)));
|
||||
}
|
||||
|
||||
|
||||
void atmBoundaryLayerInletEpsilonFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
|
||||
@ -176,7 +176,7 @@ public:
|
||||
// Access
|
||||
|
||||
//- Return max value
|
||||
scalarField Ustar() const
|
||||
const scalarField& Ustar() const
|
||||
{
|
||||
return Ustar_;
|
||||
}
|
||||
@ -204,12 +204,6 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update coefficients
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
@ -120,7 +120,25 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
||||
Ustar_[i] = kappa_*Uref_/(log((Href_ + z0_[i])/max(z0_[i] , 0.001)));
|
||||
}
|
||||
|
||||
evaluate();
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@ -174,32 +192,6 @@ void atmBoundaryLayerInletVelocityFvPatchVectorField::rmap
|
||||
}
|
||||
|
||||
|
||||
void atmBoundaryLayerInletVelocityFvPatchVectorField::updateCoeffs()
|
||||
{
|
||||
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);
|
||||
|
||||
fixedValueFvPatchVectorField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void atmBoundaryLayerInletVelocityFvPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchVectorField::write(os);
|
||||
|
||||
@ -180,23 +180,26 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return Ustar
|
||||
scalarField& Ustar()
|
||||
{
|
||||
return Ustar_;
|
||||
}
|
||||
// Access
|
||||
|
||||
//- Return flow direction
|
||||
vector& n()
|
||||
{
|
||||
return n_;
|
||||
}
|
||||
//- Return Ustar
|
||||
const scalarField& Ustar() const
|
||||
{
|
||||
return Ustar_;
|
||||
}
|
||||
|
||||
//- Return flow direction
|
||||
const vector& n() const
|
||||
{
|
||||
return n_;
|
||||
}
|
||||
|
||||
//- Return z direction
|
||||
const vector& z() const
|
||||
{
|
||||
return z_;
|
||||
}
|
||||
|
||||
//- Return z direction
|
||||
vector& z()
|
||||
{
|
||||
return z_;
|
||||
}
|
||||
|
||||
// Mapping functions
|
||||
|
||||
@ -214,12 +217,6 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update coefficients
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user