Simulation#

Convergence parameters and time step#

HAWC2 uses a (sparse) Newmark solver to solve the equations of motion. Convergence in HAWC2 is defined as fulfilling all 3 of the following criteria at a given time step:

  1. The root-sum-of-squared-error (RSSE) of the residuals on the internal-external forces/moments in the system is below a specified threshold.

  2. The RSSE of the increment in the state vector is below a specified threshold.

  3. The RSSE of the constraint equations in the system is below a specified threshold.

A user should specify convergence parameters and a time step that are relevant for their system to ensure proper convergence. E.g., smaller and/or stiffer systems may require smaller time steps, or a system with smaller external loads might need a reduced threshold on the internal-external forces/moments and state increment. One possible way to determine these parameters for your model could be:

  1. Reduce the time step and simulate the response. If the response has changed significantly, repeat this step until the response does not change with a reduced time step.

  2. Reduce the convergence thresholds until there are 2 to 3 iterations for each time step.

  3. If the response has changed significantly from Step 1, return to step 1 and repeat.

Main command block - Simulation#

Obl.

Command name

Explanation

*

time_stop

1. Simulation length [s]

solvertype

1. Solver type (1=dense Newmark (default, more robust option), 2=sparse Newmark (faster and recommended, new in version 12.7))

initial_condition

1. Type of initial condition to use (1=undeflected state (default), 2=static solution).

2. (optional) Max. step size for state variables when using the static solver, default=Inf.

3. (optional) Max. step size for constraint forces when using the static solver, default=Inf.

4. (optional) Flag to include constraint stiffnes when using the static solver, (0=exclude (default), 1=include). Including the constraint stiffness is sometimes necessary when external systems are present (e.g. ESYSMooring).

With undeflected initial conditions, the position of the nodes at the beginning of the simulation is defined by the c2_def and orientation of each main body. Setting this parameter to 2 will cause HAWC2 to solve a nonlinear static problem at the beginning of the simulation, and use this deflected configuration as initial condition. Only some forcing terms are considered for this simulation, namely: gravity, inertia, aerodynamics, hydrodynamics and external system constraints. Extending the static solver to support general HAWC2 models is under development. Generic controllers are not yet supported, but the static solver is verified to work with the echo dll, using “general constant”. This command is suitable to simulate a turbine with a fixed pitch and rotor speed. The pitch is set in the relative rotation command. Please remember that for the publicly available HAWC2 models, a 5 degree pitch to feather corresponds to a rotation about the pitch axis by minus 5 degrees as specified in the relative rotation command. The rotor speed is accounted for by the static solver using “orientation / relative / mbdy2_ini_rotvec_d1”, and by the subsequent time simulation using “constraint / bearing3 / omegas” which must be set to the same value. Setting the initial rotor speed via “orientation / base / mbdy_ini_rotvec_d1” is also supported. In particular, “constraint / bearing1” is not supported yet. The convergence history of the static solution is written in the log file. The number of iterations is controlled by “max_iterations”, while the tolerances by “convergence_limits”. The commands for iterations and tolerances of the aerodynamics are described in the aerodynamics section of the manual. They are: “n_static_bem_iter”, “static_bem_conv_criterion” and “n_static_ds_iter”.

solver_relax

1. Relaxation parameter on increment within a time step. Can be used to make difficult simulations run through the solver when the parameter is decreased, however at the cost of simulation speed. Default=1.0

on_no_convergence

Parameter that informs solver of what to do if convergence is not obtained in a time step.

1. ‘stop’: simulation stops – default. ‘continue’: simulation continues, error message is written.

convergence_limits

Convergence limits that must be obtained at every time step. See Sec. Convergence parameters and time step.

1. epsresq, residual on internal-external forces, default=10.0

2. epsresd, residual on increment, default=1.0

3. epsresg, residual on constraint equations, default=1E-7

max_iterations

1. Number of maximum iterations within a time step.

animation

Included if animation file is requested

1. Animation file name incl. relative path. E.g. ./animation/animation1.dat

visualization

Included if simulation visualization file is requested

1. Visualization file name incl. relative path. E.g. ./visualization/example.hdf5;

(optional: 2. time at which the visualization output starts [s])

(optional: 3. time at which the visualization output ends [s])

logfile

Included if a logfile is requested internally from the htc command file.

1. Logfile name incl. relative path. E.g. ./logfiles/log1.txt

log_deltat

If specified, iteration statistics is written to the log(file) every log_deltat seconds. Otherwise a log line is printed every time step.

1. Time between output to logfile [s], e.g. 2.5

default_gravity

If specified, the gravity acceleration provided will be used for all bodies and water properties, except if gravity is specifically provided for individual bodies or water properties.

1. Gravity acceleration, default 9.81 \(\text{m/s}^2\).

Sub command block - newmark#

Obl.

Command name

Explanation

beta

1. beta value (default=0.27)

gamma

1. gamma value (default=0.51)

*

deltat

1. time increment [s]

symmetry

1. Solver assumption regarding mass, damping and stiffness matrices (1=symmetric (default), 2=asymmetric (recommended for offshore structures). When hydrodynamic loading is applied this parameter will automatically change to 2.)