crackRinit(parameters)
Np
-- integer -- SIS/EMC -- number of Monte Carlo samples to utilize
analyze
) this is the number of
particles in the set. In this case the complete set of particles is
carried through the analysis, so Np
> several million may use
up available memory. If many millions of particles are needed, the
runs can be split and re-combined later either by using
analyzeParallel
or by using the add=TRUE
option in analyze
. For EMC run (using crackRmc
) this is the
number of trials. Detailed results of each trial are not maintained,
thus many millions is fine from a memory standpoint. crackRmc
is NOT fast, so testing a run with Np
around 1000 is
recommended (see system.time
).
analysis.type
-- character -- SIS/EMC -- the type of
probabilistic damage tolerance analysis being performed, be it a
single-type at a single crack ('single'), multiple-type at a
single crack ('multiple'), or a continuing damage analysis
involving two cracks ('CD')
crackRinit
(either Sing
, Mult
, or
CD
). For an EMC run, the appropriate method of
crackRmc
is selected according to this parameter.
survival.updating
-- character -- SIS -- whether to proceed
flight-by-flight ('fbf') or in intervals ('int')
calcInterval
). This
parameter is not used in an EMC run
(crackRmc
).
flt.calc.interval
-- integer -- SIS/EMC -- frequency of output of SFPOF
calculations in number of flights for each sub-interval
survival.updating
, SFPOF
is calculated and output at the beginning and end of sub-intervals of
length flt.calc.interval
. The actual sub-interval lengths
will often vary slightly since sub-intervals are forced to end at
a scheduled inspection. The sub-intervals within an inspection
interval are rounded to integers which minimize the variation from
flt.calc.interval
. A value of 1 may be used, but for long
service lives the results object may become large and calculation
speeds may suffer.
sfpof.threshold
-- numeric -- SIS/EMC -- if specified, a horizontal line will appear
on results plots at this value.
sfpof.min
-- numeric -- SIS/EMC -- minimum value of SFPOF to include in results
sfpof.min
will be
recorded as sfpof.min
. If = 0, SFPOF will be allowed to be
zero in results. In
this case, when plotting SFPOF on the log scale, warnings will be
issued and the plot will not appear at the zero values.
bootstrap.sfpof
-- logical -- SIS -- whether or not to
perform obtain bootstrap confidence intervals of SFPOF during a run
TRUE
. The number of bootstrap samples to
generate at each calculation of SFPOF is set by
bootstrap.samples
and the desired quantiles to estimate by
bootstrap.quantiles
. Results will be in additional
column(s) with SFPOF in the SFPOF data.frame of the
crackRresults object. Note that there are many SFPOF calculations
and using a large number of bootstrap samples may significantly
increase the run time.
bootstrap.pcd
-- logical -- SIS -- whether or not to
perform obtain bootstrap confidence intervals of PCD during a
scheduled inspection
TRUE
. The number of bootstrap samples to
generate at each calculation of PCD is set by
bootstrap.samples
and the desired quantiles to estimate by
bootstrap.quantiles
. Results will be in additional
column(s) with PCD in the PCD data.frame of the
crackRresults object. Inspections occur less frequently than SFPOF
calculations, but large values of bootstrap.samples
may significantly
increase the run time.
bootstrap.samples
-- integer -- SIS -- number of
bootstrap samples to take for either SFPOF or PCD
Np
).
bootstrap.quantiles
-- numeric -- SIS -- quantile(s)
at which to estimate the sampling distribution of either SFPOF or PCD
probs
argument to the
quantile
function.
ms.gumbel
-- numeric -- SIS/EMC -- vector of length
two specifying the location (loc) and scale parameters for the
Gumbel distribution which describes the maximum applied stress per flight
cp4$ms.gumbel <- c(loc=31.079,
scale=0.832)
crackR
is currently hard-coded to utilize the
Gumbel distribution for max stress per flight. Expanding to a
generic distribution is not difficult; it just hasn't been done
yet. Mostly this is because max stress per flight is almost always
Gumbel distributed in the literature, so I haven't bothered.
inspections
-- data.frame -- SIS/EMC -- specification
of inspection intervals (in number of flights) and the inspection
type to occur at the end of the interval
cp4$inspections <- data.frame(flt.interval = c(4615,2308,2308), type = c(1,2,1))
4615+2308+2308=9231
flights. The three inspections
are of types 1, 2, and 1, respectively, which refers to parameter pod.func
.
pod.func
-- list -- SIS/EMC -- list of POD functions
cp7ext$pod.func <- list(); cp7ext$pod.func[[1]] <- function(a)
lognormalPOD(a, 0.03, 1); cp7ext$pod.func[[2]] <-
function(a) lognormalPOD(a, 0.01, 1)
inspections
specifies which of these to
use. If the inspection type calls for a POD curve that is not
specified here, errors will occur. See lognormalPOD
and inspection
.
pod.threshold
-- numeric -- SIS/EMC -- either a
matrix or a vector specifying the crack sizes at which different
severities of repair will occur (see below for details)
analysis.type=="single"
or
analysis.type=="CD"
, this is a weakly increasing vector of
thresholds at
which to partition the PCD results. For example, if = 0, then no
partitioning will occur; if = c(0.01, 0.05), then PCD will be
split into three: a < 0.01, 0.01 < 0.05, and a > 0.05.
analysis.type=="multiple"
, there is more than
one type of repair that is possible and the behavior of each is
different. Because of this, pod.threshold
is an upper triangular matrix of
dimension c(dta.types, dta.types)
, where each row is the
POD threshold vector for that type. Note each row must be weakly
increasing from left to right. It is upper triangular since it is
assumed that a repair can only get more severe...unless the part
is replaced because the crack grew to exceed the largest threshold
value. This is admittedly confusing, so here's an example. Suppose there are two
DTA types describing the possible condition at a single fastener hole, where the first represents the as-manufactured
condition and the second represents an oversized fastener
installation. Suppose
pod.threshold==matrix(c(0.005,NA,0.25,0.005), nrow=2,
ncol=2)
. For a type 1 particle, the POD threshold values used are
taken from the first row of this matrix: c(0.005, 0.25). If a
crack is found smaller than 0.005, it can be repaired to
as-manufactured condition. If 0.005 < a < 0.25, the oversized
fastener is installed and the type switches to type 2 as a
result of the inspection being performed. If a >
0.25, the part is replaced (back to type 1). If instead when
heading into inspection the repair was of type 2, then
pod.threshold==0.005
. If the found crack is smaller than
0.005, it can be repaired back to the oversized fastener condition
(but not back to type 1, a smaller fastener). If a > 0.005, the
part must be replaced (since the oversized fastener repair has
already been utilized and no other repair is possible). Note that
zero and Inf values may be used. Also the NA values can optionally
be zero as they are not used by the code.
dta.types
-- integer -- SIS/EMC -- number of Damage
Tolerance Analysis (DTA) data sets present in the analysis
analysis.type=="multiple"
in
the methods corresponding to a crackR
object of class
Mult
.
ismc.bool
-- logical -- EMC -- whether or not to
utilize importance sampling to set the initial state in an EMC run
FALSE
standard Monte Carlo sampling is used and
the initial crack size will be generated using, for example,
ifs.ractual.
TRUE
importance sampling is used and the initial
size will be generated using ifs.rsamp instead. Subsequently
ifs.dsamp and ifs.dactual are used to determine the importance
weights.
dta
for more information regarding
specification of initial flaw size distributions
cg.cc
-- numeric -- SIS/EMC -- critical crack length
for a run of either analysis.type=="single"
or analysis.type=="multiple"
cg
, linear extrapolation will occur until
reaching cg.cc. If cg.cc is smaller than the largest values of
said table, failure will occur earlier.
cg
.
cg.cc.pc/cg.cc.ph/cg.cc.sc/cg.cc.sh
-- numeric -- SIS/EMC -- critical crack length
for a run of analysis.type=="CD"
dta
-- list -- SIS/EMC -- deterministic damage
tolerance analysis input data for analysis.type=="single"
or analysis.type=="multiple"
analysis.type=="single"
, this is a list of the
following parameters
analysis.type=="multiple"
, dta is a
"list of lists", where each item of the list (e.g., dta[[1]]) is a
complete dta list with the components described below, each of
which corresponds to a repair type. The length of the list of
lists should equal the value of the parameter dta.types (this is
redundant at present).
cg
-- data.frame -- crack growth data with columns
flight
and crack
; note this differs from some other
probabilistic damage tolerance analysis codes which are indexed to
flight hours instead of flight numbers. Linear extrapolation will
occur using the last two rows of this table if cg.cc is larger
than the last crack size in the table.
geo
-- data.frame -- geometry data relating crack
length to normalized stress intensity K/sigma with columns
crack
and ksig
. The data in this table is not
extrapolated; if a K/sigma value is needed for a crack size beyone
the end of this table, the final value of K/sigma will be
used.
kc.rsamp
-- function -- generates values from
fracture toughness distribution
ifs.rsamp
-- function -- generates values from
initial flaw size sampling distribution
ifs.dsamp
-- function -- density function for
initial flaw size sampling distribution
ifs.ractual
-- function -- generates values from
initial flaw size actual distribution
ifs.dactual
-- function -- density function for
initial flaw size actual distribution
rfs.rsamp
-- function -- generates values from
repair flaw size sampling distribution
rfs.dsamp
-- function -- density function for
repair flaw size sampling distribution
rfs.ractual
-- function -- generates values from
repair flaw size actual distribution
rfs.dactual
-- function -- density function for
repair flaw size actual distribution
dta.pc/dta.ph/dta.sc/dta.sh
-- list -- SIS/EMC -- deterministic damage
tolerance analysis input data for a continuing damage run
dta.pc
and dta.sc
need to have the various
distributions for fracture toughness and initial flaw size, but
dta.ph
and dta.sh
don't require them.
analyze
data(cp7ext)
cp7ext.init <- crackRinit(cp7ext)
head(cp7ext.init$state)
Run the code above in your browser using DataLab