Title: | Simulates LOX Drop Testing |
Version: | 0.1.3 |
Author: | Chad Ross [aut, cre] |
Maintainer: | Chad Ross <chad.ross@gmail.com> |
Description: | Generates simulated data representing the LOX drop testing process (also known as impact testing). A simulated process allows for accelerated study of test behavior. Functions are provided to simulate trials, test series, and groups of test series. Functions for creating plots specific to this process are also included. Test attributes and criteria can be set arbitrarily. This work is not endorsed by or affiliated with NASA. See "ASTM G86-17, Standard Test Method for Determining Ignition Sensitivity of Materials to Mechanical Impact in Ambient Liquid Oxygen and Pressurized Liquid and Gaseous Oxygen Environments" <doi:10.1520/G0086-17>. |
Depends: | R (≥ 3.4.0) |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | data.table |
URL: | https://github.com/chadr/droptest |
RoxygenNote: | 6.0.1 |
NeedsCompilation: | no |
Packaged: | 2018-08-23 14:32:30 UTC; Chad |
Repository: | CRAN |
Date/Publication: | 2018-09-19 19:00:03 UTC |
droptest: Simulates LOX drop testing.
Description
Generates simulated data representing the LOX drop testing process (also known as impact testing). Drop testing is expensive, time consuming, and notoriously difficult to analyze. A simulated process allows for accelerated study of test behavior.
Details
Functions are provided to simulate trials, test series, and groups of test series. Functions for creating plots specific to this process are also included. Test attributes and criteria can be set arbitrarily. This work is not endorsed by or affiliated with NASA.
Drop testing – sometimes called impact testing – is used to evaluate if a material will interact with liquid oxygen (LOX). The material is exposed to the LOX and an impactor is dropped onto the sample. Each drop is a bernoulli trial where a reaction is a failure and a non-reaction is a success. The specified number of trials – until failure – completes one test.
While fundamentally a binomial process, drop testing – performed by the military and NASA – yields results that are difficult to analyze. Numerous tech briefs and standards have attempted to address the problem (see below for more information). Testing stops immediately once the failure condition is reached. If the failure condition occurs on drop one or two – depending on the failure criteria – then the test returns only one or two result values. Alternatively, if a material passes, or if the failure condition occurs on the last trial, then the test returns as many result values as trials.
Simulation can be used to examine the behavior of this test procedure.
Inspired by NASA Technical Note "Computer Simulation of Threshold Sensitivity Determinations" (NASA-TN-D-7663). Gayle (1974). https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19750004618.pdf
Definitions
-
Trial: A simulated bernoulli trial that represents one drop of the impactor onto a material sample. Hence a trial is also referred to as a drop. Where q is the probability of failure. A reaction is recorded as a failure. Where p is the probability of success. A non-reaction is recorded as a success. Where
p = 1 - q
. See https://en.wikipedia.org/wiki/Bernoulli_trial -
Drop Test: A collection of simulated trials (drops) generated with equal parameters (q, number of trials, failure criteria, etc). When the failure criteria is reached the test is immediately terminated and no more trials are completed. The sooner a test reaches the failure criteria the less total trials for that particular test. A test with no failures will always contain the maximum number of trials as defined in the function parameters.
-
Test Series: A collection of simulated drop tests. A group number can be attached to the drop tests in a test series (optional).
-
Groups: A collection of multiple simulated test series. Each batch of test series are identified with a group number. Within each group test parameters will be identical.
-
Trial Deviation: The average distance from q for the total percent of reactions (failures).
Author(s)
Chad Ross chad.ross@gmail.com
References
Pass/Fail criteria and number of observations required have been defined in the following standards:
NASA-STD-6001B https://spaceflightsystems.grc.nasa.gov/SpaceDOC_II/Standards/documents/NASA-STD-6001B-1.pdf
ASTM D2512 https://www.astm.org/Standards/D2512.htm
ASTM G86-17 https://www.astm.org/Standards/G86.htm
Note: This package is not constrained by any standard. Arbitrary test criteria and observations can be specified for maximum flexibility.
For more information on drop testing:
"An Instrument for Determination of Impact Sensitivity of Materials in Contact with Liquid Oxygen" (AB6002-EB). Lucas (1960). https://www.astm.org/DIGITAL_LIBRARY/STP/MMR/PAGES/AB6002-EB.htm
"Reproducibility of Liquid Oxygen Impact Test Results" (NASA-TN-D-7905). Gayle (1970). https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19750014413.pdf
"Lox/Gox Mechanical Impact Tester Assessment" (TM-74106). Bransford, Bryan, Frye, Stohler (1980). https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19800006920.pdf
Note: This work is not endorsed by or affiliated with NASA. Released under MIT license.
See Also
dtrials
dseries
dgroups
trialdev
gayleplot
ratioplot
D7905
PREGENTD
Historical Data
Description
Historical drop test data where testers did not immediately terminate testing. Useful for comparing modern test methods and simulation output.
Usage
data("D7905")
Format
A data frame with 10 observations on the following 2 variables.
P
a numeric vector
SD
a numeric vector
Source
NASA Technical Note NASA-TN D-7905. (1970) Written by J. B. Gayle. https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19750014413.pdf
Examples
data(D7905)
Trial Deviation for Pre-Generated Data
Description
Output of trialdev()
on a large pre-generated dataset.
Original dataset represents fifty levels of q where each level has 100,000 simulated test series. For a total of 5,000,000 simulated tests.
Usage
data("PREGENTD")
Format
A data frame with 50 observations of 4 variables.
See Also
Examples
data(PREGENTD)
Generates groups of simulated test series.
Description
dgroups
returns a collection test series organized into groups. Each
batch of test series are identified with a group number. Test parameters
will be uniform within each group.
Usage
dgroups(num.groups = NULL, probs = NULL, ...)
Arguments
num.groups |
Integer. Specifies how many groups of drop tests to simulate. |
probs |
Vector. Specifies probabilities of q used for each group. Vector length must equal value of num.groups. |
... |
Passes values to |
Value
Data table of groups where each group consists of multiple drop tests. Consisting of the following elements:
-
F_CRITERIA The failure criteria specified.
-
REACT The total number of simulated reactions (failures).
-
NON_REACT The total number of simulated non-reactions (successes).
-
TRIALS The number of simulated trials performed until failure condition met.
-
MAX_TRIALS The maximum number of simulated trials to perform as specified.
-
PCT_REACT The percent of simulated trials that yielded a reaction (failure).
-
Q The probability of failure (reaction) as specified.
-
P The probability of success (non-reaction).
-
RESULT Whether the simulated test series as a whole failed or passed based on the failure criteria specified.
-
GROUP Denotes the group of simulated test series.
Author(s)
Chad Ross chad.ross@gmail.com
See Also
Examples
dgroups(num.groups = 2, probs = c(0.01, 0.2), num.series = 5)
dgroups(num.groups = 2, probs = c(0.01, 0.2), num.series = 5, max.trials = 60)
dgroups(num.groups = 2, probs = c(0.01, 0.2), num.series = 5, fail.criteria = 2)
dgroups(num.groups = 5, probs = seq(0.01, 0.05, by = 0.01), num.series = 2)
Completes multiple series of simulated drop tests.
Description
dseries
returns a series of simulated drop tests. Where each test
consists of trials (drops).
Usage
dseries(num.series, tag.group = FALSE, group = 0, ...)
Arguments
num.series |
Integer. Specifies how many series of drop tests to simulate. |
tag.group |
Logical. If |
group |
Integer. Assigns a group number to each simulated drop test
within the same series. Only if |
... |
Passes |
Value
Data table of multiple simulated drop tests. Each row of the data.table represents one simulated drop test. Containing the following elements:
-
F_CRITERIA The failure criteria specified.
-
REACT The total number of simulated reactions (failures).
-
NON_REACT The total number of simulated non-reactions (successes).
-
TRIALS The number of simulated trials performed until failure condition met.
-
MAX_TRIALS The maximum number of simulated trials to perform as specified.
-
PCT_REACT The the percent of simulated trials that yielded a reaction (failure).
-
Q The probability of failure (reaction) as specified.
-
P The probability of success (non-reaction).
-
RESULT Whether the simulated test series as a whole failed or passed based on the failure criteria specified.
Author(s)
Chad Ross chad.ross@gmail.com
See Also
Examples
dseries(num.series = 5, q = 0.05)
dseries(num.series = 5, q = 0.05, max.trials = 60)
dseries(num.series = 5, q = 0.05, max.trials = 60, fail.criteria = 2)
Completes a simulated drop test.
Description
dtrials
returns simulated bernoulli trials (drops) that compose one
drop test.
Usage
dtrials(q, max.trials = 20, fail.criteria = 1,
data.structure = "data.table")
Arguments
q |
Integer. Specifies the probability that a reaction occurs.
A reaction is interpreted as a failure therfore q is the probability
of failure for the bernoulli trials. Probability of success would be
|
max.trials |
Integer. The maximum number of bernoulli trials to
perform. where each trial represents one drop of the impactor onto
a sample. Trials performed will always be less than or equal to
|
fail.criteria |
Integer. Specifies number of reactions (failures)
that can occur before an entire test is considered a failure. Must be
less than or equal to |
data.structure |
Instructs function to return result as a data.table or list. Default is data.table. Note: Other functions in this package only work with data.tables. List is an option strictly for future flexibility. |
Value
A data table or list. Containing the following elements:
-
F_CRITERIA The failure criteria specified.
-
REACT The total number of simulated reactions (failures).
-
NON_REACT The total number of simulated non-reactions (successes).
-
TRIALS The number of simulated trials performed until the failure condition was met.
-
MAX_TRIALS The maximum number of simulated trials specified.
-
PCT_REACT The percent of simulated trials that yielded a reaction (failure).
-
Q The probability of failure (reaction) as specified.
-
P The probability of success (non-reaction).
-
RESULT Whether the simulated test series as a whole failed or passed based on the failure criteria specified.
Author(s)
Chad Ross chad.ross@gmail.com
See Also
Examples
dtrials(0.05)
dtrials(0.05, max.trials = 60)
dtrials(0.05, fail.criteria = 2)
dtrials(0.05, max.trials = 60, fail.criteria = 2)
dtrials(0.05, data.structure = "list")
Plot of std deviation percent, vs probability of reaction percent.
Description
gayleplot
Creates plot similar to the one seen in NASA Technical
Note NASA-TN-D-7905. (1970) Written by J. B. Gayle. The namesake
of this function.
https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19750014413.pdf
Usage
gayleplot(simq = seq(0.01, 0.5, by = 0.05), ...)
Arguments
simq |
Vector. Probabilities of failure (q) to use for simulated trials. Defaults to range of q = 0.01 to q = 0.5 in 0.05 steps. |
... |
Passes values to |
Details
Plots historical standard deviations ( mid-test – against binomial process. Also plots standard deviations ( from simulation using modern procedure.
Shows how historical data follows a binomial process, but simulated data produced using modern procedure does not.
Value
none
Author(s)
Chad Ross chad.ross@gmail.com
See Also
dgroups
dseries
dtrials
droptest
Examples
# recommended to use num.series value greater than or equal to 1000.
gayleplot(num.series = 100)
gayleplot(num.series = 100, simq = seq(0.01, 0.05, by = 0.01))
Creates plot of pass/fail ratio for repeated test series.
Description
ratioplot
Creates plot of pass/fail ratio for repeated test
series. By simulated probability of reaction.
Usage
ratioplot(simq = seq(0.01, 0.2, by = 0.01), colors = c("RED", "GREEN"), ...)
Arguments
simq |
Vector. Probabilities of failure (q) to use for simulated trials. Defaults to range of q = 0.01 to q = 0.5 in 0.05 steps. |
colors |
Vector. Passes color options to |
... |
Passes values to |
Value
none
Author(s)
Chad Ross chad.ross@gmail.com
See Also
dgroups
dseries
dtrials
droptest
Examples
# recommended to use num.series value greater than or equal to 1000.
ratioplot(simq = seq(0.01, 0.20, by = 0.01), num.series = 100)
ratioplot(simq = seq(0.01, 0.20, by = 0.01), num.series = 100,
colors = c("BLUE", "BLACK"))
Calculates trial deviation for simulated trials (drops).
Description
trialdev
creates a data.table with the average distances from q for
the total percent of reactions (failures).
Usage
trialdev(sim.values)
Arguments
sim.values |
Data table. Data table produced by droptest::dtrials, droptest::dseries, or droptest::dgroups. |
Value
Data table of q, p, trial deviation, and average total trials per test. Aggregated by q.
-
Q The probability of failure (reaction) as specified.
-
P The probability of success (non-reaction).
-
TRIAL_DEV The average distance from q for the total percent of reactions (failures).
-
AVG_TRIALS The average number of simulated trials reached for each q.
Author(s)
Chad Ross chad.ross@gmail.com
See Also
dtrials
dseries
dgroups
droptest
Examples
trialdev(dtrials(q = 0.05, max.trials = 60, fail.criteria = 2))