Skip to content
Snippets Groups Projects
Commit f74e0657 authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

STYLE: cylindricalInletVelocityFvPatchVectorField: Rationalized naming convention

for consistency with other rotating BCs.
parent e7f979c4
Branches
Tags
No related merge requests found
......@@ -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_.clone()),
radialVelocity_(ptf.radialVelocity_.clone()),
......@@ -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_.clone()),
radialVelocity_(ptf.radialVelocity_.clone()),
......@@ -106,7 +106,7 @@ cylindricalInletVelocityFvPatchVectorField
)
:
fixedValueFvPatchField<vector>(ptf, iF),
centre_(ptf.centre_),
origin_(ptf.origin_),
axis_(ptf.axis_),
axialVelocity_(ptf.axialVelocity_.clone()),
radialVelocity_(ptf.radialVelocity_.clone()),
......@@ -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.writeEntry("centre", centre_);
os.writeEntry("origin", origin_);
os.writeEntry("axis", axis_);
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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment