2D MBB Beam with a Convolution Filter and Adaptive Mesh Refinement

In this example we will go over the SIMP approach to topology optimization using adaptive mesh refinement. Only new material not covered in the previous example will be covered here 2D Topology Optimization with Radial Average Filter, 2D Topology Optimization with PDE Filter and Boundary Penalty.

The main addition for this example is showing an effective indicator for adaptive mesh refinement, which is the mat_den_nodal variable below.. In the AuxVariables block there is a new variable.

Listing 1: Nodal material density variable definitions

[AuxVariables]
  [mat_den_nodal]
    family = L2_LAGRANGE
    order = FIRST
    initial_condition = ${vol_frac}
    [AuxKernel]
      type = SelfAux
      execute_on = TIMESTEP_END
      variable = mat_den_nodal
      v = mat_den
    []
  []
[]
(modules/combined/examples/optimization/2d_mbb_pde_amr.i)

The mat_den_nodal variable works better than using the mat_den variable for the indicator. Using the ValueJumpIndicator on the mat_den_nodal variable and refining the mesh where the indicator is greater than a small threshold (0.1), will result in a mesh that is refined in the areas where the material is not 0 or 1. This helps to create a "sharp" interface between the void and the solid elements, without having to refine the entire mesh.

Listing 2: MBB Adaptivity block

[Adaptivity]
  max_h_level = 2
  recompute_markers_during_cycles = true
  interval = 1
  cycles_per_step = 1
  marker = density_marker
  [Indicators]
    [density_jump]
      type = ValueJumpIndicator
      variable = mat_den_nodal
    []
  []
  [Markers]
    [density_marker]
      type = ErrorToleranceMarker
      indicator = density_jump
      coarsen = 0.1
      refine = 0.1
    []
  []
[]
(modules/combined/examples/optimization/2d_mbb_pde_amr.i)