Advanced Tutorial 2: Bulb and Forebody Optimisation¶
Overview¶
In this tutorial you parametrise the bulbous bow and the forebody shoulder of a hull with delta shift transformations in CAESES. CAESES then runs SHIPFLOW XPAN automatically for every design variant, first to explore the design space with an ensemble investigation and Sobol sampling, then to optimise the hull for minimum wave resistance with the NSGA-II genetic algorithm.
The tutorial has four parts:
- Parametrise the bulb shape with two curve-based delta shifts (two design variables)
- Explore the bulb design space with an ensemble investigation and Sobol sampling
- Parametrise the forebody shoulder with a surface delta shift (two more design variables)
- Optimise all four design variables together with NSGA-II
Time required: 2–3 hours
Difficulty: Advanced
Prerequisites: XPAN computations (Basic Tutorial 1), design variables and ensemble investigations (Basic Tutorial 2); familiarity with the CAESES CAD workspace
SHIPFLOW modules used: XPAN
CAESES required
This tutorial needs the full CAESES environment from Friendship Systems together with SHIPFLOW. SHIPFLOW Design5 has an Optimize workspace, but the tutorial uses options and tools that only the full CAESES provides, so it cannot be done in SHIPFLOW Design4 or Design5.
Learning Objectives¶
By completing this tutorial, you will be able to:
- Parametrise a bulbous bow with curve-based delta shift transformations
- Parametrise a forebody shoulder with a surface delta shift transformation
- Combine several transformations in a delta sum
- Apply the transformations to the hull through image offset groups
- Define constraints on LOA and displacement
- Explore a design space with an ensemble investigation and Sobol sampling
- Set up and run an NSGA-II optimisation with four design variables
Background: Parametric Hull Deformation¶
CAESES deforms geometry with transformation objects, without changing the original data. This tutorial builds the parametrisation in two stages:
| Stage | Region | Deformation type | Design variables |
|---|---|---|---|
| Part 1 | Bulb | Curve-based delta shifts | delta_length, delta_height |
| Part 3 | Forebody shoulder | Surface delta shift | lower, higher |
The transformations of both stages are combined in one delta sum. The delta sum is applied to image offset groups: deformed copies of the original offset groups, which themselves are never modified.
Non-overlapping deformation regions
The bulb delta shifts act between x = 162 m and x = 169 m (the bulb), the surface delta shift between x = 96.5 m and x = 161.5 m (the forebody shoulder). Because the regions do not overlap, all transformations can be combined in one delta sum without interfering with each other.
What is a Delta Shift Transformation?¶
A curve-based delta shift uses a curve as a function that displaces geometry along a chosen axis:
- the abscissa of the curve (here its x-coordinate) is the position along the hull, that is, where the geometry is displaced
- the ordinate of the curve (here its z-coordinate) is the size of the displacement at that position
- the Delta X, Delta Y or Delta Z check box sets the direction of the displacement
A surface delta shift works the same way with a surface instead of a curve, so the displacement can vary in two directions — here along the hull and with height.
In both cases the deformation is controlled by design variables linked to coordinates of the control points of the curve or surface.
Tutorial Files¶
The configuration and offset files for this tutorial are located in your SHIPFLOW installation:
C:\FLOWTECH\SHIPFLOW<version>-x86_64\tutorials\tutorial-files\AdvancedTraining\Tutorials-v5\Tutorial_2\source\
| File | Description |
|---|---|
config_t2_1 |
SHIPFLOW configuration |
off_t2_1 |
Offset file (hull geometry) |
Part 1: Parametrising the Bulb Shape¶
1.1 Set Up the Project¶
- Start a new project.
- Go to Import → Configuration (SHIPFLOW) and select
config_t2_1. When a second file dialog opens, select the offset fileoff_t2_1, which is in the same folder. - Save the project as
tut2. -
Check which SHIPFLOW executable CAESES starts: in the Connect workspace, select Computations → shfComputation1, click the pencil icon next to Application, and check that Executable points to
shipflow.batin thebinfolder of your SHIPFLOW installation. -
Turn off the automatic report: select Configurations → config_t2_1, add the command xpost → control and set
onofftooff.
Why turn off the report?
By default, XPOST writes a report after every computation (see XPOST CONTROL). In an ensemble investigation or an optimisation every variant is a computation of its own, so turning the report off saves time on every variant.
1.2 Run the Baseline Computation¶
Select Computations → shfComputation1 and click the Run button
.
This computes the wave resistance of the original hull. Its results are needed in the next step, where the evaluation parameters are created from them.
1.3 Create Evaluation Parameters¶
CAESES must know which SHIPFLOW results to read after each computation. You tell it by creating evaluation parameters from the results table.
- Open the TableViewer.
-
Double-click the values of V, CW and Sref. Double-click the boxes with the numbers in the second column, not the labels in the first column.
This creates the three parameters eval_V, eval_CW and eval_Sref, which the design engines read after each computation.
1.4 Inspect the Baseline Geometry¶
- Switch to the Model workspace and open the 3DView.
-
View the hull from the side and zoom in on the bulb.
Offset file vs. CFD results
The offsets and the XPAN results do not overlap exactly: the XPAN results are displaced by the computed dynamic sinkage and trim, while the offsets show the hull at rest.
-
Hide the XPAN results so that only the offsets are shown: in the Connect workspace, open the Post-Processing tab, go to Results → shfComputation1 → XPAN, and click the visibility icon next to Body and next to Free Surface.
1.5 Create the Bulb Length Deformation¶
The deformation function is a parabolic spline defined by three points. A design variable sets the height of the last point. Applied through a delta shift (section 1.6), the spline lengthens or shortens the bulb.
Create a scope¶
CAESES organises the model in scopes, which work like folders.
- In the Model workspace, click CAD → Scope. The new scope appears at the same level as
SHF_Import_off_t2_1. - Rename it
bulb_delta_length. -
Middle-click the scope to make it the working scope. Its icon turns green, and the prompt in the Console changes to
|bulb_delta_length>. New objects are now created inside this scope.
Create the spline points¶
-
Click CAD → Points → 3D Point three times and give the three points these coordinates:
Point X Y Z point1162 0 0 point2164 0 0 point3169 0 0
Pre-filled coordinates
If a point is selected when you create a new point, the coordinates of the new point contain references to the coordinates of the selected point. Select the scope bulb_delta_length before you create a point to avoid this, or edit the references away.
Create a B-spline from the points¶
-
Select the three points in the Object Tree and click CAD → Curves → Point Based → B-Spline.
-
In the Object Editor of the new curve
curve1, set General → Degree to2, so that the curve becomes a parabola. The default is 3, but with only three points 2 is the highest possible degree.
Create the design variable¶
-
Click CAD → Parameters → Design Variable.
-
Name the new variable
delta_lengthand set its Value to1. -
Link the Z coordinate of
point3todelta_length. Selectpoint3, then either dragdelta_lengthfrom the Object Tree onto the Z field, or open the drop-down list of the Z field and select|bulb_delta_length|delta_length.The Z field now shows
delta_lengthwith its value 1, and the curve bends upwards towardspoint3:
1.6 Create the Delta Shift for Bulb Length¶
- Select
curve1in the Object Tree. -
Click Transformations → Shifts → Delta to create a delta shift, and name it
length. The selected curvecurve1is filled in as the Deltacurve. -
In the Object Editor of
length, check General → Delta X.
How the delta shift works
- Deltacurve Abscissa: X — the x-coordinate of
curve1is the input: it says where along the hull the shift acts (x = 162–169 m). - Deltacurve Ordinate: Z — the z-coordinate of
curve1is the output: it gives the size of the shift at that position. - Delta X — the direction in which the geometry is shifted.
- Factor — scales the shift;
1leaves it unchanged.
With delta_length = 1 the bulb is lengthened by up to 1 m, following the shape of curve1.
1.7 Create the Delta Shift for Bulb Height¶
The second deformation moves the bulb up or down. It is built in the same way, so copy the first one.
-
Leave the scope
bulb_delta_length: middle-click its name again, or right-click it and select Working Scope. The prompt in the Console returns to|>. -
Copy the scope
bulb_delta_lengthand paste it (Ctrl+C, Ctrl+V). All objects inside the scope are copied, with consistent internal references. - Rename the copy
bulb_delta_height. Inside it, rename the delta shift toheightand the design variable todelta_height. -
In the Object Editor of
bulb_delta_height | height, uncheck General → Delta X and check General → Delta Z.
1.8 Combine the Transformations¶
Combine the two shifts in one transformation object, so that they are applied together.
-
Click Transformations → Auxiliaries → Delta Sum and name the new object
delta_bulb. -
In the Object Editor of
delta_bulb, addbulb_delta_height | heightandbulb_delta_length | lengthto the Transformations list. Drag and drop them, or pick them from the drop-down lists.
The delta sum is extended later
In Part 3 you add the forebody transformation to this delta sum and rename it delta_forebody.
1.9 Connect the Transformation to the Bulb Geometry¶
The original offsets are never modified. Instead, an image offset group applies delta_bulb to a copy of the bulb offsets.
- In the Object Tree, select the offset group SHF_Import_off_t2_1 → offsets_bulb → bulb.
-
Click Maritime → Sections → Image Offset Group.
-
In the Object Editor of the new image offset group:
- rename it
bulb - check that General → Source is
SHF_Import_off_t2_1 | offsets_bulb | bulb; it is filled in automatically because the bulb offset group was selected - set General → Image Transformation to
delta_bulb
Keep the name
bulbThe configuration refers to the bulb offset group by its name, with
fbgrof the HULLTYPE command (xflow → hull in the GUI). If you give the image group another name, changefbgrto match. - rename it
-
Select the offset group assembly SHF_Import_off_t2_1 → as_off_t2_1.
-
In its Object Editor, replace
offsets_bulb | bulbin General → Groups with the image groupbulb. Drag and drop it, or use the drop-down list.
Verify the deformation¶
-
To tell the image bulb from the original, give it a colour: select the image group
bulb, open Display Options, click the colour button next to Color and pick a colour. -
Change the values of
delta_heightanddelta_lengthand check that the image bulb moves in the 3DView. If you select both scopes,bulb_delta_heightandbulb_delta_length, you can edit both variables in one Object Editor.
1.10 Define the LOA Parameter¶
The optimisation constrains the overall length (LOA), so CAESES needs the LOA of every variant. Instead of searching the deformed bulb offsets for their foremost point, you define one point at the bulb tip, move it with the same transformation, and measure the distance to the transom.
Create the bulb tip point¶
- Click CAD → Scope, name the new scope
bulb_tip_positionand make it the working scope (middle-click). - Click CAD → Points → 3D Point to create a point,
point1. -
Enter the coordinates of the undeformed bulb tip,
(168.51, 0, -3.96). To read them yourself, click the bulb tip in the 3DView: it belongs to the offsetoffsets_bulb | os_000, and the Point Data of that offset in the Object Editor starts with the coordinates.
Create an image of the bulb tip¶
-
With
point1selected, click CAD → Points → Image. -
In the Object Editor of the new image point
point2, set General → Image Transformation todelta_bulb.point2now follows the bulb tip for every design variant.
Define the transom position¶
- Create another 3D point in the same scope and rename it
transom. -
Enter this expression as its X coordinate:
getMin(0)returns the smallest x-coordinate (index 0) of the stern offset group, which is the x-position of the transom.
Compute LOA¶
- With
bulb_tip_positionstill the working scope, click CAD → Parameters → Parameter and name the new parameterLOA. -
Enter this expression as its value:
:Xgives the x-coordinate of a point. While you type, press Ctrl+Space to see suggestions for completing the entry.The value of
LOAdepends on the current value ofdelta_length, so yours may differ from the screenshot.LOAis updated for every variant. -
Leave the working scope: middle-click
bulb_tip_positionagain.
1.11 Define Wave Resistance and Displacement Parameters¶
Wave resistance Rw¶
-
Click CAD → Parameters → Parameter, name the new parameter
Rwand enter this expression as its value:
The expression converts the wave resistance coefficient into the wave resistance in kilonewtons:
with \(L_{pp}\) = 162 m, \(F_n\) = 0.28, \(\rho\) = 1000 kg/m³ and \(g\) = 9.81 m/s². The final division by 1000 converts newtons to kilonewtons.
Displacement in cubic metres¶
-
Select
eval_Vin the Object Tree and append* (162 ^ 3)to its expression, so that it gives the displacement volume in m³. Keep the expression that was created from the TableViewer and only add the multiplication at the end.
1.12 Set Up the Constraints¶
Two constraints apply to all investigations in this tutorial:
| Constraint | Monitor | Comparator | Limit |
|---|---|---|---|
LOA_constraint |
bulb_tip_position | LOA |
< |
174 (m) |
Disp_constraint |
eval_V |
> |
22500 (m³) |
- Switch to the Optimize workspace and click Optimization → Constraints → Inequality. Name the new constraint
LOA_constraint. -
Set Monitor to
bulb_tip_position | LOA, Comparator to<and Limit to174. -
Create a second inequality constraint named
Disp_constraint, with Monitoreval_V, Comparator>and Limit22500.
Part 2: Bulb Design Space Exploration¶
With the two bulb design variables and the constraints in place, explore the design space: first with a regular 3 × 3 grid of variants (an ensemble investigation), then with 50 variants from a Sobol sequence.
2.1 Ensemble Investigation¶
The ensemble investigation computes nine variants (3 × 3) to show how the bulb length and height affect the wave resistance.
- In the Optimize workspace, click Optimization → Design Space Exploration → Ensemble Investigation.
-
In the Object Editor of
ensembleInvestigation1, set:Design variable Series delta_height-1,0,1delta_length-2,0,2- Evaluations:
Rw, with Objectiveobserver - Constraints:
Disp_constraintandLOA_constraint
- Evaluations:
-
Save the project (Ctrl+S) and click Run, the green arrow next to the name of the design engine. The results table fills in as the variants are computed.
-
When all nine variants are finished, check the results table. Variants that violate a constraint are marked red, variants that satisfy both constraints green.
-
Click Show Charts to see the results as a matrix of plots, in which every variable, evaluation and constraint is plotted against every other.
2.2 Sobol Design Space Sampling¶
A Sobol design engine creates its variants from a quasi-random Sobol sequence. With 50 variants it covers the design space much more densely than the 3 × 3 grid of the ensemble investigation.
- Click Optimization → Design Space Exploration → Sobol.
-
In the Object Editor of
sobol1, set:- Variants:
50 - Design Variables:
delta_heightfrom-1to1anddelta_lengthfrom-2to2(Lower and Upper), the same ranges as in the ensemble investigation - Evaluations:
Rw, with Objectiveobserver - Constraints:
Disp_constraintandLOA_constraint
- Variants:
-
Save the project and click Run.
-
The Result Pool dialog asks which earlier runs to use as a result pool for this run. Select the ensemble run
ensembleInvestigation1_01and click Run. -
When the run has finished, click Show Charts.
With 50 variants, the plots show much more clearly than the nine ensemble variants how Rw, the displacement and LOA vary with the bulb height and length.
Part 3: Parametrising the Forebody Shape¶
With the bulb explored, extend the parametrisation to the forebody shoulder (x = 96.5–161.5 m). The deformation function is now a planar B-spline surface instead of a curve, used by a surface delta shift. You add the new transformation to the existing delta sum, so that one transformation object contains all four design variables and can be applied to both the bulb and the hull image offset groups.
3.1 Create the Planar B-Spline Surface¶
The surface lies in the Y - (Z,X) plane: its first axis is z and its second axis is x, and its y-coordinate is the displacement of the hull in the y-direction.
-
Click CAD → Surfaces → Point Based → Planar B-Spline.
-
In the Create Feature dialog, set:
Setting Value Plane Y - (Z,X)CP in U-Direction 7CP in V-Direction 6Start First Axis, Start Second Axis (lower corner) -8.18,96.5End First Axis, End Second Axis (upper corner) 3,161.5Keep Create Control Points checked. Under Display Options, select the option highlighted in the figure so that the control points are shown in the 3DView. Then click Execute.
The surface is created in a new scope, SurfacePlanarBSpline1, and is referred to as SurfacePlanarBSpline1 | surface.
3.2 Assign Forebody Design Variables¶
Two design variables move two horizontal rows of control points sideways.
- Create a new scope named
Parameters(CAD → Scope) and make it the working scope. -
Create two design variables,
lowerandhigher(CAD → Parameters → Design Variable). Leave their values at0. -
In the 3DView, select the three control points shown in the next figure: in the second row from the bottom, at z = −5.944. Hold Ctrl to select several points, or drag a selection window.
-
In the Object Editor, link the Y coordinate of the three points to
lower. -
Select the three control points two rows higher up, at z = −1.472, and link their Y coordinate to
higher.
Editing several points at once
With several points selected, the Object Editor changes all of them at once. Fields whose values differ between the points, such as X here, are shown empty.
3.3 Create the Surface Delta Shift¶
-
Click Transformations → Shifts → Surface Delta and name the new transformation
surface_transformation. BecauseParametersis still the working scope, the transformation is created in that scope. -
In the Object Editor of
surface_transformation:- check General → Delta Y
- set Delta Surface to
SurfacePlanarBSpline1 | surface - set Coordinate to
Y
Coordinate and delta direction
Coordinate selects which coordinate of the surface is read as the size of the shift. Delta Y selects the direction in which the hull offsets are shifted. With both set to Y, the y-values of the surface are applied as y-displacements of the hull.
3.4 Extend the Delta Sum¶
- Select
delta_bulband rename itdelta_forebody, since it now controls both the bulb and the forebody. -
Add
Parameters | surface_transformationto its Transformations list, belowheightandlength.
References are kept
Renaming delta_bulb to delta_forebody updates all objects that refer to it, including the image group bulb and the image point in bulb_tip_position from Part 1. You do not need to link them again.
The delta sum now contains three transformations:
| Transformation | Type | Effect |
|---|---|---|
length |
Delta shift (Delta X) | Lengthens or shortens the bulb |
height |
Delta shift (Delta Z) | Raises or lowers the bulb |
surface_transformation |
Surface delta shift (Delta Y) | Widens or narrows the forebody shoulder |
3.5 Create the Hull Image Offset Group¶
The hull needs its own image offset group, as the bulb did in Part 1.
- Select the offset group SHF_Import_off_t2_1 → offsets_hull → hull.
- Click Maritime → Sections → Image Offset Group and name the new image group
hull. -
In its Object Editor, check that General → Source is
SHF_Import_off_t2_1 | offsets_hull | hull, and set General → Image Transformation todelta_forebody. -
Select the offset group assembly SHF_Import_off_t2_1 → as_off_t2_1 and replace
offsets_hull | hullin General → Groups with the image grouphull.
3.6 Visual Check¶
-
Give the image group
hullits own colour under Display Options → Color, so that you can tell it from the original. -
Set
lowerandhigherto non-zero values and check that the forebody shoulder deforms in the 3DView. -
Set
lowerandhigherback to0before you continue.
Parameters and constraints from Part 1
The evaluation parameters eval_CW, eval_Sref and eval_V, the parameter Rw and the constraints LOA_constraint and Disp_constraint from Part 1 are used unchanged. No further set-up is needed.
Part 4: Combined NSGA-II Optimisation¶
With both the bulb and the forebody parametrised, the NSGA-II genetic algorithm searches for the lowest wave resistance with all four design variables at once.
4.1 Configure NSGA-II¶
- In the Optimize workspace, click Optimization → Multi Objective Optimization → NSGA-II.
-
In the Object Editor of the new design engine, set:
General setting Value Generations 20 Population Size 4 Mutation Probability 0.1 Crossover Probability 0.9 Design variable Lower Value Upper delta_height-1 0 1 delta_length-2 0 2 higher-0.5 0 0.5 lower-0.5 0 0.5 - Evaluations:
Rw, with Objectivemin - Constraints:
Disp_constraintandLOA_constraint
- Evaluations:
-
In the Constraints table, check Considered for both constraints.
4.2 Run and Interpret the Results¶
- Save the project (Ctrl+S) and click Run. If the Result Pool dialog opens, select the earlier runs to use as a result pool (see 2.2) and click Run.
-
Follow the progress in the results table, and click Show Charts to plot the results.
Tutorial settings
The first column of the chart shows each quantity in the order in which the designs were computed. With only 4 individuals per generation and 20 generations (80 designs), this set-up shows how the design variables and Rw evolve during an optimisation, but it does not find a useful optimum. For that, the optimisation parameters must be tuned and many more generations computed.
Troubleshooting¶
General troubleshooting
Problems that can occur in any SHIPFLOW case are collected on one page: Troubleshooting.
Directly relevant to this tutorial:
- A design variable does not update the configuration
- Hull group names are not recognised — for example after renaming an image offset group
- An ensemble or optimisation run fails part-way through
- The computation takes much longer than expected — for example with the XPOST report switched on
Summary¶
In this tutorial you have:
- parametrised the bulb with two curve-based delta shifts and the forebody shoulder with a surface delta shift, combined them in one delta sum and applied it to the hull through image offset groups
- defined
LOA, the wave resistanceRwand the displacement as parameters, and constraints on LOA and displacement - explored the bulb design space with an ensemble investigation and Sobol sampling
- run an NSGA-II optimisation over all four design variables
Key Objects¶
| Object | Type | Purpose |
|---|---|---|
bulb_delta_length |
Scope | Length deformation: curve1, delta_length and the delta shift length |
bulb_delta_height |
Scope | Height deformation: curve1, delta_height and the delta shift height |
bulb_tip_position |
Scope | Bulb tip point, its image point2, the point transom and the parameter LOA |
Parameters |
Scope | Forebody design variables lower, higher and the transformation surface_transformation |
SurfacePlanarBSpline1 |
Scope | The planar B-spline surface, reference surface of the forebody deformation |
delta_length, delta_height |
Design variables | Bulb length and bulb height |
lower, higher |
Design variables | Y-displacement of the lower and the upper row of control points |
length, height |
Delta shifts | Bulb displacement in x (Delta X) and in z (Delta Z) |
surface_transformation |
Surface delta shift | Forebody displacement in y (Delta Y) |
delta_forebody |
Delta sum | Sum of the three transformations (delta_bulb before Part 3) |
bulb, hull |
Image offset groups | Deformed bulb and hull, used in as_off_t2_1 |
LOA |
Parameter | Current overall length |
Rw |
Parameter | Wave resistance in kN |
LOA_constraint |
Inequality constraint | LOA < 174 m |
Disp_constraint |
Inequality constraint | Displacement > 22 500 m³ |
Next Steps¶
- Advanced Tutorial 3: Appendage Modelling with Overlapping Grids — model a rudder, a propeller shaft and a shaft bracket with overlapping grids.
- Advanced Tutorial 4: Complex Appendage Modelling — an ensemble investigation with self-propulsion computations, for an energy saving device.
Getting help: send your questions to [email protected]. Product information is available at shipflow.se.
Tutorial updated: June 2026
SHIPFLOW version: 8.0.37
Document version: 1.0


























































