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.
2.1 Create a New Project¶
- Start SHIPFLOW Design5. It opens with a new, empty project.
- 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¶
-
On the Import tab, click IGES (in the NURBS group).
-
Browse to the
examples\geometryfolder of your SHIPFLOW installation, selectkcs_g2010.igsand click Open. -
The Import IGES window lists the IGES entities. Keep the pre-selected entities and click OK.
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. -
Click the 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):
How to rotate the view and change the viewing direction is described on the SHIPFLOW Design5 page.
2.3 Create a Surface Group¶
- Save the project (Ctrl+S).
-
Select all imported surfaces in the 3DView, for example with a selection box around the whole hull.
-
In the Model workspace, on the CAD tab, open Surface Based (in the Surfaces group) and click Surface Group.
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¶
- Switch to the Connect workspace (left bar).
-
On the Connection tab, click Shipflow (in the Computations group).
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:
Add the Offset Command¶
- Select
xflowin the Object Tree. -
In the Object Editor, select
offsetin the drop-down list and click the + button (Add entry). The OFFSETFILE command is added asoffsetunderxflow. -
Select
offsetand add the parametersiges,lppandzoriin the same way.
Link the Geometry and Enter the Main Dimensions¶
-
Switch to the Model workspace and drag the name
grp1from the Model tree into the text box of theigesparameter.Drag the name, not the icon
Grab the text
grp1, not the symbol to the left of it. -
Complete the expression so that it reads
and click the Evaluate button. Press Ctrl+Space while typing to see auto-complete suggestions.
-
Set
lppto230andzorito10.8.
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¶
-
Select Configurations → configurationShf1 → xflow → program, choose
xpanin the drop-down list and remember to click + to add it. -
Select
hull— the HULLTYPE command, shown ashullin the tree — add the keywordfsflowand set it tofsflow.Set fsflow explicitly
The GUI default is
nofsfl(no free surface). Withoutfsflow, XPAN computes a double-body flow: there are no waves and the wave resistance is zero. -
Add
xmdenstohulland set it tocoarseto keep the computation short.xmdenssets the panel density factors for the hull (BDENS) and for the free surface (FDENS):xmdensBDENSandFDENScoarse0.5 medium0.8 fine1.0 (same as the default) -
Select
vship(the VSHIP command), add the parametervknotand set it to26, then addscaleand set it to31.6.Parameter Value Meaning vknot26Ship speed in knots, given at full scale (here Fn = 0.28) scale31.6Scale factor: the case is computed at model scale 1:31.6
Check the Input File¶
-
Right-click
configurationShf1in the Object Tree and select Show Preview of Input File. -
The Configuration_Preview tab shows the input file generated from the configuration:
-
Save the project.
2.5 Run the Computation¶
- In the Connect workspace, select Computations → shfComputation1.
-
Click the Run button
in the Object Editor, or right-click shfComputation1and select Run.
2.6 Monitor the Computation¶
-
In the TaskMonitor, select
shipflow.batto see the solver output.SHIPFLOW first converts the IGES geometry into an offset file (
Offset file written to: …\off_kcs_g2010) and then runs the XPAN iterations. -
With the coarse grid the computation converges in 8 iterations and takes about 1–2 minutes, depending on your computer.
- Save the project. You use it again in section 3.2.
If the Solver Does Not Start¶
Check the path to the solver executable:
-
In the Object Editor of
shfComputation1, click the pencil icon next to Application. -
Check that Executable points to
shipflow.batin thebinfolder of your SHIPFLOW installation.
See Troubleshooting → The solver does not start when you click Run for more checks.
2.7 Results and Post-Processing¶
Results Table¶
- The computation has finished when both the Started and the Finished time are shown in the TaskMonitor.
-
The results are summarised in the TableViewer window:
If the TableViewer is not visible, open it from View → New → Viewer → Table Viewer:
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¶
-
Open Connect → Post-Processing. By default the 3DView shows the wave pattern computed by XPAN.
-
The post-processing objects are in the Object Tree under Results → shfComputation1 → XPAN: Body (hull), Free Surface and Wave Profile.
-
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
-
Change the style of the hull panels in the same way (XPAN → Body, or click the hull in the 3DView).
- 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.
- Create a new project and a SHIPFLOW setup (Connect workspace, Connection tab, Shipflow).
-
Add the
offsetcommand toxflowand add theigesparameter to it. Enter the absolute path of the IGES file, for example: -
Complete the configuration as in section 2.4 (
lpp,zori,program,hullandvship) 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.
- Create a new project, or open an existing one.
-
On the Import tab, click Configuration (SHIPFLOW) (in the Maritime group).
-
Browse to the run folder of the Part 2 computation, select the configuration file
configurationShf1and click Open:<your project folder>\manual_results\baseline\shfComputation1\configurationShf1_RUN_DIR\configurationShf1This configuration contains some additional commands that the GUI does not recognise. Ignore the error message about them.
-
The imported configuration uses the offset file that SHIPFLOW created from the IGES file in Part 2, and the
hullcommand now contains the names of its offset groups (h1gr,ogrp,fbgrandabgr).In the Model workspace, the offset groups are listed in the tree:
The same group names are used in configurationShf1 → xflow → hull in the Connect workspace:
-
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\configurationShf1is the configuration that was run. It refers to the generated offset file and contains the offset group names....\shfComputation1\configurationShf1is 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¶
- Start a new project and save it in your working directory, for example as
T_1_4. -
On the Import tab, click Offsets (NAPA/SHIPFLOW).
-
Browse to the
examples\geometryfolder of your SHIPFLOW installation, selectoff_ropaxand click Open. - A window lists the offset groups in the file. Keep the pre-selected groups and click OK.
-
In the Model workspace, the imported offset
SHF_Import_off_ropaxis 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.
-
Save the project.
4.2 Set Up the XPAN Configuration¶
-
In the Connect workspace, on the Connection tab, click Shipflow.
-
Select Configurations → configurationShf1 → xflow → program, choose
xpanin the drop-down list and click +. -
Select
xflow, chooseoffsetin the Object Editor and click + (Add entry). -
Add the parameters
lppandzoritooffsetand set them to122.5and6. -
Add the parameter
filetooffset. Dragas_off_ropaxfrom Model → CAD → SHF_Import_off_ropax into its text box, complete the expression so that it readsand click Evaluate. After dragging the name, press Ctrl+Space for help with the rest of the expression.
-
Select
hull, addxmdensand set it tocoarse, as in Part 2. - Add
fsflowtohulland set it tofsflow. -
Add
h1grtohulland set it tomain, then addfbgrand set it tobulb.h1grnames the offset group of the main hull andfbgrthe offset group of the fore bulb (see HULLTYPE). The names must match the group labels in the offset file,mainandbulbinoff_ropax. -
Select
vship, addvknotand set it to16, then addscaleand set it to17.5. -
Save the project.
4.3 Run and Monitor the Computation¶
-
Select Computations → shfComputation1 and click the Run button
. -
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:
- Geometry import and offset generation — unsupported IGES entities, missing geometry,
cannot find geometry file - Memory errors —
SHIPFLOWMEM, the 32-bit limit, and why incomplete geometry causes them - Configuration errors — syntax errors,
fsflowvsnofsfl, hull group names - Computation failures and convergence
- Results that look wrong
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) andvship, 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¶
- Tutorial 2: Creating Design Variants — create a design variant with the transom option and run a speed series with an ensemble investigation.
- Tutorial 3: Automatic Generation of Offset Files — Twin-Skeg Example — let SHIPFLOW generate the offset file for a twin-skeg hull from IGES geometry.
- Tutorial 4: Boundary Layer Calculations with XBOUND — compute the boundary layer, streamlines and limiting streamlines.
- Tutorial 5: Grid Generation for the Viscous Flow Solver XCHAP — generate grids with XGRID, run XCHAP and post-process the viscous-flow results.
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

































