delwaq time-step relative to telemac timestep - Home - Delft3D
delwaq time-step relative to telemac timestep
I've been handed a delwaq model (forced by 1-hourly hydrodynamics from telemac3D via the respective *.dwq files) that runs at 5 min time-step. The model domain is a lake with a tidal inlet and several freshwater inflow locations.
I noticed that the continuity of the model output (in *.ada) varies between 0.7-1.1. Some areas of the domain drop to 0.7, while most of the domain remains around 0.9, and peaks to 1.1 at the tidal inlet of the lake. The model uses integration scheme, 15.70.
**The reason of checking this is: a tracer plume (dTr) appears to advect at ~1m/s, while the telemac hydro output (from the *.slf) only shows maximum magnitudes of 0.25m/s.***
I reduced the delwaq time-step from 5mins to 30s, in an attempt to see if the continuity improved, but there is no improvement.
I'm just wondering if there is a limit on the ratio between the delwaq:telemac timesteps, beyond which the continuity will not be equal to one. Right now, my ratio is 5:60 (1/12) and I have done 0.5:60 (1/120).
Is it best to remain close to 1/4 (or something like that)? i.e., have finer temporal hydrodynamic input (15 mins instead of hourly).
Any insight would be appreciated.
PS: I ask here because each run takes 2 weeks to finish, so I figured to tap into the user-knowledge base first to save time.
The schemes used by DELWAQ are only mass-conserving when the underlying hydrodynamics is volume-conserving. The deviations you report are far too large to be comfortable. Something is wrong here and that cannot be helped by a smaller DELWAQ timestep. (In case you are wondering: the procedure used by DELWAQ is volume-conserving - the flow is kept constant between hydrodynamic timesteps and the volume is interpolated linearly.)
You mention that the run takes two weeks. This indicates a very large model. Could you describe it in some more detail? How many grid cells, how large are the grid cells? That sort of things. I am also surprised by the difference in advection/flow velocity - I have no idea where that is coming from. How did you find that out?
**What the model is ***
The hydrodynamic model is 32734 nodes x 10 sigma layers. The smallest grid size in the shallower areas is ~30 m expanding to ~300 m in the center of the lake. The model simulates Lake Macquarie in Australia. The shallow areas are around 1 m deep (we have wetting and drying) and the deep areas are in the range of ~20-30m. The original time-step of the DELWAQ was 5 mins. The model runs for 3 months (using dt=5 mins) in wall-time of 6 days. Once the dt drops to 30s, the wall-time blows up to 2+weeks. This is done using 12 cores in a older HP Z800 desktop.The DELWAQ model doesn't aggregate in time or space in this case.
**How we figured the advection overestimate**
In DELWAQ (or is it D-water), we have 35 variables being simulated (NO3, etc), and 5 of them are tracers (decaying). When we plotted 1 of the tracers, we found that the tracer plume advects a long distance (3km) (See Fig 1a & 1b) in an hour (~1m/s). Half hourly outputs also show the same behaviour. This is a relatively large speed and much larger than usually observed for this region. Similar behaviour happens with other tracers (but not as intense, i.e., small fast moving plume).
I plotted the surface velocity from the telemac output (*.slf) and the speeds at these times are in the range of 0.2-0.3 m/s. Of course, DELWAQ doesn't use the *.slf hydro files as input, but rather their equivalent *.dwq. I haven't been able to open and read this file yet to confirm that the behaviour is not hydro forced (but I checked the *.slf and *.dwq were created the same time, so created by the same telemac run).
Do you have a matlab/python/fortran script that would read the *.dwq files?
The other behaviour is the tracer plume advects almost exclusively through the surface layer. See Fig 1b & 2, which are the top and the layer below the top layer respectively. Each layer is ~0.1 fraction of depth. The surface plume covers ~3km while the layer just below barely moves 600m...this region is not known for strong stratification.
These odd behaviours led me to check the continuity output, which were !=1 for most of the domain. I've attached the *.inp file for reference. The scheme is 15.70.
I appreciate the help.
Let me start with the problem that the tracer is mainly present in the surface layer:
The vertical diffusion is set to 1.0e-7 m2/s - if there is no vertical flow, then the timescale this diffusion causes is around 10000 days - depth**2/ diffusion. So vertical mixing is a matter of vertical flow. You may want to put in a larger diffusion coefficient.
The integration method, 15, is an implicit method. This means that - in principle - substance can travel from one side of the model area to the other side in one single step. Of course the concentrations will be very small if it is controlled by flow (instead of diffusion/dispersion) but still. It simply means that the fast transport you see may be due to this and you need a different method to estimate the travel time. Try a calculation with cTr1 and dTr1 and the Age process turned on. You only need a few time steps and study the "age" output parameter for this.
The continuity is a mystery to me. Quite odd :(.
As for the .dwq files:
These files are "unformatted, big-endian" files, the record structure is quite simple: the first number is an integer that represents the time in seconds (since the reference time - T0) and the rest are the N volumes or the M flows or areas - N is the total number of segments, M is the total number of exchanges.
Fortran code (using Intel Fortran, because of the big-endianness):
open( 10, file = '...', form = 'unformatted', convert = 'big_endian' )
read( 10, iostat = ierr ) itime, flow ! or volume
if ( ierr /= 0 ) exit