-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
corrections for phi<=0 #287
base: master
Are you sure you want to change the base?
Conversation
@@ -475,10 +475,14 @@ void Foam::fv::axialFlowTurbineALSource::calcEndEffects() | |||
{ | |||
vector elementVelDir = elementVel / mag(elementVel); | |||
scalar relVelOpElementVel = -elementVelDir & relVel; | |||
vector rotorPlaneDir = freeStreamDirection_; | |||
vector rotorPlaneDir = axis_; // use axis_ instead of rotorPlaneDir_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this properly account for CW/CCW rotation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The better explanation would be: it works only if the angle between freeStreamDirection_ and axis_ is within the range of -90...0...90 degrees. And since in the current state of the code, there is no way to reverse the turbine rotation while keeping axis_ the same, it can be said that this works only for CW rotation.
I should have added this as a comment.
Also, // use axis_ instead of rotorPlaneDir_ is not correct. It should have been // use axis_ instead of freeStreamDirection_.
Should I cancel this commit and make a new one?
src/fvOptions/axialFlowTurbineALSource/axialFlowTurbineALSource.C
Outdated
Show resolved
Hide resolved
Co-Authored-By: Pete Bachant <petebachant@gmail.com>
You can keep adding new commits to your fork, and I can squash-merge once it's ready. Note that in the future it's usually a good idea to work on branches instead of |
If you take a look at the Travis log, you can see the test is failing since the end effect factor is not in the expected range: https://travis-ci.org/turbinesFoam/turbinesFoam/jobs/557763236 |
Ah ok, sorry I am a complete newbie in Github. I'll check that feature for my next commit, thanks!
Hmm the expected range for tip loss factor f is [0,1] right? I couldn't figure out how that happened. |
Yep, but for that test, I constrained it further just to make sure it was significantly below 1, i.e., that it was working at the tip. |
So, maybe it is the VSMALL value that causes f=1? |
Looks like it. Perhaps |
phi being exactly equal to zero is a very, very rare case. In my simulations, the problem arises as soon as phi drops below zero, even by the smallest amount allowed by machine precision. This is related to the definition of the tip correction function f, which is not designated to take negative phi values. |
hmmm I'm not quite sure what's going on then. The test is setup to make sure that the loss factor at the tip is between 0 and 0.5, and with your modification it is 1.0, i.e., no tip loss. |
Your plot seems correct. This is going to take a bit more investigation. The test case is a single standalone turbine, so I don't know off the top of my head why it would be failing like that. I'll need to plot the distribution. |
#286