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:
- 4-digit time of day
- The initial pressure of the experiment, in Torr
- The initial temperature of the experiment, in K
- The end of compression pressure
- The overall ignition delay
- The first stage ignition delay
- The estimated end of compression temperature
- The inches of spacers for the experiment
- The millimeters of shims for the experiment
- 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 indicatorFF
: Fuel symbolP.PP
: Equivalence ratio to two decimal placesAR
: Percent of argon in the oxidizerN2
: Percent of nitrogen in the oxidizerXX
: inches of spacersYY
: millimeters of shimsZZZ
: Initial temperature in KelvinAAAA
: Initial pressure in TorrBBB
: Multiplication factor set on the charge amplifierDD-Mon-YY-Time
: Day, Month, Year, and Time of experimentCC
:HC
orLC
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 spacersshims
: Millimeters of shimsTin
: Initial temperature in Kelvinpin
: Initial pressure in Torrtime_of_day
: Time of day of the experimentdate
: Date of the experiment with the timedate_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
orpathlib.Path
, optional) – If an argument is supplied, it should be an instance ofPath
orstr
. If no argument is supplied, the filename is read from the standard input as a string and resolved into aPath
object. - cti_file (
str
orpathlib.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 byparse_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.
-
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
- time (
-
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:
- 4-digit time of day
- The initial pressure of the experiment, in Torr
- The initial temperature of the experiment, in K
- The end of compression pressure
- The overall ignition delay
- The first stage ignition delay
- The estimated end of compression temperature
- The inches of spacers for the experiment
- The millimeters of shims for the experiment
- 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 indicatorXX
: inches of spacersYY
: millimeters of shimsZZZ
: Initial temperature in KelvinAAAA
: Initial pressure in TorrBBB
: Multiplication factor set on the charge amplifierDD-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 spacersshims
: Millimeters of shimsTin
: Initial temperature in Kelvinpin
: Initial pressure in Torrfactor
: Multiplication factor set on the charge amplifiertime_of_day
: Time of day of the experimentdate
: Date of the experiment with the timedate_year
: Date of the experiment with the year
Return type: dict
- file_path (