cylindricalInletVelocityFvPatchVectorField: Rationalized naming convention
for consistency with other rotating BCs.
This commit is contained in:
parent
371bec2048
commit
fc4101df16
2 changed files with 18 additions and 18 deletions
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -40,7 +40,7 @@ cylindricalInletVelocityFvPatchVectorField
|
|||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(p, iF),
|
||||
centre_(Zero),
|
||||
origin_(Zero),
|
||||
axis_(Zero),
|
||||
axialVelocity_(),
|
||||
radialVelocity_(),
|
||||
|
|
@ -58,7 +58,7 @@ cylindricalInletVelocityFvPatchVectorField
|
|||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
|
||||
centre_(ptf.centre_),
|
||||
origin_(ptf.origin_),
|
||||
axis_(ptf.axis_),
|
||||
axialVelocity_(ptf.axialVelocity_, false),
|
||||
radialVelocity_(ptf.radialVelocity_, false),
|
||||
|
|
@ -75,7 +75,7 @@ cylindricalInletVelocityFvPatchVectorField
|
|||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(p, iF, dict),
|
||||
centre_(dict.lookup("centre")),
|
||||
origin_(dict.lookup("origin")),
|
||||
axis_(dict.lookup("axis")),
|
||||
axialVelocity_(Function1<scalar>::New("axialVelocity", dict)),
|
||||
radialVelocity_(Function1<scalar>::New("radialVelocity", dict)),
|
||||
|
|
@ -90,7 +90,7 @@ cylindricalInletVelocityFvPatchVectorField
|
|||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(ptf),
|
||||
centre_(ptf.centre_),
|
||||
origin_(ptf.origin_),
|
||||
axis_(ptf.axis_),
|
||||
axialVelocity_(ptf.axialVelocity_, false),
|
||||
radialVelocity_(ptf.radialVelocity_, false),
|
||||
|
|
@ -106,7 +106,7 @@ cylindricalInletVelocityFvPatchVectorField
|
|||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(ptf, iF),
|
||||
centre_(ptf.centre_),
|
||||
origin_(ptf.origin_),
|
||||
axis_(ptf.axis_),
|
||||
axialVelocity_(ptf.axialVelocity_, false),
|
||||
radialVelocity_(ptf.radialVelocity_, false),
|
||||
|
|
@ -128,17 +128,17 @@ void Foam::cylindricalInletVelocityFvPatchVectorField::updateCoeffs()
|
|||
const scalar radialVelocity = radialVelocity_->value(t);
|
||||
const scalar rpm = rpm_->value(t);
|
||||
|
||||
vector hatAxis = axis_/mag(axis_);
|
||||
const vector axisHat = axis_/mag(axis_);
|
||||
|
||||
const vectorField r(patch().Cf() - centre_);
|
||||
const vectorField d(r - (hatAxis & r)*hatAxis);
|
||||
const vectorField r(patch().Cf() - origin_);
|
||||
const vectorField d(r - (axisHat & r)*axisHat);
|
||||
|
||||
tmp<vectorField> tangVel
|
||||
(
|
||||
(rpm*constant::mathematical::pi/30.0)*(hatAxis) ^ d
|
||||
(rpm*constant::mathematical::pi/30.0)*(axisHat) ^ d
|
||||
);
|
||||
|
||||
operator==(tangVel + hatAxis*axialVelocity + radialVelocity*d/mag(d));
|
||||
operator==(tangVel + axisHat*axialVelocity + radialVelocity*d/mag(d));
|
||||
|
||||
fixedValueFvPatchField<vector>::updateCoeffs();
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ void Foam::cylindricalInletVelocityFvPatchVectorField::updateCoeffs()
|
|||
void Foam::cylindricalInletVelocityFvPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<vector>::write(os);
|
||||
os.writeKeyword("centre") << centre_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("origin") << origin_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("axis") << axis_ << token::END_STATEMENT << nl;
|
||||
axialVelocity_->writeData(os);
|
||||
radialVelocity_->writeData(os);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -36,7 +36,7 @@ Usage
|
|||
\table
|
||||
Property | Description | Required | Default value
|
||||
axis | axis of rotation | yes |
|
||||
centre | centre of rotation | yes |
|
||||
origin | origin of rotation | yes |
|
||||
axialVelocity | axial velocity profile [m/s] | yes |
|
||||
radialVelocity | radial velocity profile [m/s] | yes |
|
||||
rpm | rotational speed (revolutions per minute) | yes|
|
||||
|
|
@ -48,7 +48,7 @@ Usage
|
|||
{
|
||||
type cylindricalInletVelocity;
|
||||
axis (0 0 1);
|
||||
centre (0 0 0);
|
||||
origin (0 0 0);
|
||||
axialVelocity constant 30;
|
||||
radialVelocity constant -10;
|
||||
rpm constant 100;
|
||||
|
|
@ -89,10 +89,10 @@ class cylindricalInletVelocityFvPatchVectorField
|
|||
{
|
||||
// Private data
|
||||
|
||||
//- Central point
|
||||
const vector centre_;
|
||||
//- Origin of the rotation
|
||||
const vector origin_;
|
||||
|
||||
//- Axis
|
||||
//- Axis of the rotation
|
||||
const vector axis_;
|
||||
|
||||
//- Axial velocity
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue