XGRID commands¶
The following commands will be interpreted by XGRID if found in the input file between the SHIPFLOW module delimiter commands XGRID and END. XGRID only uses the first four characters of a command or a keyword.
Note that some options are by default turned off. So even if you don't intend to change any of the default values, you will at least have to give its command to activate the option.
Note also that there are two exceptions to the rule that all lengths and coordinates given must suit the dimensionless coordinate system, namely the commands SINGUL and RADIUS.
There are a few commands in the XFLOW section that will affect the way XGRID will design the grid.
The XFLOW command HULLTYPE and its keywords WSING and NOWSING will control the default behaviour of XGRID for the waterline singularity. The free-surface is normally treated as a symmetry plane by XGRID, but can be fitted to the free-surface computed by XPAN when the HULLTYPE keyword VFSFLOW is given.
Tuning commands¶
Some of the XGRID commands will be referred to as tuning commands in the following. These commands are not likely to be used by the user. The tuning commands have been included only to give the user access to some "constants" that really shouldn't have to be changed and some options that are not likely to be used. Since we haven't had the chance to try XGRID on all possible hull shapes (there are quite a few of them), we cannot guarantee that the tuning command default values will be right for all of them. These commands should thus be used restrictively!
The tuning commands are marked TUNING COMMAND in their descriptions: ETASMOOTH, FEEDBACK, IMPROVE, NEUMANN, SKIN, YPLUS and TUNE.
Multiple XGRID modules¶
From version 6.0 it is possible to use the XGRID module more than once in a command file in order to more conveniently specify the geometry of a multihull vessel for the viscous solver XCHAP. In order to comply with the default monohull behavior, the multihull behavior is achieved by pre-processing the command file and running XGRID separately to create grids and then in the final run import them. This is done for all occurrences of XGRID except the last one, which is run together with the rest of the system as usual.
By default, XGRID takes the geometry from the XFLOW module, it places the hull centerline at y=0, the forward perpendicular at x=0 and the aft perpendicular at y=0 and it also sets the domain size and boundary conditions to represent the whole fluid domain in the computation. When adding hulls this will not work, so the defaults have to be overridden.
The domain size and other aspects of the grid details can be set directly in the XGRID module. To reduce the domain size, use XGRID:XDISTR:XSTART, XGRID:XDISTR:XEND and XGRID:RADIUS:RADIUS. See XDISTR, RADIUS and the other sections of this chapter for details.
The geometry of the hull is given in the XFLOW:OFFSET and XFLOW:HULL commands (OFFSETFILE and HULLTYPE). If those commands are given in an XGRID module (except the last one), they will override the commands given in the XFLOW module. It is also possible to override the XFLOW:SYMMETRY command (SYMMETRY) in the same way. This is useful in order to specify for example a symmetric trimaran configuration where the center hull is XFLOW:SYMMETRY:SYMM and the side hull(s) are XFLOW:SYMMETRY:NOSYMM.
The location, orientation and boundary conditions for an imported grid are specified with the XCHAP:IMPORT command. Since having multiple hulls in the same position is not sensible, an IMPORT command must be given in all XGRID modules except the last one. See IMPORT in the XCHAP chapter for details.
The generated command files are found in <id>_RUN_DIR and are named xgrid_<import_ID>, where import_ID is the ID parameter given in the IMPORT command.
To demonstrate the new functionality, trimaran_xchap has been added to the example collection in the distribution.
Since catamarans do not have a hull on the centerline, the functionality described above does not apply. Like in earlier versions the demi-hull has to be embedded in a box grid using the XFLOW:ENVBOX or XFLOW:BOX commands (ENVBOX, BOX). The location, orientation and boundary conditions are specified in the XCHAP:XGRID command (XGRID in the XCHAP chapter).
For symmetric ships with an even number of hulls in general, one demi-hull has to be specified according to the previous paragraph, while the other hulls can be added with extra XGRID modules.
For unsymmetric configurations like a proa, one hull can use the default XGRID behaviour, with XFLOW:SYMMETRY:SYMM, and the rest of the hulls are added with extra XGRID modules.
COARSE¶
This command specifies the relation between the preliminary grid and the final grid. The use of a coarser grid gives the user a chance to
- avoid the problems that arise due to the extreme resolution close to the hull that XCHAP (or any other code) demands at high Reynolds numbers. The preliminary grid needs only to be fine enough to resolve the curves that we want the ζ-lines to be able to do close to the hull.
- save some time thanks to the sheer reduction of the number of points that have to be processed (see also OUTPUT).
General form of command
Default values
ksimax and zetamax are entered with the SIZE command.
Keywords
| Keyword | Description |
|---|---|
FATTEN |
The first ζ-layer outside the hull in the preliminary grid will lie a factor FATTEN further out from the hull than the distance specified in the SKIN command. |
KSICOPY |
The ξ-coordinate of the last plane that will be produced through solving the Poisson equations. The planes after this plane will be copies of it. To make XGRID use the Poisson solver on the whole domain, KSICOPY must be KSIMAX + 0.5. |
ZETAPRE |
The number of ζ-planes used in the preliminary grid. |
CONTROL¶
This command is used to specify whether the program should use original or post processed offset file and also if the quality test should be performed.
General form of command
Default values
None
Keywords
| Keyword | Description |
|---|---|
OFFTEST |
The offset file quality test is performed to search for possible errors. In total there are seven different criteria used to judge the correctness of the data:
|
XGR8 |
Switches on new version of XGRID with contour line following. |
OVHG |
Switches on special treatment for stern overhang (VOF only). |
BALA |
Switches on special treatment for ballast conditions (VOF only). |
OVFWD |
Offset of the hund parameter from keel line at its intersection. |
OVAFT |
Offset of the hund from keel line at the transom. |
NODECK |
Prevents XGRID from creating a deck for VOF cases. |
OFFSET¶
This command can be used to specify the names of the offset groups in the offset file that will be used in the construction of the grid. The specified offset groups will override those entered in the command HULLTYPE.
General form of command
OFFSET ( H1GR = "c" , H2GR = "c" , H3GR = "c" , OGRP = "c" ,
ABGR = "c" , FBGR = "c" , H1GI = "c" , H2GI = "c" ,
H3GI = "c" , OGRI = "c" , ABGI = "c" , FBGI = "c" ,
H1GO = "c" , H2GO = "c" , H3GO = "c" , OGRO = "c" ,
ABGO = "c" , FBGO = "c" )
Default values
Keywords
| Note | Note Keyword | Description |
|---|---|---|
| (1) | H1GR |
Name of an offset group that describes the main hull. |
| (1) | H2GR |
Second offset group that describes the main hull. |
| (1) | H3GR |
Third offset group that describes the main hull. |
| (1) | OGRP |
Name of offset group that describes the overhang in the stern. |
| (1) | ABGR |
Name of offset group that describes the stern bulb. |
FBGR |
Name of offset group that describes the bulb. | |
| (2) | H1GI |
Name of an offset group that describes the inner part of the main hull. |
| (2) | H2GI |
Second offset group that describes the inner part of the main hull. |
| (2) | H3GI |
Third offset group that describes the inner part of the main hull. |
| (2) | OGRI |
Name of offset group that describes the inner part of the overhang in the stern. |
| (2) | ABGI |
Name of offset group that describes the inner part of the stern bulb. |
| (2) | FBGI |
Name of offset group that describes the inner part of the bulb. |
| (2) | H1GO |
Name of an offset group that describes the outer part of the main hull. |
| (2) | H2GO |
Second offset group that describes the outer part of the main hull. |
| (2) | H3GO |
Third offset group that describes the outer part of the main hull. |
| (2) | OGRO |
Name of offset group that describes the outer part of the overhang in the stern. |
| (2) | ABGO |
Name of offset group that describes the outer part of the stern bulb. |
| (2) | FBGO |
Name of offset group that describes the outer part of the bulb. |
Notes
- At most three offset groups can be used to describe the main hull. The frames in the groups
H1GR,H2GRandH3GRmust be in global order from the foreship to the stern.ABGRandOGRPshall be used when there is a stern bulb and an overhang. See HULLTYPE and Mono-hull for more information. - Offset groups used to describe inner and outer parts of the twin skeg hull. More information on grid generation for this type of ship can be found in Offset file format for twin skeg hulls.
OUTPUT¶
This command gives the user control over what grids will be written to files and if any iteration history should be given.
General form of command
Default values
Keywords
| Keyword | Description |
|---|---|
NONE |
Nothing will be sent to the id_XVGRID file. |
COARSE |
The preliminary, uninterpolated, grid will be sent to the id_XVGRID file. |
FINE |
The interpolated grid will be written to id_XVGRID. |
PNONE |
[POST] No data for post-processing is saved. |
PCOARSE |
[POST] The preliminary uninterpolated grid is stored for post-processing. |
PFINE |
[POST] The interpolated grid is stored for post-processing. |
FULL |
This keyword can be used in combination with PCOARSE and PFINE. All points used by XGRID will be saved for post-processing, not just those that correspond to the p-points. The pictures of the grid from such a file will undoubtedly look more impressive to the eye of a novice but this option should be used with some care since the resulting data files will become approximately 8 times larger. |
HISTON |
The presence of HISTON in the command turns on the iteration history that will be written to the output file. |
Notes
The interpolation itself is controlled by the command COARSE.
POISSON¶
This command controls the Poisson solver.
General form of command
POISSON ( MAXIT = n , YCRIT = v , ZCRIT = v , ORFY = v ,
ORFZ = v , OFF , OUTER , FREEZE ,
INNER
JUFREEZE = n , JAFREEZE = n , ANGFREEZE = v )
Default values
POISSON ( MAXIT = 60, YCRIT = 1.0D-09, ZCRIT = 1.0D-09, ORFY = 1.0,
ORFZ = 1.0, OFF*, JUFREEZE = UETA, JAFREEZE = AETA,
ANGFREEZE = 25 )
* for submarines
For twin skeg hulls:
Keywords
| Note | Note Keyword | Description |
|---|---|---|
MAXIT |
The maximum number of iterations allowed for solving the Poisson equations. | |
| (1) | YCRIT |
Convergence limit for the y-component changes. |
| (1) | ZCRIT |
Same as YCRIT but for the z-component. |
ORFY |
Over relaxation factor for the y-equation. | |
ORFZ |
Over relaxation factor for the z-equation. | |
OFF |
[POISOFF] Its presence in the command turns off the Poisson solver. The initial guess as produced by transfinite interpolation will be used for output. This is useful when a quick check of the boundary point distribution is wanted. | |
| (2) | OUTER |
The information in the command will concern the outer block of the grid for twin skeg hull. |
| (2) | INNER |
The information in the command will concern the outer block of the grid for twin skeg hull. |
| (3) | FREEZE |
Turn off the Poisson solver for VOF grids in certain problematic areas. |
| (3) | JUFREEZE |
From this eta position start searching (in increasing eta direction) for a chine. Freeze the Poisson solver from the chine and for larger etas if keyword FREEZE is present. This is done separately for each ksi-plane. |
| (3) | JAFREEZE |
Freeze the Poisson solver from this eta position and for larger etas if keyword FREEZE is present. |
| (3) | ANGFREEZE |
Chine detection grid angle for JUFREEZE. |
Notes
- Convergence is achieved1 when ychang <
YCRITat the same time as zchang <ZCRIT. Ychang and zchang are the maximum changes made to the grid between two consecutive iterations. Note that the largest change in the y-direction (ychang) may have taken place at another point than the largest z-direction change. The iteration history in terms of ychang and zchang is printed out in theid_OUTPUTfile of the y and z-coordinate for any grid point. - Keywords that can be used only in connection with the twin skeg hull. More information on grid generation for this type of ship can be found in Offset file format for twin skeg hulls.
-
This functionality is typically used when you have a hull with a chine which you will run with VOF. It is hard for the Poisson solver to produce a good grid around the chine and for some cases some cells might be twisted inside out if
FREEZEis not used.When the freezing functionality is used, it might be necessary to reduce the number of Poisson iterations.
RADIUS¶
The radius of the domain is entered in this command. Note that centre demands input given in the offset file coordinate system. (The only other XGRID command that needs input in that system is SINGUL.)
General form of command
Default values
Keywords
| Note | Note Keyword | Description |
|---|---|---|
| (1) | RADIUS |
Radius of the grid. |
| (2) | CENTRE |
Z-coordinate of the center line of the grid, this must be given in the offset file system! |
| (2) | STING |
Thickness of a STING that will replace the polar singularity in the wake behind a submarine. |
Notes
- The radius will have to be chosen large enough to avoid blockage effects. If a potential flow solution is used as a boundary condition, the radius can be chosen much smaller as long as the outer boundary doesn't enter the viscous part of the flow.
- This keyword is supposed to be used to inform XGRID where the sting of a submarine is located.
Centreshould be the z-coordinate of the centre of the grid, given in the hull offset coordinate system. This keyword will be ignored for anything but submarines.
SINGUL¶
This command gives the location of the two parametric edges that detach from the keel and water line. They are often called singularity lines since the mapping of a 90° edge to a flat surface results in a singularity in the mapping. This is one of the only two XGRID commands that needs input given in the offset file coordinate system. (The other one is RADIUS.)
General form of command
Default values
Keywords
| Keyword | Description |
|---|---|
KEEL |
[WHICH] The information in the command will concern the water edge leaving the keel. |
WATER |
[WHICH] The information in the command will concern the water edge leaving the waterline. |
BOW |
[WHICH] The information in the command will concern the water edge leaving the keel at the bow. |
XYZFWD |
The x, y and z coordinate of the point where the singularity line leaves the hull. It should coincide with the hull. This point will, in the WATER case, follow the water line if the ship is subject to sinkage and trim. |
XYZAFT |
The x, y and z coordinate of the point where the singularity line should change direction to become parallel to the x-axis. XGRID assigns values to XYZAFT that make the singularity line continue aft of XYZFWD with constant y and z-coordinates if not given. |
OFF |
The presence of OFF turns off the user defined parametric edges. The default behaviour is used instead which means that the parametric edge will follow the x-axis aft of the hull. The η-boundary smoothing is turned |
SIZE¶
The number of planes in the grid, and the extent of the grid along the hull, are specified with this command.
If the refinement is changed with VCOARSE, COARSE, MEDIUM, FINE or VFINE, the refinement of all other grids is changed accordingly. See OVERLAP in the XCHAP chapter for more details.
XGRID builds the grid in one of two ways (note 1):
- In the global approach the grid covers the whole hull and the flow around it, from well upstream of the bow to downstream of the stern, and XCHAP computes the whole flow. This is the default for a single skeg hull and for every VOF computation.
- In the zonal approach the grid starts at about midship, and XCHAP takes its inflow boundary conditions from the XPAN and XBOUND results. This is the default for a twin skeg hull;
ZONALselects it for a single skeg hull.
In SHIPFLOW Design5 the approach is selected with the parameter domain (global or zonal) under xgrid → size; see Global and Zonal Approach in Basic Tutorial 5.
General form of command
SIZE ( GLOBAL , ETAMAX = n , ZETAMAX = n , IETAMAX = n ,
ZONAL
OETAMAX = n , VCOARSE , UETAMAX = n , AETAMAX = n ,
COARSE
MEDIUM
FINE
VFINE
JMAXF = n , JMAXP = n ,
OEBO = n , OEBA = n , OEAF = n , OEAB = n ,
IEAF = n )
Default values
SIZE ( GLOBAL (single skeg, VOF) or ZONAL (twin skeg),
the grid size of XFLOW|HULL, MEDIUM unless given there )
A grid size given here overrides the one of HULL in XFLOW, including its target y+ (see YPLUS). The numbers of planes of each grid size are listed in notes 2 to 4.
Keywords
| Note | Note Keyword | Description |
|---|---|---|
| (1) | GLOBAL |
[APPROACH] The grid covers the whole hull: the global approach. The default for a single skeg hull and for VOF computations. |
| (1) | ZONAL |
[APPROACH] The grid starts at about midship: the zonal approach. The default for a twin skeg hull. |
| (2) | ETAMAX |
Number of planes in the circumferential direction on one side of the hull; without symmetry (SYMMETRY(NOSYM)) the grid has 2·ETAMAX−1 planes around the whole hull. The planes are uniformly distributed. Use IETAMAX and OETAMAX instead for twin skeg. |
| (2) | ZETAMAX |
Number of planes in the radial direction. |
| (3) | IETAMAX |
Number of planes in the circumferential direction in the inner block of the grid for twin skeg hull. Keyword can only be used in connection with a twin skeg hull. More information on grid generation for this type of ship can be found in Offset file format for twin skeg hulls. |
| (3) | OETAMAX |
Number of planes in the circumferential direction in the outer block of the grid for twin skeg hull. Keyword can only be used in connection with a twin skeg hull. More information on grid generation for this type of ship can be found in Offset file format for twin skeg hulls. |
| (4) | UETAMAX |
Available only for VOF. Number of planes in the circumferential direction up to HUND location. See XDISTR for more information. |
| (4) | AETAMAX |
Available only for VOF. Number of planes in the circumferential direction up to HABO location. See XDISTR for more information. |
| (4) | JMAXF |
Available only for VOF. Number of planes in the circumferential direction up to the deck location. See XDISTR for more information. |
JMAXP |
Available only for VOF. Number of planes in the transverse of the deck plug grids. | |
OEBO |
[XGRID7] Number of points in transverse directions on the boss. | |
OEBA |
[XGRID7] Number of points in transverse directions above the boss. | |
OEAF |
[XGRID7] Number of points in transverse directions on the outer part of the aft overhang. | |
OEAB |
[XGRID7] Number of points in transverse directions below the aft overhang. | |
IEAF |
[XGRID7] Number of points in transverse directions on the inner part of the overhang. | |
| (2) | VCOARSE |
[XGDENS] Very coarse grid. Set the numbers of planes listed in notes 2 to 4. Not available on HULL in XFLOW. |
| (2) | COARSE |
[XGDENS] Coarse grid. Set the numbers of planes listed in notes 2 to 4. |
| (2) | MEDIUM |
[XGDENS] Medium grid, the default. Set the numbers of planes listed in notes 2 to 4. |
| (2) | FINE |
[XGDENS] Fine grid. Set the numbers of planes listed in notes 2 to 4. |
| (2) | VFINE |
[XGDENS] Very fine grid, one step finer than FINE: every number of planes is multiplied by about 21/4, as between the other grid sizes, and the target y+ is 0.5. Set the numbers of planes listed in notes 2 to 4. Not available on HULL in XFLOW, nor with XGRID8 (FINE is used). |
Notes
- Global and zonal approach. The approach decides where the grid starts and ends along the hull and how the planes are distributed between the blocks of XDISTR. In the global approach (all lengths in Lpp, x = 0 at the forward and x = 1 at the aft perpendicular) the grid runs from
XSTART= −2.0 toXEND= 1.8, fromXSTART= −1.0 toXEND= 3.0 in a VOF computation, with all five blocks ofXDISTR. In the zonal approach it runs fromXSTART= 0.5 toXEND= 1.8, and the blocks upstream of the bow are not used (NU= 0,NF= 1). AnXSTARTat or upstream of x = 0.05 always gives the global approach. The outer radius of the grid is set with RADIUS in both. -
Single skeg hull. The defaults of each grid size:
VCOARSECOARSEMEDIUMFINEVFINEETAMAX41 49 59 70 83 ZETAMAX59 71 84 100 119 YTARGET(YPLUS)1.18 0.99 0.83 0.70 0.50 NU,NF(global)27, 65 32, 78 38, 92 45, 110 54, 131 NM,NA,NW(global)77, 27, 30 92, 32, 35 109, 38, 42 130, 45, 50 155, 54, 60 NM,NA,NW(zonal)44, 27, 30 52, 32, 28 62, 38, 34 74, 44, 40 88, 52, 48 In both approaches
XAPU= 0.88 andXAPD= 0.99; in the global approachXFPU= −0.05 andXFPD= 0.225. In a computation at a Reynolds number above 108 (full scale) the defaultZETAMAXis multiplied by 1.5. -
Twin skeg hull.
ZETAMAX,YTARGETand theXDISTRvalues as for a single skeg hull, andVCOARSECOARSEMEDIUMFINEVFINEOETAMAX20 34 48 57 68 IETAMAX16 27 38 45 54 -
VOF, single skeg hull. The global approach, with
XSTART= −1.0 andXEND= 3.0, theXDISTRvalues of note 2,HUND= −0.005 andHABO= 0.015, andVCOARSECOARSEMEDIUMFINEVFINEETAMAX84 100 119 141 168 UETAMAX36 42 50 60 71 AETAMAX59 71 84 100 119 JMAXF75 89 106 126 151
XDISTR¶
This command controls the x-plane distribution: where the grid starts and ends along the hull, and how the planes are distributed between the five blocks of the grid (figure below). The x-coordinates are in Lpp, with x = 0 at the forward and x = 1 at the aft perpendicular. The defaults depend on the approach and the grid size set with SIZE; its notes list them all.
General form of command
XDISTR ( XSTART = v , NU = g , XFPU = v , NF = g ,
XFPD = v , NM = g , XAPU = v , NA = g ,
XAPD = v , NW = g , XEND = v , UNIFORM ,
HUND = v , HABO = v )
Default values (single skeg hull, global approach, MEDIUM grid)
XDISTR ( XSTART=-2.0, XEND=1.8, XFPU=-0.05, XFPD=0.225, XAPU=0.88,
XAPD=0.99, NU=38, NF=92, NM=109, NA=38, NW=42 )
VOF computations start at XSTART=-1.0 and end at XEND=3.0. In the zonal approach the grid runs from XSTART=0.5 to XEND=1.8 with NU=0, NF=1, NM=62, NA=38 and NW=34 (MEDIUM).
Keywords
| Keyword | Description |
|---|---|
XSTART |
x-coordinate of the inflow end of the computational domain. −2.0 (two ship lengths upstream of the forward perpendicular) in the global approach, −1.0 in a VOF computation, 0.5 in the zonal approach. An XSTART of 0.05 or less always gives the global approach. |
NU |
number of planes (of clusters) in the longitudinal (ξ) direction between coordinates XSTART and XFPU. Not used in the zonal approach. |
XFPU |
The x-coordinate of the change in stretching of the bow region upstream of the FP. |
NF |
number of planes (of clusters) in the longitudinal (ξ) direction between coordinates XFPU and XFPD. Not used in the zonal approach. |
XFPD |
The x-coordinate of the change in stretching of the bow region downstream of the FP. |
NM |
number of planes (of clusters) in the longitudinal (ξ) direction between coordinates XFPD and XAPU. |
XAPU |
The x-coordinate of the change in stretching of the stern region upstream of the AP. |
NA |
number of planes (of clusters) in the longitudinal (ξ) direction between coordinates XAPU and XAPD. |
XAPD |
The x-coordinate of the change in stretching of the stern region downstream of the AP. |
NW |
number of planes (of clusters) in the longitudinal (ξ) direction between coordinates XAPD and XEND. |
XEND |
The x-coordinate of the end of the grid. 1.8 (0.8 ship lengths downstream of the aft perpendicular), 3.0 in a VOF computation. |
UNIFORM |
A uniform distribution is made. Only XSTART and XEND need to be specified. |
HUND |
The non-dimensional z-coordinate of the lower grid plane of the refined free surface interface. Available only for VOF. Default value is -0.005. |
HABO |
The non-dimensional z-coordinate of the higher grid plane of the refined free surface interface. Available only for VOF. Default value is 0.015. |
For VOF computations, the refined free surface interface lies between z = HUND and z = HABO. The two figures below show it in a side view and in a transverse cut, together with the numbers of circumferential planes (UETAMAX, AETAMAX, JMAXF and ETAMAX) set in SIZE.
ETASMOOTH¶
TUNING COMMAND
This command controls the fourth order smoothing of the longitudinal lines on the η-boundaries.
General form of command
Default values
ZETAPRE is truncated to an integer.
Keywords
| Keyword | Description |
|---|---|
TIMESM |
The smoothing of the longitudinal lines on the η boundaries is governed by fourth order diffusion. TIMESM is the time that the diffusion will act on the lines (see theoretical manual). |
ZETASM |
The time of diffusion used will increase gradually from zero at the hull to TIMESM at the parametric grid coordinate ζ = ZETASM. The lines outside ζ = ZETASM will be smoothed using a time of diffusion = TIMESM. The reason for this is that the mechanism that has been introduced to prevent the lines from moving inside each other or the hull isn't elegant enough to produce as good lines as a lower time of diffusion will. |
OFF |
The η-boundary smoothing is turned off if OFF is found in the command. |
FEEDBACK¶
TUNING COMMAND
This command allows the user to tune the improvement of the Poisson equation source terms (see "Source term improvement" in the theoretical manual).
General form of command
Default values
Keywords
| Keyword | Description |
|---|---|
HULL, WATER, KEEL |
[WHICH] Feedback coefficients are chosen separately for the hull, water and centre plane surface. The presence of the keyword HULL in this command tells XGRID that the quantities given in the command should be used for the hull surface. WATER and KEEL work in the same way but for the water surface and the centre plane below the keel. This command can thus appear three times in the input file. |
TRANS |
This is the feedback amplification factor Kt. It affects the feedback of the "transversal" source term, i.e. the source term that influences the direction of the coordinate lines leaving the surface of interest. |
NORMAL |
Same as TRANS but concerning the other feedback amplification factor, Kn. It affects the source term that influences the spacing of the coordinate planes "parallel" to the surface of interest. |
MAXDIFF |
This parameter puts a limit on the "error" that enters the feedback loop. It is an adjustable level of saturation for the feedback loop. |
IMPROVE¶
TUNING COMMAND
This command controls when the source terms of the Poisson equations should be improved (see "Source term improvement" in the theoretical manual).
General form of command
Default values
For twin skeg hulls:
Twin skeg inner: IMPROVE ( IMPW8 = 100, IMPHOP = 2, IMPMAX = 200,
ANGSEEP = -0.005, CONFUNBLEED = 0.59*ZETAMAX)
Twin skeg outer: IMPROVE ( IMPW8 = 100, IMPHOP = 2, IMPMAX = 200,
ANGSEEP = 0.001, CONFUNBLEED = 0.59*ZETAMAX)
Keywords
| Keyword | Description |
|---|---|
IMPW8 |
The number of Poisson solver iterations before the first manipulation of the sources. |
IMPHOP |
The number of Poisson solver iterations between each change. |
IMPMAX |
The maximum number of changes that should be made. |
ANGSEEP |
Non-orthogonal edges of the domain will infinitely frustrate the source term feedback process unless the grid is allowed to be slightly non-orthogonal close to these corners. ANGSEEP is the non dimensional extent of this region. |
CONFUNBLEED |
This is the parametric distance of influence in the preliminary grid of the source (control function) changes. |
OFF |
The presence of OFF in the command turns off the iterative improvement of the source terms. |
OUTER |
The information in the command will concern the outer block of the grid for twin skeg hull. Keyword can only be used in connection with a twin skeg hull. More information on grid generation for this type of ship can be found in Offset file format for twin skeg hulls. |
INNER |
The information in the command will concern the inner block of the grid for twin skeg hull. Keyword can only be used in connection with a twin skeg hull. More information on grid generation for this type of ship can be found in Offset file format for twin skeg hulls. |
NEUMANN¶
TUNING COMMAND
A Neumann boundary condition at the η-boundaries can be explicitly implemented by movement of the boundary points in between sweeps in the Poisson solver.
General form of command
Default values
Keywords
| Keyword | Description |
|---|---|
NEUW8 |
The number of Poisson solver iterations before the first boundary point movement. |
NEUHOP |
The number of Poisson solver iterations between each movement. |
NEUMAX |
The maximum number of changes that should be made. The actual number of changes made will be limited by convergence of the grid generation process or by the value of MAXIT (see POISSON). |
OFF |
The presence of OFF in the command turns off the migration of the boundary points. |
SKIN¶
TUNING COMMAND
The distance between the first and second ζ plane is specified with this command.
General form of command
Default values
Keywords
| Keyword | Description |
|---|---|
KEEL |
[WHICH] The distances given will be the distances between the first and second ζ-plane at the keel edge of the parametric grid. |
WATER |
[WHICH] Same as KEEL but this time at the waterline. The absence of any default values will force the use of two SKIN commands. |
X |
The x-coordinates of the thickness values. The sequence x1 .. xnumber has to be monotonically increasing. |
THICKNESS |
The distances that XGRID will try to achieve. Linear interpolation is used between the values used. The first and last values given are used in front of x1 and after xnumber respectively. |
Notes
The values given are only what XGRID will try to aim for. Unwise use of η boundary smoothing (see ETASMOOTH) and a very small first distance in the preliminary grid (see COARSE) can make the final grid look a lot different from what we specified.
The thickness values have to be chosen so that the second p-layer outside the hull does not end up outside the logarithmic overlap region of the boundary layer. Consult the theoretical manual for more details on how the SKIN thickness values should be chosen.
YPLUS¶
TUNING COMMAND
Sets the thickness of the first cell on the hull, through the y+ it should give. Normally this command is not needed: the grid size set with SIZE (or with HULL in XFLOW) gives the target y+ (note 1).
General form of command
Default values
YPLUS ( YTARGET = 1.18 (VCOARSE), 0.99 (COARSE), 0.83 (MEDIUM),
0.70 (FINE) or 0.50 (VFINE), NOWALLAW, EXPAND=1 )
Keywords
| Note | Note Keyword | Description |
|---|---|---|
| (1) | YTARGET |
Target y+ of the first cell on the hull. Overrides the value of the grid size. |
NOWALLAW |
[WALL] Yields suitable y+ values for XCHAP that use no-slip boundary condition at the hull surface. | |
WALLAW |
[WALL] Yields suitable y+ values for the use of wallaw boundary condition at the hull surface. XCHAP does not use wallaws so do not use this option. | |
EXPAND |
Expands linearly the YTARGET value to EXPAND*YTARGET at XCH2 or XEND. |
Notes
- XGRID converts
YTARGETinto a first-cell thickness with the Reynolds number of the computation. The value of the grid size actually used applies — theSIZEkeyword (VCOARSEtoVFINE) if given, otherwise the grid size ofHULLin XFLOW,MEDIUMby default — unlessYTARGETis given here; aYPLUScommand withoutYTARGETkeeps the value of the grid size. An explicit SKIN command overrides both. XCHAP keeps this thickness, except in a computation at a Reynolds number of 108 or more (full scale): there the grid is generated withYTARGET=200and XCHAP stretches it to the y+ target of XGRID in the XCHAP chapter.
TUNE¶
TUNING COMMAND
The parameters changed by this command are of minor importance.
General form of command
Default values
Keywords
| Keyword | Description |
|---|---|
CORKY |
In the vicinity of the parametric longitudinal edges at the keel and waterline, the source terms will have to be adjusted (if improvement of source terms is turned on) to satisfy the boundary conditions of two surfaces. This can simply become too much for the feedback process in some cases unless we diminish the feedback amplification in the corners slightly. This extra multiplicative factor is named CORKY. The default value will make the feedback 40% weaker in these corners than otherwise. |
PENDEP |
The iterative "improvement" of the source terms will take place in a region of parametric thickness CONFUNBLEED (see IMPROVE). At the edge of this region, the changes will have dropped to zero. At the parametric distance PENDEP*CONFUNBLEED from the boundary, the influence will have dropped to one half of that at the surface. |
SMALLP |
The equations that govern the feedback contain boundary values of the source terms. If these turn out to be zero, no change will ever be made. To avoid this, these terms are never allowed to become smaller than SMALLP. |
EXPLICIT |
The presence of this word in the command tells XGRID to satisfy the Neumann boundary condition at the η-boundaries explicitly. This option is "old" but has been included until the implicit approach has been thoroughly tested. |
-
We have to remember that convergence of the Poisson equations is not the ultimate goal of our efforts. If we can produce an acceptable grid after say three sweeps, that's excellent and we don't care that it's a poor solution to our grid generation equations. ↩


