flowRateInletVelocityFvPatchVectorField: Added optional profile entry to specify the velocity profile
The unreliable extrapolateProfile option has been replaced by the more flexible
and reliable profile option which allows the velocity profile to be specified as
a Function1 of the normalised distance to the wall. To simplify the
specification of the most common velocity profiles the new laminarBL (quadratic
profile) and turbulentBL (1/7th power law) Function1s are provided.
In addition to the new profile option the flow rate can now be specified as a
meanVelocity, volumetricFlowRate or massFlowRate, all of which are Function1s of
time.
The following tutorials have been updated to use the laminarBL profile:
multiphase/multiphaseEulerFoam/laminar/titaniaSynthesis
multiphase/multiphaseEulerFoam/laminar/titaniaSynthesisSurface
The following tutorials have been updated to use the turbulentBL profile:
combustion/reactingFoam/Lagrangian/verticalChannel
combustion/reactingFoam/Lagrangian/verticalChannelLTS
combustion/reactingFoam/Lagrangian/verticalChannelSteady
compressible/rhoPimpleFoam/RAS/angledDuct
compressible/rhoPimpleFoam/RAS/angledDuctLTS
compressible/rhoPimpleFoam/RAS/squareBendLiq
compressible/rhoPorousSimpleFoam/angledDuctImplicit
compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff
compressible/rhoSimpleFoam/squareBend
compressible/rhoSimpleFoam/squareBendLiq
heatTransfer/chtMultiRegionFoam/shellAndTubeHeatExchanger
heatTransfer/chtMultiRegionFoam/shellAndTubeHeatExchanger
incompressible/porousSimpleFoam/angledDuctImplicit
incompressible/porousSimpleFoam/straightDuctImplicit
multiphase/interFoam/RAS/angledDuct
Class
Foam::flowRateInletVelocityFvPatchVectorField
Description
Velocity inlet boundary condition creating a velocity field with
optionally specified profile normal to the patch adjusted to match the
specified mass flow rate, volumetric flow rate or mean velocity.
For a mass-based flux:
- the flow rate should be provided in kg/s
- if \c rho is "none" the flow rate is in m3/s
- otherwise \c rho should correspond to the name of the density field
- if the density field cannot be found in the database, the user must
specify the inlet density using the \c rhoInlet entry
For a volumetric-based flux:
- the flow rate is in m3/s
Usage
\table
Property | Description | Required | Default value
massFlowRate | Mass flow rate [kg/s] | no |
volumetricFlowRate | Volumetric flow rate [m^3/s]| no |
meanVelocity | Mean velocity [m/s]| no |
profile | Velocity profile | no |
rho | Density field name | no | rho
rhoInlet | Inlet density | no |
alpha | Volume fraction field name | no |
\endtable
Example of the boundary condition specification for a volumetric flow rate:
\verbatim
<patchName>
{
type flowRateInletVelocity;
volumetricFlowRate 0.2;
profile laminarBL;
}
\endverbatim
Example of the boundary condition specification for a mass flow rate:
\verbatim
<patchName>
{
type flowRateInletVelocity;
massFlowRate 0.2;
profile turbulentBL;
rho rho;
rhoInlet 1.0;
}
\endverbatim
Example of the boundary condition specification for a volumetric flow rate:
\verbatim
<patchName>
{
type flowRateInletVelocity;
meanVelocity 5;
profile turbulentBL;
}
\endverbatim
The \c volumetricFlowRate, \c massFlowRate or \c meanVelocity entries are
\c Function1 of time, see Foam::Function1s.
The \c profile entry is a \c Function1 of the normalised distance to the
wall. Any suitable Foam::Function1s can be used including
Foam::Function1s::codedFunction1 but Foam::Function1s::laminarBL and
Foam::Function1s::turbulentBL have been created specifically for this
purpose and are likely to be appropriate for most cases.
Note
- \c rhoInlet is required for the case of a mass flow rate, where the
density field is not available at start-up
- The value is positive into the domain (as an inlet)
- May not work correctly for transonic inlets
- Strange behaviour with potentialFoam since the U equation is not solved
See also
Foam::fixedValueFvPatchField
Foam::Function1s::laminarBL
Foam::Function1s::turbulentBL
Foam::Function1s
Foam::flowRateOutletVelocityFvPatchVectorField
This commit is contained in:
@ -33,12 +33,14 @@ boundaryField
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.00379;
|
||||
rhoInlet 1.0; // fallback value for e.g. potentialFoam
|
||||
profile turbulentBL;
|
||||
}
|
||||
inletSides
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.00832;
|
||||
rhoInlet 1.0; // fallback value for e.g. potentialFoam
|
||||
profile turbulentBL;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
|
||||
@ -31,13 +31,13 @@ boundaryField
|
||||
inletCentral
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.15;
|
||||
intensity 0.05;
|
||||
value uniform 3.75e-9;
|
||||
}
|
||||
inletSides
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.16;
|
||||
intensity 0.05;
|
||||
value uniform 3.75e-9;
|
||||
}
|
||||
outlet
|
||||
|
||||
@ -33,12 +33,14 @@ boundaryField
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.00379;
|
||||
rhoInlet 1.0; // fallback value for e.g. potentialFoam
|
||||
profile turbulentBL;
|
||||
}
|
||||
inletSides
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.00832;
|
||||
rhoInlet 1.0; // fallback value for e.g. potentialFoam
|
||||
profile turbulentBL;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
|
||||
@ -31,13 +31,13 @@ boundaryField
|
||||
inletCentral
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.15;
|
||||
intensity 0.05;
|
||||
value uniform 3.75e-9;
|
||||
}
|
||||
inletSides
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.16;
|
||||
intensity 0.05;
|
||||
value uniform 3.75e-9;
|
||||
}
|
||||
outlet
|
||||
|
||||
@ -33,6 +33,7 @@ boundaryField
|
||||
type flowRateInletVelocity;
|
||||
rhoInlet 1.2;
|
||||
massFlowRate constant 0.00379;
|
||||
profile turbulentBL;
|
||||
value uniform (0 14.68 0);
|
||||
}
|
||||
inletSides
|
||||
@ -40,6 +41,7 @@ boundaryField
|
||||
type flowRateInletVelocity;
|
||||
rhoInlet 1.2;
|
||||
massFlowRate constant 0.00832;
|
||||
profile turbulentBL;
|
||||
value uniform (0 17.79 0);
|
||||
}
|
||||
outlet
|
||||
|
||||
@ -31,13 +31,13 @@ boundaryField
|
||||
inletCentral
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.15;
|
||||
intensity 0.05;
|
||||
value uniform 3.75e-9;
|
||||
}
|
||||
inletSides
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.16;
|
||||
intensity 0.05;
|
||||
value uniform 3.75e-9;
|
||||
}
|
||||
outlet
|
||||
|
||||
@ -34,6 +34,7 @@ boundaryField
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.1;
|
||||
profile turbulentBL;
|
||||
rhoInlet 1; // estimate for initial rho
|
||||
}
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ boundaryField
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.1;
|
||||
profile turbulentBL;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@ boundaryField
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 5;
|
||||
rhoInlet 1000; // Guess for rho
|
||||
profile turbulentBL;
|
||||
}
|
||||
|
||||
outlet
|
||||
|
||||
@ -30,7 +30,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,U) Gauss linearUpwind limited;
|
||||
div(phi,U) Gauss linearUpwindV limited;
|
||||
div(phi,e) Gauss linearUpwind limited;
|
||||
div(phi,epsilon) Gauss linearUpwind limited;
|
||||
div(phi,k) Gauss linearUpwind limited;
|
||||
|
||||
@ -34,6 +34,7 @@ boundaryField
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.1;
|
||||
profile turbulentBL;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ boundaryField
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.1;
|
||||
profile turbulentBL;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@ boundaryField
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.5;
|
||||
rhoInlet 0.5; // Guess for rho
|
||||
profile turbulentBL;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
|
||||
@ -28,6 +28,7 @@ boundaryField
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 5;
|
||||
rhoInlet 1000; // Guess for rho
|
||||
profile turbulentBL;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
|
||||
@ -30,7 +30,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,U) bounded Gauss linearUpwind limited;
|
||||
div(phi,U) bounded Gauss linearUpwindV limited;
|
||||
div(phi,h) bounded Gauss linearUpwind limited;
|
||||
div(phi,e) bounded Gauss linearUpwind limited;
|
||||
div(phi,epsilon) bounded Gauss linearUpwind limited;
|
||||
|
||||
@ -31,6 +31,7 @@ boundaryField
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.05;
|
||||
profile turbulentBL;
|
||||
value $internalField;
|
||||
}
|
||||
wall
|
||||
|
||||
@ -26,6 +26,7 @@ boundaryField
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.05;
|
||||
profile turbulentBL;
|
||||
value $internalField;
|
||||
}
|
||||
upper
|
||||
|
||||
@ -34,6 +34,7 @@ boundaryField
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
volumetricFlowRate constant 0.1;
|
||||
profile turbulentBL;
|
||||
}
|
||||
|
||||
outlet
|
||||
|
||||
@ -40,7 +40,7 @@ boundaryField
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
volumetricFlowRate constant 0.1;
|
||||
// value uniform (0.1 0 0);
|
||||
profile turbulentBL;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
|
||||
@ -34,6 +34,7 @@ boundaryField
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate constant 0.1;
|
||||
profile turbulentBL;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
||||
@ -24,8 +24,9 @@ boundaryField
|
||||
inlet
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate 2.173893E-07;
|
||||
massFlowRate 2.173893e-07;
|
||||
rho thermo:rho.vapor;
|
||||
profile laminarBL;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
|
||||
@ -24,8 +24,9 @@ boundaryField
|
||||
inlet
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
massFlowRate 2.173893E-07;
|
||||
massFlowRate 2.173893e-07;
|
||||
rho thermo:rho.vapor;
|
||||
profile laminarBL;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
|
||||
@ -58,8 +58,8 @@ vertices #codeStream
|
||||
points = transform(Rz(degToRad($angle)), points);
|
||||
|
||||
// Append points 6 and 7
|
||||
points.append(points[0] - point($lenInlet, 0, 0)); // pt 6
|
||||
points.append(points[3] - point($lenInlet, 0, 0)); // pt 7
|
||||
points.append(point(-$lenInlet, points[0].y(), points[0].z())); // pt 6
|
||||
points.append(point(-$lenInlet, points[3].y(), points[3].z())); // pt 7
|
||||
|
||||
// Duplicate z points
|
||||
points.append(cmptMultiply(points, vector(1, 1, -1)));
|
||||
|
||||
Reference in New Issue
Block a user