Skip to content

Tutorial 1: Potential Free Surface Analysis of a Container Ship and a RoPax Vessel

Overview

In this tutorial you use the potential-flow solver XPAN in SHIPFLOW Design5 to compute the wave pattern, the wave resistance and the dynamic sinkage and trim of two ships:

  • Part 2: the KCS container ship, starting from an IGES file;
  • Part 4: a RoPax vessel, starting from a SHIPFLOW offset file.

Part 3 shows two alternative workflows: passing an IGES file directly to the solver, and importing an existing configuration.

Time required: 30 minutes
Difficulty: Beginner
SHIPFLOW modules used: XPAN

Video walkthrough

A video of the complete KCS setup is embedded at the start of Part 2.


Prerequisites

Before starting this tutorial, make sure you have:

  • SHIPFLOW installed and licensed
  • Access to the example files in your SHIPFLOW installation
  • A basic understanding of ship hydrodynamics

Learning Objectives

By completing this tutorial, you will be able to:

  • Navigate the SHIPFLOW Design5 interface
  • Import hull geometry from IGES and offset files
  • Set up XPAN for a free-surface computation with free sinkage and trim
  • Run and monitor a computation
  • Read the results and visualise the wave pattern
  • Reuse an existing configuration

Tutorial Files

The geometry files are in the examples\geometry folder of your SHIPFLOW installation:

C:\FLOWTECH\SHIPFLOW<version>-x86_64\examples\geometry\kcs_g2010.igs
C:\FLOWTECH\SHIPFLOW<version>-x86_64\examples\geometry\off_ropax

Part 1: Introduction to the SHIPFLOW Design5 Interface

The interface is described on its own page: SHIPFLOW Design5 — workspaces and navigation.

It covers starting SHIPFLOW Design5, the CAD and Connect workspaces, and the 3D view controls (rotate, pan, zoom, Zoom Extent, view orientation and the gimbal). Read it first if you have not used the interface before, then continue with Part 2.


Part 2: KCS Container Ship from an IGES File

In this part you set up and run an XPAN computation for the KCS hull, starting from its IGES geometry.

Ship data Value
Hull KCS (KRISO Container Ship), IGES file kcs_g2010.igs
Length between perpendiculars, Lpp 230 m
Draught 10.8 m
Speed 26 knots (Fn = 0.28), computed at model scale 1:31.6
Computation Free surface, free sinkage and trim

Optional: watch this video walkthrough alongside the written steps below.

📥 Download Video (45 MB)


2.1 Create a New Project

  1. Start SHIPFLOW Design5. It opens with a new, empty project.
  2. Save the project in your working directory, for example as KCS_Tutorial: on the Project tab click Save, or press Ctrl+S.

Project files

Saving creates the project database file (KCS_Tutorial.cdb) and a project folder with the same name. SHIPFLOW writes the configurations and results of your computations into this folder (under manual_results). Keep the .cdb file and the folder together.


2.2 Import the IGES Geometry

  1. On the Import tab, click IGES (in the NURBS group).

    Import tab with the IGES button highlighted

  2. Browse to the examples\geometry folder of your SHIPFLOW installation, select kcs_g2010.igs and click Open.

  3. The Import IGES window lists the IGES entities. Keep the pre-selected entities and click OK.

    Import IGES window with the pre-selected NURBS Surfaces

    Unsupported entities

    The Console shows warnings such as entity type warning [detected type 0 is unsupported]. You can ignore them in this example: the hull surfaces are imported.

  4. Click the Zoom Extent button Zoom Extent button in the lower-left corner of the 3DView, or press F10, to fit the hull in the window.

If the main window does not show the 3DView, open it from View → Windows → 3DView (or 3DOverView):

View tab with the Windows menu open, listing 3DOverView and 3DView

How to rotate the view and change the viewing direction is described on the SHIPFLOW Design5 page.


2.3 Create a Surface Group

  1. Save the project (Ctrl+S).
  2. Select all imported surfaces in the 3DView, for example with a selection box around the whole hull.

    3DView with a selection box around the imported KCS hull

  3. In the Model workspace, on the CAD tab, open Surface Based (in the Surfaces group) and click Surface Group.

    CAD tab with Surface Based → Surface Group highlighted and the new group grp1 in the Model tree

SHIPFLOW creates the surface group grp1, which contains all selected surfaces (350 entries for this hull). You pass this group to SHIPFLOW in the next section.


2.4 Set Up the XPAN Configuration

Create the SHIPFLOW Setup

  1. Switch to the Connect workspace (left bar).
  2. On the Connection tab, click Shipflow (in the Computations group).

    Connection tab with the Shipflow button; the new configurationShf1 and shfComputation1 are highlighted in the Object Tree

Two objects are added to the Object Tree: the configuration configurationShf1 under Configurations and the computation shfComputation1 under Computations. The configuration already contains the default commands title, program, vship and hull under xflow:

Default commands title, program, vship and hull under configurationShf1 → xflow

Add the Offset Command

  1. Select xflow in the Object Tree.
  2. In the Object Editor, select offset in the drop-down list and click the + button (Add entry). The OFFSETFILE command is added as offset under xflow.

    Object Editor of xflow with offset selected and the Add entry (+) button

  3. Select offset and add the parameters iges, lpp and zori in the same way.

  1. Switch to the Model workspace and drag the name grp1 from the Model tree into the text box of the iges parameter.

    Drag the name, not the icon

    Grab the text grp1, not the symbol to the left of it.

  2. Complete the expression so that it reads

    grp1.exportIGES("kcs_g2010.igs")
    

    and click the Evaluate button. Press Ctrl+Space while typing to see auto-complete suggestions.

  3. Set lpp to 230 and zori to 10.8.

    offset command with the evaluated grp1.exportIGES expression and lpp = 230

Changed export command

Earlier versions used exportIGES_deprecated(). The current command is exportIGES().

Parameter Value Meaning
iges grp1.exportIGES("kcs_g2010.igs") Writes the surface group to an IGES file, which SHIPFLOW converts into an offset file before the computation
lpp 230 Reference length used to non-dimensionalise the geometry, normally the length between perpendiculars (m)
zori 10.8 Vertical position of the computational origin (the undisturbed free surface) in the offset coordinate system, i.e. the draught (m)

Select XPAN and Set the Flow Conditions

  1. Select Configurations → configurationShf1 → xflow → program, choose xpan in the drop-down list and remember to click + to add it.

    program command with xpan selected in the drop-down list

  2. Select hull — the HULLTYPE command, shown as hull in the tree — add the keyword fsflow and set it to fsflow.

    hulltype settings with shiptype mono and fsflow = fsflow

    Set fsflow explicitly

    The GUI default is nofsfl (no free surface). Without fsflow, XPAN computes a double-body flow: there are no waves and the wave resistance is zero.

  3. Add xmdens to hull and set it to coarse to keep the computation short. xmdens sets the panel density factors for the hull (BDENS) and for the free surface (FDENS):

    xmdens BDENS and FDENS
    coarse 0.5
    medium 0.8
    fine 1.0 (same as the default)
  4. Select vship (the VSHIP command), add the parameter vknot and set it to 26, then add scale and set it to 31.6.

    Parameter Value Meaning
    vknot 26 Ship speed in knots, given at full scale (here Fn = 0.28)
    scale 31.6 Scale factor: the case is computed at model scale 1:31.6

Check the Input File

  1. Right-click configurationShf1 in the Object Tree and select Show Preview of Input File.

    Context menu of configurationShf1 with Show Preview of Input File

  2. The Configuration_Preview tab shows the input file generated from the configuration:

    xflow
       title( title = "shipflow" )
       program( xpan )
       vship( vknot = 26,scale = 31.6 )
       hull( mono,fsflow,coarse )
       offset( iges = "kcs_g2010.igs",lpp = 230,zori = 10.8 )
    end
    

    Configuration_Preview tab with the xflow commands of configurationShf1

  3. Save the project.


2.5 Run the Computation

  1. In the Connect workspace, select Computations → shfComputation1.
  2. Click the Run button Run button in the Object Editor, or right-click shfComputation1 and select Run.

    Object Editor of shfComputation1 with the Run button highlighted


2.6 Monitor the Computation

  1. In the TaskMonitor, select shipflow.bat to see the solver output.

    TaskMonitor with shipflow.bat running and the output of the offset file generation

    SHIPFLOW first converts the IGES geometry into an offset file (Offset file written to: …\off_kcs_g2010) and then runs the XPAN iterations.

  2. With the coarse grid the computation converges in 8 iterations and takes about 1–2 minutes, depending on your computer.

  3. Save the project. You use it again in section 3.2.

If the Solver Does Not Start

Check the path to the solver executable:

  1. In the Object Editor of shfComputation1, click the pencil icon next to Application.

    Execution Settings of shfComputation1 with the pencil icon next to Application

  2. Check that Executable points to shipflow.bat in the bin folder of your SHIPFLOW installation.

    shipflowBinApplication settings with the Executable path to shipflow.bat

See Troubleshooting → The solver does not start when you click Run for more checks.


2.7 Results and Post-Processing

Results Table

  1. The computation has finished when both the Started and the Finished time are shown in the TaskMonitor.
  2. The results are summarised in the TableViewer window:

    TableViewer with the XPAN results of the baseline design, including CW

    If the TableViewer is not visible, open it from View → New → Viewer → Table Viewer:

    View tab with New → Viewer and the File Viewer and Table Viewer entries

Reference values for the coarse grid:

TableViewer label Quantity Value
CW Wave resistance coefficient, based on the wetted surface at zero speed (Sref) 0.832E-03
TRIMAN Dynamic trim angle in degrees; a negative value means bow down -0.1219
ZSINK Dynamic sinkage (draught change) at Lpp/2, as a fraction of Lpp -0.205E-02

The hull data in the table (B, T, S, …) are also non-dimensionalised by Lpp, which is why LPP is 1. The case is computed at model scale (scale = 31.6).

Check your results

If your values differ clearly from these, check lpp, zori, vknot and scale, and that fsflow is set.

Output File

More information about the settings and the results is in the file configurationShf1_OUTPUT: open the FileViewer window (View → New → Viewer → File Viewer if it is not visible) and click the tab of that file. The file contains the input as read by SHIPFLOW, the results of every iteration and any warnings.

Wave Pattern

  1. Open Connect → Post-Processing. By default the 3DView shows the wave pattern computed by XPAN.

    Post-Processing tab with the XPAN wave pattern of the KCS in the 3DView

  2. The post-processing objects are in the Object Tree under Results → shfComputation1 → XPAN: Body (hull), Free Surface and Wave Profile.

    Results → shfComputation1 → XPAN in the Object Tree and the Object Editor of XPAN_FreeContours

  3. To change the style of the wave pattern, select Results → shfComputation1 → XPAN → Free Surface → XPAN_FreeContours (or click the free surface in the 3DView) and choose one of the Presets in the Object Editor:

    • Black isolines on colored surface
    • White isolines on colored surface
    • Colored isolines on surface
    • Colored surface

    XPAN_FreeContours with the preset Black isolines on colored surface applied to the wave pattern

  4. Change the style of the hull panels in the same way (XPAN → Body, or click the hull in the 3DView).

  5. Save the project.

Part 3: Alternative Workflows

3.1 Using an IGES File Without Importing It

You do not have to import the hull surfaces into SHIPFLOW Design5. Instead, you can give the full path of the IGES file in offset | iges.

  1. Create a new project and a SHIPFLOW setup (Connect workspace, Connection tab, Shipflow).
  2. Add the offset command to xflow and add the iges parameter to it. Enter the absolute path of the IGES file, for example:

    C:\FLOWTECH\SHIPFLOW<version>-x86_64\examples\geometry\kcs_g2010.igs
    

    offset command with the absolute path of the IGES file in the iges field

  3. Complete the configuration as in section 2.4 (lpp, zori, program, hull and vship) and run the computation.

Geometry not shown in the GUI

With this method the IGES surfaces are not shown in the GUI; the configuration and the results are displayed as usual. To see the hull, import the offset file that SHIPFLOW writes during the IGES conversion (off_kcs_g2010, see section 2.6) as described in section 4.1.


3.2 Importing an Existing Configuration

This section requires the project from sections 2.1 to 2.6. It shows how to start from the configuration of an earlier computation — here the one from Part 2.

  1. Create a new project, or open an existing one.
  2. On the Import tab, click Configuration (SHIPFLOW) (in the Maritime group).

    Import tab with the Maritime entries Offsets (NAPA/SHIPFLOW), Results (SHIPFLOW) and Configuration (SHIPFLOW)

  3. Browse to the run folder of the Part 2 computation, select the configuration file configurationShf1 and click Open:

    <your project folder>\manual_results\baseline\shfComputation1\configurationShf1_RUN_DIR\configurationShf1
    

    This configuration contains some additional commands that the GUI does not recognise. Ignore the error message about them.

  4. The imported configuration uses the offset file that SHIPFLOW created from the IGES file in Part 2, and the hull command now contains the names of its offset groups (h1gr, ogrp, fbgr and abgr).

    In the Model workspace, the offset groups are listed in the tree:

    Model tree with the offset groups of the converted KCS geometry and the hulltype settings

    The same group names are used in configurationShf1 → xflow → hull in the Connect workspace:

    hull command of the imported configuration with h1gr = main, ogrp = aft, fbgr = bulb and abgr = boss

  5. Save the project. You can now change the configuration, for example the speed or the grid density, and run it as before.

Two versions of the configuration

  • ...\shfComputation1\configurationShf1_RUN_DIR\configurationShf1 is the configuration that was run. It refers to the generated offset file and contains the offset group names.
  • ...\shfComputation1\configurationShf1 is the configuration as created in the GUI, with the reference to the IGES file. Import this one if you want the original setup.

Part 4: RoPax Vessel from an Offset File

In this part you set up the same kind of computation for a RoPax ferry, starting from an existing offset file. An offset file describes the hull by points on stations, grouped into offset groups — see Offset file format. Apart from the geometry import and the hull group names, the steps are the same as in Part 2.

Ship data Value
Hull RoPax, offset file off_ropax
Length between perpendiculars, Lpp 122.5 m
Draught 6.0 m
Speed 16 knots (Fn = 0.24), computed at model scale 1:17.5
Computation Free surface, free sinkage and trim

4.1 Import the Offset File

  1. Start a new project and save it in your working directory, for example as T_1_4.
  2. On the Import tab, click Offsets (NAPA/SHIPFLOW).

    Import tab with Offsets (NAPA/SHIPFLOW) highlighted

  3. Browse to the examples\geometry folder of your SHIPFLOW installation, select off_ropax and click Open.

  4. A window lists the offset groups in the file. Keep the pre-selected groups and click OK.
  5. In the Model workspace, the imported offset SHF_Import_off_ropax is listed in the tree and the hull stations are shown in the 3DView.

    Offset and IGES geometry

    An imported offset file is shown as stations, an imported IGES file as surfaces. Both can be used for the computation.

  6. Save the project.


4.2 Set Up the XPAN Configuration

  1. In the Connect workspace, on the Connection tab, click Shipflow.

    Connection tab with the Shipflow button highlighted

  2. Select Configurations → configurationShf1 → xflow → program, choose xpan in the drop-down list and click +.

    program command with xpan selected in the drop-down list

  3. Select xflow, choose offset in the Object Editor and click + (Add entry).

    Object Editor of xflow with offset and the Add entry button highlighted

  4. Add the parameters lpp and zori to offset and set them to 122.5 and 6.

  5. Add the parameter file to offset. Drag as_off_ropax from Model → CAD → SHF_Import_off_ropax into its text box, complete the expression so that it reads

    SHF_Import_off_ropax|as_off_ropax.exportSHF("off_ropax")
    

    and click Evaluate. After dragging the name, press Ctrl+Space for help with the rest of the expression.

    offset command with the file expression, lpp = 122.5 and zori = 6

  6. Select hull, add xmdens and set it to coarse, as in Part 2.

  7. Add fsflow to hull and set it to fsflow.
  8. Add h1gr to hull and set it to main, then add fbgr and set it to bulb.

    hulltype settings with h1gr = main and fbgr = bulb

    h1gr names the offset group of the main hull and fbgr the offset group of the fore bulb (see HULLTYPE). The names must match the group labels in the offset file, main and bulb in off_ropax.

  9. Select vship, add vknot and set it to 16, then add scale and set it to 17.5.

    vship settings with Vknot = 16 and scale = 17.5

  10. Save the project.


4.3 Run and Monitor the Computation

  1. Select Computations → shfComputation1 and click the Run button Run button.

    shfComputation1 with the Run button and its configuration configurationShf1 highlighted

  2. Follow the progress in the TaskMonitor by selecting shipflow.bat, as in section 2.6.


4.4 Results

When the computation has finished, the results are shown in the TableViewer and the wave pattern in the 3DView (Connect → Post-Processing). The post-processing tools are the same as in section 2.7.

Reference values for the coarse grid:

TableViewer label Quantity Value
CW Wave resistance coefficient, based on the wetted surface at zero speed (Sref) 0.168E-03
TRIMAN Dynamic trim angle in degrees; a negative value means bow down -0.917E-01
ZSINK Dynamic sinkage (draught change) at Lpp/2, as a fraction of Lpp -0.127E-02

The case is computed at model scale (scale = 17.5).


Troubleshooting

General troubleshooting

Problems that can occur in any SHIPFLOW case are collected on one page: Troubleshooting.

Directly relevant to this tutorial:


Summary

In this tutorial you:

  • imported a hull from an IGES file (KCS) and from an offset file (RoPax);
  • set up XPAN with the commands offset, program, hull (fsflow, xmdens, hull groups) and vship, and checked the input file;
  • ran the computations and followed them in the TaskMonitor;
  • read the wave resistance, trim and sinkage in the TableViewer and visualised the wave pattern;
  • used an IGES file without importing it, and reused an existing configuration.

Next Steps

The commands used here are described in the user manual: HULLTYPE, OFFSETFILE and VSHIP in the XFLOW chapter, and the XPAN commands.

Getting help: send questions to [email protected]. Product information: shipflow.se.


Tutorial updated: May 2026
SHIPFLOW version: 8.0.37
Document version: 2.0