-
Notifications
You must be signed in to change notification settings - Fork 6
Quickstart
Rick Fenrich edited this page Feb 14, 2017
·
13 revisions
Running an aerothermostructural analysis for a nozzle is easy using MULTI-F. Example config and input files can be found in the example directory.
- Create a local directory on your computer to run the nozzle analysis in.
- Copy the config file
general.cfg
from the MULTIF/example directory to your local directory. The config file defines the baseline values of parameters as well as the required design variables. - Open
general.cfg
. Lines 7-12 define 3 nozzle fidelities which will be specified via the command line. Line 31 describes what quantities will be output. Line 61 lists the design variables along with the name of the file which from which design variable values will be read. The remainder of the file defines parameterizations and parameter values. - Copy
inputdv_all.in
from the MULTIF/example directory to your local directory. When the MULTI-F analysis is called, parameter values from this file will overwrite the baseline values in the config file and will be assigned to the MULTI-F nozzle model prior to analysis. - Copy the driver script
runModel.py
from the MULTIF directory to your local directory. This script is used to call MULTI-F. - Open
runModel.py
and add the following line after theimport sys
command:sys.path.append('/location/of/locally/installed/MULTIF')
. Save the file and close it. This allows therunModel.py
to find MULTI-F. - Open a command prompt and cd to your local directory.
- Call
python runModel.py -f general.cfg -l 0
to run the low-fidelity (1st fidelity level defined in the config file) analysis. A lot of information will be printed to the screen and many text files will be created in your directory containing stresses, temperatures, etc. - Open
results.out
to view the requested function outputs.
To run a deterministic low-fidelity optimization (the same one described in the MULTI-F documentation), Dakota will need to be installed. In addition, NPSOL is used to solve the optimization problem, but another algorithm can be substituted.
- Create a local directory on your computer to run the optimization in.
- Copy
genDakotaInput.py
andlinearConstraints.py
from the MULTIF/example/optim directory to your local directory. ThegenDakotaInput.py
file is used to generate the Dakota input file for the optimization, and thelinearConstraints.py
file contains the linear constraints for the optimization problem. - Copy
det_optim_standard.cfg
from the MULTIF/example directory to your local directory. - Open
det_optim_standard.cfg
. Change line 29 toINPUT_DV_FORMAT= DAKOTA
and change line 38 toINPUT_DV_NAME= params.in
. - Copy the driver script
runModel.py
from the MULTIF directory to your local directory. This script is used to call MULTI-F. - Open
runModel.py
and add the following line after theimport sys
command:sys.path.append('/location/of/locally/installed/MULTIF')
. Save the file and close it. This allows therunModel.py
to find MULTI-F. - Open a command prompt and cd to your local directory.
- Call
python genDakotaInput.py
to generate the Dakota input file. A message will be printed telling you the linear constraints are feasible at the starting location. - Open the generated Dakota input file
det-opt.in
and inspect it to ensure that it is correct for your computer (i.e. number of cores for parallel calculations is right, etc.). If not, alter thegenDakotaInput.py
file and repeat from step 8. Close the file. - Call
dakota -i det-opt.in -o det-opt.out
from your local directory to start the optimization.
This optimization converged using NPSOL with 2,016 unique low-fidelity function evaluations.