a 2d box in a water pool same as attached figures, meanwhile one side of pool displacement as Sinusoidal wave (the equation of the wave is in the figure )
It's necessary to define a UDF. is there anyone that can help me with that?
Michael Horko's (2007) thesis contains a UDF (in the appendix) for an inflow-boundary based wavemaker that can be easily implemented as an interpreted UDF in FLUENT. Please find a link to Horko's thesis attached.
An inflow boundary type wavemaker is computationally cheaper (and less complicated to implement) compared to a moving boundary type wave paddle. As far as the box is concerned, you would have to implement that using FLUENT's 6-DOF solver. I do not have much experience with the 6-DOF solver and am not aware of any relevant references for the same.
But I hope the UDF given in Horko's thesis helps with the wave generation part of your problem. Best regards.