c This is a program for calculating contact anglec from QCM frequency changec Newton-Raphson Methodc Input constant C, frequency change f, and initial guess10 print *,'Delta f= ?' Read (*,*)f print *,'# of drops=' read (*,*)n print *,'C=?' read (*,*)C print *,'Initail guess of contact angle=?(degree)' read (*,*)theta x=cos(theta/180.*3.1415926)c Interation100 fx1=f/C*(3.1415926)**(2./3.)*(2-3*x+x**3)**(2./3) fx2=(3*2.*n)**(2./3)*(1-x*x) fx=fx1-fx2 dfx1=2*f/C*(3.1415926)**(2/3.)*(2.-3*x+x*x*x)**(-1./3)*(x*x-1) dfx2=(3*2.*n)**(2/3.)*2.*x dfx=dfx1+dfx2 x1=x x=x-fx/dfx iter=iter+1 print *,iter,fxc converge criteria error=abs(x1-x) if (error.gt.1e-6) goto 100c Output of results theta = acos (x)/3.1415926*180 write(*,*)theta c Determination of another run print *,'Another run?(yes=1,no=0)' read *,run if (run.eq.1) goto 10 end