Skip to content
Snippets Groups Projects
Commit e7a6095a authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: avoid duplicate bookkeeping of rotation tensors in rotorDiskSource

parent dcc1dc13
Branches
Tags
No related merge requests found
...@@ -422,8 +422,7 @@ void Foam::fv::rotorDiskSource::constructGeometry() ...@@ -422,8 +422,7 @@ void Foam::fv::rotorDiskSource::constructGeometry()
// rotor cone system // rotor cone system
scalar c = cos(beta); scalar c = cos(beta);
scalar s = sin(beta); scalar s = sin(beta);
R_[i] = tensor(c, 0, -s, 0, 1, 0, s, 0, c); Rcone_[i] = tensor(c, 0, -s, 0, 1, 0, s, 0, c);
invR_[i] = R_[i].T();
} }
} }
} }
...@@ -480,9 +479,8 @@ Foam::fv::rotorDiskSource::rotorDiskSource ...@@ -480,9 +479,8 @@ Foam::fv::rotorDiskSource::rotorDiskSource
tipEffect_(1.0), tipEffect_(1.0),
flap_(), flap_(),
x_(cells_.size(), Zero), x_(cells_.size(), Zero),
R_(cells_.size(), I), Rcone_(cells_.size(), I),
invR_(cells_.size(), I), area_(cells_.size(), Zero),
area_(cells_.size(), 0.0),
coordSys_(), coordSys_(),
cylindrical_(), cylindrical_(),
rMax_(0.0), rMax_(0.0),
......
...@@ -188,10 +188,7 @@ protected: ...@@ -188,10 +188,7 @@ protected:
List<point> x_; List<point> x_;
//- Rotation tensor for flap angle //- Rotation tensor for flap angle
List<tensor> R_; List<tensor> Rcone_;
//- Inverse rotation tensor for flap angle
List<tensor> invR_;
//- Area [m2] //- Area [m2]
List<scalar> area_; List<scalar> area_;
......
...@@ -26,6 +26,7 @@ License ...@@ -26,6 +26,7 @@ License
#include "rotorDiskSource.H" #include "rotorDiskSource.H"
#include "volFields.H" #include "volFields.H"
#include "unitConversion.H" #include "unitConversion.H"
#include "transform.H"
using namespace Foam::constant; using namespace Foam::constant;
...@@ -62,7 +63,7 @@ void Foam::fv::rotorDiskSource::calculate ...@@ -62,7 +63,7 @@ void Foam::fv::rotorDiskSource::calculate
vector Uc = cylindrical_->invTransform(U[celli], i); vector Uc = cylindrical_->invTransform(U[celli], i);
// Transform velocity into local coning system // Transform velocity into local coning system
Uc = R_[i] & Uc; Uc = transform(Rcone_[i], Uc);
// Set radial component of velocity to zero // Set radial component of velocity to zero
Uc.x() = 0.0; Uc.x() = 0.0;
...@@ -129,7 +130,7 @@ void Foam::fv::rotorDiskSource::calculate ...@@ -129,7 +130,7 @@ void Foam::fv::rotorDiskSource::calculate
liftEff += rhoRef_*localForce.z(); liftEff += rhoRef_*localForce.z();
// Transform force from local coning system into rotor cylindrical // 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 // Transform force into global Cartesian co-ordinate system
force[celli] = cylindrical_->transform(localForce, i); force[celli] = cylindrical_->transform(localForce, i);
......
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