Quadtree and Sub-Grid Sampling FAQ: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 18:
 
=Does using SGS increase model runtimes?=
Turning SGS on can increase run times by 20-30% for a model that is well designed with appropriate cell sizes. However, in cases where the model resolution is too coarse for the terrain, the improvement in model stability and hydraulic performance by using SGS can actually cause a reduction in run times. For example, for a direct rainfall model of the Johnstone River catchment SGS vastly reduced the choking of narrow flow paths caused by one elevation per cell face in the steeper part of the catchment, thereby reducing high depth and high velocity areas that allowed the simulation to progress at much larger timesteps reducing the simulation time from 26 hours to 4(!). Using SGS will also allow you to use larger cell size(s) without adversely changing results so that runs can be performed much faster - this is of great benefit when developing or calibrating a model when you wish to have a high turnover of simulations - if you can carry out this phase of the modelling using coarser cell sizes by using SGS without greatly changing results your workflow efficiency can be greatly enhanced.
Turning SGS on can increase run times byt 20-30%, but in some cases the improvement in model stability can actually cause a reduction in run times. Also, being able to go to a larger grid size and still keep the hydraulic accuracy means that runs can be performed much faster.
 
=I'm using SGS and my water level extent is larger than depth extent. Why?=
For map outputs, the default for SGS models is to treat whether a 2D cell is wet or dry differently for water level surfaces compared to other map outputs. For water level surfaces a cell is wet if any part of the cell (based on the SGS sampling) therefore all partially wet cells are flagged as wet and will appear wet in the XMDF and other map output. The advantages here are as a modeller you can see which cells are wet even if they are only partially wet and there is no need to buffer the water level surface for high quality mapping produced by subtracting the DEM from water level surface. For all other map outputs a cell is deemed wet only if the water level in the cell exceeds the SGS elevation at the 2D cell centre. This was necessary as otherwise greatly distorted depth, hazard and other outputs could occur by taking the depth at the lowest part of the cell based on the SGS sampling. There are a range of commands that allow you to adjust the default settings for map outputs using SGS. For a more detailed discussion and a description of these new commands see Section 7.5 in the 2020-01 Release Notes.<br>
The default for SGS models is to map the water level in its full extent and the rest of the data types as trimmed. This can be changed with the below commands:<br>
RemapNote there is a new remap function that is part of the asc_to_asc utility that can be used to post-process the result grids tousing a finer resolution DEM to produce high resolution mapping. See <u>[[TUFLOW_Remapping | TUFLOW Remapping]]</u>.
<font color="blue"><tt>SGS Map Extent Trim </tt></font> <font color="red"><tt>==</tt></font><tt> All </tt><br>
<font color="blue"><tt>SGS Map Extent Full</tt></font> <font color="red"><tt>==</tt></font><tt> h d v</tt><br>
For more information see section 7.5.4 in the 2020-01 Release Notes - to be changed to the Manual.<br>
Remap function that is part of the asc_to_asc utility can be used to post-process the result grids to a finer resolution DEM. See <u>[[TUFLOW_Remapping | TUFLOW Remapping]]</u>.
 
=Why shouldn't I use Z Shape gully/min lines with SGS models?=
Line 31 ⟶ 28:
 
=Why should I create more Z Shape ridge/max lines with SGS models?=
ItWithout isbreaklines possibleSGS thatwill withoutbe correctmore breaklines,likely SGSto modelallow allows"leaks" a leak overthrough a levee or embankment thatcompared to running the model withwithout smallerSGS. cell sizeThis doesis notbecause orSGS doessampling muchwill less.pick Theup morelower 2d_zshelevations max/ridgeseither areside usedof the better.levee Awhere roughthe estimate2D cell extends over both sides of SGSthe testinglevee, requiredand twicetherefore produce lower flowpaths through the numberlevee ofor ridgeembankment. lines comparedTherefore, the need to arepresent traditionalall model.hydraulic Thiscontrols alsosuch includesas locationslevees where(artificial thereor werenatural), noroad/rail ridgesembankments, previouslyetc is even more important for SGS models (this practice should be carried out for all TUFLOW models, but even more so for SGS models). Breakline The breakline feature in <u>[[ASC_to_ASC | asc_to_asc utility]]</u> mightcan be very useful for easily creating additional breaklines from a DEM.<br>
The reason for this is that SGS doesn't know where in the cell the low elevations and high elevations are, so it smooths out the breaklines. It allows water to flow from low point to low point within the same cell even if there is higher point in between them.
 
=If I run one SGS model, double the cell size and run it again, wouldwill I get the same results?=
Firstly, you'll never get identical results - this will never happen with any hydraulic modelling software. However, using SGS greatly improves your results convergence when changing cell sizes, therefore you're much more likely to be able to demonstrate results consistency between the two runs if using SGS. Of importance is that your hydraulic controls are well-defined using breaklines as discussed above - ensure this is the case before running the two simulations. Note as discussed further above that there is only one velocity calculated per cell face (this is a depth and width averaged velocity) - increasing the cell size with SGS on may produce consistent water level and flow results, but you will see a smoothing of your velocity based map outputs as the velocity for the larger cell size will be based on that over a larger flow area. If there are significant velocity gradients across the channel you might need to use a finer resolution to achieve results convergence. Finally, as always, simply run both simulations and spend some time comparing your results in your focus area(s) to ensure the coarser cell size is not adversely affecting your modelling, but you should expect to see a much improved results convergence using SGS.
SGS isn't a silver bullet that resolves all. If the hydraulic controls aren't adequately defined by the chosen cell resolution the results will vary until the said features are defined by the mesh adequately. Check the gully lines and ridge lines questions above. For a situation where there is little variation in velocity across channel the results might be impressive. In the real world, where there are significant velocity gradients across the channel the modeller might need to use a finer resolution to converge to a solution.
 
=My HPC model runs with double precision, using SGS the model initialisation slows down significantly. Why?=
Due to an Intel compiler issue thisthe grid inspection has to be donecarried out with un-optimised code and will be slow. However, note that the HPC solution scheme (including Quadtree) doesn't generally require double precision engine. If Also, if XF files are enabled (default), subsequent initialisations will be much faster.<br>
The need for using double precision with HPC should be revisited. From experience the models that still require double precision when using HPC are models with carved 1D channels. Either the channel itself is causing the mass error or the boundary links between 1D and 2D domain do. Unfortunately, it is not possible to run the 1D engine in double precision and 2D engine in single precision for the same model. There are two ways how to go about this, we would recommend the second one:
* Try to improve stability of the 1D features and 1D/2D links so it would perform well in single precision. The _TSMB and _TSMB1d2d layers might help locating specific features that could be worked on. The drawback of this suggestion is that it might be very time consuming to achieve even a small improvement and sometimes it is just not possible to get the mass error low enough.
* Remove 1D channel completely and use Quadtree mesh to sufficiently refine resolution of the creek in 2D.