A method to model the influence of a hydraulic structure connecting two water bodies is presented. This method was incorporated into an existing two-dimensional (depth-averaged) hydrodynamic model. Specifically, the flow in and out of a cell (used to represent the hydraulic structure) is calculated using a broad crested weir formula and is determined from the time-varying head difference between the two systems. An example application of the method is also presented. In this example the hydraulic structure cell was used to model the flow through an automated bi-directional hydraulic structure connecting an estuary to an artificial lake system. The gates of this hydraulic structure are programmed to open four times each day (once during each semi-diurnal tidal phase) and remain open for a period of 2 hours, allowing alternative and partial exchange between the two water bodies. Hence, the model setup involved the specification of the opening and closing times of the gates and the calibration of the discharge coefficient. Tests indicated that these were the most sensitive parameters which ensured the correct volume of water exchange between the two systems. Finally, the model-predicted results were compared with available surface elevation observations at two sites within the lake. The comparison showed a good agreement (RMS error <0.09), quantifying the ability of the hydraulic structure cells to simulate the flux between the estuary and lake for each opening.