I am doing numerical modelling of regular wave slamming on rigid body structure with SPH method. Smoothed Particle Hydrodynamic is a meshfree, Lagrangian, particle method, which is particularly suited to the solution and modelling of large scale, complex free surface fluid flows.
Attachment 31201

If we look at the figure, I was trying to use wall boundaries as wavemaker which simulated by layers of boundary particles similar to fluid particles, which balance the pressure of inner fluid particles and prevent them from penetrating the wall.

For the piston motion, I just called out a simple class contains the information ;
 // Wave maker on the left side of boundary wall pts	
	// iFlag values:
	// 0 = > no motion;
	// 1 = > sloshing motion uBnd=waveHeight/2*sin(w*t), vBnd=0;
	// 2 = > wave motion on all xBnd<=0 Prts with uBnd,vBnd and u3,v3(imposed velocity on xInt region)
	//		 this is used to assign values to uBnd and vBnd as functions of xBnd, yBnd  and t.
	// 3 = > wave motion imposed at both ends of wall boundary (xBnd<0, xBnd>6.0)
	// 4 = > piston wave maker
	// return !=0 for error.

}else if(iFlag==4){
		kW3=(0.5*wH)*w;   // Piston motion
		for(i=0;i<nIntPrts;i++) {
			if(ipType[i]==300) {
I assigned 300 to the wall particle (means only particles with this no will move forward n backward to generate wave.

To prevent penetrating, I use both ghost particle and repulsive force between boundary-fluid particle;

All calculation are made inside a time-stepping which I can brief the simulation flows as follows;

-Start loop A1 contribution from internal prts
-Determine whether a wall pt is wet
-Change wet particle bpType and collect their index in Wall for pressure calculation
-updating (u,v) at (n+1/2)
-introduce a boundary force
-pressure at (n+1) due to u at (n+1/2)
-To wall prtcle from wall/ghost prtcle and from internal prtcle
-To internal prtcle (non free surface) from wall/ghost prtcle and from internal prtcle
-solve for pressure at n+1 using DoBiCGStab iteration method
-Assign new pressure to pressureBoundary and pressureInternal in main Class
-update velocity at n+1
-updating u, x etc
-updating background Grid and get the particles into the cells in background Grid

As you can see at no 3; in order to change the wet particle, I have also assigned number;
rc0=iMass/rho0;   //density of fluid
		nBndWtPts=0; // number of wet wall pts
		for(i=0;i<nBndWPts;i++) {
			if(tBnd[i]<0.250||(tBnd[i]<1.50&&bwWall1[i]<=4)||bwWall1[i]<=1) {  //dry
				bwWall1[i]=-1-i;// just in case, actually not used
			} else { // wet
				bwWall[nBndWtPts++]=i; // index for wet pt
So, the region that supposed to be assigned as 300 at first place then change either to 1200 or 1000, making it hard to control the movement of the piston wavemaker.

The output of my result only allows for one particular type at same time ;

# ipType,rho,p,x,y,u,v
1000, 1.010402e+003, 9.658910e+003, 7.500000e-002, 1.500000e-002, 0.000000e+000, 0.000000e+000
1000, 1.010248e+003, 9.511820e+003, 7.500000e-002, 3.000000e-002, 0.000000e+000, 0.000000e+000
1200, 1.010094e+003, 9.364730e+003, 7.500000e-002, 4.500000e-002, 0.000000e+000, 0.000000e+000
1200, 1.009940e+003, 9.217640e+003, 7.500000e-002, 6.000000e-002, 0.000000e+000, 0.000000e+000

I am not sure how other researcher deal with this problem in order to generate wave.

I am hoping for a good suggestions.