Professional Documents
Culture Documents
FVCOM uses unstructured triangular grids and since no automatic mesh generator is
supplied with the coding, users must use alternate software to build the mesh. There are a
multitude of mesh generators available. Some are open source and several are
commercial. Any software which is capable of generating two-dimensional, unstructured
triangular grids would work for FVCOM. However, high powered meshing software
designed for complex 3-D grids, such as Gridgen, ICEM, or GAMBIT are expensive,
difficult to learn, and are unnecessarily powerful. We have listed some recommended
meshes on the FVCOM users website.
At MEDM/SMAST, we primarily use the SMS (Surface Water Model System) to
generate unstructured grids in FVCOM. SMS is module-based commercial software that
can be purchased in whole or by module. Only three modules are necessary for mesh
generation. They are the Mesh Module, the Map Module, and the Scatter Module. The
beta version can be downloaded from the SMS website:
http://www.ems-i.com/SMS/SMS_Overview/sms_overview.html/
In this document, we will guide you through an example mesh generation using SMS to
teach the basic procedure of generating meshes for FVCOM.
a) Coastline preparation
91
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
1 41.5756 -70.5038
2 41.5756 -70.5041
2 41.5757 -70.5043
2 41.5760 -70.5043
2 41.5761 -70.5042
2 41.5761 -70.5039
2 41.5760 -70.5036
2 41.5757 -70.5036
3 41.5756 -70.5038
Column 1: the data type: 1-start point; 2-points between start and end points; 3-end point.
Column 2: Latitude
Column 3: Longitude
Use Proj to convert the longitude and latitude format data to the x-y coordinate.
Column 1: x Column 2: y
92
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Note: when Proj is used, be sure to keep the x and y locations of the reference point
used for the projection. These will be required if you wish to convert the x and y
locations back to Lat/Lon.
3. Insert the 1st column (data type) from the original coastline data (latitude and
longitude format) into converted x-y data file.
Proj can only run with an input file of longitude and latitude data, so after the
projection is completed, we need to add the 1st column of the original data into the
projected data to keep the identification of the data type.
4. Run ReadCST.f to create the coastline file format compatible with SMS.
We have a simple Fortran 77 program called readcst_new.f on FVCOM user website.
Users can use it or can write a very simple Matlab program to do it. The format of the
resulting output file is:
COAST
11 0.0
9 0
871884.3125 -139646.0313 0.0
871859.3125 -139645.9219 0.0
871842.6875 -139634.7500 0.0
871842.8125 -139601.4375 0.0
871851.1875 -139590.3594 0.0
871876.1875 -139590.4531 0.0
871901.1875 -139601.6719 0.0
871901.0625 -139634.9844 0.0
871884.3125 -139646.0313 0.0
11 0
871775.5625 -139734.4531 0.0
871742.2500 -139723.2188 0.0
871720.3125 -139712.0000 0.0
871700.6875 -139689.7344 0.0
871700.7500 -139667.5156 0.0
871784.1875 -139667.8438 0.0
871825.8125 -139679.1094 0.0
871842.4375 -139701.3906 0.0
871834.0000 -139723.5781 0.0
871820.2500 -139734.6094 0.0
871775.5625 -139734.4531 0.0
93
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
94
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
2. Go to File at the upper left corner. Select Open and then find the *.cst file in
your computer and open it. Select ADCIRC and click on it. Your coastline data
should appear on the screen. This is an example of Waquoit Bay on the southern
coast of Cape Cod, Massachusetts.
95
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
3.
Start at a selected point at the coastline with one click, and then hold shift, click points
to build an open boundary. Be sure to double click at the end point.
96
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
97
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
98
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Feature Objects
Redistribute Vertices
99
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Repeat this exercise until you select all segments of the coastline and open boundary
line. Be sure to save your map file. SMS does not save as your proceed and you
cannot go backwards. After all these are completed, the screen should look like:
100
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
101
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
102
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Click Select Feature Polygons on the left menu bar, then move the mouse back to
the mesh domain, hold the shift key, and click it, the entire domain should become
black. If you find some regions are not colored black, it means that your previous
steps are not done correctly, either the line is not closed or perhaps another issue. Be
sure to go back to fix it. When correct, your screen should look like this:
103
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Go to the upper menu bar to and select Map2D Mesh from the Feature
Objects pull-down menu. Click on it to start building your mesh.
Map2D Mesh
104
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
105
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Be sure to save this mesh First, click Mesh Module on the left side manual bar, then go
to the upper menu File to select Save Mesh. Click on it, your mesh is saved.
Mesh Module
106
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Display Options
107
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Step 3: check the box Mesh quality, click options next to Mesh quality, an
element quality checks screen appears. Users need to input their quality requirement
parameters into each row. Below are our recommendations:
Minimum interior angle: 30.0
Maximum interior angle: 130.0
Maximum slope: 0.1
Element area change: 0.5
Connecting elements: 8 or less (8 is the maximum elements allowed for FVCOM).
After all selections, click ok.
108
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Below is the result of the quality selection. Red colors show that the angle of an
element is out of the range we specified, and blue colors show that the element area
change of those triangles are out of the range we expected.
109
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Step 4: start adjusting the mesh angles and area. The simplest way is to adjust using
the mouse. Go to the left manual bar to click on Select Mesh Node. Use the mouse
to go to the colored area, and move the nodes until the color disappears. Repeat for all
colored regions.
Note: To make the radiation open boundary condition work properly, we suggest that
users make one of the interior edges of an open boundary triangle normal to the open
boundary. FVCOM will run without this restriction, but with increased numerical noise
due to the high frequency wave reflection from the open boundary.
110
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
8. Select the open boundary nodes to build an input file for the open boundary
condition treatment.
Step 1: Go to the left manual bar to click Create Nodestring. Move your mouse to the
first node of the open boundary line connected to the coastline. Hold shift and then
continue to click the open boundary nodes. When you get to the last end node point
connected to the other side of the coastline, double click it. Check the screen to make
sure all boundary nodes are selected.
Create Nodestring
111
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Step 2: Re-number the open boundary nodes. Go to the left manual bar to click on
Select Nodestring. A small box will appear on the open boundary line. Click this box,
all the open boundary nodes will be colored. Go to the upper manual bar to select
Nodestring. On that sub-window, click on renumber. All nodes on the open boundary
will be renumbered.
Renumber
Select Nodestring
After you have finished this step, be sure to go to File to click Save Mesh, so that the
mesh file will be updated with the new numbering of the open boundary nodes. This
numbering will facilitate specifying the open boundary forcing in later model setup
stages.
112
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Step 1: Go to the upper manual to File and select Open. Find the bathymetric file in
your computer, then click it. Keep clicking next in the GUI selection. All the data will
appear on the screen, overlapping over the mesh. An example is given below. Note: this is
just used to demonstrate how we can interpolate the bathymetric data into the mesh, so
we did not use the complete bathymetric data set here.
113
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Step 2: Go to the upper manual bar, select Scatter. In the sub-window manual, select
Interpolate to Mesh. See the screen below for example.
114
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Step 3: Click Interpolate to Mesh You can select different interpolation methods in the
box of interpolation. After your make your selection, click ok. The bathymetric data
will be interpolated to nodes of the mesh.
115
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
Step 4: Select save as from the file menu and create an output file name with the
extension pts (example: myfile.pts). Click Save, a sub-window titled Export Shoal
File screen will appear. From here, you must do two things: 1) in Export Option
check Save Mesh; and 2) go to Column Header, select Z row and then choose the
last option elevation (Z) inter(Scalar). After you complete these two steps, click ok
and your bathymetric data file is saved.
116
FVCOM User Manual (October 2011) SMAST/UMASSD-11-1101
117