Changes
Page history
Update use_api_internal
authored
Sep 07, 2022
by
Adrien Crovato
Show whitespace changes
Inline
Side-by-side
use_api_internal.md
View page @
5397a320
...
...
@@ -9,30 +9,30 @@ In practise, all the internal APIs use the [Core API](use_api_core) to initializ
Additional common parameters:
```
python
# Post-pro
p
[
'
Slice
'
]
=
list
of
float
# y-coordinates of cutting planes to extract slices on the geometry (optional, will only work with VTK)
p
[
'
TagId
'
]
=
int
# id of physical group to be sliced (id can be obtained through gmsh)
cfg
[
'
Slice
'
]
=
list
of
float
# y-coordinates of cutting planes to extract slices on the geometry (optional, will only work with VTK)
cfg
[
'
TagId
'
]
=
int
# id of physical group to be sliced (id can be obtained through gmsh)
```
Additional parameters specific to Polar class:
```
python
p
[
'
AoA_begin
'
]
=
float
# first value of the angle of attack [degrees]
p
[
'
AoA_end
'
]
=
float
# last value of the angle of attack [degrees]
p
[
'
AoA_step
'
]
=
float
# step in the angle of attack [degrees]
cfg
[
'
AoA_begin
'
]
=
float
# first value of the angle of attack [degrees]
cfg
[
'
AoA_end
'
]
=
float
# last value of the angle of attack [degrees]
cfg
[
'
AoA_step
'
]
=
float
# step in the angle of attack [degrees]
```
Additional parameters specific to Trim class:
```
python
p
[
'
CL
'
]
=
float
# target lift coefficient
p
[
'
AoA
'
]
=
float
# guess (first) angle of attack
p
[
'
dCL
'
]
=
float
# guess (first) slope of CL w.r.t AoA [1/rad]
cfg
[
'
CL
'
]
=
float
# target lift coefficient
cfg
[
'
AoA
'
]
=
float
# guess (first) angle of attack
cfg
[
'
dCL
'
]
=
float
# guess (first) slope of CL w.r.t AoA [1/rad]
```
**2. Using the solver**
After the parameters have been defined, the solver can be set up automatically by instantiating the object as,
```
python
import
dart.api.internal.polar
as
pol
polar
=
pol
.
Polar
(
p
)
polar
=
pol
.
Polar
(
cfg
)
# or
import
dart.api.internal.trim
as
trm
trim
=
trm
.
Trim
(
p
)
trim
=
trm
.
Trim
(
cfg
)
```
The script can then be run by calling,
```
python
...
...
...
...