Experiments

Experiments module

class uconnrcmpy.experiments.AltExperiment(file_path=None, cti_file=None, cti_source=None, copy=True)

Contains all the information of a single alternate RCM experiment. See the documentation for Experiment for attribute descriptions.

copy_to_clipboard()

Copy experimental information to the clipboard

The information is intended to be pasted to a spreadsheet. The information is ordered by columns in the following way:

  1. 4-digit time of day
  2. The initial pressure of the experiment, in Torr
  3. The initial temperature of the experiment, in K
  4. The end of compression pressure
  5. The overall ignition delay
  6. The first stage ignition delay
  7. The estimated end of compression temperature
  8. The inches of spacers for the experiment
  9. The millimeters of shims for the experiment
  10. The cutoff frequency that was used to filter the voltage trace
parse_file_name(file_path)

Parse the file name of an experimental trace, where the name is in an alternate format.

Parameters:file_path (pathlib.Path) –

The Path object that contains the path of the current experimental data file. The filename associated with the path should be in the following format:

'Fuel_FF_EqRatio_P.PP_PercentAr_AR_PercentN2_N2_[NR_]XX_in_YY_mm_ZZZK_AAAAtorr-DD-Mon-YY-Time_Endplug_CC.txt'

where:

  • [NR_]: Optional non-reactive indicator
  • FF: Fuel symbol
  • P.PP: Equivalence ratio to two decimal places
  • AR: Percent of argon in the oxidizer
  • N2: Percent of nitrogen in the oxidizer
  • XX: inches of spacers
  • YY: millimeters of shims
  • ZZZ: Initial temperature in Kelvin
  • AAAA: Initial pressure in Torr
  • BBB: Multiplication factor set on the charge amplifier
  • DD-Mon-YY-Time: Day, Month, Year, and Time of experiment
  • CC: HC or LC to indicate the high clearance or
    low clearance endplug, respectively
Returns:Dictionary containing the parameters of the experiment with the following names:
  • spacers: Inches of spacers
  • shims: Millimeters of shims
  • Tin: Initial temperature in Kelvin
  • pin: Initial pressure in Torr
  • time_of_day: Time of day of the experiment
  • date: Date of the experiment with the time
  • date_year: Date of the experiment with the year
Return type:dict
class uconnrcmpy.experiments.Experiment(file_path=None, cti_file=None, cti_source=None, copy=True)

Contains all the information of a single RCM experiment.

Parameters:
  • file_path (str or pathlib.Path, optional) – If an argument is supplied, it should be an instance of Path or str. If no argument is supplied, the filename is read from the standard input as a string and resolved into a Path object.
  • cti_file (str or pathlib.Path, optional) – Location of the CTI file for Cantera
  • cti_source (str, optional) – String containing the source of a CTI file for Cantera
  • copy (bool, optional) – Boolean indicating whether values should be copied to the clipboard.
compression_time

float – The compression time in milliseconds, from the end of compression to the approximate start of piston motion

file_path

pathlib.Path – Object storing the file path

experiment_parameters

dict – Stores the parameters of the experiment parsed from the filename by parse_file_name.

voltage_trace

VoltageTrace – Stores the experimental voltage signal and related traces

pressure_trace

ExperimentalPressureTrace – Stores the experimental pressure trace and its derivative

output_end_time

float – The end time for the output to a file, relative to the end of compression in milliseconds

offset_points

float – The number of points to offset the end of compression, to better match the non-reactive and reactive pressure traces together

ignition_delay

float – The overall ignition delay of the experiment. Will be zero for a non-reactive experiment.

first_stage

float – The first stage ignition delay of the experiment. Will be zero for a non-reactive experiment of if there is no first-stage ignition.

T_EOC

float – The temperature estimated at the end of compression

calculate_ignition_delay()

Calculate the ignition delay from the pressure trace.

change_EOC_time(time, is_reactive=True)

Change the EOC time for an experiment

Parameters:
  • time (float) – The new value of the EOC time
  • is_reactive (boolean) – The experiment is reactive or not
change_filter_freq(value)

Change the cutoff frequency of the filter for the voltage trace

Parameters:value (float) – The new value of the cutoff frequency
copy_to_clipboard()

Copy experimental information to the clipboard

The information is intended to be pasted to a spreadsheet. The information is ordered by columns in the following way:

  1. 4-digit time of day
  2. The initial pressure of the experiment, in Torr
  3. The initial temperature of the experiment, in K
  4. The end of compression pressure
  5. The overall ignition delay
  6. The first stage ignition delay
  7. The estimated end of compression temperature
  8. The inches of spacers for the experiment
  9. The millimeters of shims for the experiment
  10. The cutoff frequency that was used to filter the voltage trace
parse_file_name(file_path)

Parse the file name of an experimental trace.

Parameters:file_path (pathlib.Path) –

The Path object that contains the path of the current experimental data file. The filename associated with the path should be in the following format:

[NR_]XX_in_YY_mm_ZZZK-AAAAt-BBBx-DD-Mon-YY-Time.txt

where:

  • [NR_]: Optional non-reactive indicator
  • XX: inches of spacers
  • YY: millimeters of shims
  • ZZZ: Initial temperature in Kelvin
  • AAAA: Initial pressure in Torr
  • BBB: Multiplication factor set on the charge amplifier
  • DD-Mon-YY-Time: Day, Month, Year, and Time of experiment
Returns:Dictionary containing the parameters of the experiment with the following names:
  • spacers: Inches of spacers
  • shims: Millimeters of shims
  • Tin: Initial temperature in Kelvin
  • pin: Initial pressure in Torr
  • factor: Multiplication factor set on the charge amplifier
  • time_of_day: Time of day of the experiment
  • date: Date of the experiment with the time
  • date_year: Date of the experiment with the year
Return type:dict