changeset 2584:706906ee1d30

examples/pitot: added new PITOT bootstrapper example to the repository example is from 2016, but it being in the repository is new...
author Chris James (c.james4@uq.edu.au)
date Thu, 06 Jun 2019 10:29:03 +1000
parents b7f1f24ee379
children 37e069be9b79
files examples/pitot/high-speed-air-theory-bootstrapper/high-speed-air-theory.cfg examples/pitot/high-speed-air-theory-bootstrapper/high-speed-air-theory.sh
diffstat 2 files changed, 245 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/pitot/high-speed-air-theory-bootstrapper/high-speed-air-theory.cfg	Thu Jun 06 10:29:03 2019 +1000
@@ -0,0 +1,234 @@
+# Example input file for pitot.
+# Chris James (c.james4@uq.edu.au) 09/12/16
+# This is a sample config file for a Bootstrapping uncertainty calculating
+# version of PITOT where the user can assign different uncertainties to 
+# different input variables and then the code is ran many times to get the 
+# bounds of each input variable and confidence intervals are assigned.
+
+#--------------------------- Start-up --------------------------------------
+# This is where the setup of the program is specified.
+
+# Name of the output file (if required)
+filename = 'high-speed-air-theory'
+
+# Boolean statement controlling if pitot will clean up temporary files after running
+# Use false unless you really want to clean everything up.
+
+cleanup = True
+cleanup_old_files = True
+
+# Testcase to run. There are three options:
+# 'fulltheory-pressure' = a fully theoretical run where shock speeds are found from set fill pressures
+# 'fulltheory-shock' = a fully theoretical run where fill pressures are found from set shock speeds 
+# 'experiment' = partially theoretical run where both shock speeds and fill pressures are specified based on experimental data
+# 'experiment-shock-tube-theory-acc-tube' = where the shock tube is specified from experiment (Vs1 and p1) and Vs2 is found from theory
+# 'theory-shock-tube-experiment-acc-tube' = where Vs1 is found from theory and the acc tube is found from experiment (Vs2 and p5, of a specified p7)
+
+test = 'experiment'
+
+# Solver to use. There are three options:
+# 'eq' = equilibrium calculations using CEA code
+# 'pg' = perfect gas solver
+# "pg-eq' = a combination of pg and eq solvers, used for CO2 based gases. Sets state1 as a pg, but everything else (including the shock to state 2, are done as eq)
+
+solver = 'eq'
+
+# Mode that the program is run in. There are five options:
+# 'printout' = normal run, prints out a summary to the screen, a txt file and a csv file at the end of the program, then quits
+# 'return' = simpler run, useful if pitot is to be used inside a bigger program. returns a set of values at the end of the run, then quits
+# the returned values are cfg, states, V and M, which are, the config dictionary, state dictionary, velocity dictionary and mach number dictionary
+# 'cea-printout' = same as printout but does some cfcfd gas object printouts at the end
+# 'txt-printout' = just does the txt file printout
+# 'cea-txt-printout' = just the txt file printout but with cea style printouts too
+# 'csv-printout' = just does the csv printout
+
+mode = 'printout'
+
+# Here you can specify how many steps are used for the various unsteady expansions
+
+#secondary_driver_expansion_steps = 200
+
+shock_tube_expansion_steps = 400
+
+# need to use 800 - 1000 steps on the acceleration tube unsteady expansion to match the
+# pressure across the contact surface properly, which is important.
+
+acc_tube_expansion_steps = 1000
+
+# Can specify your own bounds and initial guesses for the secant solver in 
+# the acceleration tube if you so desire
+
+# for 'fulltheory-pressure' testcase:
+
+#Vs2_lower = 
+#Vs2_upper =
+#Vs2_guess_1 =
+#Vs2_guess_2 = 
+
+# for 'fulltheory-shock' testcase: (all pressures in Pa)
+#p5_lower = 5.0
+#p5_upper = 2000.0
+#p5_guess_1 = 10.0
+#p5_guess_2 = 100.0
+
+#------------------------- Facility parameters -----------------------------
+# This is where the facility parameters are specified.
+
+# The facility to simulate. Currently there are two options:
+# 'x2' = the x2 expansion tube
+# 'x3' = the x3 expansion tube
+
+facility = 'x2'
+
+# Tunnel mode to use. There are two options:
+# 'expansion-tube' = expansion tube mode
+# 'nr-shock-tunnel' = non-reflected shock tunnel mode
+
+tunnel_mode = 'expansion-tube'
+
+# Secondary driver 
+
+secondary = False
+
+# Nozzle
+
+nozzle = True
+
+# Piston in use (Only currently required for x2 facility). There are two options:
+# 'lwp' = lightweight piston. tuned driver condition designed by David Gildfind
+# 'ostp' = original single stage piston. designed by Michael Scott
+
+piston = 'lwp-2mm-new-paper'
+
+#-------------------------- Tunnel parameters ------------------------------
+
+# Driver gas to use (by mole fraction). There are four options:
+# Keep in mind, that the fourth option is normally only used for X3 facility.
+# 'He:0.80,Ar:0.20'
+# 'He:0.90,Ar:0.10' 
+# 'He:1.0'
+# 'He:0.60,Ar:0.40'
+
+driver_gas = 'He:0.80,Ar:0.20'
+
+# Test gas to use (by mole fraction where mentioned). There are myriad options:
+# Check the make_test_gas function in the main program for more info about the gases
+# 'air'; 'air5species'; 'n2'; 'titan'; 'gasgiant_h215ne'; 'gasgiant_h215he'; 
+# 'gasgiant_h240ne'; 'gasgiant_h285ne'; 'gasgiant_h210he'; 'gasgiant_h210ne'; 
+# 'co2'; 'mars'; 'venus'; 'h2'
+# NOTE: co2, mars and venus test gases only work with pg and pg-eq solvers
+
+test_gas = 'air'
+
+# Specified shock speeds (used for both the 'fulltheory-shock' and 'experiment' test cases)
+# Units for shock speeds are m/s and should be inputted as floating point numbers
+# Vsd, Vs1 and Vs2 are the names of the variables
+
+# Specified fill pressures (used for both the 'fulltheory-pressure' and 'experiment' test cases)
+# Units for fill pressures are Pa and should be inputted as floating point numbers
+# psd, p1 and p5 are the names of the variables
+# psd is secondary driver fill pressure (if used)
+# p1 is shock tube fill pressure
+# p5 is acceleration tube fill pressure (if used)
+
+# these seem to be reasonable experimental errors...
+
+p1 = 3000.0 # Pa
+p1_delta = 100.0 #Pa
+p1_distribution = 'uniform'
+
+p5 = 10.0 # Pa
+p5_delta = 1.0 #Pa
+p5_distribution = 'uniform'
+
+# maximum Mr_st value for this experimental shock speed is 3.24065137764
+# Therefore I have made that the range...
+# the range means it won't use the nominal value at all, but pitot needs that to start...
+rs_out_of_st = True
+Mr_st = 2.0
+Mr_st_range = [1.0, 3.2]
+Mr_st_distribution = 'uniform'
+
+#V3s_loss_factor = 1.0
+
+Vs1 = 4020.0
+Vs1_std_dev = 30.0
+Vs1_distribution = 'normal'
+
+Vs2 = 7920.0
+Vs2_std_dev = 30.0
+Vs2_distribution = 'normal'
+
+#custom_T5 = True
+#T5 = 250.0 # K
+
+#custom_T1 = True
+#T1 = 400.0 #K
+
+#-------------------------- Final parameters ------------------------------
+# Some parameters that control the solution
+
+# Nozzle area ratio
+# I used to generally use 2.5 (which was a value from Richard)
+# BUT currently I've been using 5.64 (the geometric area ratio of the nozzle)
+
+# 4.0 to 6.0 seemed like a reasonable range here
+# but we could try to get something from variation during pitot shots...
+area_ratio = 5.64
+area_ratio_range = [4.0,6.0]
+area_ratio_distribution = 'uniform'
+
+# Choose whether to expand expanding shocked test gas to the shock speed or 
+# the gas velocity behind the shock in the acceleration tube.
+# 'flow-behind-shock' = expand shocked test gas to gas velocity behind shock in the acceleration tube
+# 'shock-speed' = expand the shocked test gas to the shock speed in the acceleration tube
+# I changed the default here to 'shock-speed' as that simulates the Mirels' Effect
+# and would generally be correct for most high enthalpy test cases.
+
+expand_to = 'shock-speed'
+
+# Change the ratio of the expansion specified in the parameter above.
+# Leave this value as a floating point 1.0 unless you know what you're doing,
+# but it's used to tweak how far above or below the shock speed / gas velocity 
+# that the test gas is expanded to.
+
+# I ran the normal experimental mode and found that
+# when I expand to shock speed (7920.0 m/s) the expand to gas velocity was 7478.1 m/s
+# which is 0.9442, so I made that the bottom of the range
+
+expansion_factor = 1.0
+expansion_factor_range = [0.9442,1.0]
+expansion_factor_distribution = 'uniform'
+
+# Turns on the shock switch that is used for simulating scramjet conditions.
+# In a scramjet condition in an expansion tube the secondary driver shock is
+# driven faster than the shock in the test gas, creating a normal shock into 
+# the shock tube, instead of the usual unsteady expansion. The switch below turns
+# that feature on (the code will try to look for the phenomena itself, 
+# but it won't always find it).
+# NOTE: always make this false unless you know what it is!
+
+shock_switch = False
+
+# Turns on the code that calculates the conditions over a conehead placed in the test section.
+# The conehead angle can be specified in degrees, but will default to 15 degrees if not specified.
+
+conehead = True
+conehead_angle = 15.0 # (degrees)
+
+wedge = True
+wedge_angle = 50.0 # degrees
+
+
+# Turns on the code that calculates the conditions over a normal shock over a test model in the test section.
+
+shock_over_model = True
+
+all_total = True
+
+# --------------- extra bootstrapper inputs ---------------
+
+number_of_test_runs = 1000
+variable_list = ['p1', 'p5', 'Vs1','Vs2', 'Mr_st', 'expansion_factor', 'area_ratio']
+
+secondary_list = [False]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/pitot/high-speed-air-theory-bootstrapper/high-speed-air-theory.sh	Thu Jun 06 10:29:03 2019 +1000
@@ -0,0 +1,11 @@
+#! /bin/sh
+# file: high-speed-air-theory.sh
+# Shell script to run the fully theoretical 
+# air example for pitot.
+# This is a bootstrapping version.
+#Chris James (c.james4@uq.edu.au) - 09/06/16
+
+pitot_bootstrapper.py --config_file=high-speed-air-theory.cfg
+
+echo "Done"
+