Tools to modify the boundary and interior mesh of the problem based on the adjoint solution are provided in the Design Tool dialog box. The Design Tool uses computed adjoint sensitivity data to find an optimal design change satisfying one or more goals or constraints, and to predict the resulting changes in observable values. Among the goals that can be specified in the Design Tool are:
minimization, maximization, or targeted changes of single or multiple observable values
prescribed deformations of selected geometry
general constraints on deformations including restrictions on direction of motion, symmetry, and boundary conditions.
equality and/or inequality constraints on geometry (fixed walls, bounding boxes, and so on).
The Design Tool is accessed by clicking in the Design ribbon tab (Adjoint-Based group box).
Design → Adjoint-Based
→ Design Tool...
The general procedure to use the Design Tool is as follows.
Select those boundaries that are free to be deformed in the Zones To Be Modified field on the Design Change tab. Boundaries that are not selected in this box that intersect the control volume will be constrained not to move. This is useful if there are walls which, for design reasons, must not move. Note that if you have a two-sided wall that you want to deform, it is recommended that you select both the wall and the corresponding wall-shadow.
Define the region that will be modified in the Region tab. (Defining the Region for the Design Change)
Define conditions on the deformation region such as number of control points, symmetry, directional invariance, and boundary continuity. (Defining Region Conditions)
Compute and export the sensitivities from the adjoint solution for each observable of interest. (Exporting Sensitivity Data)
Import the sensitivity data for each observable that will participate in the design change and specify the optimization goals for the observables. (Defining Observable Objectives)
Note: Export and Import of sensitivity data is only required for multi-objective analysis.
Define constraining and/or deformation conditions on the design change, such as fixed boundaries, prescribed boundary deformation (through a profile, translation, rotation, or scaling), and bounding surfaces / planes. (Defining Conditions for the Deformation)
Specify weights for the various objectives, a scaling factor for the deformation, and whether the design conditions are strictly enforced. (Shape Modification)
(optional) Adjust the optimal design calculation numerics if required.
Compute the optimal design change and modify the mesh.
Details of these steps are elaborated in the following sections:
To define the region of space where a design change is to be applied, perform the following steps:
Click the Region tab of the Design Tool dialog box.
Make a selection from the Region Geometry drop-down to specify whether you will define the space as either a Cartesian or a Cylindrical region type.
For either region type, the Show Bounding Box option will be enabled by default; this allows you to view the region associated with the settings along with the mesh in the graphics window.
For the Cartesian region type, specify the X Min, X Max, Y Min, and Y Max (and Z Min and in 3D) fields. Alternatively, the following tools are available:
Click the button to open the Bounding Box Definition dialog box. There you can select the Zones to be bounded from the list of zones, and the fields will be populated to create a bounding box sized to the selected zones.
Click the Larger Box and Smaller Box buttons to adjust the deformation region size as needed.
Note: Symmetry conditions affect the location and size of the deformation region:
If you plan to enable the Symmetry of Motion options in the Region Conditions tab (as described in Defining Region Conditions), the deformation region should be positioned with forethought given to the effect on the various boundary zones in the region.
If you have a boundary zone of type symmetry in the deformation region, it is recommended that it either is located on a planar boundary of the deformation region, or is centered within the deformation region in a manner that is consistent with the Symmetry of Motion option.
For the cylindrical region type, specify the angular, radial, and (for 3D) axial coordinate ranges; this will require you to define a Coordinate System, and then enter the values of the Region Extent relative to that system. The fields you will define are illustrated in Figure 35.14: A Cylindrical Region.
Note the following:
For 2D cases, the axis is defined implicitly as the Z-axis (as determined by the right-hand rule, where in a front view the X-axis is horizontal and the Y-axis is vertical).
For the angular range (defined by Theta Min and Theta Max), the positive direction is determined by the right-hand rule about the axis, and the total range must not exceed 360 degrees.
For 3D cases, the axis and radial direction must not be co-linear.
Symmetry conditions affect the location and size of the deformation region, as described in the previous step about Cartesian region types. Note that for a cylindrical region type, radial symmetry is not possible.
Click Update Region. This will set the values for the region boundaries and update the display of the design change region.
Click the Region Conditions tab in the Design Tool dialog box.
Specify the control points and motion conditions for each coordinate direction.
Select the number of control Points.
The control points are distributed uniformly within each coordinate range (in the X-, Y-, and Z- directions for a Cartesian region, and the Theta, Radial, and Axial directions for a cylindrical region). The spacing between the control points defines the characteristic spatial scale for the deformation operation. The larger the number of control points, the smaller the spacing and hence, the smaller the spatial scale on which changes can be made. 20 to 40 control points for each coordinate direction is typical.
If you want to prevent deformation of the deformation region in the given coordinate direction, disable Motion Enabled.
If you want the motion along a coordinate direction to be uniform in one or more directions, enable the appropriate option (for example, Invariant in X).
You can ensure that the deformation is symmetrical relative to the different coordinate directions by enabling options in the Symmetry of Motion group box. Symmetry can be imposed in as many directions as desired (though radial symmetry for a cylindrical region is not possible). The symmetry planes will be displayed in the graphics window when you click ; you should ensure they reflect your intent for the design change, modifying the extents of the deformation region as necessary.
The Region Boundary Continuity settings control the order of continuity of the deformation process at the boundaries of the deformation region. This is of particular relevance when the boundary of the deformation region intersects a wall that will be deformed. The Continuity Order controls the smoothness of the transition from the undeformed wall lying outside the deformation region to the deformed wall within. A value of 1 ensures first-order continuity at the transition, that is, a continuous first derivative of the deformation operation. A value of 2 ensures second-order continuity, and so on.
By default, the continuity Definition is Uniform and is enforced at all deformation region boundaries. Alternatively, you can choose By Boundary to use different continuity conditions at each boundary. For each boundary (X-Min, X-Max, and so on) you can specify what order continuity to enforce for each motion direction. You can also specify In-Plane Motion Only on that boundary; note that this option may be useful if a deformation region boundary coincides with a boundary zone that is of type symmetry.
The continuity settings will not affect the transition between fixed and movable boundaries within the deformation region, only mesh nodes in the transition zone from inside to outside the deformation region.
Click .
In order to perform multi-objective optimization, you need to export the sensitivity data for each observable/flow-condition combination that will take part in the optimization.
Define the observables of interest as described in Defining Observables.
For each observable solve for and export the sensitivity data.
Solve the adjoint as described in Solving the Adjoint.
In the Region tab of the Design Tool dialog box, specify the deformation region and click Export Sensitivities....
The exported file contains the sensitivities of the observable for the mesh nodes within the specified deformation region. The deformation regions for the various observables can, in principle, be different. However, it is advisable that there is as much overlap as possible for observables that will be used together in a multi-objective design process.
The Design Tool computes the optimal mesh deformation to satisfy multiple simultaneous design goals. Among these can be goals for multiple observables, possibly at multiple flow conditions. Once you have obtained the adjoint solutions and displacement sensitivities for the various observables of interest, you can import the data and specify the design objectives for each.
Click the Objectives tab in the Design Tool dialog box.
To import previously saved sensitivity data, click Manage Data.... In the Manage Sensitivity Data dialog box click Import Sensitivities... to load previously saved sensitivity files and close the Manage Sensitivity Data dialog box.
If you want to include computed sensitivity data in the current session that you have not exported yet enable Include current data.
For each observable objective you can specify the following.
determines how Fluent will attempt to change the value of the observable through the design change. You can choose to increase or decrease the value of the observable optimally, or you can specify a target change in value. You can also select None in which case the observable will not be considered in computing the optimal design change, but the predicted change in observable value will still be reported.
When the chosen Objective is Target Change in Value, this field corresponds to the desired change in the value. When the chosen Objective is Maximize or Minimize, the magnitude of this field is a reference weighting for the observable. This can be used to normalize the objectives in cases where you have multiple observables of vastly differing magnitudes, thereby allowing the values entered for Weight in the Design Change tab to all be of similar scale. You can check As Percentage to specify the Target/Reference Change as a percentage of the value of the observable.
Note: You must click Apply for each objective you define before moving on to the next one.
In the Design Conditions tab, you can specify conditions on the mesh morphing such as fixing portions of wall surfaces, prescribing the deformation of surfaces, or setting up bounding planes / surfaces. To create a condition, click Create..., select the type of condition in the Create New Condition dialog box (you can choose between fixed-walls, bounded-by-plane, bounded-by-surfaces, prescribed-profile, rotation, translation, and scaling), and provide a unique Name. You can then define the condition by selecting it in the list on the left, defining the settings (as described in the steps that follow), and clicking . If necessary, you can Rename a selected condition using the Rename Constraint dialog box that opens. Once created, the design conditions can be individually included or excluded from the design change in the Design Change tab.
Important: Note that a given surface cannot have multiple conditions of type prescribed-profile, rotation, translation, or scaling.
The fixed-walls constraint can be applied to clip-surfaces of walls in the deformation region. This offers a fine-grained control over parts of the geometry that should not move. Whereas deselecting a zone in the Zones To Be Modified list on the Design Change tab will fix an entire wall zone, selecting a clip-surface from in the Fixed Walls Condition list will fix only the portion of the wall that forms the clip-surface.
Any clip surfaces you have defined will appear in the Clip Surfaces list. You can assign clip surfaces to a fixed walls constraint by selecting them in the list and clicking Apply.
The bounded-by-plane condition allows you to define one or more bounding planes that constrain the geometry deformation in such a way that the geometry cannot cross the given planes, thereby respecting packaging or form-factor constraints. The bounding plane is characterized by a vector normal to the plane and a distance measured from the global coordinate system origin to the plane, along the normal direction. The motion of the selected wall surface(s) will be constrained such that all points on the surface(s) lie on the side of the bounding plane that is opposite to the normal direction.
In Figure 35.15: Specifying a Bounding Plane for Design Changes the bounding plane
normal vector is denoted by and the distance is denoted by
.
is the position vector of a point on the wall surface subject to the
bounded-by-plane condition. Note that a positive value for the distance yields a bounding plane
that is oriented with its normal pointing away from the origin, while a negative value for the
distance yields a bounding plane oriented with its normal direction pointing towards the
origin. The constraint equation can be expressed as:
Select the surfaces (or clip-surfaces) that are subject to the bounding plane condition in the Bounded Surfaces list.
Enter the components of the bounding plane normal direction.
Enter the distance of the plane from the origin (along the normal direction).
Click Apply.
The bounded-by-surfaces condition allows you to import one or more
bounding surfaces that constrain the geometry deformation in such a way that the geometry
cannot cross the nearest facet of the bounding surfaces, thereby respecting packaging or
form-factor constraints. The bounding surfaces can be read from an
.stl, .msh, or .cas
file. The deformation of the selected bounded surfaces will be constrained such that all points
on the surfaces lie on the sides of the bounding surfaces that have a positive
orientation.
Select the surfaces (or clip-surfaces) that are subject to the bounded-by-surface condition in the Bounded Surfaces list.
Use the button to import a .stl,
.msh, or .cas file that contains the
appropriate bounding surface(s). Note that the file you read must have the same
dimensionality (2D or 3D) as the working case file.
Select the Imported Surfaces that will constrain the bounded surfaces.
To visually confirm that the selected Bounded Surfaces and Imported Surfaces are appropriate, click the button. The imported surfaces will be colored green by default.
Note: When examining the surfaces, it may be helpful to revise display properties of particular surfaces (for example, the color, the level of transparency, and the visibility of the mesh edges or faces). This can be done using the Scene Description dialog box, as described in Advanced Scene Composition. Note that you can even revise the display properties of the imported surfaces, the names of which will be displayed with the prefix bounding-.
To ensure that the Bounded Surfaces are constrained on the correct side of the Imported Surfaces (that is, the side that has a positive orientation), click the button. The selected Imported Surfaces will be displayed, with their orientation indicated by arrows. In the dialog box that opens (Figure 35.16: The Bounding Orientation Dialog Box), you can select individual and their orientation as necessary; you can also increase the Skip value to display less orientation arrows, for cases where the arrow density obscures the orientation. Note that the orientation you define for a particular bounding surface will be used globally for all bounded-by-surfaces conditions.
When reviewing the orientation of a bounding surface, you should verify that the facets have a uniform orientation, that is, all of the arrows are on the same side of the surface. Bounding surfaces with facets that have a mixed orientation can affect the convergence and/or accuracy of the calculation.
Click Apply in the Design Conditions tab of the Design Tool dialog box to save your settings.
If at any point you would like to delete any of the Imported Surfaces, you can do so using the Surface Meshes Dialog Box.
Note: When using the bounded-by-surfaces condition, it is recommended that you apply preconditioning on the advancement of the process for updating the freeform displacements (by changing the Preconditioning field to a positive value in the Numerics tab of the Design Tool dialog box, as described in Design Tool Numerics), in order to encourage the stability of the solution. A value on the order of 1 or 10 is recommended.
You can use the prescribed-profile condition to assign a motion
profile to a wall zone or zones using a DEFINE_GRID_MOTION UDF.
Select the wall zones for which to prescribe the displacement in the Wall Zones list.
Compile your DEFINE_GRID_MOTION UDF in Fluent. (Refer to
DEFINE_GRID_MOTION
in the Fluent Customization Manual).
Select your UDF in the Deformation profile drop-down list.
Specify the Scale Factor to be applied to the deformation profile. Alternatively, you can specify or create an input parameter to use for the Scale Factor by clicking the p button next to the Scale Factor field.
Click Apply.
The rotation condition allows you to specify that surfaces undergo rotation.
Select the surfaces (or clip-surfaces) you want to rotate in the Surfaces list.
Enter the rotation Angle in degrees. Note that you can enter a set
value, or use the
button to assign an input parameter (for example, as part of a
parametric study managed by Workbench); see Select Input Parameter Dialog Box for
details.
Define the Origin about which you want the surfaces to rotate.
For 3D cases, define the Axis of rotation. For 2D cases, this is automatically defined as the positive Z axis.
Click .
The translation condition allows you to specify that surfaces undergo translation.
Select the surfaces (or clip-surfaces) you want to translate in the Surfaces list.
Define the Displacement to be applied along each coordinate axis.
Note that for each field you can enter a set value, or use the
button to assign an input parameter (for example, as part of a
parametric study managed by Workbench); see Select Input Parameter Dialog Box for
details.
Click .
The scaling condition allows you to specify that surfaces are scaled along one or more axes.
Select the surfaces (or clip-surfaces) you want to scale in the Surfaces list.
Select the scaling Type and define the associated settings:
Radial
This type scales the surfaces radially about the Origin, using a single scaling Factor along each of the coordinate axes. The size of the surfaces will change, though not the shape.
In-Plane
This type is available for 3D cases, and scales the surfaces about the Origin using a single scaling Factor along the two axes of a plane (as defined by the Normal Direction).
Axial
This type scales the surfaces about the Origin using a scaling Factor along a single Axis.
General
This type scales the surfaces about the Origin using a separate scaling Factor for each of the defined axes. For 2D cases, you define one Axis, and the second axis is automatically defined as being perpendicular; for 3D cases, you define Axis 1 and Axis 2 (which should not be parallel), and the third axis is defined automatically as the cross product. Note that the surfaces will be scaled along each axis sequentially, so the order will be relevant for non-orthogonal axes.
For all types, the scaling Factor must be positive. A value of 1
results in no change, while a value greater or less than 1 results in stretching or
shrinking, respectively. Note that you can enter a set value, or use the
button to assign an input parameter (for example, as part of a
parametric study managed by Workbench); see Select Input Parameter Dialog Box for
details.
Click .
The procedure for computing the optimal design change and deforming the mesh if as follows:
Click the Design Change tab.
Select those boundaries that are free to be partially constrained or deformed in the Zones To Be Modified field. Boundaries that are not selected in this box that intersect the control volume will be constrained not to move. This is useful if there are walls that, for design reasons, must remain fixed and not move.
Select the constraining and/or deformation conditions (Defining Conditions for the Deformation) to be applied to the design change in the list of Applied Conditions. Note that a given surface cannot have multiple conditions of type prescribed-profile, rotation, translation, or scaling.
For each observable, specify its Weight in the optimization calculation. The weights are applied to the Target/Reference Change you specified in the Objectives tab. That is, if you have two observables that are each given a Weight equal to 1, Fluent will attempt to find an optimal design change that alters the observable values in proportion to their respective values for Target/Reference Change.
Note: Weights are only required if there are two or more objectives that do not have explicit target changes specified.
Specify the deformation parameters.
Choose a Freeform Scaling Scheme and specify the Freeform Scaling Factor. This setting controls how the overall scaling factor for the design change magnitude is interpreted.
The magnitude of the freeform deformation will be based on the control-point
spacing. That is, a Freeform Scale Factor of
1.0 leads a to maximum control point movement on the order of
one sub-cell of the control volume. The sub-cell size is determined by a uniform
sub-division of the morphed region based on the number of control points specified
(Defining Region Conditions). A value of
1.0 is a reasonable default to preserve mesh quality during
the morphing process.
The magnitude of the freeform deformation will be based on the
Target/Reference Change value in the
Objectives tab. That is, for a single observable optimization
with Freeform Scale Factor of 1.0, the
design change computed will yield an expected change in the observable equal to the
Target/Reference Change for the observable.
If you have disabled Auto-Select Smoothness in the Numerics tab (Design Tool Numerics) you can also specify a value for Smoothness of the deformed geometry. A lower value will allow locally sharper changes in the geometry, potentially at the expense of manufacturability.
If you used an input parameter as part of the setup of a deformation condition in the Design Conditions tab, the initial value will be displayed and is available for modification.
Click the button to verify that your constraining and/or
deformation conditions are set up in such a way as to produce good results. A report will be
printed in the console, summarizing the number of control points defined in the
Region Conditions tab that are active (that is, not disqualified by
other constraints) and listing conflicts between multiple constraints / deformations applied
on a single node (including the Design Conditions and the continuity
constraint applied along the boundary of the morphing region). The conflicts are categorized
as being either of type Fatal (which indicates the solution is
unlikely to converge or be desirable) or Possible (which may be
allowable, depending on the details of the applied conditions).
By default, the condition or conditions specified for a given zone (including the selected Applied Conditions, as well as the fixed condition applied to the unselected Zones To Be Modified) are not applied to every node, but instead to a subset of nodes distributed throughout the zone; this is to avoid overly constraining the zone. Consequently, some nodes will not strictly adhere to the condition, even if you have defined the constraint tolerance to be small or the residuals are small. To specify that all nodes of the zone strictly obey the condition, click the button and use the dialog box that opens (Figure 35.17: The Strict Conditions Dialog Box).
Select the conditions for which you want strict enforcement and click . For unselected conditions, only the default subset of nodes will strictly obey the condition. Note that when you apply strict enforcement to a case in which the Objective is Target Change in Value (as described in Defining Observable Objectives), the desired change in the value may not be achieved.
Note: Strict enforcement is a direct modification of the surface mesh nodes to satisfy the design condition, and no modification is applied on the interior mesh. Consequently, when the boundary node modification is large, it may deteriorate the mesh or even cause negative volumes. Therefore you should use this condition carefully: the design condition should reach a good convergence and there should be enough control points.
When you click the button (as described in a later step), the maximum offset for each condition (that is, the maximum distance a node has deviated from the prescribed condition) will be printed to the console.
Click Calculate Design Change to compute the optimal design change. The Expected change for each observable will be reported in the Design Tool dialog box.
(optional) Click Write Expected Change... to write to file the adjustment in the observable that is expected due to the change defined by the current settings.
(optional) Click Export Displacements... to write to file the optimal surface displacement field (overwriting any pre-existing file of the same name). An example of the format of the text file that is written (for three-dimensions) is as follows:
Line 1: n Lines 2 to n+1: x y z dx dy dz
The planned change to the geometry can be visualized by plotting the optimal displacement vector field or a contour plot of surface deformation.
Click Modify Mesh to deform the boundary and interior mesh with the optimal design change. If you determine that the change is unsatisfactory, you can click Revert to undo the mesh changes.
Upon successful modification of the geometry of the system, the modified shape can be viewed using the usual commands for viewing the mesh in ANSYS Fluent. After the mesh has been modified according to the control settings, the original flow calculation can be restarted and converged with the modified geometry. Upon successful convergence, the observable value should now have changed by an amount similar to that reported when the Expected Change button was clicked prior to deforming the geometry.
For 3D cases, you have the option of exporting the surfaces from your modified geometry as
an .stl file, for use in other software packages. Click the
button near the bottom of the Design
Change tab, select the Surfaces of interest in the dialog box
that opens (Figure 35.18: The Export STL Dialog Box) and
them.
As described in Smoothing and Mesh Morphing, the mesh morphing is controlled by two superposed smoothing bases: the Bernstein polynomial basis which control the large scale smooth deformation and the B-spline basis which controls fine-scale deformation. The choice of smoothness determines the relative weighting of these bases and therefore the spatial scale of the design change. A large value of smoothness biases the design change to one in which optimal displacements vary in space in a manner dominated by the Bernstein polynomial basis. That is, they have a high degree of smoothness. A smaller value of smoothness leads to a recommended design change with smaller spatial scales.
The ability to vary the smoothness parameter is particularly important when prescribed displacements and design conditions are applied. Deformation at smaller spatial scales relieves the stiffness that would otherwise cause numerical challenges as well as lead to poor quality of the computed design and mesh.
By default, Fluent will automatically choose the smoothness. In the Numerics tab, you can disable Auto-Select Smoothness in which case a Smoothness input will be made available on the tab.
Note: If no Design Conditions are imposed, and if there are no walls that are treated as fixed which intersect the region being modified, the numerical settings described below are not used.
In many cases, no adjustment of the detailed numerics will be required for the design tool to compute an optimal solution. However, if the problem under investigation involves many Design Conditions and/or large displacements, the settings may need to be adjusted.
The maximum number of inner iterations that will be performed in an effort to compute displacements from prescribed changes.
The under-relaxation factor that is applied to the field to converge the prescribed displacements. This takes a value between 0 and 1.
A value of 0 yields the most aggressive advancement, while a larger value encourages more stable, albeit slower, advancement of the process for updating the prescribed displacements. A value of order 1 is typical in the event that preconditioning needs to be applied.
The maximum number of inner iterations that will be performed in an effort to compute freeform displacements that satisfy the applied Design Conditions.
The under-relaxation factor that is applied to the field to converge the constrained freeform displacements. This takes a value between 0 and 1.
A value of 0 means that no preconditioning is applied, while a larger value encourages more stable, albeit slower, advancement of the process for updating the freeform displacements. A value of order 1 is typical in the event that preconditioning needs to be applied.
For design conditions such as the Bounded-By-Plane condition there are additional parameters that are implicit in the calculation. The values of these parameters are computed as part of the solution process. The value of the parameter relaxation defines the rate at which these parameters are corrected as the calculation progresses. This takes a value between 0 and 1.
The tolerance for convergence of the residuals associated with the design conditions themselves, or fixed zone conditions.
The tolerance for convergence of the parameters associated with the design conditions.
Using a value of 1 for Constraint Relaxation and a value of 0 for Preconditiong yields the most aggressive behavior. This can result in the fewest number of iterations to converge a constrained problem, at the expense of some added numerical effort and memory in preparing the preconditioning. For 2D and small 3D problems the added cost in time and memory is typically small. For larger problems involving multiple constraints a non-zero Preconditioning and Constraint Relaxation less than 1 may be preferable. The execution time to set up the preconditioning will be less, as will the memory usage. Calculation stability can also be improved. The number of iterations required to converge the problem will increase. However, this can prove to be an effective strategy that results in an overall shorter time needed to compute the design change.