Repository navigation
Tags
Tags
Numpy 2 compatibility (#87) * Replace np.complex_ with np.complex128 for NumPy 2.0 compatibility np.complex_ was removed in NumPy 2.0. np.complex128 is semantically identical and available in all supported NumPy versions. Also fixes a pre-existing bug in combine_split_comp.py where dtype=np.dtype (the class itself) was passed instead of the local variable dtype. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Replace math.cos/sin/sqrt with numpy equivalents in weights_turboprop NumPy 2.0 removed automatic coercion of 1-element arrays to Python scalars, so math.cos/sin/sqrt no longer accept numpy array inputs. Replace with np.cos/sin/sqrt which handle arrays natively. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Loosen test tolerances for minor numerical shifts with NumPy 2.x / OpenMDAO 3.43 Small numerical differences (~3e-6 relative) in surge_margin (N3) and battery SOC_final (HybridTwin) arise from library version changes and are not correctness regressions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Guard against negative Re in SkinFrictionCoefficient_JetTransport During Newton solver warmup iterations, fltcond|Utrue can temporarily go negative, making Re negative and causing log(negative) = NaN which propagates through the Jacobian. Fix: compute Re = U*L/visc_kin and apply abs(Re) for real-valued arrays only, so complex-step derivative checking still propagates the imaginary part correctly (for complex arrays, negate Re where real(Re)<0). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Remove numpy upper bound * Update testing versions * Fix promotion issue * Fix remaining NumPy 2 incompatibilities in OpenAeroStruct wrappers np.trapz and np.ComplexWarning were removed in NumPy 2, and NumPy 2.5 no longer allows assigning size-1 arrays to scalar array elements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Simplify HybridTwin_thermal mdot_coolant promotion fix Exclude mdot_coolant from the propulsion input promotion with glob character classes and connect it explicitly, instead of listing every ac|propulsion input by hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Simplify negative Reynolds number guard Use U * sign(U.real), which is |U| for real inputs and remains complex-step safe, rather than branching on the input dtype. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Leave commented-out formulas in weights_turboprop unchanged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Check near-zero battery SOC with absolute tolerances The SOC_final reference values were under-converged results whose last digits depend on the Newton iteration path, which changed in OpenMDAO 3.43. Use the tightly converged values with an absolute tolerance consistent with the solver tolerance, and revert the earlier tolerance loosening (the N3 discrepancy came from stale local engine deck caches, not NumPy). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Require OpenAeroStruct >= 2.10 and update OAS regression values OpenAeroStruct 2.7.1 does not support NumPy 2. OAS 2.10 does, but it evaluates B-splines of panel quantities (t/c, skin and spar thickness) at panel centres, which changes the aerostructural results; with uniform distributions the results are unchanged. Update the reference values, make run_OAS set the panel t/c directly, and bump the oldest tested versions to OpenMDAO 3.35 (required by OAS 2.10), NumPy 1.25 and SciPy 1.11. Install pyCycle from GitHub in the latest build because its NumPy 2 fixes are unreleased. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Stop the oldest CI build from upgrading NumPy With Python 3.11, installing pyCycle pulled in the latest OpenMDAO, which requires NumPy 2 and silently replaced the oldest NumPy and SciPy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Exclude only mdot_coolant from the HybridTwin_thermal ac|* promotion The glob character classes also excluded any other input starting with "t" or "m". Promote everything with "ac|propulsion|*" and rename just mdot_coolant with an explicit tuple, which takes precedence over the wildcard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * List HybridTwin_thermal ac|propulsion inputs explicitly Promote each ac|propulsion input by its full name, leaving out only the per-node mdot_coolant, rather than renaming it out of the ac| namespace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Write OpenMDAO test outputs to a temporary directory Since OpenMDAO 3.35 every problem creates a <name>_out directory in the working directory, so running the tests left hundreds of them in the repo root. Point OPENMDAO_WORKDIR at a temporary directory for the pytest session unless the user has already set it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Remove redundant OpenMDAO reinstall from the oldest CI build OpenMDAO is now pinned when pyCycle is installed, so the later step that reinstalled the oldest OpenMDAO had nothing left to do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Remove redundant steps from the CI build job - Use a single Python setup step that picks the oldest or latest version - Let pyCycle and the testing and docs extras install in one pip call, rather than installing pyCycle, NumPy, SciPy and OpenMDAO separately - Drop the conda always_yes config, which the latest build never needed, and pass -y to the one conda install instead Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Name CI build jobs after the versions they test Give each dep-versions value its own versions through matrix include, so the job names list the OS and the Python, NumPy, SciPy and OpenMDAO versions instead of every version setting for both builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Turn off OpenMDAO reports in tests instead of moving their outputs Writing outputs to a temporary directory broke the Windows build: the temporary directory and the checkout are on different drives, and OpenMDAO's inputs report calls os.path.relpath on its output file. The reports are what create the <name>_out directories, so turn them off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Update GHA names * Bump version to 1.3.0 * minor code style tweak to make it clear trapazoid came from a package * Tighten solver tolerance in problematic test --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Safa Bakhshi <bakhshi@umich.edu>
Fix setup.py to include engine data files to the package (#84) * add engine deck npy files to package_data * update GHA yaml to test package data including * yaml fix * readme -> README fixes build? * yaml temp edit for debugging * yaml fix * bring back full test * run the new check on ubuntu-latest only * Bump version to 1.2.6
Fix erasure of Integrator subsytem, remove OpenMDAO upper bound (#83) * Revert "Fix erasure of `Integrator` subsystems" This reverts commit 7ab251f. * Fix erasure of `Integrator` subsytem * Remove OM upper bound * 3rd time lucky? * Formatting * Make fix work with older OM versions * Set pycycle version in setup.py * Bump version from 1.2.4 to 1.2.5 --------- Co-authored-by: Shugo Kaneko <49300827+kanekosh@users.noreply.github.com>
Fixed abs2prom and variable names to support OpenMDAO 3.39 (#76) * Set OM upper bound version * Update link for engine data files * fix test for OM 3.38 or 3.39 * test fix * add final_setup to tests so it raises an error in OM3.38+ * Manual abs2prom WIP * Fix `_var_abs2prom` issue with `_resolver._abs2prom` * Remove OpenMDAO upper bound * Forgot to pass `abs_name` * OM version <= 3.39 * Remove unnecessary call to `set_order` * Force `static_mode=True` to fix issue with `IntegratorGroup` in OM 3.40 * Remove OM upper bound again * Skip OAS tests if OAS not installed * Revert "Remove unnecessary call to `set_order`" This reverts commit 584a3ba. * undo changes related to `IntegratorGroup` `_setup_procs` * Revert "Remove OM upper bound again" This reverts commit 7296252. * ignore openmdao_out files * fixed hybrid promoted names * more varname fixes * patch version bump --------- Co-authored-by: Shugo Kaneko <49300827+kanekosh@users.noreply.github.com> Co-authored-by: kanekosh <shugok@umich.edu> Co-authored-by: Alasdair Gray <alachris@umich.edu>
Lots of new models for clean sheet aircraft design (#64) * Add tags to the mult-div comp * Convergence improvements for the incompressible duct. Add some analytic derivatives and create a full duct model that can take an external HX model as connections * Added lower bounds on some components * various tweaks to duct test group for diagnostics * Limit throttle to 1.05 rated * Tweaks and doc updates to N3hybrid model * remove dymos * remove dymos import, reduce tol on B737 test due to differences in scipy model training behavior * Add heat sinks specific to motors and batteries * Further reduce tol of 738 test * Fix docstring indentation * WIP: N3hybrid (#21) * First dymos-based phase * add hybrid engine surrogate model * Add ISA temp offset to standard atmosphere * Add dymos to requirements * Install dymos from git * continued install problems * remove dymos test scratch folder * pin openmdao for now * identify why 737 test is failing * Fix trajectory test bugs introduced during dymos work * Add a "BasicMission" with a ground roll phase that's not a real BFL phase * Minor change to CFM56 surrogate * Add tags to the mult-div comp * Convergence improvements for the incompressible duct. Add some analytic derivatives and create a full duct model that can take an external HX model as connections * Added lower bounds on some components * various tweaks to duct test group for diagnostics * Limit throttle to 1.05 rated * Tweaks and doc updates to N3hybrid model * remove dymos * remove dymos import, reduce tol on B737 test due to differences in scipy model training behavior * Add heat sinks specific to motors and batteries * Further reduce tol of 738 test * Fix docstring indentation * Fix docstring and reference to battery heatsink model from Eytan's PR * ignore scratch folder * Battery tests done * Reg tests for the motor heat sink * First draft of the hybrid single aisle with some todos * Resize HX for lower hot side pressure drop * Thermal optimization is functional * deprecate a couple of debugging things * Add pressure losses proportional to dynamic pressure * Optimization with lossy diffuser * Add proportional losses to the compressible duct * Added refrigerator capability for the hybrid single aisle and compressible duct robustness improvements * Add refrigerator weight to hybrid single aisle and reformulate control parameter * base case * Added LiquidCooledMotor to ParallelTMS * Update hydraulic diameter computation and add regression tests against Kays and London empirical coefficients for the heat exchanger * Add a comprehensive HX reg test case * Add compressible duct reg tests vs pycycle * Add reg tests that don't depend on pycycle * Add warning when pycycle not installed * Added heat pipe model and tests * Removed duplicate vapor temp drop calc and changed defaults from 6061 to 7075 aluminum * Fix trajectories for OM 3.3+ (works on 3.7 dev) * Roll openmdao version, fix a couple examples * Heat pipe docstring fixes * Tested w/ openmdao 3.5 and still works so relaxing dependency pinning * Update duct test for latest pycycle * tweaks to nasa model * repo maintenance * Add a warning to cached surrogate * - Add tests for hose and pump comps - Add effectiveness/NTU calc for the motor heat sink comp - Refactor tms and heat sink tests - Clean up unused code in thermal.py * remove hybrid single aisle examples until conclusion of trees study * implements promote_add and promote_mult convenience funcs * refactor the empirical engine decks and update the n+3 design * missed a promote in the ducts comp * add two geom design vars to the hx group * Change name of top-level integrator comp to allow multimission problems at the top-level * lower bound on duct mass flow for convergence * Updated engine maps * New chiller component * Make case cooling coefficient a user parameter * Change bounds on duct comp * Add a muliple trajectory plot utility * Remove a print statement * Added tests for chiller * Removed eff_factor option from COPExplicit and added docstrings * Changed iv comp to set_input_defaults for steady flight phase so linear interpolator can be connected for trajectory optimization * Corrected documentation for I/O of updated HeatPumpWithIntegratedCoolantLoop * Changed default batteries per bandolier from 21 to 82 * Added hydrogen tank composite thickness estimate with netting and tests * Added liner and insulation weight components and simplified composite calc * Made some fixes and added validation * Moved hydrogen work to subfolder in components * Reorganized hydrogen folder * Prototypes (in progress) of a couple necessary parts for boil-off estimation * Added fairing to outside of insulation * Added derivatives to components * Added tests for hydrogen tank thermals * Attempt for full tank component, but still in progress * Added tests for some new components * Added components and modified to make it solve semi-robustly * Missed some parentheses, oops * Added analytic derivatives to COPVHeatFromEnvironmentIntoTankWalls * Added more tests for hydrogen thermal comps * Added LH2 tank tests and made a couple more corrections * Note about LH2 tank initial fill level * First attempt at good boil-off model (still not functional) * Failed attempt at better boil off model * Added GH2 reservoir and test * New LH2 tank looking decent, need to change a few connections still * LH2 tank more connections made but still not solving * Working LH2 tank! Now just need venting... * Removed arccos from heat into propellant to vastly increase robustness but slightly decrease accuracy * Added venting and heating features to tank, updated tests * Fixed deprecation error in ExecComp * Added validation for LH2 tank * Added ability to pull LH2 from tank in addition from GH2 * Added lower bound to ullage temperature * Added lower bound to pressure in ullage ODE * Added more bounds for physical behavior * Updated defaults of LH2 tank to better reflect real world * Updated LH2 tank tests for new default options * Small change to LH2 tank docs * Removed TMS to match mdolab/master * Ran black * Added proper validation script for MHTB boil-off * Working on new boil off model * Boil off model gets reasonable results, needs testing, cleanup, and verification of ODE * Cleaned up boil off API and improved initial guess for solver * Added tests and fixed derivatives for fill level calc * Tested boil off ODE against EBM * Added derivatives for hydrogen property functions * Analytic derivatives for half of the boil of ODE outputs * Analytic derivatives for V_dot_gas in boil off ODE * Added derivatives for T_dot_liq * Analytic partials for boil off ODE done * Fixed incorrect derivative when T_dot_liq is zeroed out * Boil off with complex step to check works great now * New structural model for vacuum tank * Added air thermal conductivity * Added viscosity * Ran black * Added vacuum wall model * Starting new thermal model * Getting thermal model together, still need to make it work * Thermal model is done-ish * First pass at final tank, needs robustness and some other stuff * Added MLI weight * Added tests for LH2 tank * Trying to improve robustness of the boil-off * Added integrated test for boil off model * Removed previous versions of files for LH2 tank * Added rubberized turbofan that can do hydrogen * Added options to LH2 tank for more customizability * Consistent radius default * Trying to figure out what's going on with the solvers and guess_nonlinear * Adjusted tolerance on LH2Tank NLBGS solver * Boil off model should now work with mission integrator linking properly * LH2 tank test was failing because there was no top level nonlinear solver after NLBGS was removed * Actually....I added back in the NLBGS solver because the Newton was getting funny results * Working on improving the tank model robustness * Added some notes for myself and corrected a docstring * Added LH2 tank without boil-off model * Added tests for new LH2 tank comps * Added LH2 tanks to based energy storage imports * Removed viscosity and conductivity comps * New boil off model, still needs robustness improvement and derivatives * Fixed error in boil off * adding SOFC fuel cell model * adding sizing functions, fuel cell PEM, and updating SOFC * Adding Venkats sizing file, does not run * Making some fixes in sizing stuff * Fixed wing weight typo in init * First pass at fixed jet transport weight model * Updated docstrings and init file * Vastly improved jet transport weight estimation * Fixing up sizing example * First pass at jet transport drag buildup * Added tests for new drag buildup * Tests for geometry comps * Cylinder wetted area component * No more approximation of tail lever arm * Added tests and docstrings for tail volume coefficient sizing * Added CL max estimation * Removing old sizing * Modified RubberizedTurbofan to take in rated thrust instead of number of engines * Moved CD_nonwing up to the VLMDragPolar and enabled it to be a vector input * Formatted and modified FullMissionWithReserve * Extended PolarDrag to accept vectorized CD0 * Changed name of CL max output * Initial pass at setting up B738 sizing run script * Done with mission analysis of Boeing 737-800 with empirical weight and drag * Ran black * Removed n2 from drag test * Changed some variables bounds * Increased upper bounds in basic mission segment durations * Note on engine model and profile variable bound setting * Added wing planform geometry utilities * Corrected docstring * Added wing weight multiplier * Modified equipment weight to make pressurized cabin geometry more general * Removed unused option * Added BWB weight model * Added BWB drag estimate that is just nacelles and dirty stuff * Tools to compute planform area of parts of the wing * Max lift coefficient estimation via the critical section method * Added todo * Ran black * Removed some unused imports * Minor changes to critical section method * Added Schur solver for critical section CL max * Reduced landing gear CD for BWB * Added output documentation for BWB weights * Removed CODEOWNERS to avoid unneccesary PR reviews while developing hyfi, ADD BACK BEFORE PUSH TO MAIN * Utility to compute mean aerodynamic chord of OpenAeroStruct section-defined wing * Forgot a summation in MAC calc * Fixed docstrings * Added comps to compute wave drag * Fix a bug in the wave drag calculation * Fix error in flap CLmax calculation * Extension to critical section method (#54) * Restructure * Extended critical section method to handle varying Clmax across span * Added thermal tests back * Corrected heat leak multiplier in thermal calcs * Removed stale code and other code that is not ready to merge * Fixed BWB test * Fixed options in BWB test * One more bit of code not ready to merge * Remove other dated code * Fixed convergence and added test for B738_sizing example * Add back CODEOWNERS file * Inconsequential rendition thump * Removed old B738 sizing data * Ran black * Fix most flake8 errors * Fixed ascii art * Try to fix remaining flake8 * Indentation fix * Documentation for new components * Fixed some errors I noticed in the documentation * Address most comments * Upper bound on OpenMDAO version * Forgot a comma * Oldest OpenMDAO version was being overridden on OpenConcept install * Try OM 3.16 * Try OM 3.17 * 3.17 it is * Bump again to 3.21 to fix spline shape problem * Add code for checking against OAS and weighted avg of cos(sweep) rather than sweep directly * Reorganized to remove duplicated code * Tightened Newton solver tolerance to make testing more consistent * Fixing black and flake8 * Make up your mind flake8 * Better descriptions of takeoff|h behavior * Even more descriptive takeoff|h behavior --------- Co-authored-by: Ben Brelje <benjamin.brelje@gmail.com> Co-authored-by: Ben Brelje <bbrelje@umich.edu> Co-authored-by: Cody Karcher <ckarcher@umich.edu>
Changed Hx Value error to Analysis error for 3 instances. (#62) * heat exchanger raise value error precisions * init version update * test_heat_exchangers * Fix black complaints * new conflict resolution between upstream main and hbx_issue --------- Co-authored-by: Marie J Vaucher <mvaucher@umich.edu> Co-authored-by: Eytan Adler <eytana@umich.edu>
PreviousNext