I’ve been trying to generate a stretched grid along the X direction in MFIX and was wondering how to implement this using control points. There are five parameters that I can manipulate for this purpose.
My first question is whether the ‘position’ parameter refers to one of the boundary points of the region I wish to mesh.
From the user manual, I understand that ‘first’ and ‘last’ indicate the widths of the first and last cells, respectively, while ‘cells’ sets the total number of cells. Given this, would there be any conflicts if I set ‘cells,’ ‘stretch,’ ‘first,’ and ‘last’ all at the same time? Or, does setting these parameters require precise calculations to avoid any possible conflicts?
Control points are used to break the length of the domain (say in the x-direction) into segments. The control point position defines the end point of a segment, so there are as many control points as segments. The first segment always starts at x=xmin. The last control point must match xmax.
My recommendation is to add control points one at a time, define the number of cells in each segment (the sum must match the number of cells in a given direction), and set the stretch factor to 1. Then adjust the stretch factor. If it is too tedious to adjust the stretch factor, use the “first” or “last” setting which will try to adjust the stretching to have a smooth transition in grid spacing between one segment to another. That adjustment is done at run time though so it cannot be visualized in the GUI before running the simulation. If there is a conflict, an error message will be displayed indicating incorrect setting. Please take a look at the vortex shedding example: