Changes
Page history
Update User guide
authored
Dec 19, 2024
by
Adrien Crovato
Hide whitespace changes
Inline
Side-by-side
User-guide.md
View page @
2a443636
Once installed, BLASTER is initialized using the following lines:
Once installed, BLASTER is initialized using the following lines:
```
python
```
python
from
blaster.blast.api.blaster_api
import
init_blaster
_blast
=
init_blaster
(
cfg
,
icfg
,
iSolverName
,
task
)
```
```
where the parameters are...
where:
-
`_blast`
is a Python dictionary containing the objects required to run BLASTER
-
`cfg`
is a Python dictionary that configures the viscous solver
-
`icfg`
is a Python dictionary that configures the inviscid solver (e.g. see
[
DART
](
https://gitlab.uliege.be/am-dept/dartflo/-/wikis/use_api_core
)
)
-
`iSolverName`
is the name of the inviscid solver (available options:
`'DART'`
)
-
`task`
is the type of calculation to be made (available options:
`'analysis'`
,
`'optimization'`
)
This will return...
The configuration dictionary
`cfg`
consists of the parameters defined here under:
\ No newline at end of file
```
python
cfg
=
{
'
Re
'
:
float
# Flow Reynolds number.
'
Minf
'
:
float
# Freestream Mach number (only used for time step computation).
'
CFL0
'
:
float
# Initial CFL number.
'
Verb
'
:
int
# Verbosity level of the viscous solver.
'
xtrF
'
:
[
float
,
float
]
# Forced transition location [upper, lower].
'
couplIter
'
:
int
# Maximum number of coupling iterations.
'
couplTol
'
:
float
# Tolerance to end computation (drag count between 2 iterations).
'
iterPrint
'
:
int
# Number of iterations between which the coupler outputs its state.
'
resetInv
'
:
bool
# Resets the inviscid solver at each iteration (True), reuses previous state as initial condition (False).
}
```
The return dictionary
`_blast`
contains:
-
`coupler`
: the coupler driving the viscous inviscid process
-
`isol`
: the interface of the inviscid solver (see
`blast/interfaces/DSolversInterface.py`
)
-
`vsol`
: the viscous solver
-
`adj`
: the coupled viscous inviscid adjoint solver
A viscous inviscid solution is then obtained by:
```
python
coupler
.
run
()
```
\ No newline at end of file