Experiment - concrete column in an aggressive soil environment

p-y calculation

Gauss1D[x_,Tetax_]:=Exp[-Pi (x/Tetax)^2];(*scale function*)
kele[Ebet_,Ipile_,dl_]:=Ebet Ipile/dl^3 {{12,6 dl,-12,6 dl},{6 dl,4 dl^2,-6 dl,2 dl^2},{-12,-6 dl,12,-6 dl},{6 dl,2 dl^2,-6 dl,4 dl^2}};
PutToKglob[nr_,Ebet_,Ipile_,dl_]:=Table[Kglob[[2 nr-2+j,2 nr-2+i]]=Kglob[[2 nr-2+j,2 nr-2+i]]+kele[Ebet,Ipile,dl][[j,i]],{j,1,4},{i,1,4}];
Gp[Gsrf_(*Stifness on surface level*),z_(*depth*),k_(*parameter*),A_(*parametr*),sig_(*description rand*)]:=Gsrf+(A z)^k+sig los[[Round[z/dl+1]]] Gsrf;
kz[z_]:=Dpil Gp[Gsrf,z,k,Awz,sig];
pu[z_]:=((1+Sin[fric+Pi/180. los[[Round[z/dl+1]]]])/(1-Sin[fric+Pi/180. los[[Round[z/dl+1]]]]))^2 gamma z+10^-20;
p[z_,y_]:=A pu[z] Tanh[kz[z] y/A/pu[z]/Dpil];
N1[s_]:=1-3 s^2+2 s^3
N2[s_,L_]:=L (s-2 s^2+s^3)
N3[s_]:=3 s^2-2 s^3
N4[s_,L_]:=L (-s^2+s^3)
v[s_(*<0,1>*),L_,w1_,f1_,w2_,f2_]:={N1[s],N2[s,L],N3[s],N4[s,L]}.{w1,f1,w2,f2}
r[s_(*<0,1>*),L_,w1_,f1_,w2_,f2_]:={-6+12 s,L (-4+6 s),6-12 s,L (-2+6 s)}.{w1,f1,w2,f2}/L^2
M[s_(*<0,1>*),L_,w1_,f1_,w2_,f2_,Ebet_,Ipile_]:={-6+12 s,L (-4+6 s),6-12 s,L (-2+6 s)}.{w1,f1,w2,f2} Ebet Ipile/L^2
Q[s_(*<0,1>*),L_,w1_,f1_,w2_,f2_,Ebet_,Ipile_]:={-12,-6 L,12,-6 L}.{w1,f1,w2,f2} Ebet Ipile/L^3
Mel[s_,i_]:=M[s,dl,rozwf[[2 (i-1)+1]],rozwf[[2 (i-1)+2]],rozwf[[2 (i-1)+3]],rozwf[[2 (i-1)+4]],Ebet,If[((i) dl)≥zonecor,Ipilenor,Ipilecorr]]
Qel[s_,i_]:=Q[s,dl,rozwf[[2 (i-1)+1]],rozwf[[2 (i-1)+2]],rozwf[[2 (i-1)+3]],rozwf[[2 (i-1)+4]],Ebet,If[((i) dl)≥zonecor,Ipilenor,Ipilecorr]]
rel[s_,i_]:=r[s,dl,rozwf[[2 (i-1)+1]],rozwf[[2 (i-1)+2]],rozwf[[2 (i-1)+3]],rozwf[[2 (i-1)+4]]]
vel[s_,i_]:=v[s,dl,rozwf[[2 (i-1)+1]],rozwf[[2 (i-1)+2]],rozwf[[2 (i-1)+3]],rozwf[[2 (i-1)+4]]]
Mtot[x_]:=Mel[x/dl-Floor[(x)/dl],Floor[(x)/dl]+1]
Qtot[x_]:=Qel[x/dl-Floor[(x)/dl],Floor[(x)/dl]+1]
vtot[x_]:=vel[x/dl-Floor[(x)/dl],Floor[(x)/dl]+1]
rtot[x_]:=rel[x/dl-Floor[(x)/dl],Floor[(x)/dl]+1]

FORCE=50;(*force in head of column*)
zonecor=5;(*m zone corroded*)
Ebet=30 10^6(*kPa modulus of elasticity of column*);
Dpil=0.40;(*m diameter of column*)
Ipilenor=Pi (Dpil/2)^4/4;(*inertia of column (pure)*)
Gsrf=10000;
Awz=100;(*Awz*)
k=1.2;
Ltot=10;(*m length of column*);
ile=20;
fric=30 Pi/180.;gamma=20;A=1.;
sig=0.1;(*random parameter for substrate*)
dl=Ltot/ile;
rozmiarx=dl;(*element length*)
ilex=ile+2;(*number of elements*)
WspXMid=Table[rozmiarx (ix-1/2),{ix,1,ilex}];
TetaX=N[5 dl];
Cov[el1_,el2_,Tetax_]:=Gauss1D[WspXMid[[el1]]-WspXMid[[el2]],Tetax](*scale function*)
CovVector=Table[N[Cov[i,j,TetaX]],{i,1,ilex},{j,1,ilex}];
LCovDistans=CholeskyDecomposition[CovVector];

Monitor[
For[cor=0;MYMAX={},cor≤0.08,cor=cor+0.02,
For[zonecor=1,zonecor≤5,zonecor++,
Do[
Block[
{Ipilecorr=Pi (Dpil/2-cor)^4/4},los=RandomVariate[NormalDistribution[0,1],{ilex}].LCovDistans;
Kglob=Table[0,{i,1,ile*2+2},{j,1,ile*2+2}];
Table[PutToKglob[wezelek,Ebet,If[(wezelek dl)≥zonecor,Ipilenor,Ipilecorr],dl],{wezelek,1,ile}];
ufi=Table[w[i],{i,1,Length[Kglob]}];
iost=Length[Kglob];
ywst=Flatten[Table[{0.01,0},{i,1,iost,2}]];
FM=Flatten[Table[{-dl p[i dl/2,ywst[[i]]]/ywst[[i]] ufi[[i]],0},{i,1,iost,2}]];
FM[[1]]=FORCE+FM[[1]]/2;
FM[[Length[Kglob]-1]]=FM[[Length[Kglob]-1]]/2;
row=Table[(Kglob.ufi)[[i]]==FM[[i]],{i,1,Length[Kglob]}];
rez=NSolve[row,ufi,Reals,WorkingPrecision->5];
rozwf=Flatten[ufi/.rez];
ww=Table[Flatten[ufi/.rez][[i]],{i,1,Length[Kglob],2}];
fi=Table[Flatten[ufi/.rez][[i]],{i,2,Length[Kglob],2}];
FM=Flatten[Table[{-dl p[i dl/2,rozwf[[i]]]/rozwf[[i]] ufi[[i]],0},{i,1,iost,2}]];
FM[[1]]=FORCE+FM[[1]]/2;
FM[[Length[Kglob]-1]]=FM[[Length[Kglob]-1]]/2;
row=Table[(Kglob.ufi)[[i]]==FM[[i]],{i,1,Length[Kglob]}];
rez=NSolve[row,ufi,Reals,WorkingPrecision->5];
rozwf=Flatten[ufi/.rez];
ww=Table[Flatten[ufi/.rez][[i]],{i,1,Length[Kglob],2}];
fi=Table[Flatten[ufi/.rez][[i]],{i,2,Length[Kglob],2}];
FM=Flatten[Table[{-dl p[i dl/2,rozwf[[i]]]/rozwf[[i]] ufi[[i]],0},{i,1,iost,2}]];
FM[[1]]=FORCE+FM[[1]]/2;
FM[[Length[Kglob]-1]]=FM[[Length[Kglob]-1]]/2;
row=Table[(Kglob.ufi)[[i]]==FM[[i]],{i,1,Length[Kglob]}];
rez=NSolve[row,ufi,Reals,WorkingPrecision->5];
rozwf=Flatten[ufi/.rez];
ww=Table[Flatten[ufi/.rez][[i]],{i,1,Length[Kglob],2}];
fi=Table[Flatten[ufi/.rez][[i]],{i,2,Length[Kglob],2}];
MYMAX=Append[MYMAX,{cor,zonecor,vtot[0],Max[Table[Mtot[x],{x,0,Ltot-1,0.5}]] }]
],
{n,1,5000}]](*number of simulations*)
],
ProgressIndicator[Dynamic[n/5000]]]

Export["out.csv",MYMAX]

results of p-y method from out.dat

MYMAX=Import["out.csv"];

DY[cor_,depth_]:=Cases[MYMAX,{cor,depth,_,_}][[;;,3]]
DM[cor_,depth_]:=Cases[MYMAX,{cor,depth,_,_}][[;;,4]]

Histogram[Table[DY[0.02,h],{h,1,5}],{.0001}]

Histogram[Table[DY[0.08,h],{h,1,5}],{.0001}]

Histogram[Table[DY[cr,1],{cr,0.02,0.08,0.02}],{.0001}]

Histogram[Table[DY[cr,5],{cr,0.02,0.08,0.02}],{.0001}]

rezK={};rezPu={};
Do[
los=RandomVariate[NormalDistribution[0,1],{ilex}].LCovDistans;
AppendTo[rezK,Table[{z,kz[z]},{z,0,5,0.25}]];
AppendTo[rezPu,Table[{z,pu[z]},{z,0,5,0.25}]];
,{n,1,10}]
ListPlot[rezK,Joined->True]
Export["roz_Kz.eps",ListPlot[rezK,Joined->True]]
ListPlot[rezPu,Joined->True]
Export["roz_pu.eps",ListPlot[rezPu,Joined->True]]

sulphate front

Kor[DclMag_,Ctreshold_,Ampl_]:=
{
element=0.2;(*radius of column*)
dx=0.005;(*distance*)
Dcl=DclMag 3.09/1000000;
dt=1;(*time step*)
ilep=Round[element/dx] ;
C0=0;
F0=dt/(dx^2);
Cc=Table[C0,{i,1,ilep+2}];
period=50(*yrs*);
Cmax=Cc;
crack=0;
rez={};
alpha=2.017;
Do[
{Cc[[1]]=Ampl 0.5(Cos[t 2 Pi/365]+1);
Do[
Dclm=Dcl(element/(element-m dx+0.01));
Cc[[m]]=If[Cmax[[m]]>Ctreshold,alpha Dclm,Dclm] F0 (Cc[[m+1]]+Cc[[m-1]]-2 Cc[[m]])+Cc[[m]];
If[Cc[[m]]>Cmax[[m]],Cmax[[m]]=Cc[[m]]];
crack=If[Cmax[[m]]>Ctreshold,m dx,crack],
{m,2,ilep+1}]
};
AppendTo[rez,crack],
{t,0,period 365,dt}];
CorDep=Table[{i*5,rez[[i*365*5+1]]},{i,0,10}](*read in every 5 yrs*);
}

varB[x_]:=(1/8) (-4+1/x^2)(*var 0.25*)
Losowanie[ile_,var_,min_,max_]:=RandomVariate[BetaDistribution[varB[var],varB[var]],ile] (max-min)+min
ile=3000;
var=0.15;
DclMag=Losowanie[ile,var,0.1,0.5](*property*);
Ctreshold=Losowanie[ile,var,0.30,0.60](*treshold*);
Ampl=Losowanie[ile,var,1.0,4.0](*ions concentr*);
LosStrefa=Losowanie[ile,var,0,5](*attaced zone [m] *);

R=
Monitor[
REZ={};
Table[
Kor[DclMag[[i]],Ctreshold[[i]],Ampl[[i]]];
AppendTo[REZ,CorDep],
{i,1,ile}],
Row[{ProgressIndicator[i,{1,ile}],i}," "]];

ListPlot[REZ[[100;;200]],Joined->True]

Export["rez_korozja.eps",ListPlot[REZ[[1;;200]],Joined->True]]

Export["rozwiazania_korozji.csv",REZ]

REZLatami=Table[REZ[[1;;Length[REZ],rok/5,2]],{rok,5,50,5}];

Histogram[{REZLatami[[4]],REZLatami[[6]],REZLatami[[8]],REZLatami[[10]]}](*20lat,30, 40, 50lat*)

Export["rez_prob_kor.eps",Histogram[{REZLatami[[4]],REZLatami[[6]],REZLatami[[8]],REZLatami[[10]]}]]

Histogram[REZ[[;;,10]],{.1}]

rozklady=Table[{i*5, {μ, σ} /. FindDistributionParameters[REZLatami[[i]], LogNormalDistribution[μ, σ]]}, {i, 3, Length[[WynYOM]REZLatami]}]

(*KLUCZOWE*)

rozklady={
{15,{-3.8394181802092033`,0.22999970331122815`}},
{20,{-3.6401019962378536`,0.2365538283025691`}},
{25,{-3.4933529717104768`,0.23746137576420753`}},
{30,{-3.3796401344260483`,0.24266088384078896`}},
{35,{-3.2846885987235366`,0.24632284420082876`}},
{40,{-3.202336829706916`,0.24848943498550727`}},
{45,{-3.1331625817957685`,0.2543134333243087`}},
{50,{-3.0665446998495223`,0.254817994035441`}}}

rozklady[[1,2,1]]

Plot[Table[PDF[LogNormalDistribution[rozklady[[i,2,1]],rozklady[[i,2,2]]],x],{i,1,7}],{x,0,0.1},PlotRange->All,Filling->Bottom]

wyniki dopasowania dla kolejnych pięciolatek poczynając od 15, 20, 25, 30 .. 50

Export["rez_prob_kor_lognormal.eps",Plot[Table[PDF[LogNormalDistribution[rozklady[[i,2,1]],rozklady[[i,2,2]]],x],{i,1,7}],{x,0,0.1},PlotRange->All,Filling->Bottom]]

Export["rez_prob_kor_lognormal30lat.eps",Plot[PDF[LogNormalDistribution[rozklady[[3,2,1]],rozklady[[3,2,2]]],x],{x,0,0.1},PlotRange->All,Filling->Bottom]]

Export["rez_prob_kor_lognormal50lat.eps",Plot[PDF[LogNormalDistribution[rozklady[[7,2,1]],rozklady[[7,2,2]]],x],{x,0,0.1},PlotRange->All,Filling->Bottom]]

analisys

rezdopasowania=Table[
Table[{cr,h,μ, σ}/.
FindDistributionParameters[DY[cr,h], LogNormalDistribution[μ, σ]],
{cr,0.02,0.08,0.02}],
{h,1,5,1}]

Export["5m.eps",
Show[
Histogram[{DY[0.02,5],DY[0.04,5],DY[0.06,5],DY[0.08,5]},{0.0001},"PDF"],
Plot[
{PDF[LogNormalDistribution[-5.1007353617279545`,0.07278890747812172`],x],
PDF[LogNormalDistribution[-4.951193361416223`,0.07372524398900229`],x],
PDF[LogNormalDistribution[-4.7693102321930185`,0.0766478806269529`],x],
PDF[LogNormalDistribution[-4.545583230972011`,0.07959733781869058`],x]},
{x,0,0.015},PlotRange->All,PlotStyle->Thick]
]]

Export["1m.eps",
Show[
Histogram[{DY[0.02,1],DY[0.04,1],DY[0.06,1],DY[0.08,1]},{0.0001},"PDF"],
Plot[
{PDF[LogNormalDistribution[-5.226198210264447`,0.06973229408779939`],x],
PDF[LogNormalDistribution[-5.219485326069791`,0.06917297209037444`],x],
PDF[LogNormalDistribution[-5.206531699753524`,0.06824359523678832`],x],
PDF[LogNormalDistribution[-5.180196296365432`,0.0685057747497439`],x]},
{x,0,0.015},PlotRange->All,PlotStyle->Thick]
]]

multiplication of probability

data 1

rozkladyKOR={
{15,-3.8394181802092033`,0.22999970331122815`},
{20,-3.6401019962378536`,0.2365538283025691`},
{25,-3.4933529717104768`,0.23746137576420753`},
{30,-3.3796401344260483`,0.24266088384078896`},
{35,-3.2846885987235366`,0.24632284420082876`},
{40,-3.202336829706916`,0.24848943498550727`},
{45,-3.1331625817957685`,0.2543134333243087`},
{50,-3.0665446998495223`,0.254817994035441`}};

rozkladyMECH={
{0.02`,1,-5.226198210264447`,0.06973229408779939`},{0.04`,1,-5.219485326069791`,0.06917297209037444`},{0.06`,1,-5.206531699753524`,0.06824359523678832`},{0.08`,1,-5.180196296365432`,0.0685057747497439`},{0.02`,2,-5.176347780474413`,0.07039388522124598`},{0.04`,2,-5.094076261655867`,0.06764295279240555`},{0.06`,2,-4.958511334395738`,0.06719003797685816`},{0.08`,2,-4.73994447165115`,0.06766802698386734`},{0.02`,3,-5.1245106919727474`,0.07112532928100367`},{0.04`,3,-4.984561544044052`,0.07121901779533808`},{0.06`,3,-4.795311898135812`,0.07260655046075556`},{0.08`,3,-4.555732018885752`,0.0787569276319436`},{0.02`,4,-5.104634014949098`,0.07297987612364099`},{0.04`,4,-4.953630475956158`,0.07353277451394861`},{0.06`,4,-4.768536979814507`,0.07697486847998744`},{0.08`,4,-4.546958897527682`,0.08124255804565737`},{0.02`,5,-5.1007353617279545`,0.07278890747812172`},{0.04`,5,-4.951193361416223`,0.07372524398900229`},{0.06`,5,-4.7693102321930185`,0.0766478806269529`},{0.08`,5,-4.545583230972011`,0.07959733781869058`}};

data 2

data0=rozkladyMECH[[;;,1;;3]]

nlm1=NonlinearModelFit[data0,a1 x^2+a2 x +a3 x y + a4 y^2+a5 y + a6,{a1,a2,a3,a4,a5,a6},{x,y}];
Normal[nlm1]

miu[x_,y_]:=-5.455825287262648`-3.516229928687693` x+50.038517330500675` (x^2)+0.22181858766002857` y+1.903052150815703` x y-0.03813562348256178` (y^2)

(* dopasowanie odchylen dla palowania*)
(* x- glebokosc korozji, y - strefa skorodowana na dlugosci pala*)
data1=Table[ Append[rozkladyMECH[[k,1;;2]],rozkladyMECH[[k,4]]],{k,1,Length[rozkladyMECH]-1}]

nlm2=NonlinearModelFit[data1,a1 x^2+a2 x +a3 x y + a4 y^2+a5 y + a6,{a1,a2,a3,a4,a5,a6},{x,y}];
Normal[nlm2]

sigma[x_,y_]:=0.07638430061650064` -0.3693860381125798` x+2.6206460683179795` (x^2)-0.0009006507373644527` y+0.061777612419016525` x y+0.000036565568816691157` (y^2)

prawdDISP[d_(*0.02 ... 0.08m*),c_(*1..5m*),lim_(*m*)]:=-InverseCDF[NormalDistribution[0,1],1-CDF[LogNormalDistribution[miu[d,c],sigma[d,c]],lim]]

Export["beta.eps",Show[Plot3D[prawdDISP[cr,h,0.008],{cr,0.02,0.08},{h,2,5},ColorFunction->"RustTones",BoundaryStyle->Thick,RegionFunction->Function[{cr,h,z},z≥0],Filling->Bottom,Mesh->10],
Plot3D[prawdDISP[cr,h,0.01],{cr,0.02,0.08},{h,2,5},ColorFunction->"RustTones"],
Plot3D[prawdDISP[cr,h,0.012],{cr,0.02,0.08},{h,2,5},ColorFunction->"RustTones"]]
]

prawdDISPA[d_(*0.02 ... 0.08m*),c_(*1..5m*),lim_(*m*)]:=1-CDF[LogNormalDistribution[miu[d,c],sigma[d,c]],lim]

fitting

data0=rozkladyKOR[[;;,1;;2]]

nlm1=NonlinearModelFit[data0,a1 x^2+a2 x+a3,{a1,a2,a3},{x}]

Normal[nlm1]

miuK[x_]:=-4.445378010309725`+0.04762787438412194` x-0.0004062599210582354` (x^2)

rozkladyKOR[[1,1;;3]]

data1=Table[ {rozkladyKOR[[k,1]],rozkladyKOR[[k,3]]},{k,1,Length[rozkladyKOR]-1}]

nlm2=NonlinearModelFit[data1,a1 x^2+a2 x+a3,{a1,a2,a3},{x}]
Normal[nlm2]

sigmaK[x_]:=0.21944895196456424` +0.0007671137154575651` x-2.050057526571628`*^-7 (x^2)

final calculation

As[lim_]:=Table[prawdDISPA[k,5,lim],{k,0.02,0.08,0.01}]

B=
Table[
Table[
1-CDF[LogNormalDistribution[miuK[t],sigmaK[t]],rysa],
{rysa,0.02,0.08,0.01}],
{t,15,50,1}];

(*kolumny 0.02  0.03  0.04 ... 0.08m*)

(*wiersze czas*)

ABrez=Table[Max[As[0.01]*B[[i]]],{i,1,Length[B]}]

RRREEEZZZ=-InverseCDF[NormalDistribution[0,1],ABrez]

REZ[lim_]:=Table[{i+14,-InverseCDF[NormalDistribution[0,1],Table[Max[As[lim]*B[[i]]],{i,1,Length[B]}]][[i]]},{i,1,36}]

REZ[0.008]
REZ[0.01]
REZ[0.012]

Export["rrrezzz.eps",ListPlot[{REZ[0.006],REZ[0.008],REZ[0.010],REZ[0.012],REZ[0.014]},Joined->True,PlotRange->{All,{0,5}}]]