Description Usage Arguments Details Value Author(s) Examples
Simulation of fatigue lifetime model
1 | simFracture(stress, S, opt, param, last.defect = FALSE, CL = NULL)
|
stress |
applied stress level |
S |
non-overlapping geometry system |
opt |
control list for simulation of individual failure times |
param |
parameter list for generating individual failure times |
last.defect |
logical, |
CL |
optional, NULL (default), predefined clustered regions of objects |
We provide a wrapper function for simDefect
to simulate the proposed fatigue lifetime model including
the generation of individual failure times with additional information of the responsible accumulated defect projection
area (simply called defect area) which leads to the failure of the system. This information is returned in the following
list with elements: crack
the responsible defect itself, T
the individual failure times of objects aggregated
as a cluster of objects, ferrit
whether any secondary phase (here called ferrit
) is involved for overall failure,
interior
whether the defect occurs in the interior or at the boundaries of the simulation box. The optional
list argument CL
defines clustered regions, see simCluster
, of objects sticking together more close than
others. This is useful in case one also wishes to model densely lieing agglomerations of objects (i.e. clusters of particles or
fibers) as an obvious phenomenon of some specimen in mind. This list is made up of the following elements: id
, the id of
the region, center
the center point of the corresponding region, r
the radius (as the Euclidean distance from the
center point) which within all objects belong to this region, interior
whether any object within radius r
hits
the box boundaries of the simulation box.
a list made up of the following objects if last.defect=FALSE
(default):
fracture return value of simDefect
times return value of simTimes
cl_info additional cluster information of responsible defect cluster
otherwise only cl_info
is returned.
M. Baaske
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | ## Not run:
## Simulate a defect accumulation of a particle system
## primary particles (as prolate spheroids)
## and secondary phase (as spheres)
data(AL2MC_20p_k10_F2p_S)
## which is clustered and densified according to CL
## additional predefined clustered regions
data(AL2MC_20p_k10_F2p_CL)
## the box is stored together with the geometry system
box <- attr(S,"box")
## distTol=0.25, so use 25% of accumulation distance
opt <- list("vickers"=107, "distTol"=0.25, "Tmax"=10^12,
"inAreafactor"=1.56, "outAreafactor"=1.43,
"pointsConvHull"=10, "scale"=1e+06,"pl"=101)
## constants 'const' are set to the following internally
## and can partially be overwritten if needed
# const <- list("Em"=68.9,"Ef"=400,"nc"=28.2,"nu"=0.33,
# "pf"=0.138,"nE"=NULL,"sigref"=276,"Vref"=5891)
par <- list("P"=c(0.01,5,0.5,50,-11,3),
"F"=c(0,0,0,105,-12,1),"const"=NULL)
# stress amplitude applied
stress <- 110
## generate individual (particles') failure times
CLT <- simTimes(S,par,vickers=opt$vickers,stress=stress,cores=1L)
## generated random failure times
T <- unlist(sapply(CLT,`[[`,"T"))
V <- unlist(sapply(CLT,`[[`,"V"))
U <- unlist(sapply(CLT,`[[`,"U"))
dev.new()
showDensity(list("Debonding"=log10(V),"Fracture"=log10(U),"Failure time"=log10(T)),xlim=c(-2,15))
# Area max
(inA <- areaCrit(opt$vickers, stress=stress, factor=opt$inAreafactor, scale=opt$scale))
(outA <- areaCrit(opt$vickers, stress=stress, factor=opt$outAreafactor, scale=opt$scale))
## run accumulation
RET <- simDefect(stress,S,CLT,opt)
length(RET)
#### alternatively, includes simulating times by 'simTimes'
# SIM <- simFracture(stress,S,opt,par,last.defect=FALSE,CL=CL)
# SIM$cl_info
## some simple analysis of accumulation paths until failure,
## that is, while the critical area is exceeded
LR <- RET[[length(RET)]]
isInCluster <- any(unlist(lapply(CL,function(x,y)
any(y$id %in% x$id) , y=LR)))
cat("Broken cluster: ", isInCluster,"\t Ferrit: ",
any("F" %in% LR$label),"\t Acc.size",length(LR$id),"\n")
## select only clusters of size larger than 'msize'
msize <- 1
id <- sapply(RET,function(x) ifelse(length(x$id)>msize,TRUE,FALSE))
cat("Number of defect projections in last cluster: ",length(RET[[length(RET)]]$id),"\n")
## draw all accumulation paths until failure
dev.new()
L <- plotDefectAcc(RET,last.path=FALSE)
## draw last accumulation path until failure
dev.new()
L <- plotDefectAcc(RET,last.path=TRUE)
## 3D visualization of final defect projection area
#library(rgl)
#library(unfoldr)
#qid <- LR$id
#open3d()
#spheroids3d(S[qid],box=box, col=c("#0000FF","#00FF00","#FF0000","#FF00FF"))
#
### drawing only last cluster leading to failure
#drawDefectProjections(S,list(LR))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.