Checklist for a Dakota Study

The Cannon Centered Parameter Study

  10.0
  23.5
  {velocity}
  {angle}
#  Cannon problem - centered parameter study

environment
  tabular_data
    tabular_data_file = 'cannon_centered_tabular.dat'

method
  centered_parameter_study
  steps_per_variable = 4
#              'velocity' 'angle'
  step_vector =   2.0       5.0

variables
  active all
  continuous_design = 2 
    descriptors     = 'velocity' 'angle'
    initial_point   =    10.0     23.5

interface
  fork 
    analysis_drivers = 'mdriver.cmd'  # MATLAB/Octave program driver script for Windows
#   analysis_drivers = 'driver.sh'    # MATLAB/Octave program driver script for Linux/Mac OS X
    parameters_file  = 'params.in'
    results_file     = 'results.out'
# file_save

responses
  response_functions = 1
    descriptors      = 'distance'
  no_gradients
  no_hessians
@echo off

rem  Process the simulation program input file template with dprepro to 
rem  generate the input file for the simulation program using the first
rem  script argument, %1, as the variable values input file to dprepro

C:\ME498\perl\bin\perl.exe C:\ME498\dakota\bin\dprepro %1 cannon.template cannon.inp

rem  Run the simulation program using the input file from the previous
rem  command

C:\ME498\octave\bin\octave-cli --silent --path c:/me498/cannon --eval "cannon('cannon.inp');" > NUL 2>&1

rem  Post-process the simulation results to produce the response data for
rem  input to dakota using the second script argument, %2, as the file name 
rem  used by Dakota

move cannon.out %2 > NUL 2>&1
#!/bin/bash

# $1 and $2 are special variables in bash that contain the 1st and 2nd 
# command line arguments to the script, which are the names of the
# Dakota parameters and results files, respectively.

params=$1
results=$2

############################################################################### 
##
## Pre-processing Phase -- Generate/configure an input file for your simulation 
##  by substiting in parameter values from the Dakota paramters file.
##
###############################################################################

dprepro $params cannon.template cannon.inp

############################################################################### 
##
## Execution Phase -- Run your simulation
##
###############################################################################

octave --no-gui --silent --path ~/ME498/cannon --eval "cannon('cannon.inp')"

############################################################################### 
##
## Post-processing Phase -- Extract (or calculate) quantities of interest
##  from your simulation's output and write them to a properly-formatted
##  Dakota results file.
##
###############################################################################

mv cannon.out $results

Back to ME498/599 Home Page