Wave Gage Function

Hi Giuseppe,

I faced a problem with a simple test case using wave gage. I tried to generate waves with H=0.2 m height along a flume by using a piston as a wavemaker and also used different wave gages to read the water surface level. The WaveGage.txt file shows that the wave height is around 0.18m which makes sense, but when I looked at the generated waves in the Paraview the wave height was more than 0.2m and around 0.38 m ! I didn’t do any post-processing stuff on the results, but I saw this mismatch. So, I wanted to look at the “add_gage” function to see how it calculated the water surface level. I couldn’t find this function. I usually search sth like “add_gage” in the GitHub repository to find the functions but I couldn’t find the “add_gage” function.
Could you please tell me how can I find it? Moreover, what is the third component of the “add_gage” function? the first and the second ones are the x and y locations of the wave gage, respectively, but does the z location of the wave gage matter here?!

Regards,
Alireza

Hello @AlirezaZarei,

GPUSPH has two types of wavegages: nearest neighbors and “smoothed”. They compute the water height by looking at neighboring free-surface particles. The nearest neighbor gage takes the closest highest free-surface particle, while the “smoothed” one does an SPH smoothing of the height (with one less dimension than the simulation). The extra parameter is the radius of the gage.

add_gage is in src/ProblemCore.{h,cc}, and the gage classes themselves are in src/WaveGage.h. They are updated in src/GPUSPH.cc in the doWrite member function.

I’m surprised that you see such a huge difference between the gages and visually in ParaView. One thing you can do is visualize the actual gage position in ParaView. They should follow the wave motion unless there’s something wrong going on.