Skip to content

Commit

Permalink
use aborts, modify docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkuhn committed Jan 16, 2025
1 parent a0feb1e commit d64f260
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions amr-wind/ocean_waves/relaxation_zones/stokes_waves_ops.H
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ struct ReadInputsOp<StokesWaves>
auto& info = data.info();
relaxation_zones::read_inputs(wdata, info, pp);

if (wdata.current > constants::TIGHT_TOL) {
amrex::Abort(
"Current is specified as nonzero, but current is not yet "
"implemented for Stokes Waves.");
}

// Get gravity from MultiPhase physics, assume negative z
wdata.g = -data.sim().physics_manager().get<MultiPhase>().gravity()[2];
// Get wave attributes
Expand Down
6 changes: 6 additions & 0 deletions amr-wind/ocean_waves/relaxation_zones/waves2amr_ops.H
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ struct ReadInputsOp<W2AWaves>
auto& info = data.info();
relaxation_zones::read_inputs(wdata, info, pp);

if (wdata.current > constants::TIGHT_TOL) {
amrex::Abort(
"Current is specified as nonzero, but current is not yet "
"implemented for W2A Waves.");
}

pp.get("HOS_modes_filename", wdata.modes_file);
pp.query("HOS_init_timestep", wdata.ntime);
if (!pp.contains("HOS_init_timestep")) {
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/user/inputs_ocean_waves.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ This section is for setting up wave forcing and relaxation zones.

Flow speed of a uniform current in the x-direction to be added to the wave forcing. This option is
currently only compatible with the LinearWaves wave type and the numerical beach. If a nonzero current is
specified for a case with nonlinear waves and a numerical beach, nonphysical results will occur.
specified for a case with nonlinear waves, the code will abort.

The following input arguments are only valid for the LinearWaves and StokesWave wave types:

Expand Down

0 comments on commit d64f260

Please sign in to comment.