function f input Real t "Time"; input Real force "force"; input Real m " linear mass of the material"; input Real length "length of the beam"; input Real EE "young's modulus of the material"; input Real JJ "area moment of inertia"; input Real beta1L = 1.875 "first root of the function cos(betaL)cosh(betaL)+1=0"; input Real beta2L = 4.694 "second root of the function cos(betaL)cosh(betaL)+1=0"; input Real beta3L = 7.855 "third root of the function cos(betaL)cosh(betaL)+1=0"; input Real beta4L = 10.955 "fourth root of the function cos(betaL)cosh(betaL)+1=0"; input Real beta5L = 14.1371 "fifth root of the function cos(betaL)cosh(betaL)+1=0"; input Real beta6L = 17.2787 "sixth root of the function cos(betaL)cosh(betaL)+1=0"; input Real beta1 = beta1L/length "first beta"; input Real beta2 = beta2L/length "second beta"; input Real beta3 = beta3L/length "third beta"; input Real beta4 = beta4L/length "fourth beta"; input Real beta5 = beta5L/length "fifth beta"; input Real beta6 = beta6L/length "sixth beta"; input SIunits.PerUnit A1 = 4*force*length/(EE*JJ*(m/length)*beta1^4*(sin(beta1L)*exp(beta1L) + exp(2*beta1L) - 1))*(3*sin(beta1L)*(exp(2*beta1L) + 1) - 2*beta1L^3*exp(beta1L) + cos(beta1L)*(3 - beta1L^3*(exp(2*beta1L) + 1) - 3*exp(2*beta1L))) "amplitude of first cos function"; input SIunits.PerUnit A2 = 4*force*length/(EE*JJ*(m/length)*beta2^4*(sin(beta2L)*exp(beta2L) + exp(2*beta2L) - 1))*(3*sin(beta2L)*(exp(2*beta2L) + 1) - 2*beta2L^3*exp(beta2L) + cos(beta2L)*(3 - beta2L^3*(exp(2*beta2L) + 1) - 3*exp(2*beta2L))) "amplitude of second cos function"; input SIunits.PerUnit A3 = 4*force*length/(EE*JJ*(m/length)*beta3^4*(sin(beta3L)*exp(beta3L) + exp(2*beta3L) - 1))*(3*sin(beta3L)*(exp(2*beta3L) + 1) - 2*beta3L^3*exp(beta3L) + cos(beta3L)*(3 - beta3L^3*(exp(2*beta3L) + 1) - 3*exp(2*beta3L))) "amplitude of third function"; input SIunits.PerUnit A4 = 4*force*length/(EE*JJ*(m/length)*beta4^4*(sin(beta4L)*exp(beta4L) + exp(2*beta4L) - 1))*(3*sin(beta4L)*(exp(2*beta4L) + 1) - 2*beta4L^3*exp(beta4L) + cos(beta4L)*(3 - beta4L^3*(exp(2*beta4L) + 1) - 3*exp(2*beta4L))) "amplitude of fourth function"; input SIunits.PerUnit A5 = 4*force*length/(EE*JJ*(m/length)*beta5^4*(sin(beta5L)*exp(beta5L) + exp(2*beta5L) - 1))*(3*sin(beta5L)*(exp(2*beta5L) + 1) - 2*beta5L^3*exp(beta5L) + cos(beta5L)*(3 - beta5L^3*(exp(2*beta5L) + 1) - 3*exp(2*beta5L))) "amplitude of fifth cos function"; input SIunits.PerUnit A6 = 4*force*length/(EE*JJ*(m/length)*beta6^4*(sin(beta6L)*exp(beta6L) + exp(2*beta6L) - 1))*(3*sin(beta6L)*(exp(2*beta6L) + 1) - 2*beta6L^3*exp(beta6L) + cos(beta6L)*(3 - beta6L^3*(exp(2*beta6L) + 1) - 3*exp(2*beta6L))) "amplitude of sixth cos function"; input SIunits.Length x = length "a distance between 0 and length L of the beam"; input SIunits.AngularFrequency wk1 = (EE*JJ/m)^(1/2)*beta1^2 "1st natural frequency"; input SIunits.AngularFrequency wk2 = (EE*JJ/m)^(1/2)*beta2^2 "2nd natural frequency"; input SIunits.AngularFrequency wk3 = (EE*JJ/m)^(1/2)*beta3^2 "3rd natural frequency"; input SIunits.AngularFrequency wk4 = (EE*JJ/m)^(1/2)*beta4^2 "4th natural frequency"; input SIunits.AngularFrequency wk5 = (EE*JJ/m)^(1/2)*beta5^2 "5th natural frequency"; input SIunits.AngularFrequency wk6 = (EE*JJ/m)^(1/2)*beta6^2 "6th natural frequency"; input Real shape1 = A1/2*((-cosh(beta1*x)) + cos(beta1*x) + ((-cos(beta1L)) - cosh(beta1L))*(sin(beta1*x) - sinh(beta1*x))/(sin(beta1L) - sinh(beta1L))); input Real shape2 = A2/2*((-cosh(beta2*x)) + cos(beta2*x) + ((-cos(beta2L)) - cosh(beta2L))*(sin(beta2*x) - sinh(beta2*x))/(sin(beta2L) - sinh(beta2L))); input Real shape3 = A3/2*((-cosh(beta3*x)) + cos(beta3*x) + ((-cos(beta3L)) - cosh(beta3L))*(sin(beta3*x) - sinh(beta3*x))/(sin(beta3L) - sinh(beta3L))); input Real shape4 = A4/2*((-cosh(beta4*x)) + cos(beta4*x) + ((-cos(beta4L)) - cosh(beta4L))*(sin(beta4*x) - sinh(beta4*x))/(sin(beta4L) - sinh(beta4L))); input Real shape5 = A5/2*((-cosh(beta5*x)) + cos(beta5*x) + ((-cos(beta5L)) - cosh(beta5L))*(sin(beta5*x) - sinh(beta5*x))/(sin(beta5L) - sinh(beta5L))); input Real shape6 = A6/2*((-cosh(beta6*x)) + cos(beta6*x) + ((-cos(beta6L)) - cosh(beta6L))*(sin(beta6*x) - sinh(beta6*x))/(sin(beta6L) - sinh(beta6L))); output Real w; end f;