Difference between revisions of "Mesh generation"
| Line 5: | Line 5: | ||
CFL=(|u|+sqrt(g*h))*dt/dx | CFL=(|u|+sqrt(g*h))*dt/dx | ||
| − | must be <1 for given dx,dt in such models. Here h is the local water depth, and u is the flow velocity. Note that the sqrt() term is related to surface wave celerity. | + | must be <1 for given dx,dt in such models. Here h is the local water depth, and u is the flow velocity. Note that the sqrt() term is related to surface wave celerity.<ref>Note that the Evaluate function is also very useful for generation of other .gr3 files needed by SELFE </ref> |
Being an implicit model using Eulerian-Lagrangian method (ELM), SELFE has a somewhat opposite requirement: CFL>0.4. Therefore care must be taken in the grid generation | Being an implicit model using Eulerian-Lagrangian method (ELM), SELFE has a somewhat opposite requirement: CFL>0.4. Therefore care must be taken in the grid generation | ||
| Line 15: | Line 15: | ||
** xmgredit5 -belel -1.e-10 hgrid.gr3 (note: '-belel -1.e-10' is used mainly to increase precision for lat/lon grid) | ** xmgredit5 -belel -1.e-10 hgrid.gr3 (note: '-belel -1.e-10' is used mainly to increase precision for lat/lon grid) | ||
** since the CFL inside ACE is calculated without u, we should impose a min depth of 0.1 (so that sqrt(g*h)>=1m/s); you can do this by: <br /> | ** since the CFL inside ACE is calculated without u, we should impose a min depth of 0.1 (so that sqrt(g*h)>=1m/s); you can do this by: <br /> | ||
| − | Edit-->Edit over grid/regions-->Evaluate, and then in the dialogue box, type depth=max(depth,0.1) | + | Edit-->Edit over grid/regions-->Evaluate, and then in the dialogue box, type depth=max(depth,0.1) |
---- | ---- | ||
Revision as of 08:35, 29 August 2012
Beware of CFL number
You may be familiar with the CFL restriction associated with explicit (mode-splitting) models; the CFL number, defined as
CFL=(|u|+sqrt(g*h))*dt/dx
must be <1 for given dx,dt in such models. Here h is the local water depth, and u is the flow velocity. Note that the sqrt() term is related to surface wave celerity.<ref>Note that the Evaluate function is also very useful for generation of other .gr3 files needed by SELFE </ref>
Being an implicit model using Eulerian-Lagrangian method (ELM), SELFE has a somewhat opposite requirement: CFL>0.4. Therefore care must be taken in the grid generation process; otherwise numerical diffusion in ELM would ruin your results, which may manifest itself in the form of either noise or dissipation.
With xmgredit5, you can very easily visualize CFL for the entire grid. Note, however, that CFL number is undefined when h<0. In these shallow regions, we should use |u| alone and neglect the wave celerity term (sqrt(g*h)). E.g., if we estimate |u| ~ 1m/s, with a time step of 100s, the max. dx in regions of h<0 should be 250m; with dt=50s, dx_max=125m.
- Viz CFL number in xmgredit5
- xmgredit5 -belel -1.e-10 hgrid.gr3 (note: '-belel -1.e-10' is used mainly to increase precision for lat/lon grid)
- since the CFL inside ACE is calculated without u, we should impose a min depth of 0.1 (so that sqrt(g*h)>=1m/s); you can do this by:
Edit-->Edit over grid/regions-->Evaluate, and then in the dialogue box, type depth=max(depth,0.1)
Baratropic simulation
Grid quality requirement is relatively lax for barotropic simulations. Besides the CFL above, you mainly need to use appropriate resolution based on physics (e.g., coarser resolution in deeper depths and finer resolution for shallow depths).
Baroclinic simulation
The transport process is influenced by your choice of grid.