Hi, im trying to figure out on how to model a piston-type wavemaker in my Smoothed Particle Hydrodynamic / meshless basin model. First, for the boundary treatment, I have tried to assigned number to wall particles in order to imposed piston motion. The problem is i have already assigned the same wall particle another number to distinguish wet/dry particles for pressure calculation with the internal particles. So, I cant assigned 1 particles with 2 numbers to do 2 jobs at the same time.

----> I tried to put if iptype==300 then piston motion but it will contradict with the code below;

// Change wet pts bpType and collect their index in bwWall for pressure calculation
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) {
bwWall1[i]=-1-i;// just in case, actually not used
} else { // wet
bwWall[nBndWtPts++]=i; // index for wet pt

2nd, I have tried to cut off the wall particle and imposed on some region of the internal particle instead. But then I got problem when the internal particles tends to penetrate the imposed internal region. I guess the problem because there is no repulsive force or denser particle to repel the internal pts.

So , now Im stuck and I dunno what to do