outletPhaseMeanVelocity: Renamed Umean to UnMean
This is to make it clear that the value supplied is the scalar mean velocity normal to the patch, and to distinguish it from other instances of the keyword "UMean" which take a vector quantity.
This commit is contained in:
@ -39,7 +39,7 @@ Foam::outletPhaseMeanVelocityFvPatchVectorField
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<vector>(p, iF),
|
||||
Umean_(nullptr),
|
||||
UnMean_(nullptr),
|
||||
alphaName_("none")
|
||||
{
|
||||
refValue() = Zero;
|
||||
@ -58,7 +58,7 @@ Foam::outletPhaseMeanVelocityFvPatchVectorField
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<vector>(ptf, p, iF, mapper),
|
||||
Umean_(ptf.Umean_, false),
|
||||
UnMean_(ptf.UnMean_, false),
|
||||
alphaName_(ptf.alphaName_)
|
||||
{}
|
||||
|
||||
@ -72,7 +72,7 @@ Foam::outletPhaseMeanVelocityFvPatchVectorField
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<vector>(p, iF),
|
||||
Umean_(Function1<scalar>::New("Umean", dict)),
|
||||
UnMean_(Function1<scalar>::New("UnMean", dict)),
|
||||
alphaName_(dict.lookup("alpha"))
|
||||
{
|
||||
refValue() = Zero;
|
||||
@ -100,7 +100,7 @@ Foam::outletPhaseMeanVelocityFvPatchVectorField
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<vector>(ptf),
|
||||
Umean_(ptf.Umean_, false),
|
||||
UnMean_(ptf.UnMean_, false),
|
||||
alphaName_(ptf.alphaName_)
|
||||
{}
|
||||
|
||||
@ -113,7 +113,7 @@ Foam::outletPhaseMeanVelocityFvPatchVectorField
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<vector>(ptf, iF),
|
||||
Umean_(ptf.Umean_, false),
|
||||
UnMean_(ptf.UnMean_, false),
|
||||
alphaName_(ptf.alphaName_)
|
||||
{}
|
||||
|
||||
@ -138,23 +138,23 @@ void Foam::outletPhaseMeanVelocityFvPatchVectorField::updateCoeffs()
|
||||
// Get the patchInternalField (zero-gradient field)
|
||||
vectorField Uzg(patchInternalField());
|
||||
|
||||
// Calculate the phase mean zero-gradient velocity
|
||||
scalar Uzgmean =
|
||||
// Calculate the phase mean zero-gradient normal velocity
|
||||
const scalar UnzgMean =
|
||||
gSum(alphap*(patch().Sf() & Uzg))
|
||||
/gSum(alphap*patch().magSf());
|
||||
|
||||
// Set the refValue and valueFraction to adjust the boundary field
|
||||
// such that the phase mean is Umean_
|
||||
const scalar Umean = Umean_->value(t);
|
||||
if (Uzgmean >= Umean)
|
||||
// such that the phase mean is UnMean_
|
||||
const scalar UnMean = UnMean_->value(t);
|
||||
if (UnzgMean >= UnMean)
|
||||
{
|
||||
refValue() = Zero;
|
||||
valueFraction() = 1.0 - Umean/Uzgmean;
|
||||
valueFraction() = 1.0 - UnMean/UnzgMean;
|
||||
}
|
||||
else
|
||||
{
|
||||
refValue() = (Umean + Uzgmean)*patch().nf();
|
||||
valueFraction() = 1.0 - Uzgmean/Umean;
|
||||
refValue() = (UnMean + UnzgMean)*patch().nf();
|
||||
valueFraction() = 1.0 - UnzgMean/UnMean;
|
||||
}
|
||||
|
||||
mixedFvPatchField<vector>::updateCoeffs();
|
||||
@ -168,7 +168,7 @@ void Foam::outletPhaseMeanVelocityFvPatchVectorField::write
|
||||
{
|
||||
fvPatchField<vector>::write(os);
|
||||
|
||||
Umean_->writeData(os);
|
||||
UnMean_->writeData(os);
|
||||
os.writeKeyword("alpha") << alphaName_ << token::END_STATEMENT << nl;
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ Description
|
||||
Usage
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
Umean | mean velocity normal to the boundary [m/s] | yes |
|
||||
UnMean | mean velocity normal to the boundary [m/s] | yes |
|
||||
alpha | phase-fraction field | yes |
|
||||
\endtable
|
||||
|
||||
@ -44,7 +44,7 @@ Usage
|
||||
<patchName>
|
||||
{
|
||||
type outletPhaseMeanVelocity;
|
||||
Umean 1.2;
|
||||
UnMean 1.2;
|
||||
alpha alpha.water;
|
||||
value uniform (1.2 0 0);
|
||||
}
|
||||
@ -70,7 +70,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class outletPhaseMeanVelocityFvPatchVectorField Declaration
|
||||
Class outletPhaseMeanVelocityFvPatchVectorField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class outletPhaseMeanVelocityFvPatchVectorField
|
||||
@ -79,8 +79,8 @@ class outletPhaseMeanVelocityFvPatchVectorField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Inlet integral flow rate
|
||||
autoPtr<Function1<scalar>> Umean_;
|
||||
//- Mean velocity normal to the boundary
|
||||
autoPtr<Function1<scalar>> UnMean_;
|
||||
|
||||
//- Name of the phase-fraction field
|
||||
word alphaName_;
|
||||
|
||||
@ -15,11 +15,11 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Umean 1.668;
|
||||
UMean 1.668;
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (#neg $Umean 0 0);
|
||||
internalField uniform (#neg $UMean 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
@ -36,7 +36,7 @@ boundaryField
|
||||
{
|
||||
type outletPhaseMeanVelocity;
|
||||
alpha alpha.water;
|
||||
Umean $Umean;
|
||||
UnMean $UMean;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
|
||||
@ -15,11 +15,11 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Umean 1.668;
|
||||
UMean 1.668;
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (#neg $Umean 0 0);
|
||||
internalField uniform (#neg $UMean 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
@ -36,7 +36,7 @@ boundaryField
|
||||
{
|
||||
type outletPhaseMeanVelocity;
|
||||
alpha alpha.water;
|
||||
Umean $Umean;
|
||||
UnMean $UMean;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
|
||||
@ -15,11 +15,11 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Umean 1.668;
|
||||
UMean 1.668;
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (#neg $Umean 0 0);
|
||||
internalField uniform (#neg $UMean 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
@ -31,7 +31,7 @@ boundaryField
|
||||
type waveVelocity;
|
||||
origin (0 0 0.244);
|
||||
direction (-1 0 0);
|
||||
speed $Umean;
|
||||
speed $UMean;
|
||||
waves
|
||||
(
|
||||
Stokes2
|
||||
@ -49,7 +49,7 @@ boundaryField
|
||||
{
|
||||
type outletPhaseMeanVelocity;
|
||||
alpha alpha.water;
|
||||
Umean $Umean;
|
||||
UnMean $UMean;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ boundaryField
|
||||
right
|
||||
{
|
||||
type outletPhaseMeanVelocity;
|
||||
Umean 2;
|
||||
UnMean 2;
|
||||
alpha alpha.water;
|
||||
}
|
||||
top
|
||||
|
||||
Reference in New Issue
Block a user