| ... | @@ -13,19 +13,19 @@ In practise, the MPhys API uses the [Core API](use_api_core) to initialize DART. |
... | @@ -13,19 +13,19 @@ In practise, the MPhys API uses the [Core API](use_api_core) to initialize DART. |
|
|
from mphys import Multipoint
|
|
from mphys import Multipoint
|
|
|
class Top(Multipoint):
|
|
class Top(Multipoint):
|
|
|
# ...
|
|
# ...
|
|
|
dart = DartBuilder(cfg, scenario='aerodynamic', task='analysis', saveAll=False, raiseError=False)
|
|
dart = DartBuilder(cfg, save_all=False, raise_error=False)
|
|
|
```
|
|
```
|
|
|
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'`. Additionally, `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.
|
|
where `cfg` is a dictionary of parameters (available choices are listed in [core](use_api_core)), `save_all` is a boolean indicating whether to write results to different files at each (major) iteration, and `raise_error` is a boolean indicating whether to raise an `openmdao.api.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.
|
|
*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 `'free_edge'` MUST NOT be given.
|
|
|
|
|
|
|
|
**2. Using the interface**
|
|
**2. Using the interface**
|
|
|
Users should refer to the MPhys documentation to connect the interface through MPhys. In version 1.3.0, this is done by calling,
|
|
Users should refer to the MPhys documentation to connect the interface through MPhys. In version 2.0.0, this is done by calling,
|
|
|
```python
|
|
```python
|
|
|
# for pure aerodynamic computations...
|
|
# for pure aerodynamic computations...
|
|
|
from mphys.scenario_aerodynamic import ScenarioAerodynamic
|
|
from mphys.scenarios.aerodynamic import ScenarioAerodynamic
|
|
|
self.mphys_add_scenario('...', ScenarioAerodynamic(aero_builder=dart))
|
|
self.mphys_add_scenario('...', ScenarioAerodynamic(aero_builder=dart))
|
|
|
# ... or for aerostructural computations
|
|
# ... or for aerostructural computations
|
|
|
from mphys.scenario_aerostructural import ScenarioAeroStructural
|
|
from mphys.scenarios.aerostructural import ScenarioAeroStructural
|
|
|
self.mphys_add_scenario('...', ScenarioAeroStructural(aero_builder=dart, struct_builder=..., ldxfer_builder=..., geometry_builder=..., in_MultipointParallel=...), 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=...)
|
|
|
``` |
|
``` |