Skip to content
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

Prop #157

Merged
merged 17 commits into from
Apr 3, 2018
Merged

Prop #157

merged 17 commits into from
Apr 3, 2018

Conversation

courtin
Copy link
Collaborator

@courtin courtin commented Mar 25, 2018

Adding simple propeller model with fixed weight and radius.

@courtin courtin requested a review from mjburton11 March 25, 2018 13:53
Variables
---------
R 10 [m] prop radius
W 10 [lbf] prop weight

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the propeller having a fixed weight. Does it add 10 lbs to the solar model too? I would probably leave it without weight variable for now. Maybe it can scale with radius?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed fixed weights are not correct, but I'm not sure the best simple weight model yet. I think we should leave it with a small weight value as a placeholder until we can implement a real weight model. This lets it be added to the aircraft.components list for integration into the overall model without adding an inaccurate weight estimate.

def setup(self):
exec parse_variables(Propeller.__doc__)

def performance(self,state):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of declaring it as a model I would declare like:

"""
docstring
"""

performance = Propeller_Performance

def setup(self):
...

Also can we rename it from performance to flight_model so it's consistent with wing.py and the other GP models in this repo?

lam == V/(omega*R),
CT == Tc*lam**2,
CP == Q*omega/(.5*rho*(omega*R)**3*math.pi*R**2),
eta == CT*lam/CP, #Is this the same eta? check

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this calculating the same eta? If not which equation is driving it and which is correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the motor weight estimate; it should be left off this pull request.

@@ -0,0 +1,58 @@
" qprop model "

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this model done yet? If not let's leave it off of this PR

from qprop import QProp
from gpkitmodels.GP.aircraft.wing.wing_test import FlightState

def eta_test():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this test be a unit test for the Propeller model?

@@ -0,0 +1,31 @@
" propelle tests "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Q [N*m] torque
omega [rpm] propeller rotation rate

"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great to have bounds as well!

@bqpd
Copy link
Contributor

bqpd commented Mar 27, 2018

it looks like this is legitimately not passing tests, I'll take a look

def eta_test():

fs = FlightState()
p = Propeller(fs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

propeller does not accept flight state as an argument

@bqpd
Copy link
Contributor

bqpd commented Mar 27, 2018

@mjburton11 @courtin see code review above (deleting comments related to #24 to make this PR easier to read)

@bqpd
Copy link
Contributor

bqpd commented Mar 28, 2018

It's 19/40/40/a very lucky 60/an unlucky 60/25/36/unlucky 60 on gpkit models testing, so it's nearly the same

@galbramc
Copy link

What about the script?

@bqpd
Copy link
Contributor

bqpd commented Mar 28, 2018

The script is very similar on that test

@galbramc
Copy link

But can it be the same? Are the difference needed? If the differences do not matter we can add it to the templating for the others so we have one less script to maintain.

@bqpd
Copy link
Contributor

bqpd commented Mar 29, 2018

One of them needs to install local gpkit and master gplibrary, the other needs to the the other, and they call test_repos with one flag different so that gpklibrary is not reinstalled...I think they need to be separate unfortunately.

@galbramc
Copy link

No not those. Are these differences signifincant:

python -c "from gpkit.tests.test_repo import test_repo; test_repo(xmloutput=True)"

vs

python $PIP install -v --no-cache-dir --no-deps -e $WORKSPACE
echo "from gpkit.tests.test_repo import test_repo; test_repo('./.', xmloutput=True)" > jenkins_test.py
python $COVERAGE run --append --source=. jenkins_test.py

@bqpd
Copy link
Contributor

bqpd commented Mar 29, 2018

Oh! Sorry! I missed that you meant gpkit_ResearchModel_gplibrary_PR, though I see that now when scanning back up. You're totally right, it can inherit from gpkit_ResearchModel. Although we might need to add that python $PIP install -v --no-cache-dir --no-deps -e $WORKSPACE line to ResearchModel if it's not already in there.

@galbramc
Copy link

Should all research models be installed? I can't tell if the prop failure is due to this PR or due to the lack of the install.

@bqpd
Copy link
Contributor

bqpd commented Mar 29, 2018

The prop failure is definitely due to this PR, since this PR is what introduces that test.

@galbramc
Copy link

So if you decide you need to install just the gplibrary, you can add an if test to the gpkit_RearchModel template just for gplibrary test. That is preferable rather than having one more script with a tiny perturbation.

@bqpd
Copy link
Contributor

bqpd commented Mar 29, 2018

@galbramc I'm afraid I'm not following what you're saying! Are you proposing a further modification?

@mjburton11
Copy link

I don't understand why it think prop is not a module...

Do we just need to increase the run time of the research tests? That seems to be the only reason it is failing.

@bqpd
Copy link
Contributor

bqpd commented Mar 29, 2018

increased the timeout, though it's too bad it takes so long!

@mjburton11
Copy link

agreed. still no understanding of why TESTS is failing??

@mjburton11
Copy link

test models please

@mjburton11
Copy link

Woohoo! Passed research tests! 1 to @bqpd do you know what is going on?

@galbramc
Copy link

I added more cores to the Windows 7 VM. Hopefully it runs faster now.

@mjburton11
Copy link

@galbramc do you know why this is still failing TESTS?

@bqpd
Copy link
Contributor

bqpd commented Mar 30, 2018 via email

@galbramc
Copy link

So does this library and no other need to be installed? What happens if the others are installed?

@bqpd
Copy link
Contributor

bqpd commented Mar 30, 2018

Or this library needs to not be installed...I'll take a look. The fix might well be a little more logic in gpkit

@mjburton11
Copy link

test this please

1 similar comment
@bqpd
Copy link
Contributor

bqpd commented Mar 31, 2018

test this please

@mjburton11
Copy link

test this please

@mjburton11
Copy link

@bqpd why aren't tests running?

@mjburton11
Copy link

test models please

@mjburton11 mjburton11 merged commit bb4451e into master Apr 3, 2018
@mjburton11 mjburton11 deleted the prop branch April 3, 2018 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants