clamped=Function[{a0,Lr,α},{
r0=1.0;
l=Lr*r0;
rm=3*l;
lm=2*l;
nd=2;

μ0=10000;

m=0;
ν=0.3;
μ[z_]=μ0+m*z;
λ[z_]=2*ν*μ[z]/(1-2*ν);
λμ=2*ν/(1-2*ν);
ρs=0.7*20000;
ρp=20000;
ω=a0*(Sqrt[μ[l]/ρs])/r0;
P0=10000;
M0=0;

Ip=π/4*r0^4;

γ1new=0.3;
γ1old=0.001;
γ4new=0.3;
γ4old=0.001;
Ep=1000*μ[l]*2*(1+ν);
μ0=10000*(1+0.0I);
m=0;
μ[z_]=μ0+m*z;
λ[z_]=2*ν*μ[z]/(1-2*ν);
While[Abs[(γ1old-γ1new)/γ1old]>0.001&&Abs[(γ4old-γ4new)/γ4old]>0.001,
γ1=γ1new;
γ2=(λμ+1)/(λμ+2);
γ3=(λμ+3)/(λμ+2);
γ4=γ4new;
γ5=(λμ+1);
γ6=(λμ+3);

sq=10;
While[sq>0,
s=First[NDSolve[{r*ϕ1''[r]+ϕ1'[r]-(γ1/r0)^2*r*ϕ1[r]-γ2*ϕ2'[r]-γ3*(ϕ1[r]-ϕ2[r])/r==0,r*ϕ2''[r]+ϕ2'[r]-(γ4/r0)^2*r*ϕ2[r]+γ5*ϕ1'[r]+γ6*(ϕ1[r]-ϕ2[r])/r==0,ϕ1[r0]==1,ϕ2[r0]==1,ϕ1[rm]==0,ϕ2[rm]==0},{ϕ1,ϕ2},{r,r0,rm},MaxSteps->∞,MaxStepFraction->1/100,Method->{"ExplicitRungeKutta", "DifferenceOrder"->9}, InterpolationOrder->All]];

If[Abs[(ϕ1[rm]/.s) ]>0.0001||  Abs[(ϕ2[rm]/.s) ]>0.0001 ,rm=rm*0.8;sq=1,sq=0]];

m1=π*ρs*Integrate[(((ϕ1[r]/.s)^2+(ϕ2[r]/.s)^2)*r),{r,r0,rm},Assumptions->r0>0]+π*r0^2*ρp//N;

c=Pi*Integrate[((ϕ1[r]/.s)^2+(ϕ2[r]/.s)^2)*r,{r,r0,rm},Assumptions->r0>0]//N;

k=π*(λμ+2)*Integrate[(((∂_r) (ϕ1[r]/.s))^2*r),{r,r0,rm},Assumptions->r0>0]+π*(λμ+3)*Integrate[r*(((( ϕ1[r]- ϕ2[r])/r))^2)/.s,{r,r0,rm},Assumptions->r0>0]+
π*Integrate[(((∂_r)( ϕ2[r]/.s))^2*r),{r,r0,rm},Assumptions->r0>0]+2*π*(λμ)*Integrate[((ϕ1[r]- ϕ2[r])*(∂_r) ϕ1[r])/.s,{r,r0,rm},Assumptions->r0>0]+2*π*Integrate[((ϕ1[r]- ϕ2[r])*(∂_r) ϕ2[r])/.s,{r,r0,rm},Assumptions->r0>0]//N;

m2=π*r0^2*ρs+π*ρs*Integrate[(((ϕ1[r]/.s)^2+(ϕ2[r]/.s)^2)*r),{r,r0,rm},Assumptions->r0>0]//N;

cs=Pi*Integrate[(((ϕ1[r]/.s)^2+(ϕ2[r]/.s)^2)*r),{r,r0,rm},Assumptions->r0>0]+π*r0^2//N;

χ1=(Sqrt[((c μ0)/(2 Ep Ip))+((Sqrt[-4 Ep Ip k μ0+(c^2) ((μ0)^2)+4 Ep Ip m1 (ω^2)])/(2 Ep Ip))]);
χ2=(Sqrt[((c μ0)/(2 Ep Ip))-((Sqrt[-4 Ep Ip k μ0+(c^2) ((μ0)^2)+4 Ep Ip m1 (ω^2)])/(2 Ep Ip))]);

u[z_]=((E^(-z (χ1+χ2))) (c M0 μ0 ((E^(z (χ1+2 χ2))) χ1 (χ1-χ2)+(E^(z χ1+2 l (χ1+χ2))) χ1 (χ1-χ2)+2 (E^(z χ1+l (χ1+χ2))) χ1 χ2+2 (E^(z χ2+l (χ1+χ2))) χ1 χ2+2 (E^(l (χ1+χ2)+z (2 χ1+χ2))) χ1 χ2+2 (E^(l (χ1+χ2)+z (χ1+2 χ2))) χ1 χ2-(E^(z (2 χ1+χ2))) (χ1-χ2) χ2+(E^(z χ2+2 l (χ1+χ2))) χ2 (-χ1+χ2)-(E^(z χ1+2 l χ2)) χ1 (χ1+χ2)-(E^(2 l χ1+z χ1+2 z χ2)) χ1 (χ1+χ2)-(E^(2 l χ1+z χ2)) χ2 (χ1+χ2)-(E^(2 z χ1+2 l χ2+z χ2)) χ2 (χ1+χ2))+Ep Ip (-(E^(z χ1+2 l (χ1+χ2))) ((χ1)^2) (-P0+M0 χ1) (χ1-χ2)-(E^(z (χ1+2 χ2))) ((χ1)^2) (P0+M0 χ1) (χ1-χ2)-2 (E^(l (χ1+χ2)+z (2 χ1+χ2))) ((χ1)^2) (-P0+M0 χ1) χ2-2 (E^(z χ2+l (χ1+χ2))) ((χ1)^2) (P0+M0 χ1) χ2+(E^(2 l χ1+z χ1+2 z χ2)) ((χ1)^2) (-P0+M0 χ1) (χ1+χ2)+(E^(z χ1+2 l χ2)) ((χ1)^2) (P0+M0 χ1) (χ1+χ2)-2 (E^(l (χ1+χ2)+z (χ1+2 χ2))) χ1 ((χ2)^2) (-P0+M0 χ2)-(E^(z χ2+2 l (χ1+χ2))) ((χ2)^2) (-χ1+χ2) (-P0+M0 χ2)+(E^(2 z χ1+2 l χ2+z χ2)) ((χ2)^2) (χ1+χ2) (-P0+M0 χ2)-2 (E^(z χ1+l (χ1+χ2))) χ1 ((χ2)^2) (P0+M0 χ2)+(E^(z (2 χ1+χ2))) (χ1-χ2) ((χ2)^2) (P0+M0 χ2)+(E^(2 l χ1+z χ2)) ((χ2)^2) (χ1+χ2) (P0+M0 χ2))))/(Ep Ip χ1 χ2 (c μ0 ((1+(E^(2 l χ1))+(E^(2 l χ2))-4 (E^(l (χ1+χ2)))+(E^(2 l (χ1+χ2)))) ((χ1)^2)-2 (-1+(E^(2 l χ1))) (-1+(E^(2 l χ2))) χ1 χ2+(1+(E^(2 l χ1))+(E^(2 l χ2))-4 (E^(l (χ1+χ2)))+(E^(2 l (χ1+χ2)))) ((χ2)^2))+Ep Ip (χ1 (((χ1-χ2))^2) χ2+(E^(2 l (χ1+χ2))) χ1 (((χ1-χ2))^2) χ2-(E^(2 l χ1)) χ1 χ2 (((χ1+χ2))^2)-(E^(2 l χ2)) χ1 χ2 (((χ1+χ2))^2)+4 (E^(l (χ1+χ2))) (((χ1)^4)+((χ2)^4)))));

u2[z_]=0;
du2[z_]=0;

n1=Integrate[μ[z]*((∂_z) (u[z]))^2,{z,0,l}]+
Sum[μ[l+lm/nd*j-lm/nd/2]*(du2[l+lm/nd*j-lm/nd/2])^2*lm/nd,{j,1,nd}]//N;

n2=Integrate[ρs*ω^2*(u[z])^2,{z,0,l}]+Sum[ρs*ω^2*(u2[l+lm/nd*j-lm/nd/2])^2*lm/nd,{j,1,nd}]//N;

n3=Integrate[(λ[z]+2*μ[z])*(u[z])^2,{z,0,l}]+
Sum[(λ[l+lm/nd*j-lm/nd/2]+2*μ[l+lm/nd*j-lm/nd/2])*(u2[l+lm/nd*j-lm/nd/2])^2*lm/nd,{j,1,nd}]//N;
n4=n3/((λμ+2));
;
;
γ1new=(Sqrt[(n1+n2)/n3*r0^2]);
γ4new=(Sqrt[(n1+n2)/n4*r0^2]);
γ1old=γ1;
γ4old=γ4;
];

umax=u[0]}];

count=40;
For[i=0,i<(count+20),i++,f2=clamped[i*1/count,20,1.0];uamp[i]=f2[[1]];Print[i,"   ",uamp[i]]]

ListPlot[Table[Abs[uamp[i]],{i,0,count}],Joined->True, PlotRange->All]