mdolab / openconcept Goto Github PK
View Code? Open in Web Editor NEWOpenConcept: A toolkit for conceptual MDAO of aircraft with unconventional propulsion architectures
License: MIT License
OpenConcept: A toolkit for conceptual MDAO of aircraft with unconventional propulsion architectures
License: MIT License
The takeoff|h
parameter does set the takeoff and landing altitudes for the BasicMission
and MissionWithReserve
(though the ground roll in the BasicMission
uses its own fltcond|h
value). However, the takeoff phase altitudes in the FullMissionAnalysis
and FullMissionWithReserve
are actually set via each takeoff phases fltcond|h
. The takeoff's rotation phase does have an h_initial
variable which sets its initial altitude, but then only the obstacle height is connected to the climb phase's initial altitude (not h_initial
+ obstacle height as you may expect).
We typically leave the takeoff altitude at 0 ft. In this case, everything works as expected, so this does not mean that past cases are wrong. However, future users may adjust this value and they would not get the expected result if they are using the BasicMission
with the ground roll phase or either full mission with takeoff phases.
Travis is going to be disabled soon. If we want to continue to maintain this project, then we probably want to move to an alternate CI provider. Given that there is no complex dependency, it is probably better to use GitHub actions for this, especially since this is a public repo and should be fairly straightforward to set up.
Add more detail to the docs. Some initial ideas are
No documentation. Add docstrings for sphinx throughout
#26 broke RTD, which apparently relied on the environment.yml
file. Either add it back or change RTD setup to fix docs building.
For unknown reasons the scipyoptimizedriver breaks when used with Scipy 1.1 or higher. This is probably an openmdao bug but can't be sure
Test coverage currently at less than 25%. Improve this
On OpenMDAO 3.16 the following deprecation warnings are issued:
examples/tests/test_example_aircraft.py::TBMAnalysisTestCase::test_values_TBM
examples/tests/test_example_aircraft.py::CaravanAnalysisTestCase::test_values_Caravan
examples/tests/test_example_aircraft.py::HybridTwinThermalTestCase::test_values_thermalhybridtwin
examples/tests/test_example_aircraft.py::HybridTwinTestCase::test_values_hybridtwin
examples/tests/test_example_aircraft.py::KingAirTestCase::test_values_kingair
/home/eytan/.local/lib/python3.8/site-packages/openmdao/core/component.py:511: OMDeprecationWarning: 'analysis.rotate.transition' <class TakeoffTransition>: Passing `src_indices` as an arg to `add_input('fltcond|Utrue', ...` is deprecated and will become an error in a future release. Add `src_indices` to a `promotes` or `connect` call instead.
warn_deprecation(f"{self.msginfo}: Passing `src_indices` as an arg to "
examples/tests/test_example_aircraft.py::TBMAnalysisTestCase::test_values_TBM
examples/tests/test_example_aircraft.py::CaravanAnalysisTestCase::test_values_Caravan
examples/tests/test_example_aircraft.py::HybridTwinThermalTestCase::test_values_thermalhybridtwin
examples/tests/test_example_aircraft.py::HybridTwinTestCase::test_values_hybridtwin
examples/tests/test_example_aircraft.py::KingAirTestCase::test_values_kingair
/home/eytan/.local/lib/python3.8/site-packages/openmdao/core/component.py:511: OMDeprecationWarning: 'analysis.rotate.transition' <class TakeoffTransition>: Passing `src_indices` as an arg to `add_input('gamma', ...` is deprecated and will become an error in a future release. Add `src_indices` to a `promotes` or `connect` call instead.
warn_deprecation(f"{self.msginfo}: Passing `src_indices` as an arg to "
examples/tests/test_example_aircraft.py::TBMAnalysisTestCase::test_values_TBM
examples/tests/test_example_aircraft.py::CaravanAnalysisTestCase::test_values_Caravan
examples/tests/test_example_aircraft.py::HybridTwinThermalTestCase::test_values_thermalhybridtwin
examples/tests/test_example_aircraft.py::HybridTwinTestCase::test_values_hybridtwin
examples/tests/test_example_aircraft.py::KingAirTestCase::test_values_kingair
/home/eytan/.local/lib/python3.8/site-packages/openmdao/core/component.py:511: OMDeprecationWarning: 'analysis.rotate.v2climb' <class TakeoffClimb>: Passing `src_indices` as an arg to `add_input('gamma', ...` is deprecated and will become an error in a future release. Add `src_indices` to a `promotes` or `connect` call instead.
warn_deprecation(f"{self.msginfo}: Passing `src_indices` as an arg to "
examples/tests/test_example_aircraft.py::TBMAnalysisTestCase::test_values_TBM
examples/tests/test_example_aircraft.py::CaravanAnalysisTestCase::test_values_Caravan
examples/tests/test_example_aircraft.py::HybridTwinThermalTestCase::test_values_thermalhybridtwin
examples/tests/test_example_aircraft.py::HybridTwinTestCase::test_values_hybridtwin
examples/tests/test_example_aircraft.py::KingAirTestCase::test_values_kingair
/home/eytan/.local/lib/python3.8/site-packages/openmdao/core/component.py:511: OMDeprecationWarning: 'analysis.rotate.v2climb' <class TakeoffClimb>: Passing `src_indices` as an arg to `add_input('fltcond|Utrue', ...` is deprecated and will become an error in a future release. Add `src_indices` to a `promotes` or `connect` call instead.
warn_deprecation(f"{self.msginfo}: Passing `src_indices` as an arg to "
examples/tests/test_example_aircraft.py: 4 warnings
openconcept/components/tests/test_N3.py: 4 warnings
openconcept/components/tests/test_cfm56.py: 2 warnings
/home/eytan/.local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py:332: OMDeprecationWarning: 'train:throttle' is not a valid python name and will become an invalid option name in a future release. You can prevent this warning (and future exceptions) by declaring this option using a valid python name.
warn_deprecation(f"'{name}' is not a valid python name and will become an invalid "
examples/tests/test_example_aircraft.py: 4 warnings
openconcept/components/tests/test_N3.py: 4 warnings
openconcept/components/tests/test_cfm56.py: 2 warnings
/home/eytan/.local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py:332: OMDeprecationWarning: 'train:fltcond|h' is not a valid python name and will become an invalid option name in a future release. You can prevent this warning (and future exceptions) by declaring this option using a valid python name.
warn_deprecation(f"'{name}' is not a valid python name and will become an invalid "
examples/tests/test_example_aircraft.py: 4 warnings
openconcept/components/tests/test_N3.py: 4 warnings
openconcept/components/tests/test_cfm56.py: 2 warnings
/home/eytan/.local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py:332: OMDeprecationWarning: 'train_fltcond|h' is not a valid python name and will become an invalid option name in a future release. You can prevent this warning (and future exceptions) by declaring this option using a valid python name.
warn_deprecation(f"'{name}' is not a valid python name and will become an invalid "
examples/tests/test_example_aircraft.py: 4 warnings
openconcept/components/tests/test_N3.py: 4 warnings
openconcept/components/tests/test_cfm56.py: 2 warnings
/home/eytan/.local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py:332: OMDeprecationWarning: 'train:fltcond|M' is not a valid python name and will become an invalid option name in a future release. You can prevent this warning (and future exceptions) by declaring this option using a valid python name.
warn_deprecation(f"'{name}' is not a valid python name and will become an invalid "
examples/tests/test_example_aircraft.py: 4 warnings
openconcept/components/tests/test_N3.py: 4 warnings
openconcept/components/tests/test_cfm56.py: 2 warnings
/home/eytan/.local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py:332: OMDeprecationWarning: 'train_fltcond|M' is not a valid python name and will become an invalid option name in a future release. You can prevent this warning (and future exceptions) by declaring this option using a valid python name.
warn_deprecation(f"'{name}' is not a valid python name and will become an invalid "
examples/tests/test_example_aircraft.py: 4 warnings
openconcept/components/tests/test_N3.py: 4 warnings
openconcept/components/tests/test_cfm56.py: 2 warnings
/home/eytan/.local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py:332: OMDeprecationWarning: 'train:thrust' is not a valid python name and will become an invalid option name in a future release. You can prevent this warning (and future exceptions) by declaring this option using a valid python name.
warn_deprecation(f"'{name}' is not a valid python name and will become an invalid "
examples/tests/test_example_aircraft.py: 4 warnings
openconcept/components/tests/test_N3.py: 4 warnings
openconcept/components/tests/test_cfm56.py: 2 warnings
/home/eytan/.local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py:332: OMDeprecationWarning: 'train:fuel_flow' is not a valid python name and will become an invalid option name in a future release. You can prevent this warning (and future exceptions) by declaring this option using a valid python name.
warn_deprecation(f"'{name}' is not a valid python name and will become an invalid "
examples/tests/test_example_aircraft.py::B738TestCase::test_values_B738
examples/tests/test_example_aircraft.py::B738VLMTestCase::test_values_B738
examples/tests/test_example_aircraft.py::B738AerostructTestCase::test_values_B738
openconcept/components/tests/test_cfm56.py::CFM56TestCase::test_defaults
openconcept/components/tests/test_cfm56.py::CFM56TestCase::test_vectorized
/home/eytan/.local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py:332: OMDeprecationWarning: 'train:T4' is not a valid python name and will become an invalid option name in a future release. You can prevent this warning (and future exceptions) by declaring this option using a valid python name.
warn_deprecation(f"'{name}' is not a valid python name and will become an invalid "
python -m pytest
Hi,
I'm a Ph.D. student working at Prof. Kennedy's group at Georgia Tech. I'm doing research about electric propulsion aircraft and using the OpenConcept library. I meet some issues when running the examples TBM850.py, and the issue shows below:
(File "/Users/libao/git/openconcept/openconcept/analysis/trajectories.py", line 14, in find_integrators_in_model
next_namespace = subsys.name
AttributeError: 'str' object has no attribute 'name')
I try to switch my interpreter from python 3.8.3 to python 2.7, the issue still exists. By the way, the OpenMDAO version I used is 3.4.1. I attached a screenshot of my terminal for the issue in case you want to have a look.
Thank you,
Bao Li
Hi!
When trying out the TBM850 example I got a vector size mismatch (see traceback at the end).
Some of the vars have a shape (n, 1), and some (n,).
I fixed with adding the two lines below to MissionFlightConditions
to get the same shape for all vectors:
def compute(self, inputs, outputs):
n_int_per_seg = self.options['n_int_per_seg']
nn = n_int_per_seg*2 + 1
hvec_climb = np.linspace(inputs['mission|takeoff|h'],inputs['mission|cruise|h'],nn)
hvec_desc = np.linspace(inputs['mission|cruise|h'],inputs['mission|takeoff|h'],nn)
hvec_cruise = np.ones(nn)*inputs['mission|cruise|h']
hvec_climb = np.reshape(hvec_climb, hvec_climb.size)
hvec_desc = np.reshape(hvec_desc, hvec_desc.size)
...
I did not modify anything in the code before trying. Package versions as in the reqs, I am running it on Windows, and I tried with Python 2.7 and 3.7.
Is this a known issue, or something wrong with my installation?
Traceback:
======Analyzing Fuel Burn for Given Mision============
Traceback (most recent call last):
File "D:/Documents/GitHub/openconcept/examples/TBM850.py", line 318, in <module>
prob.run_model()
File "D:\Documents\GitHub\openconcept\venv37\lib\site-packages\openmdao\core\problem.py", line 461, in run_model
return self.model.run_solve_nonlinear()
File "D:\Documents\GitHub\openconcept\venv37\lib\site-packages\openmdao\core\system.py", line 2546, in run_solve_nonlinear
result = self._solve_nonlinear()
File "D:\Documents\GitHub\openconcept\venv37\lib\site-packages\openmdao\core\group.py", line 1592, in _solve_nonlinear
result = self._nonlinear_solver.solve()
File "D:\Documents\GitHub\openconcept\venv37\lib\site-packages\openmdao\solvers\solver.py", line 633, in solve
fail, abs_err, rel_err = self._run_iterator()
File "D:\Documents\GitHub\openconcept\venv37\lib\site-packages\openmdao\solvers\solver.py", line 361, in _run_iterator
norm0, norm = self._iter_initialize()
File "D:\Documents\GitHub\openconcept\venv37\lib\site-packages\openmdao\solvers\nonlinear\newton.py", line 216, in _iter_initialize
subsys._solve_nonlinear()
File "D:\Documents\GitHub\openconcept\venv37\lib\site-packages\openmdao\core\explicitcomponent.py", line 218, in _solve_nonlinear
failed = self.compute(self._inputs, self._outputs)
File "D:\Documents\GitHub\openconcept\openconcept\analysis\mission.py", line 143, in compute
outputs['fltcond|mission|h'] = np.concatenate([hvec_climb,hvec_cruise,hvec_desc])
ValueError: all the input arrays must have same number of dimensions
OpenMDAO v3.31 changes the om.Group
_setup_procs
method function signature from _setup_procs(pathname, comm, mode, prob_meta)
to _setup_procs(pathname, comm, prob_meta)
. This breaks the four instances of _setup_procs
in openconcept/mission/mission_groups.py. I'm not sure the best way to handle it because fixing it will break OpenConcept's backward compatibility with all versions of OpenMDAO before v3.31. The best solution would be to find a workaround that doesn't need to use the hidden methods.
For now, I'm adding an upper bound of v3.30 on the OpenMDAO version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.