Difference between revisions of "Controlled Heating"

From mintOC
Jump to: navigation, search
(Created page with "The controlled heating problem is a simple problem from the domain of continuous PDE constrained optimal control. The goal is to parametrize the wikipedia:Heat equation|heat...")
 
 
(6 intermediate revisions by 2 users not shown)
Line 12: Line 12:
 
</math>
 
</math>
  
Here, <math>f</math> denotes the source term. Given a reference function <math>u_d</math>, the optimization problem is given by:
+
Here, <math>f</math> denotes the source term. We demand that <math>C_1 \leq f(x) \leq C_2</math> in <math>\Omega</math>. Given a reference function <math>u_d</math>, the optimization problem is given by:
  
 
:<math>
 
:<math>
Line 19: Line 19:
 
   \text{s.t.} & \begin{array}[t]{rll}
 
   \text{s.t.} & \begin{array}[t]{rll}
 
     - \Delta u(x) &= f(x) \qquad & \forall x \in \Omega \\[1.5ex]
 
     - \Delta u(x) &= f(x) \qquad & \forall x \in \Omega \\[1.5ex]
     \frac{\partial u}{\partial \nu}(x) &= -u(x) \qquad & \forall x \in \partial \Omega
+
     \frac{\partial u}{\partial \nu}(x) &= -u(x) \qquad & \forall x \in \partial \Omega \\
 +
    f(x) &\in [C_1, C_2] \qquad & \forall x \in \Omega
 
   \end{array}
 
   \end{array}
 
\end{array}
 
\end{array}
Line 38: Line 39:
 
   \min\limits_{u,f} & \int\limits_\Omega (u - u_d)^2 \, \mathrm{d}x \\
 
   \min\limits_{u,f} & \int\limits_\Omega (u - u_d)^2 \, \mathrm{d}x \\
 
   \text{s.t.} & \begin{array}[t]{rll}
 
   \text{s.t.} & \begin{array}[t]{rll}
     \int\limits_\Omega \left\langle \nabla u, \nabla v \right\rangle \,\mathrm{d}x + \int\limits_{\partial \Omega} u \cdot v \,\mathrm{d}s(x) &= \int\limits_\Omega f \cdot v \,\mathrm{d}x \qquad &\forall v \in V
+
     \int\limits_\Omega \left\langle \nabla u, \nabla v \right\rangle \,\mathrm{d}x + \int\limits_{\partial \Omega} u \cdot v \,\mathrm{d}s(x) &= \int\limits_\Omega f \cdot v \,\mathrm{d}x \qquad &\forall v \in V \\[1.5ex]
 +
    f(x) &\in [C_1, C_2] \qquad & \forall x \in \Omega
 
   \end{array}
 
   \end{array}
 
\end{array}
 
\end{array}
Line 49: Line 51:
 
:<math>
 
:<math>
 
   u_d(x) = \|x\|^2
 
   u_d(x) = \|x\|^2
 +
</math>
 +
 +
Additionally, let
 +
 +
:<math>
 +
  (C_1, C_2) := (-10, 10).
 
</math>
 
</math>
  
 
= Reference solution =
 
= Reference solution =
  
''(There are currently no reference solutions for this problem)''
+
The reference solution was generated using finite element discretizations. The mesh was generated using FEniCS' mesh generation component with a resolution setting of <math>100</math>. 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 <math>0.0145336</math>.
 +
 
 +
<gallery caption="Reference solution plots" widths="180px" heights="140px" perrow="2">
 +
Image:controlled_heating_solution_3d.png| False color 3D surface plot of the solution.
 +
Image:controlled_heating_solution_color.png| False color 2D plot of the solution.
 +
Image:controlled_heating_control_3d.png| False color 3D surface plot of the control function.
 +
Image:controlled_heating_control_color.png| False color 2D plot of the control function.
 +
Image:controlled_heating_error_3d.png| False color 3D surface plot of the error function.
 +
Image:controlled_heating_error_color.png| False color 2D plot of the error function.
 +
</gallery>
 +
 
 +
= Source Code =
 +
 
 +
Model descriptions are available in
 +
 
 +
* [[:Category: Casadi | Casadi code]] using FEniCS at [[Controlled Heating (FEniCS/Casadi)]]
  
 +
[[Category: MIOCP]]
 
[[Category:PDE model]]
 
[[Category:PDE model]]
 +
[[Category: Elliptic]]

Latest revision as of 15:11, 23 February 2016

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 \Omega \subset \mathbb{R}^n be a contiguous domain and let \nu \colon \partial \Omega \to \mathbb{R}^n be an outer unit normal of \Omega. The Poisson problem with simple Robin-type boundary conditions then takes the following form:


\begin{array}{rll}
  - \Delta u &= f \qquad & \text{in } \Omega \\
  \frac{\partial u}{\partial \nu} &= -u \qquad & \text{on } \partial \Omega
\end{array}

Here, f denotes the source term. We demand that C_1 \leq f(x) \leq C_2 in \Omega. Given a reference function u_d, the optimization problem is given by:


\begin{array}[t]{rl}
  \min\limits_{u,f} & \int\limits_\Omega (u - u_d)^2 \, \mathrm{d}x \\
  \text{s.t.} & \begin{array}[t]{rll}
    - \Delta u(x) &= f(x) \qquad & \forall x \in \Omega \\[1.5ex]
    \frac{\partial u}{\partial \nu}(x) &= -u(x) \qquad & \forall x \in \partial \Omega \\
    f(x) &\in [C_1, C_2] \qquad & \forall x \in \Omega
  \end{array}
\end{array}

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:


  \int\limits_\Omega \left\langle \nabla u, \nabla v \right\rangle \,\mathrm{d}x + \int\limits_{\partial \Omega} u \cdot v \,\mathrm{d}s(x) = \int\limits_\Omega f \cdot v \,\mathrm{d}x \qquad \forall v \in V

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


\begin{array}[t]{rl}
  \min\limits_{u,f} & \int\limits_\Omega (u - u_d)^2 \, \mathrm{d}x \\
  \text{s.t.} & \begin{array}[t]{rll}
    \int\limits_\Omega \left\langle \nabla u, \nabla v \right\rangle \,\mathrm{d}x + \int\limits_{\partial \Omega} u \cdot v \,\mathrm{d}s(x) &= \int\limits_\Omega f \cdot v \,\mathrm{d}x \qquad &\forall v \in V \\[1.5ex]
    f(x) &\in [C_1, C_2] \qquad & \forall x \in \Omega
  \end{array}
\end{array}

Parameters

For testing purposes, we consider \Omega = B(0, 1) = \left\lbrace x \in \mathbb{R}^n \colon \|x\| < 1 \right\rbrace with n = 2. The reference function is given by:


  u_d(x) = \|x\|^2

Additionally, let


  (C_1, C_2) := (-10, 10).

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 100. 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 0.0145336.

Source Code

Model descriptions are available in