<%namespace name="tools" file="tools.tex"/>

This test is to check the refraction behaviour of loncrested waves, which are simulated using instat=stat and m=1000. Four cases are generated and compared: directional bins of 2.5, 5 and 10 degrees and a single bin. In all cases the incident wave angle is 60 degrees and theta grid runs from -10 to 90 degrees. The results are compared among themselves and, for the wave direction, with Snel's law and with mean direction computed by integrating $c_{\theta}/c_{g,x}$ over x. The results all agree within approx. one degree, whch is considered satisfactory. Note that the longshore current does not exhibit any negative velocities, as was noticed when the refraction is not computed correctly.

${tools.image('longcrested_refraction2/', 'crosssection.eps', 'Wave energy, direction and flow velocities for different sized of theta bins.')}
${tools.image('longcrested_refraction2/', 'refraction.eps', 'Refraction with different sizes of theta bins. The red dotted line indicates the solution according to Snel law.')}
