Skip to content

Sediment

Sediment and the components it holds: transport, morphology, bed composition and update, and groundwater.

rompy_xbeach.components.sediment.sediment

XBeach sediment and morphology configuration.

logger module-attribute

logger = logging.getLogger(__name__)

Sediment pydantic-model

Sediment(**data: Any)

Bases: XBeachBaseModel

XBeach sediment transport and morphology configuration.

This component groups all sediment-related parameters including: - Sediment transport formulations and processes - Morphological evolution (morfac, time windows) - Avalanching - Bed composition and layering - Quasi-3D sediment transport - Prescribed bathymetry evolution

All fields default to None, meaning XBeach's default values will be used unless explicitly specified.

Examples
from rompy_xbeach.components.sediment import Sediment
from rompy_xbeach.components.sediment.morphology import Morphology
from rompy_xbeach.components.sediment.transport import SedimentTransport

sediment = Sediment(
    sedtrans=SedimentTransport(
        form="vanthiel_vanrijn",
        facua=0.15,
        bdslpeffmag="roelvink_total",
    ),
    morphology=Morphology(morfac=10.0, morstart=0.0, morstop=3600.0),
)
print(sediment.get("."))
{'sedtrans': 1, 'bdslpeffmag': 'roelvink_total', 'facua': 0.15, 'form': 'vanthiel_vanrijn', 'morphology': 1, 'morfac': 10.0, 'morstart': 0.0, 'morstop': 3600.0}
See Also

rompy_xbeach.components.sediment.transport : Sediment transport parameters rompy_xbeach.components.sediment.morphology : Morphology parameters rompy_xbeach.components.sediment.bed : Bed composition parameters

References

Roelvink, D., & Reniers, A. (2011). A guide to modeling coastal morphology. Advances in Coastal and Ocean Engineering, Vol. 12.

Fields:

model_type pydantic-field

model_type: Literal['sediment'] = 'sediment'

Model type discriminator

sedtrans pydantic-field

sedtrans: Optional[Union[bool, SedimentTransport]] = None

Sediment transport parameters from XBeach Table 36, including formulations, bed slope effects, process switches, and calibration factors

numerics pydantic-field

numerics: Optional[TransportNumerics] = None

Sediment transport numerical parameters (cmax, sourcesink, thetanum, dtlimts, oldTsmin)

morphology pydantic-field

morphology: Optional[Union[bool, Morphology]] = None

Morphological evolution parameters from XBeach Table 39 (morfac, morfacopt, morstart, morstop, lsgrad, struct, ne_layer, dryslp, wetslp, hswitch, dzmax)

bed_composition pydantic-field

bed_composition: Optional[BedComposition] = None

Bed composition parameters including grain size (D50, D90), sediment density (rhos), porosity (por), and layer thickness (dzg1/2/3)

bed_update pydantic-field

bed_update: Optional[BedUpdate] = None

Bed update parameters from XBeach Table 40 (frac_dz, merge, nd_var, nsetbathy, setbathyfile, split)

groundwater pydantic-field

groundwater: Optional[GroundwaterFlow] = None

Groundwater flow parameters from XBeach Table 41 (aquiferbot, aquiferbotfile, dwetlayer, gw0, gw0file, gwReturb, gwfastsolve, gwheadmodel, gwhorinfil, gwnonh, gwscheme, kx, ky, kz)

q3d pydantic-field

q3d: Optional[Union[bool, Quasi3D]] = None

Turn on quasi-3D sediment transport (XBeach default: 0)

params property

params: dict

Return the XBeach parameters as a flat dictionary.

check_for_typos classmethod

check_for_typos(data: Any) -> Any

Suggest the closest field name for an unknown input key.

A field can be given by its name or, like in pydantic, by its alias.

dump_inputs_dict

dump_inputs_dict() -> dict

Return the original inputs as a dictionary.

dump_inputs_json

dump_inputs_json() -> str

Return the original inputs as a JSON string.

get

get(destdir: str | Path) -> dict

Return the params dict with file fetching for nested components.

This method handles two types of nested components: 1. Components with explicit parameter fields: Need special handling to extract the field value and merge remaining params 2. Discriminated union components: Already flattened by the serializer

The default implementation: - For components with explicit fields: includes that field in return dict - For discriminated unions or leaf components: returns standard params - For parent components: processes XBeachBaseModel children recursively

XBeachDataBlob fields are fetched into destdir and written as the file name under the field name. Override this method only for other file handling, such as fetching several files from a directory.

Parameters:

Name Type Description Default
destdir str | Path

Directory path for file operations.

required

Returns:

Type Description
Flat dictionary of XBeach parameters.

rompy_xbeach.components.sediment.transport

XBeach sediment transport parameter configurations.

This module contains models for sediment transport formulations and related parameters.

logger module-attribute

logger = logging.getLogger(__name__)

SedimentTransport pydantic-model

SedimentTransport(**data: Any)

Bases: XBeachBaseModel

Sediment transport parameters (XBeach Table 36).

This class consolidates all sediment transport parameters from XBeach's Table 36, including: - Sediment transport formulations (form, waveform) - Wave asymmetry and skewness effects (facAs, facSk, facua) - Bed slope effects (bdslpeff*, facsl, reposeangle) - Process switches (sws, lws, lwt, turb, turbadv) - Bed and suspended load calibration (bed, sus, bulk) - Advanced calibration parameters (Tsmin, tsfac, facDc, etc.)

All fields default to None, meaning XBeach's default values will be used unless explicitly specified.

References

Roelvink, D., & Reniers, A. (2011). A guide to modeling coastal morphology. Soulsby, R. (1997). Dynamics of marine sands. Van Rijn, L. C. (1993). Principles of sediment transport in rivers, estuaries and coastal seas. Van Thiel de Vries, J. S. M. (2009). Dune erosion during storm surges.

Fields:

Validators:

sedtrans pydantic-field

sedtrans: Literal[True] = True

Enable sediment transport (always True when using SedimentTransport class)

BRfac pydantic-field

BRfac: Optional[float] = None

Calibration factor for surface slope (XBeach default: 1.0)

Tbfac pydantic-field

Tbfac: Optional[float] = None

Calibration factor for bore interval: tbore = Tbfac * tbore (XBeach default: 1.0)

Tsmin pydantic-field

Tsmin: Optional[float] = None

Minimum adaptation time scale in advection-diffusion equation (XBeach default: 0.5 s)

bdslpeffdir pydantic-field

bdslpeffdir: Optional[Literal['none', 'talmon']] = None

Modify the direction of sediment transport based on bed slope (XBeach default: none)

bdslpeffdirfac pydantic-field

bdslpeffdirfac: Optional[float] = None

Calibration factor in the modification of the direction (XBeach default: 1.0)

bdslpeffini pydantic-field

bdslpeffini: Optional[Literal["none", "total", "bed"]] = (
    None
)

Modify the critical shields parameter based on bed slope (XBeach default: none)

bdslpeffmag pydantic-field

bdslpeffmag: Optional[
    Literal[
        "none",
        "roelvink_total",
        "roelvink_bed",
        "soulsby_total",
        "soulsby_bed",
    ]
] = None

Modify the magnitude of sediment transport based on bed slope (XBeach default: roelvink_total)

bed pydantic-field

bed: Optional[float] = None

Calibration factor for bed transports (XBeach default: 1.0)

bermslope pydantic-field

bermslope: Optional[float] = None

Swash zone slope for (semi-)reflective beaches (XBeach default: 0.0)

betad pydantic-field

betad: Optional[float] = None

Dissipation parameter for long wave breaking turbulence (XBeach default: 1.0)

bulk pydantic-field

bulk: Optional[bool] = None

Switch to compute bulk transport rather than bed and suspended load separately (XBeach default: 0)

ci pydantic-field

ci: Optional[float] = None

Mass coefficient in shields inertia term (XBeach default: 1.0)

cm pydantic-field

cm: Optional[float] = None

Mass coefficient in shields inertia term (XBeach default: 1.5)

dilatancy pydantic-field

dilatancy: Optional[bool] = None

Switch to reduce critical shields number due to dilatancy (XBeach default: 0)

facAs pydantic-field

facAs: Optional[float] = None

Calibration factor for time-averaged flows due to wave asymmetry (XBeach default: 0.2)

facDc pydantic-field

facDc: Optional[float] = None

Option to control sediment diffusion coefficient (XBeach default: 1.0)

facSk pydantic-field

facSk: Optional[float] = None

Calibration factor for time-averaged flows due to wave skewness (XBeach default: 0.15)

facsl pydantic-field

facsl: Optional[float] = None

Factor for bed slope effect (XBeach default: 1.6)

facua pydantic-field

facua: Optional[float] = None

Calibration factor for time-averaged flows due to wave skewness and asymmetry (alias for setting both facAs and facSk) (XBeach default: 0.1)

fallvelred pydantic-field

fallvelred: Optional[bool] = None

Switch to reduce fall velocity for high concentrations (XBeach default: 0)

form pydantic-field

form: Optional[
    Literal[
        "soulsby_vanrijn", "vanthiel_vanrijn", "vanrijn1993"
    ]
] = None

Equilibrium sediment concentration formulation (XBeach default: vanthiel_vanrijn)

jetfac pydantic-field

jetfac: Optional[float] = None

Option to mimic turbulence production near revetments (XBeach default: 0.0)

lws pydantic-field

lws: Optional[bool] = None

Switch to enable long wave stirring (XBeach default: 1)

lwt pydantic-field

lwt: Optional[bool] = None

Switch to enable long wave turbulence (XBeach default: 0)

phit pydantic-field

phit: Optional[float] = None

Phase lag angle in Nielsen transport equation (XBeach default: 25.0 degrees)

pormax pydantic-field

pormax: Optional[float] = None

Maximum porosity used in the expression of Van Rhee (XBeach default: 0.5)

reposeangle pydantic-field

reposeangle: Optional[float] = None

Angle of internal friction (XBeach default: 30.0 degrees)

rheeA pydantic-field

rheeA: Optional[float] = None

A parameter in the Van Rhee expression (XBeach default: 0.75)

smax pydantic-field

smax: Optional[float] = None

Maximum shields parameter for equilibrium sediment concentration according to Diane Foster (XBeach default: -1.0, no limit)

sus pydantic-field

sus: Optional[float] = None

Calibration factor for suspension transports (XBeach default: 1.0)

sws pydantic-field

sws: Optional[bool] = None

Switch to enable short wave and roller stirring and undertow (XBeach default: 1)

tsfac pydantic-field

tsfac: Optional[float] = None

Coefficient determining ts = tsfac * h/ws in sediment source term (XBeach default: 0.1)

turb pydantic-field

turb: Optional[
    Literal["none", "wave_averaged", "bore_averaged"]
] = None

Switch to include short wave turbulence (XBeach default: wave_averaged)

turbadv pydantic-field

turbadv: Optional[
    Literal["none", "lagrangian", "eulerian"]
] = None

Switch to activate turbulence advection model (XBeach default: none)

waveform pydantic-field

waveform: Optional[
    Literal["ruessink_vanrijn", "vanthiel"]
] = None

Wave shape model for asymmetry and skewness (XBeach default: vanthiel)

z0 pydantic-field

z0: Optional[float] = None

Zero flow velocity level in Soulsby and Van Rijn (1997) sediment concentration (XBeach default: 0.006 m)

params property

params: dict

Return the XBeach parameters as a flat dictionary.

no_bore_averaged_with_ruessink_vanrijn pydantic-validator

no_bore_averaged_with_ruessink_vanrijn() -> (
    SedimentTransport
)

Bore-averaged turbulence cannot be used with ruessink_vanrijn waveform.

The Ruessink et al. (2012) formulation does not determine an exact wave shape, so the bore interval cannot be calculated. Bore-averaged short-wave turbulence requires the bore interval to be computed from the wave shape.

See: https://xbeach.readthedocs.io/en/latest/xbeach_manual.html#wave-shape

check_for_typos classmethod

check_for_typos(data: Any) -> Any

Suggest the closest field name for an unknown input key.

A field can be given by its name or, like in pydantic, by its alias.

dump_inputs_dict

dump_inputs_dict() -> dict

Return the original inputs as a dictionary.

dump_inputs_json

dump_inputs_json() -> str

Return the original inputs as a JSON string.

get

get(destdir: str | Path) -> dict

Return the params dict with file fetching for nested components.

This method handles two types of nested components: 1. Components with explicit parameter fields: Need special handling to extract the field value and merge remaining params 2. Discriminated union components: Already flattened by the serializer

The default implementation: - For components with explicit fields: includes that field in return dict - For discriminated unions or leaf components: returns standard params - For parent components: processes XBeachBaseModel children recursively

XBeachDataBlob fields are fetched into destdir and written as the file name under the field name. Override this method only for other file handling, such as fetching several files from a directory.

Parameters:

Name Type Description Default
destdir str | Path

Directory path for file operations.

required

Returns:

Type Description
Flat dictionary of XBeach parameters.

TransportNumerics pydantic-model

TransportNumerics(**data: Any)

Bases: XBeachBaseModel

Sediment transport numerical parameters.

These parameters control numerical aspects of sediment transport calculations, including maximum concentration limits and numerical scheme selection.

Fields:

cmax pydantic-field

cmax: Optional[float] = None

Maximum allowed sediment concentration (XBeach default: 0.1)

dtlimts pydantic-field

dtlimts: Optional[float] = None

Factor of the timestep to determine the numerical limiter of the adaptation time (XBeach default: 1.0)

oldTsmin pydantic-field

oldTsmin: Optional[bool] = None

Switch to apply the Tsmin parameter instead of dtlimts (XBeach default: 0)

sourcesink pydantic-field

sourcesink: Optional[bool] = None

Switch to enable source-sink terms to calculate bed level change rather than suspended transport gradients (XBeach default: 0)

thetanum pydantic-field

thetanum: Optional[float] = None

Coefficient determining whether upwind (1) or central scheme (0.5) is used (XBeach default: 1.0)

params property

params: dict

Return the XBeach parameters as a flat dictionary.

check_for_typos classmethod

check_for_typos(data: Any) -> Any

Suggest the closest field name for an unknown input key.

A field can be given by its name or, like in pydantic, by its alias.

dump_inputs_dict

dump_inputs_dict() -> dict

Return the original inputs as a dictionary.

dump_inputs_json

dump_inputs_json() -> str

Return the original inputs as a JSON string.

get

get(destdir: str | Path) -> dict

Return the params dict with file fetching for nested components.

This method handles two types of nested components: 1. Components with explicit parameter fields: Need special handling to extract the field value and merge remaining params 2. Discriminated union components: Already flattened by the serializer

The default implementation: - For components with explicit fields: includes that field in return dict - For discriminated unions or leaf components: returns standard params - For parent components: processes XBeachBaseModel children recursively

XBeachDataBlob fields are fetched into destdir and written as the file name under the field name. Override this method only for other file handling, such as fetching several files from a directory.

Parameters:

Name Type Description Default
destdir str | Path

Directory path for file operations.

required

Returns:

Type Description
Flat dictionary of XBeach parameters.

Quasi3D pydantic-model

Quasi3D(**data: Any)

Bases: XBeachBaseModel

Quasi-3D sediment transport parameters.

Controls the vertical structure of flow and sediment concentration when quasi-3D mode is enabled (q3d=1). The vertical domain is divided into sigma layers with specified distribution.

The quasi-3D model resolves vertical variations in horizontal velocity and sediment concentration, improving accuracy for situations with strong vertical gradients.

References

Van Thiel de Vries, J. S. M. (2009). Dune erosion during storm surges. PhD thesis, Delft University of Technology.

Fields:

q3d pydantic-field

q3d: Literal[True] = True

Turn on quasi-3D sediment transport (XBeach default: 0)

deltar pydantic-field

deltar: Optional[float] = None

Estimated ripple height for roughness calculations (XBeach default: 0.025 m)

kmax pydantic-field

kmax: Optional[int] = None

Number of sigma layers in quasi-3D model. kmax=1 means no vertical structure of flow and suspensions (XBeach default: 100)

rwave pydantic-field

rwave: Optional[float] = None

User-defined wave roughness adjustment factor (XBeach default: 2.0)

sigfac pydantic-field

sigfac: Optional[float] = None

Dsig scales with log(sigfac). Controls vertical layer distribution (XBeach default: 1.3)

vicmol pydantic-field

vicmol: Optional[float] = None

Molecular viscosity (XBeach default: 1e-06 m²/s)

vonkar pydantic-field

vonkar: Optional[float] = None

Von Karman constant (XBeach default: 0.4)

params property

params: dict

Return the XBeach parameters as a flat dictionary.

check_for_typos classmethod

check_for_typos(data: Any) -> Any

Suggest the closest field name for an unknown input key.

A field can be given by its name or, like in pydantic, by its alias.

dump_inputs_dict

dump_inputs_dict() -> dict

Return the original inputs as a dictionary.

dump_inputs_json

dump_inputs_json() -> str

Return the original inputs as a JSON string.

get

get(destdir: str | Path) -> dict

Return the params dict with file fetching for nested components.

This method handles two types of nested components: 1. Components with explicit parameter fields: Need special handling to extract the field value and merge remaining params 2. Discriminated union components: Already flattened by the serializer

The default implementation: - For components with explicit fields: includes that field in return dict - For discriminated unions or leaf components: returns standard params - For parent components: processes XBeachBaseModel children recursively

XBeachDataBlob fields are fetched into destdir and written as the file name under the field name. Override this method only for other file handling, such as fetching several files from a directory.

Parameters:

Name Type Description Default
destdir str | Path

Directory path for file operations.

required

Returns:

Type Description
Flat dictionary of XBeach parameters.

rompy_xbeach.components.sediment.morphology

XBeach morphology parameter configurations.

This module contains models for morphological evolution parameters including morphological acceleration, avalanching, and non-erodible structures.

Morphology pydantic-model

Morphology(**data: Any)

Bases: XBeachBaseModel

Morphological evolution parameters (XBeach Table 39).

Controls morphological time acceleration (morfac), the period during which morphology is active, avalanching slopes, and non-erodible structures.

The morfac parameter allows decoupling of hydrodynamic and morphological time scales, enabling faster simulation of slow morphological processes.

Avalanching occurs when bed slopes exceed critical values, causing the bed to collapse and slide downward. Different critical slopes apply above and below water due to different effective friction.

References

Roelvink, D. (2006). Coastal morphodynamic evolution techniques. Coastal Engineering, 53(2-3), 277-287.

Fields:

morphology pydantic-field

morphology: Literal[True] = True

Turn on morphology (XBeach default: the value of sedtrans, which is 1 unless the wave model is nonh)

dryslp pydantic-field

dryslp: Optional[float] = None

Critical avalanching slope above water (dz/dx and dz/dy) (XBeach default: 1.0)

dzmax pydantic-field

dzmax: Optional[float] = None

Maximum bed level change due to avalanching per time step (XBeach default: 0.05 m/s/m)

hswitch pydantic-field

hswitch: Optional[float] = None

Water depth at which is switched from wetslp to dryslp (XBeach default: 0.1 m)

lsgrad pydantic-field

lsgrad: Optional[float] = None

Factor to include longshore transport gradient in 1D simulations. dSy/dy = lsgrad * Sy; dimension 1/length scale of longshore gradients (XBeach default: 0.0 m⁻¹)

morfac pydantic-field

morfac: Optional[float] = None

Morphological acceleration factor. Multiplies all morphological change by this factor, allowing faster simulation of slow processes (XBeach default: 1.0, no acceleration)

morfacopt pydantic-field

morfacopt: Optional[bool] = None

Switch to adjust output times for morfac. If enabled (1), simulation time is shortened by morfac. If disabled (0), simulation runs for full hydrodynamic time (XBeach default: 1)

morstart pydantic-field

morstart: Optional[float] = None

Start time for morphology in morphological time (XBeach default: 0.0 s)

morstop pydantic-field

morstop: Optional[float] = None

Stop time for morphology in morphological time (XBeach default: 2000.0 s)

ne_layer pydantic-field

ne_layer: Optional[XBeachDataBlob] = None

Name of file containing thickness of the erodible layer. File format same as bathymetry file. Values define thickness of erodible layer on top of non-erodible layer (m)

struct pydantic-field

struct: Optional[bool] = None

Switch for enabling hard structures (non-erodible layers) (XBeach default: 0)

wetslp pydantic-field

wetslp: Optional[float] = None

Critical avalanching slope under water (dz/dx and dz/dy) (XBeach default: 0.15)

params property

params: dict

Return the XBeach parameters as a flat dictionary.

check_for_typos classmethod

check_for_typos(data: Any) -> Any

Suggest the closest field name for an unknown input key.

A field can be given by its name or, like in pydantic, by its alias.

dump_inputs_dict

dump_inputs_dict() -> dict

Return the original inputs as a dictionary.

dump_inputs_json

dump_inputs_json() -> str

Return the original inputs as a JSON string.

get

get(destdir: str | Path) -> dict

Return the params dict with file fetching for nested components.

This method handles two types of nested components: 1. Components with explicit parameter fields: Need special handling to extract the field value and merge remaining params 2. Discriminated union components: Already flattened by the serializer

The default implementation: - For components with explicit fields: includes that field in return dict - For discriminated unions or leaf components: returns standard params - For parent components: processes XBeachBaseModel children recursively

XBeachDataBlob fields are fetched into destdir and written as the file name under the field name. Override this method only for other file handling, such as fetching several files from a directory.

Parameters:

Name Type Description Default
destdir str | Path

Directory path for file operations.

required

Returns:

Type Description
Flat dictionary of XBeach parameters.

rompy_xbeach.components.sediment.bed

XBeach bed composition parameter configurations.

This module contains models for bed composition, layering, and bed update parameters.

BedUpdate pydantic-model

BedUpdate(**data: Any)

Bases: XBeachBaseModel

Bed update parameters (XBeach Table 40).

Controls the vertical structure of the bed when using multiple sediment fractions and bed layers. Parameters determine when layers split or merge based on their thickness relative to nominal values.

The variable thickness layer (specified by nd_var) can grow or shrink during the simulation to accommodate sediment deposition or erosion.

Pre-defined bed evolution can be specified using setbathy parameters, allowing time series of imposed bed levels that override computed morphological changes.

Note

It is strongly advised to turn off morphology computation (morphology=0) when using setbathy, as computed changes will be overridden.

Fields:

Validators:

frac_dz pydantic-field

frac_dz: Optional[float] = None

Relative thickness to split time step for bed updating (XBeach default: 0.7)

merge pydantic-field

merge: Optional[float] = None

Merge threshold for variable sediment layer (ratio to nominal thickness) (XBeach default: 0.01)

nd_var pydantic-field

nd_var: Optional[int] = None

Index of layer with variable thickness (XBeach default: 2)

nsetbathy pydantic-field

nsetbathy: Optional[int] = None

Number of prescribed bed updates in setbathyfile (XBeach default: 1)

setbathyfile pydantic-field

setbathyfile: Optional[XBeachDataBlob] = None

Name of prescribed bed update file. File contains time series of bed levels: each update starts with time (s), followed by bed level at every grid point in same format as initial bathymetry file

split pydantic-field

split: Optional[float] = None

Split threshold for variable sediment layer (ratio to nominal thickness) (XBeach default: 1.01)

params property

params: dict

Return the XBeach parameters as a flat dictionary.

validate_setbathy_consistency pydantic-validator

validate_setbathy_consistency() -> BedUpdate

Validate that nsetbathy is specified if setbathyfile is provided.

check_for_typos classmethod

check_for_typos(data: Any) -> Any

Suggest the closest field name for an unknown input key.

A field can be given by its name or, like in pydantic, by its alias.

dump_inputs_dict

dump_inputs_dict() -> dict

Return the original inputs as a dictionary.

dump_inputs_json

dump_inputs_json() -> str

Return the original inputs as a JSON string.

get

get(destdir: str | Path) -> dict

Return the params dict with file fetching for nested components.

This method handles two types of nested components: 1. Components with explicit parameter fields: Need special handling to extract the field value and merge remaining params 2. Discriminated union components: Already flattened by the serializer

The default implementation: - For components with explicit fields: includes that field in return dict - For discriminated unions or leaf components: returns standard params - For parent components: processes XBeachBaseModel children recursively

XBeachDataBlob fields are fetched into destdir and written as the file name under the field name. Override this method only for other file handling, such as fetching several files from a directory.

Parameters:

Name Type Description Default
destdir str | Path

Directory path for file operations.

required

Returns:

Type Description
Flat dictionary of XBeach parameters.

rompy_xbeach.components.sediment.composition

XBeach bed composition parameter configurations.

This module contains models for bed composition parameters including grain size distributions, sediment density, porosity, and layer thickness.

BedComposition pydantic-model

BedComposition(**data: Any)

Bases: XBeachBaseModel

Bed composition parameters for sediment properties.

These parameters define the physical properties of the sediment bed including grain size distribution, density, porosity, and layer structure. They are critical for morphological simulations.

XBeach supports multiple sediment classes (ngd > 1) for simulating graded sediments. When using multiple classes, D50 and D90 become lists with one value per class.

The bed is divided into layers with thickness defined by dzg1 (top), dzg2 (variable middle), and dzg3 (bottom). The variable layer (dzg2) can grow or shrink during simulation.

Note

For gravel beaches (XBeach-G), use larger grain sizes: - D50: 0.002-0.08 m (default 0.01 m) - D90: 0.003-0.12 m (default 0.015 m)

For sandy beaches, use smaller grain sizes: - D50: 0.00005-0.0008 m (default 0.0002 m) - D90: 0.0001-0.0015 m (default 0.0003 m)

References

XBeach manual: Bed composition parameters section.

Fields:

Validators:

ngd pydantic-field

ngd: Optional[int] = None

Number of sediment classes. Use ngd > 1 for graded sediments (XBeach default: 1)

nd pydantic-field

nd: Optional[int] = None

Number of computational layers in the bed (XBeach default: 3)

D50 pydantic-field

D50: Optional[Union[float, list[float]]] = None

Median grain diameter (m) for each sediment class. For sandy beaches: ~0.0002 m (XBeach default). For gravel beaches: ~0.01 m. Provide a list if ngd > 1.

D90 pydantic-field

D90: Optional[Union[float, list[float]]] = None

90th percentile grain diameter (m) for each sediment class. For sandy beaches: ~0.0003 m (XBeach default). For gravel beaches: ~0.015 m. Provide a list if ngd > 1.

D15 pydantic-field

D15: Optional[Union[float, list[float]]] = None

15th percentile grain diameter (m) for each sediment class. Only used when dilatancy=1 (XBeach default: 0.00015 m)

rhos pydantic-field

rhos: Optional[float] = None

Sediment density (kg/m³) (XBeach default: 2650.0)

por pydantic-field

por: Optional[float] = None

Bed porosity (volume fraction of voids) (XBeach default: 0.4)

dzg1 pydantic-field

dzg1: Optional[float] = None

Thickness of top sediment layer (m) (XBeach default: 0.1 m). Also sets default for dzg2 and dzg3 if not specified.

dzg2 pydantic-field

dzg2: Optional[float] = None

Nominal thickness of variable (middle) sediment layer (m). This layer can grow/shrink during simulation (XBeach default: dzg1)

dzg3 pydantic-field

dzg3: Optional[float] = None

Thickness of bottom sediment layer (m) (XBeach default: dzg1)

sedcal pydantic-field

sedcal: Optional[Union[float, list[float]]] = None

Sediment transport calibration factor for each sediment class (XBeach default: 1.0 for each class)

ucrcal pydantic-field

ucrcal: Optional[Union[float, list[float]]] = None

Critical velocity calibration factor for each sediment class (XBeach default: 1.0 for each class)

ws_nonh pydantic-field

ws_nonh: Optional[float] = None

Sediment fall velocity (m/s). Only used in non-hydrostatic mode (wavemodel=nonh). If not specified, XBeach computes this internally from D50 using Ahrens (2000) (XBeach default: 0.0, computed)

params property

params: dict

Return the XBeach parameters as a flat dictionary.

convert_float_to_list pydantic-validator

convert_float_to_list(v)

Convert single float values to a list for consistency.

validate_grain_size_lists pydantic-validator

validate_grain_size_lists() -> BedComposition

Validate that grain size lists match ngd if specified.

validate_d90_greater_than_d50 pydantic-validator

validate_d90_greater_than_d50() -> BedComposition

Validate that D90 > D50 for each sediment class.

get

get(destdir: Union[str, Path]) -> dict

Return params dict with list fields converted to space-separated strings.

XBeach expects grain size parameters (D50, D90, D15, sedcal, ucrcal) as space-separated values when multiple sediment classes are used.

check_for_typos classmethod

check_for_typos(data: Any) -> Any

Suggest the closest field name for an unknown input key.

A field can be given by its name or, like in pydantic, by its alias.

dump_inputs_dict

dump_inputs_dict() -> dict

Return the original inputs as a dictionary.

dump_inputs_json

dump_inputs_json() -> str

Return the original inputs as a JSON string.

rompy_xbeach.components.sediment.groundwater

XBeach groundwater flow parameter configurations.

This module contains models for groundwater flow parameters including permeability coefficients, aquifer properties, and groundwater head modeling.

GroundwaterFlow pydantic-model

GroundwaterFlow(**data: Any)

Bases: XBeachBaseModel

Groundwater flow parameters (XBeach Table 41).

Controls groundwater flow processes including Darcy flow permeability, aquifer properties, and groundwater head modeling.

The vertical permeability coefficient can be set differently than the horizontal using kx, ky, and kz keywords. The initial bed level of the aquifer and groundwater head can be specified using external files or uniform values.

References

XBeach manual: Grid and bathymetry section for file format details.

Fields:

aquiferbot pydantic-field

aquiferbot: Optional[float] = None

Level of uniform aquifer bottom (XBeach default: -10.0 m)

aquiferbotfile pydantic-field

aquiferbotfile: Optional[XBeachDataBlob] = None

Name of the aquifer bottom file. File format same as bathymetry file

dwetlayer pydantic-field

dwetlayer: Optional[float] = None

Thickness of the top soil layer interacting more freely with the surface water (XBeach default: 0.1 m)

gw0 pydantic-field

gw0: Optional[float] = None

Level of initial groundwater level (XBeach default: 0.0 m)

gw0file pydantic-field

gw0file: Optional[XBeachDataBlob] = None

Name of initial groundwater level file. File format same as bathymetry file

gwReturb pydantic-field

gwReturb: Optional[float] = None

Reynolds number for start of turbulent flow in case of gwscheme = turbulent (XBeach default: 100.0)

gwfastsolve pydantic-field

gwfastsolve: Optional[bool] = None

Reduce full 2D non-hydrostatic solution to quasi-explicit in longshore direction (XBeach default: 0)

gwheadmodel pydantic-field

gwheadmodel: Optional[
    Literal["parabolic", "exponential"]
] = None

Model to use for vertical groundwater head (XBeach default: parabolic)

gwhorinfil pydantic-field

gwhorinfil: Optional[bool] = None

Switch to include horizontal infiltration from surface water to groundwater (XBeach default: 0)

gwnonh pydantic-field

gwnonh: Optional[bool] = None

Switch to turn on or off non-hydrostatic pressure for groundwater (XBeach default: 0)

gwscheme pydantic-field

gwscheme: Optional[Literal['laminar', 'turbulent']] = None

Scheme for momentum equation (XBeach default: laminar)

kx pydantic-field

kx: Optional[float] = None

Darcy-flow permeability coefficient in x-direction (XBeach default: 0.0001 m/s)

ky pydantic-field

ky: Optional[float] = None

Darcy-flow permeability coefficient in y-direction (XBeach default: 0.0001 m/s)

kz pydantic-field

kz: Optional[float] = None

Darcy-flow permeability coefficient in z-direction (XBeach default: 0.0001 m/s)

params property

params: dict

Return the XBeach parameters as a flat dictionary.

check_for_typos classmethod

check_for_typos(data: Any) -> Any

Suggest the closest field name for an unknown input key.

A field can be given by its name or, like in pydantic, by its alias.

dump_inputs_dict

dump_inputs_dict() -> dict

Return the original inputs as a dictionary.

dump_inputs_json

dump_inputs_json() -> str

Return the original inputs as a JSON string.

get

get(destdir: str | Path) -> dict

Return the params dict with file fetching for nested components.

This method handles two types of nested components: 1. Components with explicit parameter fields: Need special handling to extract the field value and merge remaining params 2. Discriminated union components: Already flattened by the serializer

The default implementation: - For components with explicit fields: includes that field in return dict - For discriminated unions or leaf components: returns standard params - For parent components: processes XBeachBaseModel children recursively

XBeachDataBlob fields are fetched into destdir and written as the file name under the field name. Override this method only for other file handling, such as fetching several files from a directory.

Parameters:

Name Type Description Default
destdir str | Path

Directory path for file operations.

required

Returns:

Type Description
Flat dictionary of XBeach parameters.