intro story D-Flow FM

 

D-Flow Flexible Mesh

D-Flow Flexible Mesh (D-Flow FM) is the new software engine for hydrodynamical simulations on unstructured grids in 1D-2D-3D. Together with the familiar curvilinear meshes from Delft3D 4, the unstructured grid can consist of triangles, pentagons (etc.) and 1D channel networks, all in one single mesh. It combines proven technology from the hydrodynamic engines of Delft3D 4 and SOBEK 2 and adds flexible administration, resulting in:

  • Easier 1D-2D-3D model coupling, intuitive setup of boundary conditions and meteorological forcings (amongst others).
  • More flexible 2D gridding in delta regions, river junctions, harbours, intertidal flats and more.
  • High performance by smart use of multicore architectures, and grid computing clusters.
An overview of the current developments can be found here.
 
The D-Flow FM - team would be delighted if you would participate in discussions on the generation of meshes, the specification of boundary conditions, the running of computations, and all kinds of other relevant topics. Feel free to share your smart questions and/or brilliant solutions! 

 

=======================================================
We have launched a new website (still under construction so expect continuous improvements) and a new forum dedicated to Delft3D Flexible Mesh.

Please follow this link to the new forum: 
/web/delft3dfm/forum

Post your questions, issues, suggestions, difficulties related to our Delft3D Flexible Mesh Suite on the new forum.

=======================================================

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ
Cohesive sediments & muddy systems

 


Message Boards

Roughness file .rgh

JA
Juan Arellano, modified 5 Years ago.

Roughness file .rgh

Youngling Posts: 8 Join Date: 9/25/14 Recent Posts
Hey everyone,

Does anyone know how to create a .rgh file ? I'm modelling a river and the bottom roughness is not the same in all the cells of the grid.
I've tried to do it with poligons in Quickin but I haven't figured out how to do it yet :p

Any suggestions would be great

Cheers
Richard Measures, modified 3 Years ago.

RE: Roughness file .rgh

Jedi Knight Posts: 178 Join Date: 3/23/11 Recent Posts
Hi Juan,

The process I use in Quickin to create a *.rgh file is:
  • Import grid
  • Change to data in cell centre rather than corners (Operations - Data in Cell Centre)
  • Input data (either bring in sample data or use polygons etc as you would for depth)
  • Export depth to a *.dep file
  • rename your new *.dep file to have a *.rgh extension
  • Open file in a text editor, copy the whole thing and paste it again at the end so the whole file is repeated (first half representing roughness in the M-direction, second half representing roughness in the N-direction. (Note - post edited to add this point which I initially forgot to include)
Hope that helps?
Cheers, Richard
ZJ
Zheng Jiechen, modified 5 Years ago.

RE: Roughness file .rgh

Youngling Posts: 7 Join Date: 12/22/15 Recent Posts
Hi Richard,

I'm trying to create a space varying .rgh file, but I do not know how to set roughness values using polygons. Could you tell me?

Best regards,
Jiechen Zheng
Richard Measures, modified 4 Years ago.

RE: Roughness file .rgh

Jedi Knight Posts: 178 Join Date: 3/23/11 Recent Posts
Hi,

To create a spatially varying roughness file in quickin what I do is:
  • Open the model grid in quickin
  • select "Operations - Data in Cell Centre"
  • Draw a polygon using "Edit - Polygon - New". If necessary edit the polygon using the other polygon tools (note, right click deselcts the current polygon, which can be a little counter intuitive till you get the hang of it)
  • Assign a roughness value to the cells in the polygon "Operations - Combine Depth and Uniform Value - Fill Missing Depth with Uniform Value
  • Delete polygon "Operations - Delete Polygons"
  • If necessary draw other polygons and assign depth in the same way for different patches, or use other tools such as "Edit - Depth Linear" to interpolate values (see the quickin user manual for how to use the other tools)
  • You can then use "Operations - Combine Depth and Uniform Value - Fill Missing Depth With Unifrom Value" or "Operations - Internal Diffusion" with no polygon to fill in remaing cells
  • Once you've filled your grid export it "File - Export - Depth..."
  • Then open your exported file in a text editor, copy the whole thing and paste it againa so the whole file is repeated (first half representing roughness in the M-direction, second half representing roughness in the N-direction. Rename the file .rgh and you're good to go.
Hope that helps. Let me know if you have any specific questions or get stuck anywhere.

Cheers, Richard
U
Estelle Serrero, modified 4 Years ago.

RE: Roughness file .rgh

Richard Measures:
Hi Juan,

The process I use in Quickin to create a *.rgh file is:
  • Import grid
  • Change to data in cell centre rather than corners (Operations - Data in Cell Centre)
  • Input data (either bring in sample data or use polygons etc as you would for depth)
  • Export depth to a *.dep file
  • rename your new *.dep file to have a *.rgh extension
Hope that helps?
Cheers, Richard


Hi Richard,

I followed the steps to create a .rgh file but it seems to be unreadable:

"*** ERROR Premature EOF in file: roughness_2.rgh
*** ERROR Flow exited abnormally"

I think it might be because it contains 12 columns and according to the user manual, in an .rgh file, "the records must be filled with (maximal) 8 reals".

Have you ever encountered this problem before? Do you know a solution?

Best regards,
Estelle
Richard Measures, modified 4 Years ago.

RE: Roughness file .rgh

Jedi Knight Posts: 178 Join Date: 3/23/11 Recent Posts
Hi Estelle,

The .rgh file needs to specify roughness in both M and N directions - if you haven't done this (I seem to have missed this step in my earlier post which you quote - sorry for the confusion) then that would cause the "Premature End Of File" error you are getting. This is easy to fix - see step 9 of my last post in this forum:
open your exported file in a text editor, copy the whole thing and paste it again so the whole file is repeated (first half representing roughness in the M-direction, second half representing roughness in the N-direction. Rename the file .rgh and you're good to go.


Hope that helps,
Richard
U
Estelle Serrero, modified 4 Years ago.

RE: Roughness file .rgh

Thank you Richard, that helps a lot !
MK
Manuela König, modified 3 Years ago.

RE: Roughness file .rgh

Youngling Posts: 14 Join Date: 3/31/17 Recent Posts
Hej,

I hope I can join the discussion. I had similar problems with my .rgh file.
I got the following error during my simulation run: *** ERROR Premature EOF in file: Bodenrauheit_kalibrierung.rgh

I checked and renewed my file to include just taps...

I would be delighted if you could take a short look in my attached file, maybe I am too blind to see an obvious mistake.

Thx
Manuela
Richard Measures, modified 3 Years ago.

RE: Roughness file .rgh

Jedi Knight Posts: 178 Join Date: 3/23/11 Recent Posts
Hi Manuela,

Have you repeated the data in the *.rgh file to represent roughness in both the M & N directions. If not then this will lead to a "premature EOF" error.

Also I think *.rgh files are generally space separated rather than tab separated - I'm not sure if this is important though?

Hope that helps,
Richard
MK
Manuela König, modified 3 Years ago.

RE: Roughness file .rgh

Youngling Posts: 14 Join Date: 3/31/17 Recent Posts
Hej Richard,

thanks for your answer.

Yes, I copied the data from my depth-file to have the M- as well as the N-direction included. For the negative values I added a quite small value of 0.0001.

I also tried to separate the values through a simple space, as you suggested. But unfortunately the same error occurs.

Best regards,
Manuela
Richard Measures, modified 3 Years ago.

RE: Roughness file .rgh

Jedi Knight Posts: 178 Join Date: 3/23/11 Recent Posts
Hi Manuela,

I had a quick look at the *.rgh file you posted and I think maybe you have made a mistake when duplicating the data for M and N directions:

At the moment your *.rgh file has 169 values in each block of data and 138 blocks. This should represent a 168cells x 68cells grid, with null values around the edge making it 169 x 69, repeated twice (for M and N directions), hence 168 x 138. Is you grid 168cells x 68cells? Without the *.grd and *.enc files for your grid it is impossible for me to check this.

The reason I think you may have made an error is that if you have repeated the grid twice to represent M and N directions I would expect the 1st and 70th blocks to be identical, the 2nd and 71st blocks to be identical, etc - but they are not. Unless you intentionally have different roughness values in the M and N directions there is definitely something wrong.

Good luck,
Richard
MK
Manuela König, modified 3 Years ago.

RE: Roughness file .rgh

Youngling Posts: 14 Join Date: 3/31/17 Recent Posts
Hej Richard,

thanks a lot for your help.
I checked some things with your tipps in mind.
Seems to work now, my simulation is running emoticon

Have a nice day,
Manuela
SC
Simon Colman, modified 1 Year ago.

RE: Roughness file .rgh

Youngling Posts: 5 Join Date: 10/2/18 Recent Posts

Hi Richard,

I have followed every step you have said and made all modifications but I can't seem to run the flow-file successfully. It exits abruptly when trying to read the roughness file.

*** ERROR Read error from file: ..\..\..\Grids\Friction\Friction 1.rgh 
*** ERROR Flow exited abnormally 


I exported the depth file after making it in QUICKIN.

Changed the -999 values with 0.0001 values

I checked the number of blocks and the number of values per block (10 blocks with 2050 values for a 2049x9 grid).

Thank you for your help, I am desperate at this point.

regards

Simon

SC
Simon Colman, modified 1 Year ago.

RE: Roughness file .rgh

Youngling Posts: 5 Join Date: 10/2/18 Recent Posts

*Edit* I also changed the tabs with spaces but continued to have the same results

Richard Measures, modified 1 Year ago.

RE: Roughness file .rgh

Jedi Knight Posts: 178 Join Date: 3/23/11 Recent Posts

I just had a quick look at your file and can't see anything obviously wrong. I did notice that there are a couple of extra tabs at the end of each block (e.g. line 171 ends with <tab><tab><CR><LF>) not sure if these trailing tabs are the cause of the issue? In my own rgf files (space separated) I note there are no trailing spaces on any lines...

I guess if you had edited your file in excel or similar it would have inserted these extra tabs automatically so there are the same number of columns on each row as I'm prettu sure quickplot doesn't put them in. See attached a version I modified with find and replace in a text editor.

Hopefully that might work, if not i'm a bit stumped.

SC
Simon Colman, modified 1 Year ago.

RE: Roughness file .rgh

Youngling Posts: 5 Join Date: 10/2/18 Recent Posts

Hi Richard,

Thank you for your quick reply but I have found the problem:

When saving my files after editing them in the text editor, my coding settings were set at 'Unicode' and not 'ANSI'.

This is a silly mistake but can easily be overlooked.

Thank you!

TL
Tony Lee, modified 3 Years ago.

RE: Roughness file .rgh

Youngling Posts: 9 Join Date: 4/1/17 Recent Posts
Richard Measures:
Hi Juan,

The process I use in Quickin to create a *.rgh file is:
  • Import grid
  • Change to data in cell centre rather than corners (Operations - Data in Cell Centre)
  • Input data (either bring in sample data or use polygons etc as you would for depth)
  • Export depth to a *.dep file
  • rename your new *.dep file to have a *.rgh extension
  • Open file in a text editor, copy the whole thing and paste it again at the end so the whole file is repeated (first half representing roughness in the M-direction, second half representing roughness in the N-direction. (Note - post edited to add this point which I initially forgot to include)
Hope that helps?
Cheers, Richard


Hi Richard?
Your answer helps me indeed. But I am still puzzled by the data inputted in step 3.How can I gain it?If I have a xyz .dep file ,dose it mean I can calculate roughness via it ?
Any suggestions would be great
Best regards.
Hui
Richard Measures, modified 3 Years ago.

RE: Roughness file .rgh

Jedi Knight Posts: 178 Join Date: 3/23/11 Recent Posts
Hi Tony,

Roughness is generally a calibration parameter. I suggest you start out by selecting an appropriate formulation and finding a suitable coefficient for you model from the literature, then iteratively adjust it to calibrate your model. This initial roughness estimate could be a single global roughness coefficient (in which case you don't need a *.rgh file) or a spatially varying roughness coefficient, depending on how much variability there is spatially in your model. If you have data on bed material this could be used to inform your initial estimate. For example if you have a map of bed material you could use this as a basis for a spatially varying roughness map.

Sometimes during calibration you may find you need to have a spatially varying roughness coefficient which is different in deep and shallow areas. In this case you could use your depth map as a basis for setting up your spatially varying roughness map. When I referred to "sample data" in my previous post I meant any x,y,value data that could be used to specify roughness. For example, you could have created a roughness map in GIS software and exported it into this format so you could read it into Quickin easily.

Regards,
Richard
TL
Tony Lee, modified 3 Years ago.

RE: Roughness file .rgh

Youngling Posts: 9 Join Date: 4/1/17 Recent Posts
Richard?thanks for your help emoticon