convexengineering / gplibrary

Useful subsystem models
MIT License
10 stars 11 forks source link

Add standard-atmosphere function for Python. Not GP-compatible. #113

Closed arthur-brown closed 6 years ago

arthur-brown commented 7 years ago

I wrote a standard-atmosphere function for Python. It is not GP-compatible, so it is primarily useful for fixed mission profiles or studies not using GP. Pint is used for unit consistency. The function is called stdatmo, contained in gpkit-models/gpkitmodels/tools/standard-atmosphere.py.

mjburton11 commented 7 years ago

@arthur-brown can you give a little background about this model and what you are hoping to accomplish? It looks like it might be signomial.... If not, I'm not sure that this belong in gpkit-models. If it's signomial, I would work to get it into a form that is easily importable inside of a larger model.

Also, I haven't gotten around to it yet, but I'm pretty sure that we can write atmospheric models that are gp. I at least believe this is possible at least for altitudes between 1-35,000 ft if you use density as the independent variable instead of altitude. It is at least signomial and I think you could probably turn this into standard atm sp model at the very least.

@whoburg and @bqpd correct me if I'm wrong but I believe that this repo is specifically meant for gp or sp models that are ready to use or to be imported inside a larger model.

whoburg commented 7 years ago

We used to have GP and SP compatible atmosphere models (by @pgkirsch) as part of this repo -- looks like maybe they got moved/deleted?

Roughly speaking, atmosphere models are GP-compatible if all other (non-atmosphere) models are known to exert upward pressure on rho, and SP-inequality-compatible if all other models are known to exert downward pressure on rho, and SP-equality-compatible if the direction of pressure on rho is unknown.

That assumes the dominant factor is rho; this could change if pressure or temperature have strong influence.

1ozturkbe commented 6 years ago

ummm, if no one is following up on this, I have already added an SP atmosphere model as part of #171. Closing, let me know if you have issues with this.