mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: avoid duplicate bookkeeping of rotation tensors in rotorDiskSource
This commit is contained in:
@ -422,8 +422,7 @@ void Foam::fv::rotorDiskSource::constructGeometry()
|
||||
// rotor cone system
|
||||
scalar c = cos(beta);
|
||||
scalar s = sin(beta);
|
||||
R_[i] = tensor(c, 0, -s, 0, 1, 0, s, 0, c);
|
||||
invR_[i] = R_[i].T();
|
||||
Rcone_[i] = tensor(c, 0, -s, 0, 1, 0, s, 0, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -480,9 +479,8 @@ Foam::fv::rotorDiskSource::rotorDiskSource
|
||||
tipEffect_(1.0),
|
||||
flap_(),
|
||||
x_(cells_.size(), Zero),
|
||||
R_(cells_.size(), I),
|
||||
invR_(cells_.size(), I),
|
||||
area_(cells_.size(), 0.0),
|
||||
Rcone_(cells_.size(), I),
|
||||
area_(cells_.size(), Zero),
|
||||
coordSys_(),
|
||||
cylindrical_(),
|
||||
rMax_(0.0),
|
||||
|
||||
@ -188,10 +188,7 @@ protected:
|
||||
List<point> x_;
|
||||
|
||||
//- Rotation tensor for flap angle
|
||||
List<tensor> R_;
|
||||
|
||||
//- Inverse rotation tensor for flap angle
|
||||
List<tensor> invR_;
|
||||
List<tensor> Rcone_;
|
||||
|
||||
//- Area [m2]
|
||||
List<scalar> area_;
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "rotorDiskSource.H"
|
||||
#include "volFields.H"
|
||||
#include "unitConversion.H"
|
||||
#include "transform.H"
|
||||
|
||||
using namespace Foam::constant;
|
||||
|
||||
@ -62,7 +63,7 @@ void Foam::fv::rotorDiskSource::calculate
|
||||
vector Uc = cylindrical_->invTransform(U[celli], i);
|
||||
|
||||
// Transform velocity into local coning system
|
||||
Uc = R_[i] & Uc;
|
||||
Uc = transform(Rcone_[i], Uc);
|
||||
|
||||
// Set radial component of velocity to zero
|
||||
Uc.x() = 0.0;
|
||||
@ -129,7 +130,7 @@ void Foam::fv::rotorDiskSource::calculate
|
||||
liftEff += rhoRef_*localForce.z();
|
||||
|
||||
// Transform force from local coning system into rotor cylindrical
|
||||
localForce = invR_[i] & localForce;
|
||||
localForce = invTransform(Rcone_[i], localForce);
|
||||
|
||||
// Transform force into global Cartesian co-ordinate system
|
||||
force[celli] = cylindrical_->transform(localForce, i);
|
||||
|
||||
Reference in New Issue
Block a user