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