Skip to content
SHD Sim
Menu
Documentation menu

Draft. This manual is new and still growing. If something here does not match what you see in the software, the software is right — tell us and we will fix the page.

Optimisation

Where it is

Setup tree: Optimisation

Controls

Objective

Minimise

  • Control: choice (ComboRow)
  • Default: Drag
  • Bound to: CaseState.adjointObjective
  • Options: Drag, Lift, Moment, Total pressure loss, Outlet uniformity (from CaseState.adjointObjectives)
  • Writes: optimisationDict/…/objectiveNames/type

Weight

  • Control: value (ValueField)
  • Default: 1.0
  • Bound to: CaseState.adjointWeight
  • Writes: optimisationDict/…/objectiveNames/weight

Multiplies the objective. Negative maximises instead of minimising.

Design surfaces

Map type

  • Control: choice (ComboRow)
  • Default: surfacePoints
  • Bound to: CaseState.adjointSensitivityType
  • Options: surfacePoints, surface (from CaseState.adjointSensitivityTypes)
  • Writes: optimisationDict/optimisation/designVariables/sensitivityType
  • Shown when: !CaseState.adjointMorphingActive

The in-app guidance depends on the case:

  • dJ/dx at each mesh point of the surface - what a morpher would consume.
  • dJ/dx per face, which is the easier of the two to read as a map.

Iterations

Follow the run budget

  • Control: on/off (ToggleRow)
  • Default: true
  • Bound to: CaseState.adjointItersAuto

Primal

  • Control: value (ValueField)
  • Bound to: CaseState.effectivePrimalIterations
  • Writes: optimisationDict/primalSolvers/p1/solutionControls/nIters

The in-app guidance depends on the case:

  • From Simulation control's end iteration.
  • SIMPLE iterations for the flow solution.

Adjoint

  • Control: value (ValueField)
  • Bound to: CaseState.effectiveAdjointIterations
  • Writes: optimisationDict/adjointManagers/…/solutionControls/nIters

The in-app guidance depends on the case:

  • Per cycle. With the surface moving between cycles, each cycle re-solves the flow and the adjoint at these budgets and the run's endTime is the cycle count below instead.
  • The run's endTime is the sum of the two: the solver advances the time index through the flow solve and then through the adjoint.

Shape update

Move the surface between cycles

  • Control: on/off (ToggleRow)
  • Default: false
  • Bound to: CaseState.adjointMorphingEnabled
  • Writes: optimisationDict/optimisationManager

The in-app guidance depends on the case:

  • Loops the flow/adjoint solve above through a control box wrapped round the imported body, moving the design surface a bounded amount each cycle (steadyOptimisation).
  • Not offered on an axisymmetric case - a control box would tear the wedge symmetry it depends on.
  • Not offered while a design surface above is not the imported body - this app only has a tight bounding box for the body itself, not for an arbitrary wall.
  • Not offered: the imported geometry has no usable bounding box.

Cycles

  • Control: value (ValueField)
  • Default: 10
  • Bound to: CaseState.adjointOptimisationCycles
  • Writes: controlDict/endTime
  • Shown when: CaseState.adjointMorphingActive

How many flow/adjoint/shape-update cycles to run. The bundled tutorials range from 5 to 90 depending on the geometry; this is controlDict's endTime while the surface is moving.

Max motion per cycle

  • Control: value (ValueField)
  • Default: 0.002
  • Bound to: CaseState.adjointMaxInitChange
  • Writes: optimisationDict/optimisation/designVariables/maxInitChange
  • Shown when: CaseState.adjointMorphingActive

The largest fractional change the optimiser allows a control point in one cycle. Every bundled tutorial uses 1e-3 to 5e-3; keep it small - this is what stops the surface moving far enough in one cycle to fold a cell before checkMesh sees it.

Problems reported against this step

The application checks these before a run and reports them in the Problems tab against this step.

Severity Message
warn The optimisation names …, which the case has no patch for - the mesh probably renamed them. The default surfaces are being used instead.
error A … objective integrates pressure and shear over a solid surface, and … is not a wall.
warn The adjoint is solved with frozen turbulence: nut is taken from the flow solution and its variation with the shape is neglected. The sensitivity map is indicative rather than exact.
warn Move the surface between cycles is switched on but not being used, because …. The case writes a single-cycle sensitivity map instead.

marks a value the application computes at run time, so the source carries no fixed text for it.