convexengineering / gplibrary

Useful subsystem models
MIT License
10 stars 11 forks source link

GP and SP standard atmosphere models #9

Closed pgkirsch closed 8 years ago

pgkirsch commented 8 years ago

Creates models for air density as a function of altitude using a standard atmosphere model (valid up to the top of the troposphere). The GP model takes upward pressure on rho and altitude, and the SP model takes downward pressure on rho.

bqpd commented 8 years ago

(reviewed)

bqpd commented 8 years ago

I put all my comments above into #10

whoburg commented 8 years ago

This is looking great. Shall we merge #10 into it and then merge it into master?

bqpd commented 8 years ago

Merged the PR. Ready to adopt this model?

whoburg commented 8 years ago

This looks great, and I'm overall in favor of merging, with one idea to discuss first.

One idea, which could be put into a separate PR to enable merging this now: It's a bit of code duplication to have both Troposphere and TroposphereSP. Would it make any sense to have TroposphereSP inherit from Model, and then have either a method or subclass implement the GP version by replacing/approximating some Signomial constraints with Posynomials?

bqpd commented 8 years ago

I was initially in favour of that as well, but @pgkirsch noted that the two models have very different pressures, which seems like an excellent reason to keep them separate

bqpd commented 8 years ago

@whoburg, I'm ready to merge this?