Tanks and compartments are formed automatically by Hydromax (once the tank extents and any boundary surfaces have been defined) by selecting Recalculate Tanks and Compartments from the Analysis menu.
This section describes the internal tank-forming process that Hydromax uses to form tanks. First a step-by-step outline of the tank forming process is given, followed by the tank section insertion process. Understanding these processes may assist you in rare situations where the tank forming does not work as expected.
As an example, the starboard waterballast tank below will be created using boundary surfaces.

An example of a port and starboard waterballast tank with a pipe tunnel at the centreline. The water ballast tanks have a margin plate on the side.
Hydromax uses three input items to form the compartment
§ Boundary surfaces (if defined)
§ Boundary box
§ Hydromax Hull sections
Starting position
The starboard tank margin plate is modelled using an Internal Structure surface from Maxsurf.

Starting point: Hydromax Hull sections with an internal surface and a bounding box
Also see:
Modelling Tanks Using Boundary Surfaces on page 43 and the Maxsurf manual on internal structure surfaces
Step 1: Close Internal Structure Surface

Hydromax will close the Internal Structure Surface contour by drawing a straight line between the ends of the opening.
Hydromax uses the same method for forming the tank section from the boundary surfaces as for forming the hydrostatic sections through the hull. As with the hull sections, the surfaces selected to form the tank boundary must form closed section contours at all longitudinal positions through the tank. The area inside the selected surfaces will define the tank contour.
Make sure that the boundary surfaces:
§ Form a closed section contour, or
§ There is no more than one opening – the opening will be closed with a straight line
Note:
Hydromax will close the section contour of
the selected boundary surfaces only. Often a tank is not formed as expected
because only one side
of the internal structure surface was selected for example the portside (p).
Another common cause of unexpected results is trimming. If you selected “use
trimmed surfaces” while opening the Maxsurf model, Hydromax will use the trimmed internal structure surface. Usually
the internal structure surfaces are best to be left untrimmed.
Step 2: Clip to Boundary Surface
Using the closed surface section contour Hydromax can now form a closed compartment section. The tank or compartment looks like this at this stage:

Step 3: Clip to Hull
Hydromax will clip the compartment section to the hull.

Step 4: Clip to Boundary Box
Finally the compartment section is clipped to the boundary box. The boundary box is formed from the numerical input in the Compartment definition table.

The volume of a tank or compartments is calculated by integrating section properties along the length of the tank. Thus it is important to have a sufficiently large number of sections to accurately model the tank. Hydromax will normally place twelve sections between the forward and aft limits defining the tank. If this results in a section spacing greater than the spacing for the hull spacing, additional sections will be inserted into the tank so that the tank section spacing match the hull section spacing.
Also see
Longitudinal Extents of Boundary Box on page 54
For tanks near the ship’s extremities it is good practise to set the “Fore” and “Aft” limits in the compartment table to just inside the hull surface (say 1mm). The following example illustrates why:
§ If the boundary box is set like this:
The number of hull sections is dependent on the section spacing in the model.
§ But if the boundary box is set just inside the forward limit of the bulbous bow:

To recap – Near the ship’s extremities, the longitudinal extents should not be
set to extreme values, they should be set to just inside the extents of the
hull surfaces to ensure that at least 12 sections are used to calculate the
tank volumes.
For internal structure surfaces that are used as boundary surface, Hydromax will automatically set the “Fore” and “Aft” limits of the boundary box to just within the longitudinal limits of the boundary surface. This ensures that at least 12 sections are inserted in the tank.
Note that transversely and vertically there are no such restrictions.
Also see
Number of Sections in Tanks on page 54
Forming Compartments on page 52