hexagon logo

How to control the prism layer thickness in scFLOW?

I have been testing prism layer insertion settings in my scFLOW model.  My main goal is to increase the total thickness of prism layer coverage. However, when I increase the [Number of layers] setting, the thickness of the 1st prism layer keeps getting smaller. Shouldn’t the 1st layer thickness stay at a fixed fraction  (0.2 as default) of the local octant size?



N/A
[edited by: Rodrigo Auza Gutierrez at 3:04 PM (GMT -5) on May 29, 2025]
Parents
  • Hi Rodrigo,

    I'm glad my explanation made sense.  Thanks for your follow-up question.

    I've previously tested and compared the 3 different settings for [Timing of Prism Layer Insertion], using a simple model of flow over a sphere.  I tried inserting 2, 5, and 10 prisms and in each case I found that the timing of prism insertion had very little effect on the resulting prisms.  However, that is for an external flow case, where there's not really anything to get in the way of prism insertion.  There might be some more noticeable differences in an internal flow case, especially if the width of a flow path is narrow relative to the local octant size.  One reason I say this is that the detailed settings for prism insertion change depending on the setting of [Timing of Prism Layer Insertion].

    I'm referring to the settings under [Mesh Parameter] - [Detailed setting] - [Mesh Parameter] - [Detailed Settings of Prism Layers].  If the timing setting is [Before volume meshing] or [After volume meshing], the detailed settings dialog looks like this:

    But if the timing is [After polyhedral conversion], we get this dialog instead:

    For internal flow with a narrow flow path, the mesh generation algorithm will try to insert the requested prisms, but if their specified dimensions are not fully compatible with the width of the path, it will have to scale them down, by reducing prism thicknesses and/or the number of prisms.  Some of the detailed settings above refer to these adjustments and as you can see, the prism adjustment algorithm uses different settings depending on the timing of prism insertion (I've put a red box around one of these in the bottom image).  I think this is a consequence of the different status/form of the volume mesh for the different timing options.  All of these settings are documented in the Preprocessor Reference manual, but as you can imagine, the prism insertion results can be very case-specific for internal flow.

    All that being said, my recommendation is to set [Timing of Prism Layer Insertion] to [Before volume meshing].  I say this for two reasons:

    1) It allows prism insertion on "a blank slate". - With that timing, there is only a surface mesh, so there's no need for the mesh generations algorithm to fit prism layers in between volume mesh elements and the walls.  So, it's easier for the algorithm to insert the requested prisms, although the width of a narrow flow path will still be taken into account.

    2) I've found that inserting prisms [Before volume meshing] saves time in the mesh generation stage.  In fact, this is strongly related to 1).  The algorithm can avoid the iterative smoothing steps that are needed for optimum compatibility between the prisms and pre-existing volume mesh elements.  I've typically found that inserting prisms first can reduce meshing time by about 40%.

    But as I said, prism insertion can be very case-specific for an internal flow.  So, I recommend checking your prisms in the final computational mesh.  And you'll also get an "insertion percentage" report in the [Message] window of the Preprocessor.  If you find that [Before volume meshing] doesn't seem to work that well for a particular model and set of prism parameters, then by all means, I encourage you to try the other timing options.

    I hope this answers your follow-up question sufficiently.  Prism insertion can be a complex business, but certainly not always!  In fact, I rarely have to change any of the detailed settings in the dialogs shown above.  The insertion algorithm has been developed and enhanced over several years and software versions and at this point it's really quite robust.

Reply
  • Hi Rodrigo,

    I'm glad my explanation made sense.  Thanks for your follow-up question.

    I've previously tested and compared the 3 different settings for [Timing of Prism Layer Insertion], using a simple model of flow over a sphere.  I tried inserting 2, 5, and 10 prisms and in each case I found that the timing of prism insertion had very little effect on the resulting prisms.  However, that is for an external flow case, where there's not really anything to get in the way of prism insertion.  There might be some more noticeable differences in an internal flow case, especially if the width of a flow path is narrow relative to the local octant size.  One reason I say this is that the detailed settings for prism insertion change depending on the setting of [Timing of Prism Layer Insertion].

    I'm referring to the settings under [Mesh Parameter] - [Detailed setting] - [Mesh Parameter] - [Detailed Settings of Prism Layers].  If the timing setting is [Before volume meshing] or [After volume meshing], the detailed settings dialog looks like this:

    But if the timing is [After polyhedral conversion], we get this dialog instead:

    For internal flow with a narrow flow path, the mesh generation algorithm will try to insert the requested prisms, but if their specified dimensions are not fully compatible with the width of the path, it will have to scale them down, by reducing prism thicknesses and/or the number of prisms.  Some of the detailed settings above refer to these adjustments and as you can see, the prism adjustment algorithm uses different settings depending on the timing of prism insertion (I've put a red box around one of these in the bottom image).  I think this is a consequence of the different status/form of the volume mesh for the different timing options.  All of these settings are documented in the Preprocessor Reference manual, but as you can imagine, the prism insertion results can be very case-specific for internal flow.

    All that being said, my recommendation is to set [Timing of Prism Layer Insertion] to [Before volume meshing].  I say this for two reasons:

    1) It allows prism insertion on "a blank slate". - With that timing, there is only a surface mesh, so there's no need for the mesh generations algorithm to fit prism layers in between volume mesh elements and the walls.  So, it's easier for the algorithm to insert the requested prisms, although the width of a narrow flow path will still be taken into account.

    2) I've found that inserting prisms [Before volume meshing] saves time in the mesh generation stage.  In fact, this is strongly related to 1).  The algorithm can avoid the iterative smoothing steps that are needed for optimum compatibility between the prisms and pre-existing volume mesh elements.  I've typically found that inserting prisms first can reduce meshing time by about 40%.

    But as I said, prism insertion can be very case-specific for an internal flow.  So, I recommend checking your prisms in the final computational mesh.  And you'll also get an "insertion percentage" report in the [Message] window of the Preprocessor.  If you find that [Before volume meshing] doesn't seem to work that well for a particular model and set of prism parameters, then by all means, I encourage you to try the other timing options.

    I hope this answers your follow-up question sufficiently.  Prism insertion can be a complex business, but certainly not always!  In fact, I rarely have to change any of the detailed settings in the dialogs shown above.  The insertion algorithm has been developed and enhanced over several years and software versions and at this point it's really quite robust.

Children
No Data