Last active
March 28, 2020 23:32
-
-
Save flare9x/1104baedf248c07595bfa460de32183c to your computer and use it in GitHub Desktop.
run in conjunction with FCAml iteration julia language
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = read.csv("C:/Users/Andrew.Bannerman/Desktop/MARS/15. PoC/3.24/PS_out_FCA.csv", header=T, stringsAsFactors = F) | |
FCAml = as.numeric(as.vector(data[6,2:length(data)])) | |
Rt = as.numeric(as.vector(data[9,2:length(data)])) | |
MAWPr = round(as.numeric(as.vector(data[18,2:length(data)])),digits=0) | |
MAWPr_P_intersection = ifelse(MAWPr > P,1,0) | |
df = data.frame(FCAml,Rt,MAWPr,MAWPr_P_intersection) | |
for (i in 2:length(MAWPr_P_intersection)) { | |
if (MAWPr_P_intersection[i] == 0 & MAWPr_P_intersection[i-1] == 1) { | |
index = i-1 | |
} | |
} | |
head(df,1000) | |
P = data[19,2] | |
plot(FCAml,MAWPr,xlab="FCAml",ylab="MAWPr", col = ifelse(MAWPr > P,'green','red'), pch = 19, main="Maximum FCAml @ Design P - PF-1007 - PS-2" ,xaxt='n',yaxt='n',type="b") | |
text(df[index,1]+.075, P+50, labels = paste("FCAml MAX =",df[index,1])) | |
text(0.04, P-75, labels = paste("Design P =",P)) | |
axis(1,at=seq(min(FCAml),max(FCAml),.01),las=2) | |
axis(2,at=seq(min(MAWPr),max(MAWPr),100),las=2) | |
abline(h=P,col="red") | |
abline(v=df[index,1],col="red") | |
head(df,975) | |
# MRWT sensitivty | |
data = read.csv("C:/Users/Andrew.Bannerman/Desktop/MARS/15. PoC/3.24/mawpr_thickness_sensitivty.csv", header=T, stringsAsFactors = F) | |
FCAml = as.numeric(as.vector(data[6,2:length(data)])) | |
MAWPr = round(as.numeric(as.vector(data[18,2:length(data)])),digits=0) | |
x = read.csv("C:/Users/Andrew.Bannerman/Desktop/MARS/15. PoC/3.24/x_out.csv", header=T, stringsAsFactors = F) | |
x = x$x1 | |
perc = read.csv("C:/Users/Andrew.Bannerman/Desktop/MARS/15. PoC/3.24/perc_out.csv", header=T, stringsAsFactors = F) | |
perc = perc$x1 | |
# find intersection | |
MAWPr_P_intersection = ifelse(MAWPr > P,1,0) | |
for (i in 2:length(MAWPr_P_intersection)) { | |
if (MAWPr_P_intersection[i] == 1 & MAWPr_P_intersection[i-1] == 0) { | |
index = i | |
} | |
} | |
df = data.frame(x,perc,MAWPr,MAWPr_P_intersection) | |
plot(perc,MAWPr,xlab="% From As Found Minimum Remaining WT",ylab="MAWPr", col = ifelse(MAWPr > P,'green','red'), pch = 19, main="Remaining WT Sensitivity - PS-2 - PF-1007" ,xaxt='n',yaxt='n') | |
axis(1,at=seq(round(min(perc),digits=2),round(max(perc),digits=2),5),las=2) | |
axis(2,at=seq(min(MAWPr),max(MAWPr),50),las=2) | |
abline(h=P,col="red") | |
abline(v=df[index,2],col="red") | |
text(df[index,2]+15, P+30, labels = paste("% Deviation To Design P =",paste(round(df[index,2],digits=4)),"%")) | |
text(df[index,1]+5, P+65, labels = paste("Remaining WT at Design P =",round(df[index,1],digits=3))) | |
text(8.0, P-75, labels = paste("Design P =",P)) | |
round(df[index,2],digits=3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment