-
Notifications
You must be signed in to change notification settings - Fork 6
Quickstart (Inverse Problem)
Rick Fenrich edited this page Mar 1, 2017
·
5 revisions
Setting up the code for a particular type of inverse problem should be relatively easy. In particular, here we consider a problem where the temperature profile at the wall of the nozzle is specified in addition to the inlet stagnation pressure, inlet stagnation temperature, and atmospheric pressure and temperature. Quantities of interest include thrust, the pressure profile at the wall, and the internal nozzle pressure and velocity fields.
Currently the inverse problem is only available for low-fidelity (quasi-1D area averaged flow) and high-fidelity (RANS) aerodynamic analyses.
- Create a local directory on your computer to run the nozzle analysis in.
- Copy the inference folder from the MULTIF/example directory to your local directory and open it. The config file
inference_standard.cfg
defines the baseline values of parameters as well as the required design variables. - Open
inference_standard.cfg
. Lines 12-14 define the nozzle fidelities which will be specified via the command line. Note that only an aerodynamic analysis is performed, but an aerothermal analysis must be specified for low-fidelity. Line 33 defines the output functions. Lines 37-44 define the points at which the pressure and velocity fields will be interpolated to output a vector of scalar values. Lines 47-48 list the design variables and the file from which the design variable values will be read. Lines 60-63 define the piecewise linear wall temperature profile. The remainder of the file defines paramerizations and parameter files. - Open
inference_standard.in
. 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. - Note that the inference folder also contains
pressure_locations.in
,velocity_locations.in
, andwall_pressure_locations.in
each of which specifies points at which pressure, velocity values, and wall pressure will be interpolated and output from the aero analysis solution. Each file has a plain format where each row corresponds to a single point. - 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 inference_standard.cfg -l 0
to run the low-fidelity (1st fidelity level defined in the config file) analysis orpython runModel.py -f inference_standard.cfg -l 2
to run the high-fidelity (3rd fidelity level defined in the config file) analysis. A lot of information will be printed to the screen and several text files will be created in your directory containing solution information. - Open
results.out
to view the requested function outputs. Note that outputs are written in the order specified in the config file. In addition, pressure and velocity responses are written in the order of the specified points. Velocity components are written with x-component first, followed by y-component, and then z-component.