woehler: Woehler experiment

Description Usage Arguments Details Value Author(s) Examples

Description

Simulate a Woehler experiment

Usage

1
2
woehler(S, CL, param, opt, stress, cores = getOption("simLife.mc", 1L),
  cl = NULL)

Arguments

S

non-overlapping object system

CL

predefined clustered regions of objects, see simFracture

param

parameter list for random generation of individual failure times

opt

control parameters, see simTimes

stress

list of stress levels

cores

optional, number of cores for mulicore parallization with cores=1L (default) by mclapply which also can be set by a global option "simLife.mc"

cl

optional, cluster environment object wich has priority of usage compared to multicore processing in case of cores>1

Details

As done in a real life scenario the Woehler diagram measures the applied stress amplitude versus number of cycles to failure. For each given stress level the function is intended to be an all-in-one wrapper function for fatigue lifetime model simulations for different stress levels which returns a matrix of failure times where each row corresponds to one stress level. The Woehler experiments can be simulated in parallel based on using the package snow possibly together with Rmpi for an MPI cluster object.

Value

matrix of failure times, first colunm corresponds to the times and the second to the stress level

Author(s)

M. Baaske

Examples

 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
## Not run: 

## Unless MS-Windows
# library(parallel)
# options(simLife.mc=2L)

# primary particles and secondary phase (ferrit) 
# which is already clustered and densified 
data(AL2MC_20p_k10_F2p_S)	

# simulation parameters 
opt <- list("vickers"=107,"distTol"=1.0,"Tmax"=10^11,
			"inAreafactor"=1.56, "outAreafactor"=1.43,
			"pointsConvHull"=10, "scale"=1e+06,"pl"=1L)

# lifetimes parameters
par <- list("P"=c(0.01,6,0.5,75,-15,1.5),
			"F"=c(0,0,0,105,-12,1),
			"const"=NULL)
	
nsim <- 10
stress <- as.list(seq(from=90,to=140,by=10))

cl <- NULL
## MPI/SOCKS/PSOCKS cluster object (even on Windows)
## must initialize RNG stream (rlecuyer) for reproducible results
# RNGkind("L'Ecuyer-CMRG")
# cl <- makeCluster(8)
# clusterSetRNGStream(cl)
	
# the following code may take some time
W <- woehler(S, CL=NULL, par, opt, stress=rep(stress,each=nsim),cores=1L,cl=cl)
woehlerDiagram(W, yrange=c(70,145))

## do not forget to stop cluster if used 
if(!is.null(cl)) stopCluster(cl)	

## End(Not run)

simLife documentation built on May 2, 2019, 6:36 a.m.