# create power curve
v <- seq(3, 25, 0.5)
p <- c(5, 15.5, 32, 52, 71, 98, 136, 182, 230, 285, 345, 419, 497, 594,
687, 760, 815, 860, 886, rep(900, 26))
cp <- c(0.263, NA, 0.352, NA, 0.423, NA, 0.453, NA, 0.470, NA, 0.478, NA,
0.480, NA, 0.483, NA, 0.470, NA, 0.429, NA, 0.381, NA, 0.329, NA, 0.281,
NA, 0.236, NA, 0.199, NA, 0.168, NA, 0.142, NA, 0.122, NA, 0.105, NA,
0.092, NA, 0.080, NA, 0.071, NA, 0.063)
ct <- c(0.653, NA, 0.698, NA, 0.705, NA, 0.713, NA, 0.720, NA, 0.723, NA,
0.724, NA, 0.727, NA, 0.730, NA, 0.732, NA, 0.385, NA, 0.301, NA, 0.242,
NA, 0.199, NA, 0.168, NA, 0.146, NA, 0.128, NA, 0.115, NA, 0.103, NA,
0.094, NA, 0.086, NA, 0.079, NA, 0.073)
my.pc <- createPC(v=v, p=p, cp=cp, ct=ct, rho=1.195, rated.p="900 kW")
# plot power curve with and without coefficients
plotPC(pc=my.pc)
plotPC(pc=my.pc, cp=FALSE, ct=FALSE)
# plot list of power curves
enercon.e82 <- readPC(file=system.file(package="bReeze", "powercurves",
"Enercon_E82_2.0MW.pow"))
gamesa.g83 <- readPC(file=system.file(package="bReeze", "powercurves",
"Gamesa_G83_2.0MW.pow"))
vestas.v80 <- readPC(file=system.file(package="bReeze", "powercurves",
"Vestas_V80_2.0MW.wtg"))
vestas.v90 <- readPC(file=system.file(package="bReeze", "powercurves",
"Vestas_V90_2.0MW.wtg"))
pc.2mw <- list(V80=vestas.v80, E82=enercon.e82, G83=gamesa.g83)
plotPC(pc.2mw, ct=FALSE)
plotPC(list(v80, v90))
# customize plot
plotPC(pc=my.pc, bty="u", bty.leg="o", cex.axis=0.8, cex.lab=0.9,
cex.leg=0.7, col=c("red", gray(0.4), gray(0.4)), col.axis=gray(0.2),
col.box=gray(0.5), col.lab=gray(0.2), col.leg=gray(0.2),
col.ticks=gray(0.5), las=2, leg.text=c("electric Power",
"power coefficient", "thrust coefficient"), lty=2:4, lwd=c(2,1,1),
mar=c(3.5,3.5,0.5,3.5), mgp=c(1.8,0.6,0), pos.leg="top",
xlab="velocity [m/s]", ylab=c("electric power", "coefficients"),
ylim=c(0,1100), x.intersp=1, y.intersp=1)
Run the code above in your browser using DataLab