Over three decades in ocean engineering area, due to fast development of high performance computation and improvement of numerical simulation technology, numerical wave tank has been increasingly investigated and developed as a basic research tool complementary to physical wave tank, among which one kind of model based on viscous flow theory and mimicking physical wave making is the most closed to physical wave tank. This work focuses on realizing wave generation and absorption for this kind of numerical wave tank, testing and applying it.OpenFOAM, is an outstanding open source software in computational fluid dynamics field which is comparable with commercial software such as Fluent. It is free, open( not only in terms of source code but also in its structure and hierarchical design) and extensible(from solvers, utilities to libraries), with solid foundation(strong and stable low level libraries), fexible pre- and post-processing utilities, parallel computation capbility(integrated at a low level). These advantages make it a good research platform. Researchers can make full use of it on all levels, while at the same time effectively focus on particular level they would like, making their research work more efficient and continuous.There are totally two types of methods to generate wave in numerical model, one is physical wave generation, and another is artificial wave generation. Physical wave generation means simulating wave making as physical wave tank. It makes use of wavemaker theory rather than wave theory as artificial method does, so it's convenient to compare numerical results with physical experiments. Realizing artificial wave generation, such as setting velocity input boundary or adding source function into related equations is practically easy, while realizing physical wave generation need additional technique to deal with moving boundary. As the interDyMFoam solver that deals with free surface problem using VOF method in OpenFOAM-1.5 supports dynamic mesh, this work extends it at boundary condition and solver code level to realize physical wave generation and wave absorption(see chapter 4):1. Piston type and flap type wavemaker boundary is established though inheriting from the existing class for boundary condition in OpenFOAM. They move according to linear wavemaker theory and Madsen's second order wavemaker theory. It's also convenient to set movement pattern according to other wavemaker theory.2. Top level code of interDyMFoam solver is revised to add damping term into the momentum equation for wave absorption. The wave generation and absorption model is validated by several tests and applications:1. In numerical convergent test, we found if cells around the free surface are too long and thin, nonphysical wave dissipation will be serious, sometimes, this kind of numerical wave dissipation exceeds real physical wave dissipation, especially to small amplitude wave. Pay attentiond to mesh will improve wavemaking accuracy(see chapter 5.1).2. Several two dimensional wave making tests are performed, during which we find that when relative water depth is small, piston type maker can make more accurate wave than flap type does, while when relative water depth is large, flap type maker can produce more stable wave. When mesh, wave maker type and coefficient of damping term are properly chosen, the model can provide linear and weakly nonlinear wave with high accuracy and stability(see chapter 5.2 and 5.3).3. Three dimensional simulations of wave run up square cylinder are tried which inrich research on diffraction problem by viscous flow model. Although grid resolution need to be increased, present result still show us rich details about the flow behavior around cylinder, such as secondary crest phenomenon, which can't be captured by present potential flow model(see chapter 6).Additionally, because velocity input method is widely used for wave generation, it is implemented and analyzed in chapter 7. Water level in wave tank will go up during wave generation by this method, for mass conservation can't promise at the input boundary. Although non- conservation problem exists, this method is still suitable for investigating three dimensional problem, for its low computation consumption. Finally, outlook in three aspects are produced based on above work(see chapter 8).In all, this paper sets up a good wave generation and absorption model , and finishes the most foundamatal step for developing numerical wave tank. Future work will be continued in order to set up a practical and efficient numerical wave tank. |