XPTD Commands¶
The xptd block contains the commands controlling the time-domain potential flow solver: solver
acceleration, the free surface damping zone, the thin-plate splines, the HOS3 incident wave solver,
time stepping, parallelization, saving and post-processing.
xptd
accelerate(), dmpz(), tps(), hos3(), time(), iteration(), init(),
para(), control(), tran(), save(), engine(), propeller(),
friction(), post()
end
ACCELERATE¶
Definition of parameters for the tree algorithm used to accelerate the solver.
General form of command
Default values
Not stated in the source manual.
Keywords
| Keyword | Description |
|---|---|
free |
Specifies the ratio between box size and distance when computing induced quantities for free surface panels. A value of 0 means no acceleration. Recommended values are between 0.1 and 0.3. |
body |
Specifies the ratio between box size and distance when computing induced quantities for body panels. A value of 0 means no acceleration. Recommended values are between 0.1 and 0.3. |
DMPZ¶
Definition of parameters for the free surface damping zone. The extent of the non-dampened region around the vessel is defined and the damping zone is computed accordingly.
General form of command
dmpz ( upstream = v , downstream = v , side = v ,
upfa = v , dofa = v , sifa = v ,
strength = v , power = v , noconst )
Default values
Keywords
| Keyword | Description |
|---|---|
upstream |
The extent of the non-dampened free surface upstream. Given in non-dimensional form based on the reflen (auxiliary coordinate system). |
downstream |
The extent of the non-dampened free surface downstream. Given in non-dimensional form based on the reflen (auxiliary coordinate system). |
side |
The extent of the non-dampened free surface to the sides. Given in non-dimensional form based on the reflen (auxiliary coordinate system). |
strength |
The strength of the damping zone. If not specified, it will default to a value of 1.0. |
upfa |
Specifies how fast the damping zone ramp goes from 0 to full strength in the upstream direction. |
dofa |
Specifies how fast the damping zone ramp goes from 0 to full strength in the downstream direction. |
sifa |
Specifies how fast the damping zone ramp goes from 0 to full strength in the side direction. |
power |
The power of the damping zone function. If not specified, it will default to a value of 2.0. |
noconst |
Turn off constant strength damping on the whole free surface during the acceleration phase, after which it is smoothly transitioned to the standard damping zone over a duration of three times the duration of the acceleration phase. The constant strength damping helps with reducing initial transients during the acceleration phase. |
TPS¶
Definition of parameters for the thin-plate splines used for the free surface modelling.
General form of command
Default values
Not stated in the source manual.
Keywords
| Keyword | Description |
|---|---|
mesh |
Tension of the TPS when generating the free surface mesh. |
inter |
Tension of the TPS when interpolating free surface quantities. |
active |
Tension of the TPS when computing active panels on a body. |
slimit |
Apply additional TPS tension locally if the slope of a panel is more than this value in degrees. Normally this should be used only as a last resort for difficult cases. |
wlmesh |
Tension of the TPS when generating the free surface mesh nodes belonging to panels closest to a waterline of a body. |
wlinter |
Tension of the TPS when interpolating free surface quantities for panels closest to a waterline of a body. |
HOS3¶
Controls the Higher-Order Spectral (HOS3) solver for incident waves — grid resolution, filtering, stability limits and depth. See HOS3 waves for the overall description and usage.
General form of command
hos3 ( nx = n , ny = n , falp = v , fpow = n ,
deal = v , kamx = v , klim = v , draf = v ,
erni = n , tmin = v )
Default values
hos3 ( nx = 512, ny = 4, falp = 1.0, fpow = 6, deal = 0.5,
kamx = 0.3, klim = 0.0, draf = 1.0e6, erni = 10, tmin = 6.0 )
Keywords
| Keyword | Description |
|---|---|
nx |
Number of HOS3 grid points in the \( x \) direction (must be a power of two). Default: 512. |
ny |
Number of HOS3 grid points in the \( y \) direction (must be a power of two). Default: 4. Use larger values for directional spreading. |
falp |
Spectral filter strength parameter. Larger values damp high-\( k \) more. Default: 1.0. |
fpow |
Spectral filter power (roll-off sharpness). Default: 6. |
deal |
Dealiasing cutoff as a fraction of Nyquist. Default: 0.5. |
kamx |
Maximum allowed wave steepness \( ka \). If exceeded, HOS3 scales amplitudes down to meet this limit. Default: 0.3. |
klim |
High-\( k \) linear cutoff. Modes with \( \|k\|>\texttt{klim} \) are advanced with linear (Airy) tendencies for stability. Default: 0.0 (disabled). |
draf |
Water depth used by HOS3 in meters. This depth is used in the dispersion relation and vertical scaling. Default: 1.0e6 (deep water). For finite depth, set this to the actual water depth. |
erni |
Energy renormalization interval in HOS3 steps. Default: 10. |
tmin |
Minimum period cutoff for irregular HOS3 waves [s]. Default: 6.0. The effective lower cutoff is \( \max(\text{irregular\_period\_min},\, 2.0\ \text{s},\, \texttt{tmin}) \). |
TIME¶
Definition of parameters related to the time-integration scheme.
General form of command
time ( seconds , courant = v , dt = v , nsteps = v ,
nondim manual
froude
wave
lambda = v , maxtime = v , maxiter = n , conv = v ,
noconv )
Default values
Keywords
| Keyword | Description |
|---|---|
seconds |
Input in seconds. This is the default. |
nondim |
Input in non-dimensional time \( \hat{t}=t/\sqrt{L_{pp}/g} \). |
courant |
Time step size \( dt \) is set indirectly using the specified Courant number \( Cn \), based on nominal speed \( V_{nom} \) and smallest panel size \( L_{panel} \), such that \( dt = Cn (L_{panel} / V_{nom}) \). |
manual |
Time step size is given explicitly with dt, in seconds or non-dimensional format depending on seconds/nondim. |
froude |
Time step size is set to equal nsteps time steps per fundamental wave period of the steady ship-generated waves. |
wave |
Time step size is set to equal nsteps time steps per wave period. The wave period used is the smaller of the fundamental ship-generated wave period and the incident wave period. |
dt |
Together with manual, this specifies the time-step size in seconds or non-dimensional format depending on seconds/nondim. |
nsteps |
Number of time steps per wave period when froude/wave is specified. If not specified, it defaults to 30. |
lambda |
Wave length (in non-dimensional form) to be used by the nsteps parameter. If not specified, the incident wave length is used. |
maxtime |
Specifies the maximum simulated time in seconds or non-dimensional format depending on seconds/nondim. If neither maxtime nor maxiter is given, the simulated time is set from the speed and the incident waves (see the notes). |
maxiter |
Specifies the maximum number of time steps. |
conv |
Limiting value for the convergence criterion expressed as the standard deviation of resistance in percent of its mean value. For example, conv=1 means 1%. |
noconv |
Do not stop the computation even if fulfilling the convergence criterion for resistance. |
Notes
maxiterandmaxtimeare mutually exclusive.manualrequiresdt.waverequireslambdaandnsteps.frouderequiresnsteps.courantis ignored whendtis set, or whendtis set fromwaveorfroude.-
If neither
maxtimenormaxiteris given, the simulated time is chosen so that the results can be analysed:- Calm water: a sailed distance of 10 \( L_{pp} \).
- Regular waves: the start-up plus 10 complete encounter periods, but at least a sailed distance of 10 \( L_{pp} \).
- Irregular waves: the start-up plus 200 encounter periods of the spectral peak, but at least a sailed distance of 10 \( L_{pp} \). The peak is taken from the wave components, also when the spectrum is read from a file. A shorter record leaves the significant amplitudes uncertain: with \( N \) peak encounter periods their 95 % uncertainty is roughly \( \pm 2/\sqrt{2N} \), about \( \pm 10 \) % for 200 periods.
The start-up lasts 15 times the acceleration ramp of
XPTD:CONTROL:ACCX: during the ramp the whole free surface is damped with constant strength, and afterwards this damping changes smoothly into the damping zone of DMPZ. WithDMPZ:NOCONSTthe start-up is the ramp alone. The analysis window of theCOMMAND_FILE_OUTPUTfile begins after the start-up. The encounter period is\[ T_e = \frac{2\pi}{\left| \omega - \omega^2 V \cos\beta / g \right|} \]with the wave frequency \( \omega \), the speed \( V \) and the wave direction \( \beta \) (180° in head waves); in following seas it is limited to twice the wave period. The program writes the chosen time and its reason to the screen. The default needs a forward speed: at \( F_n \le 0.01 \), give
maxtimeormaxiter.
PARA¶
Controls the parallelization of the program.
General form of command
Default values
Guessed by the program; typically the number of physical CPUs.
Keywords
| Keyword | Description |
|---|---|
nthr |
Specifies the number of threads the program should execute with. By default, this is guessed by the program. Typically this corresponds to the number of physical CPUs. |
CONTROL¶
Controls various settings for the computation.
General form of command
control ( accx = v , saef , calf , corr ,
dump = n , restart , hstr , sarp ,
thick = v , wfcl = n , bldi = v , brea = v ,
vreg = v , nopdyn , precond_block = n )
Default values
Keywords
| Keyword | Description |
|---|---|
accx |
Specifies the maximum acceleration of the acceleration ramp used to smoothly accelerate a vessel up to speed. The value is given as a fraction of the gravitational acceleration \( g \). Typical values are 0.05 for a soft start and 0.2 for a relatively quick acceleration. |
saef |
Saves VTU files in an earth-fixed reference frame instead of the computational reference frame. |
calf |
Calibrate the horizontal forces on the body to be zero at rest. This can be useful if the discretization error is large due to low quality of the body panelization. |
corr |
Correction for horizontal forces due to the difference between their values evaluated with acceleration potential and backward difference. Necessary when running self-propelled cases. |
dump |
Save the state of the computation to the COMMAND_FILE_RESTART.dat file every dump time steps so that it can be restarted from that state using the restart command. |
restart |
Restart a computation from the last state saved to the COMMAND_FILE_RESTART.dat file. |
hstr |
Enables the evaluation of the hydrostatic force discretizing the hull with triangles instead of quadrilateral panels. To be able to visualize the triangulated mesh it is necessary to set save(all). |
sarp |
Save real panels in the VTU output instead of the interpolated panel representation. |
thick |
Free-surface transition thickness used when computing wetted/active panel fractions near the waterline. This is a non-dimensional length (scaled by reflen). Default: 0.005. |
wfcl |
Wetness-factor compression level for the free surface. 0 = none, 1 = compression, 2 = compression with limiter. Default: 2. |
bldi |
Boundary-layer displacement factor used in the viscous correction. Set to zero to disable. Default: 0.0. |
brea |
Reserved (currently parsed but not used in the solver). |
vreg |
Reserved (currently parsed but not used in the solver). |
nopdyn |
Reserved (currently parsed but not used in the solver). |
precond_block |
Block size of the near-field preconditioner of the Barnes-Hut iterative solver. Default 16; allowed values are 2 to 256. Set it to 0 to use the original solver without preconditioner. |
Notes
- Restart files are not guaranteed to be forward-compatible between different program versions.
- A running computation can be stopped early by creating a file named
STOP, orCOMMAND_FILE.stop, in the run directory. The program finishes the current time step, saves the restart file and writes the post-processing output as usual, and removes the stop file so that a followingrestartdoes not stop at once.
TRAN¶
Controls various settings for the transom flow model and free surface behind the hull.
General form of command
Default values
Keywords
| Keyword | Description |
|---|---|
nlen |
Specifies the longitudinal extent of the transom pressure patch behind the transom when it is submerged, in terms of the momentary transom draught. Default value is nlen=5. |
zlim |
Specifies the maximum allowed hull generated wave height. Default value is zlim=0.01 of LPP. |
xdis |
Specifies the start of where zlim is active. Default value is xdis=-0.5 of LPP behind the CG. |
ydis |
Specifies the width of where zlim is active. Default value is ydis=1.2 of the hull width. |
SAVE¶
Controls what variables should be saved to the VTU files.
General form of command
save ( all , pos , vel , geom , active , phi ,
sigma , pdphi , wf , paid , ptot , dmpz ,
off , mark )
Default values
Not stated in the source manual.
Keywords
| Keyword | Description |
|---|---|
all |
Save all variables to the VTU files. |
pos |
Save panel coordinates to the VTU files. |
ptot |
Save total pressure to the VTU files. |
vel |
Save fluid velocities to the VTU files. |
geom |
Save geometrical quantities to the VTU files. |
active |
Save the active value to the VTU files. |
phi |
Save velocity potential and acceleration potential to the VTU files. |
sigma |
Save source strength to the VTU files. |
pdphi |
Save time derivative of the velocity potential to the VTU files. |
wf |
Save wetness factor to the VTU files. |
paid |
Save panel IDs to the VTU files. |
dmpz |
Save the damping zone strength to the VTU files. |
off |
Disable all VTU output. |
mark |
Save free-surface markers to VTK (diagnostic output). |
I_SAVE¶
Control saving of incident (explicit) field components to VTU files.
General form of command
Default values
Not stated in the source manual.
Keywords
| Keyword | Description |
|---|---|
all |
Save all incident components to the VTU files. |
pos |
Save incident positions to the VTU files. |
vel |
Save incident velocities to the VTU files. |
phi |
Save incident velocity potential to the VTU files. |
pdphi |
Save incident \( \partial\phi/\partial t \) to the VTU files. |
pdyn |
Save incident dynamic pressure to the VTU files. |
ptot |
Save incident total pressure to the VTU files. |
E_SAVE¶
Control saving of scattered (implicit) field components to VTU files.
General form of command
Default values
Not stated in the source manual.
Keywords
| Keyword | Description |
|---|---|
all |
Save all scattered components to the VTU files. |
pos |
Save scattered positions to the VTU files. |
vel |
Save scattered velocities to the VTU files. |
phi |
Save scattered velocity potential to the VTU files. |
pdphi |
Save scattered \( \partial\phi/\partial t \) to the VTU files. |
pdyn |
Save scattered dynamic pressure to the VTU files. |
ptot |
Save scattered total pressure to the VTU files. |
FRICTION¶
Definition of a simple model of frictional forces.
General form of command
Default values
Keywords
| Keyword | Description |
|---|---|
global |
Include the global friction resistance drag using the horizontal speed of the body, the instantaneous wetted surface area and the ITTC'57 friction line. |
panel |
Integrate the tangential friction forces on each individual panel using the local flow velocity and the ITTC'57 friction line. |
cf |
Manually specified friction resistance drag coefficient, \( C_f \). |
form |
Form factor, \( k \). Defaults to 0.25 without a FRICTION card and to 0.0 with one; see the notes below. |
Notes
-
The default values above are added only when the command file has no
FRICTIONcard and the hull panelization is automatic (HULLcoarse,mediumorfine, the default). -
A
FRICTIONcard replaces these defaults completely: giveglobalorpanel, otherwise no friction is computed.formthen defaults to 0.0. -
With a water current (
XFLOW:CURRENT)globaluses the speed of the body through the water. The local flow velocity ofpanelincludes the current.
POST¶
Definition of certain post-processing options.
General form of command
Default values
Not stated in the source manual.
Keywords
| Keyword | Description |
|---|---|
r0 |
User defined calm water reference \( R0 \) to be used for calculating added resistance \( RAW \) reported in the COMMAND_FILE_OUTPUT file. If not specified, added resistance will not be calculated and is reported as N/A. Note that this has no effect on the simulation itself. With r0 the report also shows \( RAW \) and its coefficient. |
