From fc4101df167ddb7d3230163dd56bfb66d1f6aef1 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 13 Jul 2017 16:09:11 +0100 Subject: [PATCH] cylindricalInletVelocityFvPatchVectorField: Rationalized naming convention for consistency with other rotating BCs. --- ...lindricalInletVelocityFvPatchVectorField.C | 24 +++++++++---------- ...lindricalInletVelocityFvPatchVectorField.H | 12 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C index d6223500e..2d076b425 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C @@ -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(p, iF), - centre_(Zero), + origin_(Zero), axis_(Zero), axialVelocity_(), radialVelocity_(), @@ -58,7 +58,7 @@ cylindricalInletVelocityFvPatchVectorField ) : fixedValueFvPatchField(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(p, iF, dict), - centre_(dict.lookup("centre")), + origin_(dict.lookup("origin")), axis_(dict.lookup("axis")), axialVelocity_(Function1::New("axialVelocity", dict)), radialVelocity_(Function1::New("radialVelocity", dict)), @@ -90,7 +90,7 @@ cylindricalInletVelocityFvPatchVectorField ) : fixedValueFvPatchField(ptf), - centre_(ptf.centre_), + origin_(ptf.origin_), axis_(ptf.axis_), axialVelocity_(ptf.axialVelocity_, false), radialVelocity_(ptf.radialVelocity_, false), @@ -106,7 +106,7 @@ cylindricalInletVelocityFvPatchVectorField ) : fixedValueFvPatchField(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 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::updateCoeffs(); } @@ -147,7 +147,7 @@ void Foam::cylindricalInletVelocityFvPatchVectorField::updateCoeffs() void Foam::cylindricalInletVelocityFvPatchVectorField::write(Ostream& os) const { fvPatchField::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); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H index feaf17f0c..833714cce 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H @@ -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