rompy.swan.components.physics.DIFFRACTION#

pydantic model rompy.swan.components.physics.DIFFRACTION[source]#

Wave diffraction.

DIFFRACTION [idiffr] [smpar] [smnum] [cgmod]

If this optional command is given, the diffraction is included in the wave computation. But the diffraction approximation in SWAN does not properly handle diffraction in harbours or in front of reflecting obstacles (see Scientific/Technical documentation). Behind breakwaters with a down-wave beach, the SWAN results seem reasonable. The spatial resolution near (the tip of) the diffraction obstacle should be 1/5 to 1/10 of the dominant wave length.

Notes

Without extra measures, the diffraction computations with SWAN often converge poorly or not at all. Two measures can be taken:

1. (RECOMMENDED) The user can request under-relaxation. See command NUMERIC parameter alpha and Scientific/Technical documentation (Eq. (3.31)). Very limited experience suggests alpha = 0.01.

2. Alternatively, the user can request smoothing of the wave field for the computation of the diffraction parameter (the wave field remains intact for all other computations and output). This is done with a repeated convolution filtering.

Examples

In [33]: from rompy.swan.components.physics import DIFFRACTION

In [34]: diffraction = DIFFRACTION()

In [35]: print(diffraction.render())
DIFFRACTION

In [36]: diffraction = DIFFRACTION(idiffr=True, smpar=0.0, smnum=1.0)

In [37]: print(diffraction.render())
DIFFRACTION idiffr=1 smpar=0.0 smnum=1
Fields:
field cgmod: float | None = None#

Adaption of propagation velocities in geographic space due to diffraction. If cgmod=0 then no adaption (SWAN default: 1.0)

field idiffr: bool | None = None#

Indicates the use of diffraction. If idiffr=0 then no diffraction is taken into account (SWAN default: 1)

field model_type: Literal['diffraction', 'DIFFRACTION'] = 'diffraction'#

Model type discriminator

field smnum: int | None = None#

Number of smoothing steps relative to smpar (SWAN default: 0)

field smpar: float | None = None#

Smoothing parameter for the calculation of ∇ · √Etot. During every smoothing step all grid points exchange smpar times the energy with their neighbours. Note that smpar is parameter a in the above text (SWAN default: 0.0)

cmd() str[source]#

Command file string for this component.