# Controlled Heating

The controlled heating problem is a simple problem from the domain of continuous PDE constrained optimal control. The goal is to parametrize the heat equation under Robin-type boundary conditions such that the stationary solution tracks a predefined reference function. This is equivalent to solving Poisson's problem under Robin-type boundary equations. The problem is therefore closely related to the source inversion problem. As opposed to the source inversion problem however, the controlled heating problem does not require the source term to be a linear combination of elementary source terms. The source term can be an arbitrary function which is usually chosen from the same function space as the temperature function.

# Problem Statement

Let be a contiguous domain and let be an outer unit normal of . The Poisson problem with simple Robin-type boundary conditions then takes the following form:

Here, denotes the source term. We demand that in . Given a reference function , the optimization problem is given by:

## Weak formulation

Some PDE discretization techniques (such as finite element methods) require the use of weak formulations of the original problem. The weak formulation of the Poisson problem with Robin-type boundary conditions as described above is obtained using Green's identities:

Here, is a suitable space of test functions. The optimization problem then takes the following form:

# Parameters

For testing purposes, we consider with . The reference function is given by:

Additionally, let

# Reference solution

The reference solution was generated using finite element discretizations. The mesh was generated using FEniCS' mesh generation component with a resolution setting of . The function space was constructed using first-degree Lagrangian elements. The optimization problem was solved using CasADi's IPOPT interface. The exact code used to solve the problem alongside solution data can be found under Controlled Heating (FEniCS/Casadi). The optimal objective function value is .

# Source Code

Model descriptions are available in

- Casadi code using FEniCS at Controlled Heating (FEniCS/Casadi)