| ... | @@ -97,7 +97,15 @@ Additionally, chordwise pressure distributions can be extracted along the wing s |
... | @@ -97,7 +97,15 @@ Additionally, chordwise pressure distributions can be extracted along the wing s |
|
|
sdpm.utils.create_slices(wing, vars, model_name, y_sec)
|
|
sdpm.utils.create_slices(wing, vars, model_name, y_sec)
|
|
|
```
|
|
```
|
|
|
where `vars` is a dictionary containing the name and its corresponding data array (e.g. `{'cp': sol.getPressure()}`), `model_name` is the name of the model (inherited from the model file) and `y_sec` is an array of y coordinates.
|
|
where `vars` is a dictionary containing the name and its corresponding data array (e.g. `{'cp': sol.getPressure()}`), `model_name` is the name of the model (inherited from the model file) and `y_sec` is an array of y coordinates.
|
|
|
The sensitivities of the solution can be computed using
|
|
The derivatives of the Generalized Aerodynamic Force (GAF) matrices can be calculated and accessed using
|
|
|
|
```python
|
|
|
|
grd = sdpm.Gradient(sol)
|
|
|
|
grd.run()
|
|
|
|
grd.computePartialsGafRe(i_freq, i_mode, i_row, j_col, wrt)
|
|
|
|
grd.computePartialsGafIm(i_freq, i_mode, i_row, j_col, wrt)
|
|
|
|
```
|
|
|
|
The last two lines will return the derivative of the real and imaginary parts of the GAF matrix entry at row `i_row` and column `j_col` with respect to the component `wrt` of mode number `i_mode` at frequency `i_freq` for all body nodes. `wrt` can either be `'a'` (rigid pitch), `'h'` (rigid plunge), `'dz'` (modal displacements along z), `'rx'` (modal rotations about x) or `'ry'` (modal rotations about y).
|
|
|
|
If automatic differentiation has been enabled, the sensitivities of the solution can be computed using
|
|
|
```python
|
|
```python
|
|
|
sens = adj.compute(of, seeds, wrt)
|
|
sens = adj.compute(of, seeds, wrt)
|
|
|
```
|
|
```
|
| ... | |
... | |
| ... | | ... | |