Examples and tutorials » Density optimization examples

Follow a material field through a state solve, sensitivity and density update.

Density optimization varies a material field on a fixed domain. The field determines the coefficients of a state equation, while an objective assigns a cost to the resulting state and material usage.

Prerequisites

The Poisson tutorial introduces the scalar diffusion solve and field export. The variational formulations guide explains how coefficients enter an assembled form.

State, sensitivity and update

The thermal example proceeds through four operations:

  1. Evaluate conductivity from the current density and solve for temperature.
  2. Solve the adjoint equation and assemble the objective derivative.
  3. Regularize that derivative to obtain a spatial update field.
  4. Update the density, project its nodal values into the admissible interval, and record the objective and material usage.

Thermal design

  • Temperature minimization — SIMP conductivity, an adjoint sensitivity and a projected density update on the unit square.

The tutorial includes the computed density and temperature, the measured objective history, output fields and a link to the complete program. Its fixed-step iteration budget defines the recorded experiment. A stationarity test or a prescribed material budget requires a corresponding optimization criterion.

Continue

The shape optimization examples vary an explicit material boundary. Both representations require a state equation, a consistent derivative and an update policy.