... | ... | @@ -13,19 +13,19 @@ In practise, the MPHYS API uses the [Core API](use_api_core) to initialize DART. |
|
|
from mphys import Multipoint
|
|
|
class Top(Multipoint):
|
|
|
# ...
|
|
|
dart = DartBuilder(p, scenario=..., task=...)
|
|
|
dart = DartBuilder(cfg, scenario='aerodynamic', task='analysis', saveAll=False, raiseError=False)
|
|
|
```
|
|
|
where `p` is a dictionary of parameters (available choices are listed in [core](use_api_core)), and where valid choices for `scenario` are `'aerodynamic'` or `'aerostructural'`, and valid choices for `task` are `'analysis'` or `'optimization'`.
|
|
|
where `cfg` is a dictionary of parameters (available choices are listed in [core](use_api_core)), and where valid choices for `scenario` are `'aerodynamic'` or `'aerostructural'`, and valid choices for `task` are `'analysis'` or `'optimization'`. Additonally, `saveAll` is a boolean indicating whether to write results to different files at each (major) iteration, and `raiseError` is a boolean indicating whether to raise an `openMDAO.AnalysisError` when the solver does not fully converge.
|
|
|
|
|
|
*Note* DART can be coupled with [pyGeo](https://github.com/mdolab/pyGeo), which uses the free-form deformation technique, to perform aerodynamic shape optimization. Since pyGeo only handles 3D geometries, users wanting to perform 2D shape optimization must provide a so-called 2.5D geometry, which consists of an extruded 2D geometry enclosed between two symmetry walls. In such a case, the parameters `'WakeTips'` MUST NOT be given.
|
|
|
|
|
|
**2. Using the interface**
|
|
|
Users should refer to the MPHYS documention to connect the interface through MPHYS. In version 0.4.0, this is done by calling,
|
|
|
Users should refer to the MPHYS documentation to connect the interface through MPHYS. In version 1.0.0, this is done by calling,
|
|
|
```python
|
|
|
# for pure aerodynamic computations...
|
|
|
from mphys.scenario_aerodynamic import ScenarioAerodynamic
|
|
|
self.mphys_add_scenario('...', ScenarioAerodynamic(aero_builder=dart))
|
|
|
# ... or for aerostructural computations
|
|
|
from mphys.scenario_aerostructural import ScenarioAeroStructural
|
|
|
self.mphys_add_scenario('...', ScenarioAeroStructural(aero_builder=dart, struct_builder=..., ldxfer_builder=...), coupling_nonlinear_solver=..., coupling_linear_solver=...)
|
|
|
self.mphys_add_scenario('...', ScenarioAeroStructural(aero_builder=dart, struct_builder=..., ldxfer_builder=..., geometry_builder=..., in_MultipointParallel=...), coupling_nonlinear_solver=..., coupling_linear_solver=...)
|
|
|
``` |