Skip to content

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.

Running an analysis

  1. Create a local directory on your computer to run the nozzle analysis in.
  2. 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.
  3. 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.
  4. 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.
  5. Copy the driver script runModel.py from the MULTIF directory to your local directory. This script is used to call MULTI-F.
  6. Open runModel.py and add the following line after the import sys command: sys.path.append('/location/of/locally/installed/MULTIF'). Save the file and close it. This allows the runModel.py to find MULTI-F.
  7. Open a command prompt and cd to your local directory.
  8. 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.
  9. Open results.out to view the requested function outputs.

Running an optimization / using constraints

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.

  1. Create a local directory on your computer to run the optimization in.
  2. Copy genDakotaInput.py and linearConstraints.py from the MULTIF/example/optim directory to your local directory. The genDakotaInput.py file is used to generate the Dakota input file for the optimization, and the linearConstraints.py file contains the linear constraints for the optimization problem.
  3. Copy det_optim_standard.cfg from the MULTIF/example directory to your local directory.
  4. Open det_optim_standard.cfg. Change line 29 to INPUT_DV_FORMAT= DAKOTA and change line 38 to INPUT_DV_NAME= params.in.
  5. Copy the driver script runModel.py from the MULTIF directory to your local directory. This script is used to call MULTI-F.
  6. Open runModel.py and add the following line after the import sys command: sys.path.append('/location/of/locally/installed/MULTIF'). Save the file and close it. This allows the runModel.py to find MULTI-F.
  7. Open a command prompt and cd to your local directory.
  8. 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.
  9. 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 the genDakotaInput.py file and repeat from step 8. Close the file.
  10. 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.

Low-fidelity optimal deterministic nozzle shape