Tutorial Module03 tmp

From TUFLOW FV Wiki
Jump to navigation Jump to search
LINKS: Main page
Modelling Advice Tutorial Models Tips and Tricks
Mesh Generation Tips Tutorial Module 1 SMS
A Model Won't Start Tutorial Module 2 UltraEdit
A Model Crashes Tutorial Module 3 Notepad++
A Model Runs Slow Tutorial Module 4 Excel
TUFLOW Products Support / Contact TUFLOW FV Utilities
Requesting a Licence Running TUFLOW FV
Mesh Generation Tips


Tutorial Description

The following example demonstrates the development of a floodplain model with a tidal outlet. The example includes the following features, progressively increasing the complexity of the floodplain model:

  • Basic Hydrodynamic Model (Standard, Isodate, US/English/Imperial Units (ft))
  • Hydraulic Structure Modelling (Weir, Bridge, Culvert)
  • Advection Dispersion Modelling (Salinity, Temperature, Heat, Tracer)

Tutorial Data

Download the Tutorial Module 3 dataset from the TUFLOW Website: http://www.tuflow.com/FV%20TutorialModel.aspx

The following datasets will be used during this tutorial:

  • Aerial photography (orthophoto.jpg)
  • SMS 2dm geometry data (FMA2_FV01.2dm)
  • Boundary condition data, in comma separated variable format (.csv)
  • GIS data representing various breaklines and fill polygons within the model domain

These datasets are contained within the folder titled 'Module_Data'. Complete versions of the model have also been provided within the folder 'Complete_Model'.

Basic Model Setup

Initialise Projection

Establish the folder structure shown below.

Tute3 000.png

Open SMS. Initialise the project projection.

Projection edit.jpeg

Select the following, Horizontal = No Projection: Meters, Vertical = Meters

Display Projection.png

Aerial Imagery

Copy the files from the Module_Data\Geometry folder into the Floodplain_Example\geo folder within the project directory. Aerial imagery has been pre-registered to the project projection for this tutorial, open 'APH\orthophoto.jpg' in SMS.

Note: Tutorial 4 provides an example demonstrating how to register aerial imagery in SMS.
Tute3 002.png

Model Mesh

Open FMA2_FV01.2dm from the Floodplain_Example\geo folder in project directory using SMS.

This geometry file is a pre-processed mesh, containing element definitions, elevation data, landuse data and external boundary condition location information. The map, landuse and DEM datasets that were used to create this mesh are provided within the tutorial module dataset folder (FMA2_FV01.map, FMA2_FV01.materials and DEM_5m.asc).

Tute3 003.png

FVC Updates

Using a text editor, create an fvc file called FMA2_Mesh_001.fvc within the Floodplain_Example\input folder. The control file should include the syntax commands listed on the lefthand side of the following table. This model simulation will be used to test the quality of the model mesh. The results will inform if mesh optimisation is required, and if so, where.

! TUFLOW FV TUTORIAL The first 2 lines are a description of the model simulation. You may also wish to include the initials of the modeller, etc.
!Floodplain Model – Mesh Optimisation


Tutorial Model == ON
! GENERAL PARAMETERS The default friction approach, Manning’s number will be used as the bottom drag model
Bottom Drag Model == Manning


! TIME COMMANDS The time commands include the time format (Hours). Start and end times. The CFL limit is 1.0 (default value – TUFLOW FV then assigns a timestep at each computational step according to the CFL limit and also between the ranges specified in the timestep limits.
Time Format == Hours
Start Time == 0.0
End Time == 12.0
CFL == 1.0
Timestep Limits == 0.01,100


! MODEL PARAMETERS The model parameters are those that control various physical and numerical processes. A Smagorinsky eddy viscosity approach has been specified, with a Smagorinsky factor of 0.5.
momentum mixing model == Smagorinsky
Global horizontal eddy viscosity == 0.5


! GEOMETRY The model geometry is the 2dm created for this tutorial module. This 2dm file example defines the mesh/element configuration, topography/bathymetry data, material/landuse definition and external boundary condition locations.
Geometry 2D == ..\geo\FMA2_FV01.2dm


! MATERIAL PROPERTIES Nine material types have been specified, each corresponding to a unique manning n value. These include

1 = River

2 = Creek

3 = Vegetated Dunes

4 = Pasture

5 = Medium Vegetation

6 = Rural

7 = Crops

8 = Dense Vegetation

9 = Dense Urban

material == 1
bottom roughness == 0.02
end material
material == 2
bottom roughness == 0.04
end material
material == 3,4
bottom roughness == 0.05
end material
material == 5,6,7
bottom roughness == 0.07
end material
material == 8
bottom roughness == 0.1
end material
material == 9
bottom roughness == 0.2
end material


! INITIAL CONDITIONS The initial internal model boundary conditions
Initial Water Level == 1.93


! BOUNDARY CONDITIONS The boundary conditions link the csv files containing the water level information along the external boundaries to the model. Two flow (Q) and water level (WL) boundaries are specified.
bc == Q, 1, ..\bc\inflows.csv
bc header == Time,Main_Inflow
end bc
bc == WL, 2, ..\bc\tide.csv
bc header == Time,level
end bc
bc == Q, 3, ..\bc\inflows.csv
bc header == Time,Tributary_Inflow
end bc
bc == WL, 4, ..\bc\tide.csv
bc header == Time,level
end bc


! OUTPUT COMMANDS In this instance, a datv format file is specified. This format is easily read into SMS for viewing. The h, d and v mean that outputs files containing water level, depth and velocity will be created.
output dir == ..\Output\
output == datv
output parameters == h,v,d
output interval == 900
end output


! USER SPECIFIED COMMANDS This command means internal and external timesteps are similarly restrictive. This is recommended for floodplain modelling.
modesplit == 0

Mesh Review Simulation

Run the recently created FMA2_Mesh_001.fvc model. Please refer to Running TUFLOW FV for a detailed description of the various methods for running a TUFLOW simulation.

Reviewing Mesh Performance

Before making further updates to the model we will review the quality of our mesh based on the results of FMA2_Mesh_001.fvc

TUFLOW FV is an adaptive timestepping model. The program will automatically calculate an appropriate timestep to achieve a stable solution based on Courant-Friedrichs-Lewy criteria (CFL parameter). This makes TUFLOW FV extremely stable, there is however the risk that a poorly configured mesh will result in small timesteps and longer than necessary simulations times. This typically occurs where unplanned small cells have been created in deep water locations.

We will review the FMA2_Mesh_001.fvc simulation timestep results in SMS to identify the cells which are driving the timestep selection. Open Floodplain_Example\input\log\FMA2_Mesh_001_ext_cfl_dt.csv in Excel.

  • Select the result data cells within Excel
  • Sort the data (Data >> Sort). Select cfkl_dt_min and Smallest to Largest

Tute3 Mesh Test 001.JPG

The sorted data shows four cell faces with a value less than 0.3 seconds. These cell faces will be setting the timestep for the entire model. Modifying the mesh in these locations will mean the simulation can run at a 0.6 second timestep, in effect making the model run twice as fast. We can review the location of these timestep limiting cell faces using SMS.

Open Floodplain_Example\input\log\FMA2_Mesh_001_ext_cfl_dt.csv in SMS. When prompted for a format to open the file, select “use import wizard”.
Tute2 064.png

This wizard can be used to import a large variety of data into SMS. In this case the file is in a comma separated value (.csv) format. In the file import options select “Delimited” and select comma as the delimiter.
Tute2 065.png

Turn off "triangulate data" and using the dropboxes set:

  • ctrd_x = X
  • ctrd_Y = Y
  • dt_min (minimum timestep) = Z

Tute2 066.png

Select “Finish” to open the data. There will be a new scatter dataset created.
In the display options set the points to be visible, and select “Use contour colour scheme”.

Tute2 067.png

In the contour options, set the contour range to highlight the cells with a small timestep:
Tute2 068.png

The timesteps should now appear as a series of points, as per the image below. These results can be used to identify the cells that are limiting the model timestep. In this case a thin unintended sligther of a cell in the deep water area offshore from the river entrance is limiting the timestep for the entire model.
Merging this cell with it's neighbouring cell will fix the mesh and double the simulation speed of this model.
Tute3 Mesh Test 003.png


Update Mesh and Run Model

We have merged the cells that were limiting the model timestep with the neighbouring cell. The updated mesh is shown below.
Tute3 Mesh Test 004.png
We have saved this update into the 2dm file FMA2_FV02.2dm.

  • Copy FMA2_FV02.2dm file from "\Complete Model\geo" folder. Update the 2dm file reference in the FVC file, FMA2_Mesh_001.fvc. Update the command to: Geometry 2D == ..\geo\FMA2_FV02.2dm
  • Saves the FVC file as FMA2_Mesh_002.fvc.
  • Run FMA2_Mesh_002.fvc using your preferred method.

Review the final elapsed time reported within the log files from the two model simulations:

  • log\FMA2_Mesh_001.log
  • log\FMA2_Mesh_002.log

The cell merger has meant model FMA2_Mesh_002' ran at a much higher timestep than FMA2_Mesh_001. The model runs over three times faster!

Hydrodynamic Modelling

The optimised mesh model FMA2_Mesh_002.fvc will be further developed in this example. Updates to the model will include various geometry changes, structure definitions and adoption of and isodate time format (date, hours, minutes, seconds). These are features which are commonly used during floodplain modelling.

FVC Hydrodynamic Updates

Syntax additions to FMA2_Mesh_002.fvc are highlighted below. After making the syntax updates, save the TUFLOW FV control file with the name, FMA2_Hydro_002.fvc. The control file should be saved to the input folder within the model directory (Floodplain_Example\input)

Further discussion of the various model updates are outlined in the following sections.

! TUFLOW FV TUTORIAL Model description change
!Floodplain Model – Hydro


Tutorial Model == ON
! GENERAL PARAMETERS No syntax changes
Bottom Drag Model == Manning


! TIME COMMANDS The time commands have been updated to use isodate format. This is useful when calibrating a model to historic recorded datasets.
Time Format == Isodate
Start Time == 01/01/2010 00:00
End Time == 02/01/2010 00:00 
CFL == 0.9  
Time Format == Isodate
Start Time == 01/01/2010 00:00
End Time == 02/01/2010 00:00
CFL == 0.9
Timestep Limits == 0.01,100


! MODEL PARAMETERS No syntax changes
momentum mixing model == Smagorinsky
Global horizontal eddy viscosity == 0.5


! GEOMETRY Additional geometry update commands:
Cell elevation polyline == ..\geo\GIS\Gully_Breakline_002_ptp.csv
Cell elevation polyline == ..\geo\GIS\Road_Breakline_002_ptp.csv  
Cell elevation polygon == ..\geo\GIS\Fill_Pad_002_ptp.csv, 6.0
Cell elevation file == ..\geo\GIS\Sand_Extraction.csv,coordinate,overwrite  
Geometry 2D == ..\geo\FMA2_FV02.2dm
Cell elevation polyline == ..\geo\GIS\Gully_Breakline_002_ptp.csv
Cell elevation polyline == ..\geo\GIS\Road_Breakline_002_ptp.csv
Cell elevation polygon == ..\geo\GIS\Fill_Pad_002_ptp.csv, 6.0
Cell elevation file == ..\geo\GIS\Sand_Extraction.csv,coordinate,overwrite
! STRUCTURE DEFINITIONS This is a new block entry within the control file. New syntax includes:
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 5
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 6
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 7
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 8
structure == Nodestring, 5
Flux function == weir
Properties == 9.5,1.6
end structure
structure == Nodestring, 6
form loss coefficient == 0.5
end structure
structure == Linked nodestrings, 7,8
flux function == culvert
Culvert File == ..\geo\STRUCT\Culvert_database.csv, 1
end structure
Structure == autoweir
End Structure


nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 5
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 6
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 7
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 8
structure == Nodestring, 5
Flux function == weir
Properties == 9.5,1.6
end structure
structure == Nodestring, 6
form loss coefficient == 0.5
end structure
structure == Linked nodestrings, 7,8
flux function == culvert
Culvert File == ..\geo\STRUCT\Culvert_database.csv, 1
end structure
Structure == autoweir
End Structure


! MATERIAL PROPERTIES No syntax changes
material == 1
bottom roughness == 0.02
end material
material == 2
bottom roughness == 0.04
end material
material == 3,4
bottom roughness == 0.05
end material
material == 5,6,7
bottom roughness == 0.07
end material
material == 8
bottom roughness == 0.1
end material
material == 9
bottom roughness == 0.2
end material


! INITIAL CONDITIONS No syntax changes
Initial Water Level == 1.93


! BOUNDARY CONDITIONS Update of the boundary condition header reference for compatibility with isodate format
bc header == Date,Main_Inflow
bc header == Date,level
bc header == Date,Tributary_Inflow
bc header == Date,level
bc == Q, 1, ..\bc\inflows.csv
bc header == Date,Main_Inflow
end bc
bc == WL, 2, ..\bc\tide.csv
bc header == Date,level
end bc
bc == Q, 3, ..\bc\inflows.csv
bc header == Date,Tributary_Inflow
end bc
bc == WL, 4, ..\bc\tide.csv
bc header == Date,level
end bc


! OUTPUT COMMANDS Additional datv output, 'dz'. This will output the model bed elevations (including the topography updates defined via the various geometry inputs)
output parameters == h,v,d,zb 


Inclusion of “flux” output, reporting flow across nodestrings within the mesh (add more nodestrings for additional locations as necessary)

output == flux									  
 output interval == 900.  
end output

Specification of output points locations. Time series results for the coordinate locations defined in “’’ Output_Points.csv’’” will be output. These results are often useful for model calibration against gauged water level data.

output == points 
 output points file == ..\geo\GIS\Output_Points.csv                                                          
 output parameters == h     										 
 output interval == 900. 		 
end output
                                                                                                                              
output dir == ..\Output\
output == datv
output parameters == h,v,d,zb
output interval == 900
end output
output == flux
output interval == 900.
end output
output == points
output points file == ..\geo\GIS\Output_Points.csv
output parameters == h
output interval == 900.
end output



! USER SPECIFIED COMMANDS No syntax changes
modesplit == 0

Geometry Updates

Geometry commands are used to modify the base topography and bathymetry in the 2dm geometry file. The files are read by TUFLOW FV sequentially. As such, in the case where multiple files include details redefining the elevation for a particular cell, the last file read by TUFLOW FV will overwrite the preceding commands for the unique location.

Five separate geometry inputs have been specified:

 Cell elevation polyline == ..\geo\GIS\Gully_Breakline_002_ptp.csv 
 Cell elevation polyline == ..\geo\GIS\Road_Breakline_002_ptp.csv
 Cell elevation polygon == ..\geo\GIS\Fill_Pad_002_ptp.csv, 6.0
 Cell elevation file == ..\geo\GIS\Sand_Extraction.csv,coordinate,overwrite
  1. A breakline, updating the bathymetry in major tributary creek line.
  2. A breakline, updating the crest level for a major road which traverses the upper floodplain.
  3. A region of ‘fill’ associated with an industrial development site.
  4. A region of ‘cut’, representing a gravel extraction pit.

Tute3 011.png

A new output type has been specified: output parameters == zb
‘zb’ will output the model topography in dat format. This a convenient way to view the final model topography, including the changes made via the various geometry inputs.

Structure Modelling

Structure commands are used to define hard engineering features such as weirs, bridges and culverts. Examples of these are provided below.

Tute3 012.png

Structure Location/Nodestrings

The location of structures within a model are defined by nodestring locations. Nodestrings can be manually defined during the mesh generation process, alternatively a "nodestring polyline" command can be used. In this example:

  1. Weir = Nodetring 5
  2. Bridge = Nodestring 6
  3. Culvert = Inlet: Nodestring 7, Outlet: Nodestring 8
  nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 5 
  nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 6 
  nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 7 
  nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 8

Weir

A weir will be defined in the upstream reach of the main river channel. The weir has a crest elevation of 9.5mAHD.

  structure == Nodestring, 5 
  Flux function == weir 
  Properties == 9.5,1.6 
  end structure 

Bridge

A bridge will be defined approximately 400m downstream of the weir. A form loss coefficient of 0.2 will be applied. This coefficient accounts for the flow disturbance losses due to piers. This value has been calculated based on information reported within, "Hydraulic of Bridged Waterways". Note: Losses associated with flow contraction and expansion due to abutments is not included within this value. These expansion and contraction losses are already accounted for by the 2D topography in the model.

The bridge has a deck level above the peak flood level, as such no obvert elevation is defined. This can however be done using a width file.

  structure == Nodestring, 6 
  form loss coefficient == 0.2 
  end structure  

Culvert

A bank of culverts is located under the approach road to the bridge. The inlet to the culverts is defined by nodestring 7. Nodestring 6 represents the culvert outlet. A culvert file has been used to define the design features of the culvert (eg. size and invert).

Note the culvert file can contain information for all culverts within the model (i.e. multiple culverts can be defined within the one file). The ID at the end of the Culvert File command in the fvc file links the nodestring location (7,8) to the specific entry in the culvert file (ID).

The following information is included within the culvert file.

  • ID = Culvert ID (integer only)
  • Type = Box or circular
  • Ignore = NA
  • UCS = Automatic calculation of nodal storage
  • Len_or_ANA = Structure length
  • n_or_n_F = Barrel manning n value
  • US_Invert = Upstream invert
  • DS_Invert = Downstream invert
  • Form_Loss = NA
  • pBlockage = NA
  • Inlet_Type = NA
  • Conn_2D = NA
  • Conn_No = NA
  • Width_or_Dia = Width (box) or diameter (circular)
  • Height_or_WF = Height (box)
  • Number_of = Number of barrels
  • Height_Cont = Height contraction coefficient
  • Width_Cont = Width contraction coefficient
  • Entry_Loss = Entry loss coefficient
  • Exit_Loss = Exit loss coefficient


  structure == Linked nodestrings, 7,8 
  flux function == culvert 
  Culvert File == ..\geo\STRUCT\Culvert_database.csv, 1  
  end structure

Auto Weir Specification

The "autoweir" structure command identifies all cell faces (not nodestrings) in the model domain that are elevated above the adjacent cells. These cell faces are then assigned a weir flow condition. This command is recommended for floodplain applications, where natural riverbanks may act as weirs when overtopped.

  structure == autoweir 
  end structure   

Isodate Time Format [Historic Event]

Model calibration typically requires modelling of historic events. Input and output to TUFLOW FV can be configured to use date/times values.

  Time Format == Isodate 
  Start Time == 01/01/2010 00:00 
  End Time == 02/01/2010 00:00

US/English Units

TUFLOW FV can now be configured to use US or English units (ft). Specify the following command to use US/English units:

 units == english 

When using this command all elevation data, model parameters and inflow boundary conditions will require inputs specified in feet (instead of metres). A US/English unit example model has not been included in this tutorial module.

Run TUFLOW FV

Once you’re happy with the FVC file contents, run TUFLOW FV.

Useful links:

Hydrodynamic Simulation Results

Open the model geometry file (FMA2_FV02.2dm) and background imagery in SMS.

Tute3 014.png


Open the spatial_geo.csv files (located in the log folder) and bed elevation result file (FMA2_Hydro_002_ZB.dat).

  • Are the additional nodestrings (defined via the nodestring polyline command) being read correctly? This data is reported in the spatial_geo.csv file
  • Are the geometry changes correctly being applied to the model?

Note: TUFLOW FV is a cell centred scheme. As such, geometry updates have been applied at the cell centre. The exact cell centre elevation values are reported in the spatial_geo.csv file. SMS uses cell corner information to display elevations/results. Due to this, TUFLOW FV results are interpolated to cell corners for display in SMS. Due to this interpolation, the values in SMS will not match the modelled cell centred values exactly. In the majority of cases this does not adversely impact the model results significantly.


Tute3 015b.png


Open the simulation water level, depth and velocity results (FMA2_Hydro_002_H.dat, FMA2_Hydro_002_D.dat, FMA2_Hydro_002_V.dat).

  • How do the various control structures alter the flood behavior? Try removing some structures, rerunning the model then comparing results (remember to rename the simulation file before running the model so past results are not overwritten).
    • Results can be compared on a timestep basis using SMS, refer to SMS Data Calculations; or
    • Create a maximum water surface dat file from the model results using RES_to_RES.exe and compare the maximum water surface results for the various test scenarios, refer to RES to RES Max Result Processing .
res_to_res.exe -2dm FMA2_FV02.2dm -max FMA2_Hydro_002_H.dat

The figure below shows the impact of the weir structure on the flood level:

  • At time = 01/01/2012 12.30pm; and
  • For the maxium water surface results.

Tute3 020.png Tute3 021.png


Open the point water level (FMA2_Hydro_002_POINTS.csv) and flux results (FMA2_Hydro_002_FLUX.csv)

  • Plot both datasets in Excel.
  • Try adding an additional point location and flux output nodestring to the model, then using the results from both datasets to derive a rating curve.


Tute3 016.png

Advection Dispersion Modelling

The hydrodynamic model FMA2_Hydro_002.fvc will be further developed to include various advection dispersion features. The example with demonstrate simple modelling of salinity, temperature, heat and a tracer.

FVC Updates (Salinity and Temperature)

This example demonstrates how to model salinity and temperature. Syntax additions to FMA2_Hydro_002.fvc are highlighted below. After making the syntax updates, save the TUFLOW FV control file with the name, FMA2_AD01_002.fvc. The control file should be saved to the input folder within the model directory (Floodplain_Example\input).

! TUFLOW FV TUTORIAL Model description change
!Floodplain Model – AD (Salinity, Temp)


Tutorial Model == ON
! GENERAL PARAMETERS Additional commands, enabling salinity and temerature modelling (neither will be coupled with density).
Include Salinity == 1,0
Include Temperature == 1,0
Bottom Drag Model == Manning
Include Salinity == 1,0
Include Temperature == 1,0


! TIME COMMANDS No syntax changes
Time Format == Isodate
Start Time == 01/01/2010 00:00
End Time == 02/01/2010 00:00
CFL == 0.9
Timestep Limits == 0.01,100


! MODEL PARAMETERS No syntax changes
momentum mixing model == Smagorinsky
Global horizontal eddy viscosity == 0.5


! GEOMETRY No syntax changes
Geometry 2D == ..\geo\FMA2_FV02.2dm
Cell elevation polyline == ..\geo\GIS\Gully_Breakline_002_ptp.csv
Cell elevation polyline == ..\geo\GIS\Road_Breakline_002_ptp.csv
Cell elevation polygon == ..\geo\GIS\Fill_Pad_002_ptp.csv, 6.0
Cell elevation file == ..\geo\GIS\Sand_Extraction.csv,coordinate,overwrite


! STRUCTURE DEFINITIONS No syntax changes
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 5
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 6
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 7
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 8
structure == Nodestring, 5
Flux function == weir
Properties == 9.5,1.6
end structure
structure == Nodestring, 6
form loss coefficient == 0.5
end structure
structure == Linked nodestrings, 7,8
flux function == culvert
Culvert File == ..\geo\STRUCT\Culvert_database.csv, 1
end structure
Structure == autoweir
End Structure


! MATERIAL PROPERTIES No syntax changes
material == 1
bottom roughness == 0.02
end material
material == 2
bottom roughness == 0.04
end material
material == 3,4
bottom roughness == 0.05
end material
material == 5,6,7
bottom roughness == 0.07
end material
material == 8
bottom roughness == 0.1
end material
material == 9
bottom roughness == 0.2
end material


! INITIAL CONDITIONS Update of the initial conditions for salinity and temperature modelling.
Initial Salinity == 35.
Initial Temperature == 18.
Initial Water Level == 1.93
Initial Salinity == 35.
Initial Temperature == 18.


! BOUNDARY CONDITIONS Update of the boundary condition header for salinity and temperature modelling
bc header == Date,Main_Inflow,Salinity,temperature
bc header == Date,level,Salinity,temperature
bc header == Date,Tributary_Inflow,Salinity,temperature
bc header == Date,level,Salinity,temperature

Note: Salinity and temperature data already exists within the provided boundary condition datasets.

bc == Q, 1, ..\bc\inflows.csv
bc header == Date,Main_Inflow,Salinity,temperature
end bc
bc == WL, 2, ..\bc\tide.csv
bc header == Date,level,Salinity,temperature
end bc
bc == Q, 3, ..\bc\inflows.csv
bc header == Date,Tributary_Inflow,Salinity,temperature
end bc
bc == WL, 4, ..\bc\tide.csv
bc header == Date,level,Salinity,temperature
end bc


! OUTPUT COMMANDS Additional datv output, 'sal' and 'temp'. This will output the model salinity and temperature results.
output parameters == h,v,d,zb,sal,temp	 
output dir == ..\Output\
output == datv
output parameters == h,v,d,zb,sal,temp
output interval == 900
end output
output == flux
output interval == 900.
end output
output == points
output points file == ..\geo\GIS\Output_Points.csv
output parameters == h
output interval == 900.
end output



! USER SPECIFIED COMMANDS No syntax changes
modesplit == 0

Run TUFLOW FV

Once you’re happy with the FVC file contents, run TUFLOW FV.

Useful links:

Salinity and Temperature Simulation Results

Open the model geometry file (FMA2_FV02.2dm) and background imagery in SMS. Update the time settings in SMS to display the results using isodate format, refer to Changing SMS Time Settings (Hours to Isodate).

Open the simulation water level, salinity and temperature results (FMA2_AD01_002_H.dat,FMA2_FV01_002_Sal.dat, FMA2_FV01_002_Temp.dat).

  • View the spatial results in SMS
  • Extract point data from a location within the coastal ICOL lake in the southern half of the model, refer to Extracting Point Output Using SMS for directions how to extract and export point results from "dat" results. How does the water temperature and salinity change in the lake when breakout from the river to the north enters the waterbody?

Tute3 017.png

FVC Updates (Heat and Tracer)

This example demonstrates how to model heat (atmospheric) and a dispersive tracer. Syntax additions to FMA2_AD01_002.fvc are highlighted below. After making the syntax updates, save the TUFLOW FV control file with the name, FMA2_AD02_002.fvc. The control file should be saved to the input folder within the model directory.

! TUFLOW FV TUTORIAL Model description change
!Floodplain Model – AD (Heat, Tracer)


! GENERAL PARAMETERS Additional commands, enabling heat and tracer modelling.
Include Heat == 1
Ntracer == 1

Note: To model mutiple tracers, update 'Ntracer' to reflect number to be modelled

Bottom Drag Model == Manning
Include Salinity == 1,0
Include Temperature == 1,0
Include Heat == 1
Ntracer == 1


! TIME COMMANDS No syntax changes
Time Format == Isodate
Start Time == 01/01/2010 00:00
End Time == 02/01/2010 00:00
CFL == 0.9
Timestep Limits == 0.01,100


! MODEL PARAMETERS No syntax changes
momentum mixing model == Smagorinsky
Global horizontal eddy viscosity == 0.5


! GEOMETRY No syntax changes
Geometry 2D == ..\geo\FMA2_FV02.2dm
Cell elevation polyline == ..\geo\GIS\Gully_Breakline_002_ptp.csv
Cell elevation polyline == ..\geo\GIS\Road_Breakline_002_ptp.csv
Cell elevation polygon == ..\geo\GIS\Fill_Pad_002_ptp.csv, 6.0
Cell elevation file == ..\geo\GIS\Sand_Extraction.csv,coordinate,overwrite


! STRUCTURE DEFINITIONS No syntax changes
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 5
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 6
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 7
nodestring polyline == ..\geo\STRUCT\FMA2_Struct_Nodestring_002.csv, 8
structure == Nodestring, 5
Flux function == weir
Properties == 9.5,1.6
end structure
structure == Nodestring, 6
form loss coefficient == 0.5
end structure
structure == Linked nodestrings, 7,8
flux function == culvert
Culvert File == ..\geo\STRUCT\Culvert_database.csv, 1
end structure
Structure == autoweir
End Structure


! MATERIAL PROPERTIES No syntax changes
material == 1
bottom roughness == 0.02
end material
material == 2
bottom roughness == 0.04
end material
material == 3,4
bottom roughness == 0.05
end material
material == 5,6,7
bottom roughness == 0.07
end material
material == 8
bottom roughness == 0.1
end material
material == 9
bottom roughness == 0.2
end material


! INITIAL CONDITIONS Update of the initial conditions for the tracer.
Initial Tracer Concentration  == 0
Initial Water Level == 1.93
Initial Salinity == 35.
Initial Temperature == 18.
Initial Tracer Concentration == 0


! BOUNDARY CONDITIONS Update with additional boundary condition inputs. Heat boundaries (wind, shortwave radiation, longwave radiation, precipitation, air temperature and relative humidity) are applied as global boundaries.
bc == W10, ..\bc\Atmospheric_BCs.csv 				
bc header == Date,WINDU,WINDV							
end bc                                      
bc == SW_RAD, ..\bc\Atmospheric_BCs.csv     
bc header == Date,SWRAD							      
end bc                                      
bc == LW_RAD, ..\bc\Atmospheric_BCs.csv     
bc header == Date,LWRAD                   
end bc                                      
bc == PRECIP, ..\bc\Atmospheric_BCs.csv     
bc header == Date,RAIN							      
end bc                                      
bc == AIR_TEMP, ..\bc\Atmospheric_BCs.csv   
bc header == Date,TEMP							      
end bc                                      
bc == REL_HUM, ..\bc\Atmospheric_BCs.csv    
bc header == Date,RHUM							      
end bc                                      

Tracer inflow and concentration are applied to all flow boundaries. The Tracer concentration assigned to these inflows is zero.

bc header == Date,Tributary_Inflow,Salinity,temperature,TRACE_1
bc header == Date,Tributary_Inflow,Salinity,temperature,TRACE_1

The actual tracer to be modelled is defined as a point inflow at the co-ordinate: 6837,15228

bc == QC, 6837,15228, ..\bc\STP_tracer.csv  
bc header == Date,STP_Outflow,TRACE_1			
end bc                                      
bc == Q, 1, ..\bc\inflows.csv
bc header == Date,Main_Inflow,Salinity,temperature,TRACE_1
end bc
bc == WL, 2, ..\bc\tide.csv
bc header == Date,level,Salinity,temperature
end bc
bc == Q, 3, ..\bc\inflows.csv
bc header == Date,Tributary_Inflow,Salinity,temperature,TRACE_1
end bc
bc == WL, 4, ..\bc\tide.csv
bc header == Date,level,Salinity,temperature
end bc
bc == W10, ..\bc\Atmospheric_BCs.csv
bc header == Date,WINDU,WINDV
end bc
bc == SW_RAD, ..\bc\Atmospheric_BCs.csv
bc header == Date,SWRAD
end bc
bc == LW_RAD, ..\bc\Atmospheric_BCs.csv
bc header == Date,LWRAD
end bc
bc == PRECIP, ..\bc\Atmospheric_BCs.csv
bc header == Date,RAIN
end bc
bc == AIR_TEMP, ..\bc\Atmospheric_BCs.csv
bc header == Date,TEMP
end bc
bc == REL_HUM, ..\bc\Atmospheric_BCs.csv
bc header == Date,RHUM
end bc
bc == QC, 6837,15228, ..\bc\STP_tracer.csv
bc header == Date,STP_Outflow,TRACE_1
end bc


! OUTPUT COMMANDS Additional datv output, 'TRACE_1'. This will output the tracer results.
output parameters == h,v,d,zb,sal,temp,TRACE_1	

Note: Additional outputs could also be specified for the various global input boundary conditions (e.g. "W10"). this is good modelling practice to check that the boundary condition is specified and being applied correctly

output dir == ..\Output\
output == datv
output parameters == h,v,d,zb,sal,temp,TRACE_1
output interval == 900
end output
output == flux
output interval == 900.
end output
output == points
output points file == ..\geo\GIS\Output_Points.csv
output parameters == h
output interval == 900.
end output


! USER SPECIFIED COMMANDS No syntax changes
modesplit == 0

Run TUFLOW FV

Once you’re happy with the FVC file contents, run TUFLOW FV.

Useful links:

Heat and Tracer Simulation Results

Open the model geometry file (FMA2_FV02.2dm) and background imagery in SMS. Update the time settings in SMS to display the results using isodate format, refer to Changing SMS Time Settings (Hours to Isodate).

Open the AD02 simulation water level, tracer and temperature results (FMA2_AD02_002_H.dat,FMA2_AD02_002_Trace_1.dat, FMA2_AD02_002_Temp.dat).

  • View the results in SMS

Tute3 018.png


Open the AD01 simulation temperature results (FMA2_AD01_002_Temp.dat).

  • How do the water temperature results vary between AD01 and AD02? Refer to SMS Data Calculations for directions how to compute difference results between both datasets.

Tute3 019.png

Are these difference expected? Yes, AD02 included addition heat boundary condition inputs compared to AD01. These atmospheric inputs allow for slow moving and shallow water to increase in temperature due to solar radiation and the surrounding air temperature. This is particularly evident in the coastal ICOL lake in the southern half of the model.

Tracer Decay Rate

This example demonstrates how to apply a decay rate to a dispersive tracer. Save FMA2_AD02_002.fvc as FMA2_AD03_002.fvc, and ddd the following commands:

 tracer == 1
     decay rate == 10.0
 end  	

This command applies a decay rate Kd to the tracer:

Tute3 022.png
where C is tracer concentration, h is water depth and t is time. Without advection and dispersion, this equation simply becomes the exponential decay:

Tute3 023.png
where C0 is initial concentration.

Run FMA2_AD03_002.fvc and compare the tracer concentration with FMA2_AD02_002.fvc. Does the decay rate reduce the tracer concentration?
Tute3 024.png

Troubleshooting

This section contains a link to some common issues that may occur when progressing through the TUFLOW FV tutorial models:

For further support please email support@tuflow.com