Anda di halaman 1dari 9

Proceedings of the 6th IMT-GT Conference on Mathematics, Statistics and its Applications (ICMSA2010) Universiti Tunku Abdul Rahman,

Kuala Lumpur, Malaysia

843

A Numerical Study of Ships Rolling Motion


Liew How Hui and Pan Yean Fong
Faculty of Engineering and Science, Department of Mathematical and Actuarial Sciences, Universiti Tunku Abdul Rahman, Kuala Lumpur Campus, Jalan Genting Kelang, 53300 Kuala Lumpur, Malaysia liewhh@utar.edu.my, yean pyf@yahoo.com Homepage: http://sites.google.com/site/liewhowhui

Abstract. The rolling motion of a ship can be modelled by a second order ordinary dierential equation with the oscillation of sea waves as the parameter. An analytical study of the ship model lead to a system of algebraic equations which demonstrated period doubling bifurcation and jump phenomena. To study the system of algebraic equations, numerical continuation method is used. It is compared to the simulation result when the frequency changes. During the numerical analysis of the ship model, sensitivity of numerical integrator, the simulation results matched the theoretical calculated resonant curves except for the period doubling region.

Introduction

Rolling motion has been considered since long time the motion relevant to the hydrodynamic part of the ship safety [8]. Rolling motions of a ship not only cause dangers (e.g. ship capsizing) to ships but can also cause damages to ship containers, as demonstrated in [7]. Grochowalski [9] pointed out that ... at present, neither model testing nor pure theoretical modelling alone could provide a reliable prediction of strongly non-linear and transient phenomena involved in ship capsizing. Instead, a combination of theoretical modelling with model experiments proved to be a very powerful and eective approach in studies of this kind of problems. The most accurate model that describes the motions of a ship involves ordinary dierential equations with six degrees of freedom [12]. However, this model is only suitable for numerical simulation and is too complex to analyse mathematically. When only rolling motion is considered, the system can be reduced to a forced nonlinear oscillator with nonlinear damping and restoring force, i.e. + D (, ) + Mr () = E (t). It approximates closely the rolling motion of a I ship and is widely analysed in the study of ship dynamics [4]. Steady-state response to the frequency of external forcing is one of the important research in the understanding of the rolling motion of ships [4]. Chaos and jumping phenomena may be the possible causes of damages related to vibrations in general mechanical systems, including the rolling motion of ships. Jumping phenomenon can even lead to the ship capsizing.

Proceedings of the 6th IMT-GT Conference on Mathematics, Statistics and its Applications (ICMSA2010) Universiti Tunku Abdul Rahman, Kuala Lumpur, Malaysia

844

This paper studies the methods and open source software used and the diculties faced in the numerical computation of steady-state response of external forcing.

Ship Roll Model

The following nonlinear oscillator with asymmetric nonlinear elastic characteristics is a simplied model for ship rolling motions [23]: + h + 2 + k2 + 3 = P1 cos(t) 0 (1)

where is related to the rolling angle with respect to the calm sea surface, 2 h > 0, h2 40 (the system is lightly damped). 2 2 Let 0 = 3 3 P0 , k = 3 3 P0 , by introducing a new coordinate, x = + 3 P0 , the equation (1) can be transformed into a forced Dung equation [4]: x + hx + x3 = P0 + P1 cos(t). (2)

The Dung equation (2) is a nonlinear equation which demonstrates period doubling bifurcations, chaotic behaviour and jump phenomenon and has been extensively studied [24, 23]. The Dung equation (2) with P0 = 0.020, P1 = 0.16, h = 0.05 was implemented in Python (to be introduced in next Section) as follows: Program: shipmodels.py Python implementation of the Equation (2)
from scipy import cos def rolling_ship(xv,t,v): x,y = xv[0], xv[1] dx = y # P0=0.02; P1=0.16; h=0.05 dy = 0.02 + 0.16*cos(v*t)-0.05*y-x**3 return (dx,dy)

Open Source Software

Scientists and engineers must have appreciation for computers in order to get their job done more eciently and productively [14]. There will be surveys on the available software for symbolic algebra and numerical computation published in books [21], journals, proceeding and the Internet [3] every few years. Although commercial mathematical software are more advanced but the open source software have been developed with all important basic features. To perform proper numerical analysis on the ship roll model (2), a computer algebra system Maxima [17] and a numerical computation system SciPy [13] are used.

Proceedings of the 6th IMT-GT Conference on Mathematics, Statistics and its Applications (ICMSA2010) Universiti Tunku Abdul Rahman, Kuala Lumpur, Malaysia

845

They provide the necessary numerical methods mentioned in [20] required to study dynamical systems. Maxima is based on a 1982 version of Macsyma [16], which was developed at MIT with funding from the United States Department of Energy and other government agencies. A version of Macsyma was maintained by Bill Schelter from 1982 until his death in 2001. In 1998 Schelter obtained permission from the Department of Energy to release his version under the GPL. That version, now called Maxima, is maintained by an independent group of developers [25]. Maxima is a rather simple system which allows the user to perform basic symbolic calculus (substitution and simplication), dierentiation and integration only. The comparison, expansion and extraction of harmonic terms required in the analysis of resonance curve discussed in Section 5 are not available. Hence, one needs to manually code and check each line of code to nd the equations for the resonance curve. Python[15, 19] is an interpret programming language with many useful modules for numerical computation, such as NumPy [2, 18] and SciPy [13]. This made Python an excellent system to perform numerical modelling and simulation. To analyse system (2), we need numerical integration for ordinary dierential equations (ODEs), Fast Fourier Transform (FFT), and numerical continuation. SciPy has included Odepack [10], which consists of a collection of standard routines to perform numerical integration for ODEs. SciPy also included FFTPACK [22], a standard routine to compute FFT. PyDSTool [5] implements the numerical continuation method [1]. It is used to compute the resonant curves given by theoretical derived equations. Finally, Matplotlib [11] is a Python 2D plotting library which produces publication quality gures in a variety of hardcopy formats and interactive environments across platforms.

Phase Portraits of Steady-State Solutions

To study the dynamics of the system (2) for a xed forcing frequency , the phase portrait (x(t; x0 , x 0 ), x (t; x0 , x 0 )), is analysed. Here (x0 , x 0 ) denotes the initial condition for (2). We have chosen = 0.9 which lies in the region which demonstrates periodic bifurcation to investigate the qT -periodic solution. Using the Python program below, we obtained Figures 1(a)1(c). Program: phase.py Plotting the phase portrait of Equation (2)
stop = 250 steady = 150 sample = 200 # Number of Cycles # Assume steady after 150 cycles # For more precision this can be made large

Proceedings of the 6th IMT-GT Conference on Mathematics, Statistics and its Applications (ICMSA2010) Universiti Tunku Abdul Rahman, Kuala Lumpur, Malaysia

846

v, x0 = .9, [0.1,0.0] from shipmodels import rolling_ship T = 2*pi/v t = r_[0:stop*T:stop*sample*1j] x = odeint(rolling_ship, x0, t, args=(v,)) tsteady = t[steady*sample:stop*sample] - t[steady*sample] xsteady = x[steady*sample:stop*sample,0] vsteady = x[steady*sample:stop*sample,1] # Phase portrait xmin, xmax, ymin, ymax = -2.,2.,-2.,2. axis([xmin,xmax,ymin,ymax]) plot(xsteady,vsteady,k); axhline(xmin=xmin,xmax=xmax); axvline(ymin=ymin,ymax=ymax); title(Phase Plot);xlabel($x$);ylabel($\dot{x}$);

(a) (x0 , x 0 ) = (0.10, 0.00)

Fig. 1. Steady-state solution for Equation (2) with = 0.9, P0 = 0.020, P1 = 0.16, h = 0.05 and dierent initial conditions.


1.0

Phase Plot @ v =0.9, x0

=(0.10,0.00)

1.0

Phase Plot @ v =0.9, x0

=(0.10,0.20)

1.0

Phase Plot @ v =0.9, x0

=(0.10,0.30)

0.5

0.5

0.5

0.0

0.0

0.0

0.5

0.5

0.5

1.0 1.5

1.0

0.5

0.0
x

0.5

1.0

1.5

1.0 1.5

1.0

0.5

0.0
x

0.5

1.0

1.5

1.0 1.5

1.0

0.5

0.0
x

0.5

1.0

1.5

(b) (x0 , x 0 ) = (0.10, 0.20)

(c) (x0 , x 0 ) = (0.10, 0.30)

Comparing Figure 1(a) and Figure 1(b), we suspected the transient exists for steady equals to 150. Hence, the variable steady was changed to 300 and stop was changed to 350, the transient goes away and we obtained Figure 1(b). What is really surprising is that when stop was changed to 400, we obtained Figure 1(c) and when stop was changed to 500, we obtained Figure 1(b). This is really surprising in view of the routine in SciPy is from Odepack, which has been a standard ODE solver. We attribute this to the possibility that the adaptive algorithm implemented in Odepack may cause the system to be sensitive to rounding errors.

Implementations

In [24] and [23], the harmonic balance method was used to study the system (2) for the T -periodic solution and qT -periodic solution, where q is an integer larger than 1. This section implements the numerical computation in Python

Proceedings of the 6th IMT-GT Conference on Mathematics, Statistics and its Applications (ICMSA2010) Universiti Tunku Abdul Rahman, Kuala Lumpur, Malaysia

847

of resonance curves associated with the T -period and 2T -periodic solutions of Equation (2) studied in [23]. 5.1 First Order Resonance Curves and Simulation Result
(1)

With rst order approximation x = x0 = C0 + C1 cos(t + ), Equation (2) gives


3 3 3 3 2 2 (C 0 +2 C0 C1 ) + ( 2 C1 + 3C0 C1 + 4 C1 ) cos(t + ) + (hC1 ) sin(t + ) 3 1 2 3 + 2 C0 C1 cos(2(t + )) + 4 C1 cos(3(t + )) = P0 + P1 cos cos(t + ) + P1 sin sin(t + )

By ignoring the high frequency terms cos(2(t + )) and cos(3(t + )), we obtain 3 3 2 2 C1 + C1 + 3C0 C1 = P1 cos() 4 hC1 = P1 sin() 3 2 3 = P0 C0 + C0 C1 2 The solution of equations (3)(5) can be obtained using PyDSTool. code is shown below. Program: First order approximation of the resonant curve.
from PyDSTool import * ### Theoretical Calculation using First Order Approximation class Order1(object): def __init__(self): pars = {v: 0.6} ### The model with P0=0.020; P1=0.16; h=0.05 c0str = (-v**2*C1 + 3*C0**2*C1 + 0.75*C1**3)**2 + (0.05*v*C1)**2 - 0.16**2 c1str = pow(C0,3) + 1.5*C0*C1**2 - 0.020 DSargs = args(name=ShipResonanceCurve) DSargs.pars = pars DSargs.varspecs = {C0: c0str, C1: c1str} DSargs.ics = {C0 : 0.01836388, C1 : 0.85196136} testDS = Generator.Vode_ODEsystem(DSargs) PyCont = ContClass(testDS) PCargs = args(name=EQ1, type=EP-C) PCargs.freepars = [v] PCargs.StepSize = 1e-2 PCargs.MaxNumPoints = 75 PCargs.MaxStepSize = 1e-1 PCargs.LocBifPoints = all PCargs.verbosity = 2 PyCont.newCurve(PCargs) PyCont[EQ1].backward() self.c = PyCont[EQ1].curve

(3) (4) (5) The

Proceedings of the 6th IMT-GT Conference on Mathematics, Statistics and its Applications (ICMSA2010) Universiti Tunku Abdul Rahman, Kuala Lumpur, Malaysia

848

To verify the theoretical prediction, we perform a simulation and use FFT to extract the amplitude of the rst harmonic using the code below. Program: resonc1.py Compare simulated result with rst order approximation
from approx1 import Order1 ap1 = Order1(); c = ap1.c from shipmodels import rolling_ship as rs from simul import Simulation s = Simulation(rs,x0=[1.,1.],start=0.4,end=2.4,step=.05,verbose=True) vs,c0,c1 = s.vs, s.c0, s.c1 from matplotlib.pylab import plot, show, xlabel,ylabel, legend, savefig plot(vs,c0,bo,vs,c1,r*,c[:-2,2],c[:-2,0],b-,c[:,2],c[:,1],r-) legend(($C_0$, $C_1$));xlabel(r"$\nu$");ylabel("Amplitude"); show()

From the simulation, we observe a jump occurring around = 1.6 if the forcing frequency increases from = 0.4 to 2.4. However, another jump is observed to occur around = 0.9 if the forcing decreases from = 2.4 down to 0.4.
2.0

1.5 Amplitude

1.0

0.5

0.0 0.0

0.5

1.0

1.5

(a) Forcing frequency is increasing

Fig. 2. Steady-state behaviour of the outer cycle


C0 C1
2.0 1.5 Amplitude 1.0 0.5 2.0 2.5 3.0 0.0 0.0 0.5 1.0 1.5 2.0

C0 C1

2.5

3.0

(b) Forcing frequency is decreasing

From Figure 2(b), we observed that the simulated result and resonance curve diers for the range from 0.9 to 1.1. This according to [23], is because a period doubling has happened and the T -periodic solution becomes unstable. Hence, a second order approximation is needed to better approximate the 2T -period solution, as demonstrated in the next section. 5.2 Second Order Resonance Curves
(2)

Substituting the second order approximation x = x0 = A0 + A1 cos(t) + +) into Equation (2) and balance the harmonic terms using Maxima, A1/2 cos( t 2

Proceedings of the 6th IMT-GT Conference on Mathematics, Statistics and its Applications (ICMSA2010) Universiti Tunku Abdul Rahman, Kuala Lumpur, Malaysia

849

we obtain [24] 3 2 3 2 2 2 + A + 3 A + A + 3A0 A1 cos(2) = 0, 1 / 2 0 4 2 1 3 2 3 3 2 2 A1 2 + A3 1 + 3A0 A1 + A1/2 A1 + A0 A1/2 cos(2) = 0, 4 2 2 1 h + 3A0 A1 sin(2) = 0, 2 3 3 3 2 2 2 A3 0 + A0 A1/2 + A0 A1 + A1/2 A1 cos(2) = P0 . 2 2 4

(6)

Using a similar program to resonc1.py, the resonance curve (6) was found in Figure 3 (the solid lines). We see that it is only located in the range 0.7 to 1.2 indicating that in this range, we may observe 2T -periodic solutions.
2.0

1.5 Amplitude

1.0

0.5

0.0 0.5

1.0

1.5

Fig. 3. Comparison of resonance curves obtained from rst and second order approximations.

Performing a simulation for changing from 1.3 down to 0.7, we obtained Figure 4 which is a good match except for the range 0.93 to 0.98. The poor match here may be due to further period doubling or the sensitivity of Odepack to numerical errors.
1.2 1.0 0.8 Amplitude 0.6 0.4 0.2 0.0 0.6 0.7 0.8 0.9

2.0

A0 A0.5 C0 C1

1.0

Fig. 4. Steady-state behaviour of the period-doubling process.

1.1 1.2

C0 A0.5 C1 A0 A0.5

2.5 1.4

1.3

Proceedings of the 6th IMT-GT Conference on Mathematics, Statistics and its Applications (ICMSA2010) Universiti Tunku Abdul Rahman, Kuala Lumpur, Malaysia

850

Conclusion

This paper applied the open source software to the investigation of the numerical computation of steady-state response of external forcing. The computer algebra system was found to lack the implementation of algorithms for harmonic balance technique. The numerical system for Python is sucient for the numerical study of the ship rolling motion described by Dung equation. However, it is found that for certain parameters, the numerical integrator of a dierential equation is behaving strangely and more in depth investigation into the implementation is required. If we change P0 in Equation (2) from 0.02 to 0.03 or 0.045, we observed that the range of period-doubling will get larger and that the chaotic solution can be clearly observed numerically, whereas the chaotic solution is not clearly observable for P0 = 0.02. According to Feigenbaum principle [6], we should expect all the three cases with period-doubling to demonstrate similar behaviour. This requires further mathematical and numerical analysis.

Acknowledgements

The authors wish to thank Universiti Tunku Abdul Rahman for the support of this research. The rst author would like to thank Professor James Peyton-Jones for introducing him to the research in ship dynamics.

References
1. Allgower, E.L., Georg, K.: Introduction to Numerical Continuation Methods. No. 45 in SIAM Classics in Applied Mathematics, SIAM (2003) 2. Ascher, D., et al.: Numerical python. Tech. Rep. UCRL-MA-128569, Lawrence Livermore National Laboratory (2001), http://numpy.scipy.org 3. Boisvert, R.F.: A guide to available mathematical software (1994), \url{http://citeseerx. ist.psu.edu/viewdoc/summary?doi=10.1.1.17.3729} 4. Cardo, A., Francescutto, A., Nabergoj, R.: Ultraharmonics and subharmonics in the rolling motion of a ship: Steady-state solution. International shipbuilding progress, Marine technology monthly, Rotterdam The Netherlands 28(326) (October 1981) 5. Clewley, R., Sherwood, W.E., Lamar, M.D., Guckenheimer, J.: Pydstool: An integrated simulation, modeling, and analysis package for dynamical systems (2007), http://sourceforge.net/ projects/pydstool 6. Feigenbaum, J.D.: Quantitative universality for a class of non-linear transformations. Journal of Satistical Physics 19, 2552 (1978) 7. France, W.N., Levadou, M., Treakle, T.W., Paulling, J.R., Michel, R.K., Moore, C.: An investigation of head-sea parametric rolling and its inuence on container lashing systems. Tech. rep., SNAME Annual Meeting 2001 Presentation (2001) 8. Francescutto, A.: Nonlinear ship rolling in the presence of narrow band excitation. In: Nonlinear Dynamics of Marine Vehicles. ASME/DSC, vol. 5, pp. 93102 (1993)

Proceedings of the 6th IMT-GT Conference on Mathematics, Statistics and its Applications (ICMSA2010) Universiti Tunku Abdul Rahman, Kuala Lumpur, Malaysia

851

9. Grochowalski, S.: Experimental investigation of ship dynamics in extreme waves. In: Vassalos, D., Hamamoto, M., Papanikolaou, A., Molyneux, D. (eds.) Contemporary Ideas on Ship Stability. Elsevier Science Ltd. (2000) 10. Hindmarsh, A.C.: ODEPACK, a systematized collection of ode solvers. In: Stepleman, R.S., et al. (eds.) Scientic Computing, IMACS Transactions on Scientic Computation, vol. 1, pp. 5564. North-Holland, Amsterdam (1983), https://computation.llnl.gov/casc/odepack/odepack_ home.html 11. Hunter, J.D.: Matplotlib: A 2d graphics environment. Computing in Science & Engineering 9(3), 9095 (2007), http://dx.doi.org/10.1109/MCSE.2007.55 12. Ibrahim, R.A., Grace, I.M.: Modeling of ship roll dynamics and its coupling with heave and pitch. Mathematical Problems in Engineering 2010, 32 (2010), doi:10.1155/2010/934714 13. Jones, E., Oliphant, T., Peterson, P., et al.: SciPy: Open source scientic tools for Python (2001 ), http://www.scipy.org/ 14. Landau, R.H., Fink, Jr, P.J.: A Scientists and Engineers guide to Workstations and Supercomputers, Coping with UNIX?, RISC, Vectors, and Programming. John Wiley and Sons, New York (1993) 15. Lutz, M.: Learning Python. OReilly & Associates (2009) 16. Martin, W.A., Fateman, R.J.: The MACSYMA system. In: SYMSAC 71: Proceedings of the second ACM symposium on Symbolic and algebraic manipulation. pp. 5975. ACM, New York, NY, USA (1971) 17. Maxima.sourceforge.net: Maxima, a computer algebra system (2010) 18. Oliphant, T.E.: Guide to NumPy. Trelgol Publishing, USA. (2006), http://numpy.scipy.org 19. Oliphant, T.E.: Python for scientic computing. Computing in Science & Engineering 9(3), 1020 (May/June 2007) 20. Parker, T.S., Chua, L.O.: Practical Numerical Algorithms for Chaotic Systems. Springer-Verlag New York, Inc. (1989) 21. Ross, P.W. (ed.): The Handbook of Software for Engineers and Scientists. CRC Press, Inc. (1996) 22. Swarztrauber, P.: Vectorizing the ts. In: Rodrigue, G. (ed.) Parallel Computations, pp. 5183. Academic Press (1982) 23. Szempli nska-Stupnicka, W.: Secondary resonances and approximate models of routes to chaotic motion in nonlinear oscillators. Journal of Sound and Vibration 113(1), 155172 (1987), http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6WM3-4XB9K8J-H&_user= 10&_coverDate=02%2F22%2F1987&_rdoc=1&_fmt=high&_orig=search&_sort=d&_docanchor= &view=c&_searchStrId=1388541812&_rerunOrigin=google&_acct=C000050221&_version= 1&_urlVersion=0&_userid=10&md5=aa96ba7cc45aeea50c9b02ba8a2248fe, doi:10.1016/S0022460X(87)81348-2 24. Szempli nska-Stupnicka, W., Bajkowski, J.: The -subharmonic resonance and its transition to chaotic motion in a nonlinear oscillator. Int. J. Nonlinear Mechanics 25(5), 401419 (1986) 25. http://en.wikipedia.org/wiki/Maxima_(software) (2010)

Anda mungkin juga menyukai