In the “WaveTank” test case, the beach is defined mathematically as a linear slope. Currently (Dec. 2019), I’m working with the “next” branch, which defines the geometry of the beach as a rotated “addBox” feature with a fixed boundary fill type. The test case runs as expected, but I’m now trying to modify the beach geometry.

The beach I’m trying to include is uniform along the y-axis but has an elevation defined by a high order polynomial function of the x-axis. In my initial approach, I was going to try approximating the beach function using a piecewise linear function with very small step sizes and build the beach as in “WaveTank”. However, this proved to be rather tedious and I quickly searched for an alternative approach.

The simplest alternative I could come up with was to build a DEM of the beach and include it following the “DEMExample” test case. Specifically, I tried to build the geometry following the “WaveTank” example then add a beach DEM at the end of the flume. However, this does not appear to work and I have a few comments and questions…

I tried to add the DEM, then shift its origin further down the wave flume with the following

`GeometryID dem = addDEM(dem_file);`

`shift(dem,1.75,0,0);`

`GeometryID fluid_box = addDEMFluidBox(H,dem);`

The “shift” causes program failure. Commenting it out initializes beach DEM as expected, only it is not located at the intended position. It’s as if “shift” does not apply to DEM geometries. I do see that “TopoCube” has a “shift” function, so I don’t know what is causing the failure.

More importantly, the inclusion of the DEM seems to unexpectedly override, or deactivate, other geometries. Again, I’m using the “next” branch, in which the “WaveTank” domain is initialized with a fluid box in the following way

`GeometryID fluid = addBox(GT_FLUID, FT_SOLID, m_origin, 1.75, ly, H);`

When a DEM is included in the problem, this fluid box is not added. I tried to make sure the boxes don’t overlap and it still fails to generate.

I then tried to make the entire domain a DEM, using “addDEMFluidBox”, however I could not add additional geometries to the domain, such as a cylinder. That being said, the wave maker is generated without any problems.

This leads me to believe that “addBox” and the DEM do work together, but the compatibility depends on the geometry type?

In summary, these are NOT compatible with the DEM approach

- “addBox(GT_FLUID,…”
- “addCylinder(GT_FIXED_BOUNDARY,…”

whereas this is compatible

- “addBox(GT_MOVING_BODY,…”

Overall, I think this DEM stuff is WAY over complicated. Couldn’t the creation of a DEM be treated exactly as an “addBox”, where there is no conflicts with including other geometries? In simplest form, a DEM is nothing more than a collection of boxes of varying heights. Right now it seems to operate as an isolated method of defining the geometry with a code structure that has an added layer of complication.

I’ve tried numerous approaches, all of which have failed. Can someone offer advice on how to build a nonlinear beach in the “WaveTank” example?