Abstract
In this paper, we study the optimal boundary control of solidification governed by the classical two-phase Stefan problem with a sharp moving interface. The main objective is to formulate an optimal control problem for interface motion using boundary heat-flux control. The control acts as a Neumann heat flux on a designated boundary segment and steers the interface through the Stefan condition. Using an enthalpy formulation, we prove well-posedness under boundary control and establish Lipschitz continuity of the control-to-state map and continuous dependence on the initial data. We then derive first-order necessary optimality conditions using a Lagrangian approach and propose a practical algorithm that couples a semismooth Newton method with Sequential Quadratic Programming (SQP) to compute the optimal boundary flux.
Keywords:
optimal control; Stefan problem; free boundary problems; boundary control; necessary optimality conditions MSC:
80A22; 35R35; 49J20; 49M25
1. Introduction
The classical two-phase Stefan problem is a foundational model for melting and solidification in materials such as aluminum [1] and steel [2]. It is a free boundary problem where a sharp solid–liquid interface moves according to the Stefan condition, which balances heat fluxes across with latent heat release or absorption.
Although the sharp-interface formulation directly reflects the physical mechanism, it presents substantial analytical and numerical challenges, especially in higher dimensions. The shifted temperature variable and the enthalpy formulation provide an alternative on a fixed domain, where temperature is expressed as a piecewise linear function of enthalpy and is used throughout, with the melting temperature corresponding to . The latent-heat jump appears as a small regularized slope, and boundary heat fluxes enter naturally in weak form. This reformulation implicitly captures the moving interface as the set where and enthalpy lies in the latent-heat interval, which is advantageous for boundary-control analysis [3,4].
A primary challenge in controlling solidification processes is managing the moving interface. One avenue adopts a sharp-interface optimal-control formulation, treating the free boundary itself as an optimization variable and using boundary temperature to track a desired interface evolution, while explicitly enforcing the Stefan condition [5]. A second, classical approach formulates the Stefan problem as a variational inequality, which enables optimal control under mixed boundary conditions and accommodates elliptic degeneracy of the original formulation [6]. Complementing these open-loop and optimization-based methods, research has also focused on boundary feedback control through backstepping and energy-shaping designs, which guarantee exponential stabilization of the interface position at a desired setpoint in both one- and two-phase Stefan problems [7,8]. Taken together, these directions illustrate a clear evolution in methodology, where optimization-based formulations, sharp-interface methods, and variational-inequality approaches provide powerful tools for trajectory design and analysis, while feedback-based controllers supply real-time stabilization guarantees that are crucial under disturbances and modeling uncertainties. This complementarity shows that no single method dominates; rather, the strength of the field lies in the interplay between rigorous optimal-control formulations and stabilizing feedback strategies, offering a broad and adaptable set of methods for applications ranging from crystal growth to advanced thermal energy storage.
While optimal control of Stefan-type problems has been investigated in several works [5], most existing studies focus on distributed controls or adjustments of the initial state. In contrast, boundary control—directly relevant to practical applications—has not been examined with the same level of analytical detail. In particular, results establishing well-posedness under boundary heat-flux control, stability estimates such as Lipschitz continuity of the control-to-state mapping, and rigorous derivations of adjoint-based optimality conditions remain incomplete. Recent work on networked control systems has explored how asymmetric information and unreliable communication affect controller performance [9,10]. Studies on decentralized and remote–local control architectures under such constraints, though focused on finite-dimensional systems, provide insights on limited information exchange and robustness that are conceptually relevant to boundary control, where sensing and actuation may also be distributed or delayed.
This paper provides a rigorous analysis of the two-phase Stefan problem with boundary heat-flux control in the enthalpy formulation. We prove the well-posedness of the controlled state system and establish stability estimates, including Lipschitz continuity with respect to both control and initial conditions. Building on these results, we formulate a tracking-type optimal control problem for the solidification front and show the existence of optimal controls. We then derive first-order necessary conditions using a Lagrangian approach and analyze the associated adjoint system for this highly nonlinear and nonsmooth control problem. Finally, we introduce a numerical strategy based on semismooth Newton methods combined with Sequential Quadratic Programming (SQP), demonstrating how these theoretical conditions can be implemented computationally.
Our motivation is driven by both theoretical and applied considerations. Mathematically, the Stefan problem belongs to a class of nonlinear free boundary problems that raise fundamental questions about existence, stability, and solution sensitivity. From an applied perspective, solidification processes play a central role in metallurgy, crystal growth, and materials science, where microstructural properties such as grain size and porosity depend strongly on the evolution of the phase interface. The ability to guide these processes through boundary fluxes is of clear technological importance. The remainder of this paper is organized as follows: In Section 2, we establish well-posedness and continuity for the controlled enthalpy model. In Section 3, we formulate the optimal boundary control problem and derive adjoint-based first-order optimality conditions. In Section 4, we present the numerical discretization and algorithms, and we illustrate controlled solidification through computational experiments.
2. The Classical Two-Phase Stefan Problem
The heat equation is a parabolic partial differential equation that is central to thermodynamics and mathematical analysis. Originally formulated to describe heat’s diffusion through a medium, it has since become a cornerstone in both theoretical and applied mathematics.
The Stefan problem provides a moving-interface model for phase-change phenomena such as melting and solidification. The transition occurs within a mushy zone, called the interface, where liquid and solid phases coexist. This model has wide applications in natural sciences and industrial processes [11], as noted in the Introduction.
In the traditional temperature formulation of the two-phase Stefan problem, the location of the phase-change interface must be determined as part of the solution. This solid–liquid boundary is a free boundary whose position is unknown a priori, making the analysis particularly challenging in multiple dimensions. To avoid explicit interface tracking, the problem can be reformulated in terms of enthalpy (internal energy). In the enthalpy method, the heat equation is expressed in terms of internal energy, absorbing the Stefan condition (accounting for latent heat) into the material law rather than imposing it as a separate boundary condition. In what follows, we develop the enthalpy-based formulation for the two-phase Stefan problem.
2.1. Enthalpy Formulation of the Two-Phase Stefan Problem
Enthalpy (internal energy) represents the total heat content of a system, combining sensible heat (temperature variation) and latent heat (associated with phase transitions). For a single-phase medium with shifted temperature and constant specific heats, the enthalpy is expressed as follows:
where is the mass density, , are the specific heats of the solid and liquid phases, respectively, and L denotes the latent heat associated with the phase transition.
The specific heat c denotes the energy required to raise the temperature of one unit of mass by one degree. In the absence of phase change, E evolves in time according to heat diffusion. With a boundary heat-flux control g prescribed on a portion of the boundary, the standard heat conduction model takes the following form:
where is the thermal conductivity and denotes the outward normal derivative for the Neumann boundary condition. Equation (1) states that the time-rate of change in enthalpy E in a region equals the thermal diffusion of , and the boundary flux is controlled by g.
Now, consider a material that can exist in two phases (solid and liquid), with a phase change occurring at a constant melting (solidification)-shifted temperature . In a two-phase (solid–liquid) scenario, the enthalpy as a function of exhibits a discontinuity at due to the absorption or release of latent heat L. As the material passes through , an extra energy (per unit volume) must be absorbed or released without a temperature change. This leads to a jump in the enthalpy–temperature relation, known as the Stefan condition. That is, enthalpy has a jump of magnitude at .
The two-phase Stefan problem describes heat diffusion in a medium undergoing a solid–liquid phase change, with a moving interface separating the two phases. We denote by the solid region and by the liquid region. Thus, is a moving free boundary, and we assume temperature continuity on .
Within each phase, heat evolves according to Fourier’s law. The general heat equation is
Accordingly, the governing equations in the two phases are
together with the condition on .
On a controlled portion of the external boundary, the normal heat flux is prescribed as a boundary control . The boundary condition is given by
where we take to be the thermal conductivity of the material in contact with at . On the remaining boundary , we impose insulation: .
The interface has unit normal and normal velocity .
Energy conservation across then implies that the latent heat absorbed or released by the moving boundary balances the jump in conductive heat flux between the two phases:
Here, points from solid to liquid, and V is the normal velocity in the direction of .
Collecting the above, the strong form of the two-phase Stefan problem is
In System (5), the unknowns are the shifted temperature field and the evolving interface . Given an initial shifted temperature distribution and initial interface , this system determines the coupled dynamics of the shifted temperature in each phase and the interface motion. Physically, the Stefan condition enforces that excess heat at the interface is consumed as latent heat to melt the solid, whereas a deficit of heat leads to solidification, thereby ensuring conservation of energy during the phase transition.
We define a set-valued enthalpy function to capture this behavior:
This strong form is presented for physical clarity; our analysis and subsequent results are derived from the weak enthalpy formulation. Figure 1 illustrates the enthalpy graph [11,12,13], as defined in Equation (6).
Figure 1.
The enthalpy set-valued graph .
Since is multi-valued at , its inverse is single-valued and continuous. Let denote the inverse relation, giving the shifted temperature as a function of enthalpy E:
Figure 2 shows the graph of the function . By construction, is continuous and non-decreasing in E. In fact, is Lipschitz-continuous globally with the Lipschitz constant
Figure 2.
The inverse enthalpy graph .
Thus, is a continuous, monotone, Lipschitz function of enthalpy, and is its (multi-valued) inverse, which is a monotone graph. Throughout, we write for the a.e. derivative, and identities involving are understood to hold almost everywhere. Physically, shows that the shifted temperature remains constant at 0 while enthalpy changes within the latent heat interval .
Using the enthalpy–temperature relation above, we can reformulate the Stefan problem entirely in terms of enthalpy on a fixed domain. Substituting into the heat conduction law (1) gives the governing equation in enthalpy form:
For simplicity, we take to be constant in the enthalpy formulation; phase-dependent can be handled with the same analysis (variable-coefficient elliptic operators).
If a solution of (8) is known, the shifted temperature is recovered as . The solid–liquid interface at time is then the set of points
2.2. Weak Formulation and Time Discretization
We now establish the weak formulation of the enthalpy equation with boundary heat-flux control. Let be a fixed domain and the portion of the boundary where a Neumann control is prescribed. Multiplying the enthalpy equation by a test function and applying Green’s identity, we obtain
Thus, in the weak form, the control g enters explicitly as a boundary Neumann term on . Equivalently, we may write
The weak formulation implicitly encodes the global energy balance. The compatibility condition
expresses conservation of total enthalpy in the domain. Specifically, the rate of change in total enthalpy in the domain must equal the net heat flux through the controlled boundary.
To construct solutions, we discretize in time with step size . The backward Euler scheme for the enthalpy formulation is
We introduce the convex functional , whose subdifferential characterizes the enthalpy–temperature relation:
Then, (11) is equivalent to the variational inclusion
The weak solution is obtained as the unique minimizer of the convex functional
The functional is coercive and convex. While the Dirichlet energy term ensures convexity, we note that is not strictly convex over the interval where (the mushy region). Under the given Neumann boundary conditions, the constant nullspace of the Laplacian combined with the non-strict convexity of in the mushy region means that uniqueness of the minimizer requires additional regularity conditions. We address this through regularization in Section 3, where we introduce a strictly convex approximation that guarantees both existence and uniqueness.
2.3. A Priori Bounds for the Finite-Difference Solution
We derive uniform a priori estimates for the finite-difference scheme, which are key for compactness and for passing to the continuous-time limit as . Such estimates for enthalpy formulations of the Stefan problem go back to Crank [14], Damlamian [13], White [3], and Voller–Cross [4], with rigorous numerical error analysis by Elliott [15].
The main tool is the compactness result known as the Aubin–Lions compactness lemma. This result is significant in the theory of Sobolev spaces and the analysis of nonlinear evolution equations, as it provides a criterion for compact embedding into the space . In particular, it serves as a tool for establishing the existence of approximate solutions developed through the Galerkin method. The lemma is formally stated as follows:
Lemma 1
(Aubin–Lions–Simon compactness lemma [16,17]). Let , X, be Banach spaces with , where is compactly embedded in X and X is continuously embedded in . For , set
Then, if , the embedding is compact, and if and , the embedding is compact.
While the original proof by Aubin required reflexivity of or , Simon [18] later proved this relaxed version and extended the result without this assumption.
Theorem 1
(Uniform bounds). Let be a bounded Lipschitz domain with measurable, and let with . Assume that and . Then, the discrete solution of (11) satisfies bounds independent of :
- (i)
- Assume that . Then, the following energy bound holds:
- (ii)
- Assume in addition that . Then, the solution satisfies the following bound:where M depends only on and .
Proof.
(i) Define the convex potential function
For a convex differentiable function f, we have
Using Green’s identity and substituting into (19) gives
Summing over formally gives
once the boundary term is estimated as follows. By the trace inequality and Young’s inequality,
Using the Lipschitz property of ,
we substitute into the inequality above. After moving the gradient term to the left-hand side of (20), we arrive at the key recursive inequality:
Applying the discrete Gronwall lemma to (23) yields the desired uniform estimate: there exists a constant independent of such that
This proves (15).
Summing in n yields
for some constant M. Finally,
where L is the Lipschitz constant of . This proves (16). □
Theorem 1 shows that is bounded in , is bounded in , and is bounded in . By the Aubin–Lions compactness lemma, using the compact embedding and the continuous embedding , we can conclude that
which is the essential ingredient for passing to the limit and proving the existence of a weak solution.
Moreover, the estimate (24) shows that
On any set where , this also controls in ; combined with the compactness of and the local invertibility of , this implies the strong convergence of on that set.
2.4. Convergence of Weak Solutions
We establish the existence of a weak solution to the enthalpy formulation (9) by passing to the limit in the discrete approximation. The compactness needed for this passage is provided by the Aubin–Lions compactness lemma.
Theorem 2
(Existence of a weak solution). Let be a bounded Lipschitz domain with . Assume that and . Then, there exists a pair such that
and the weak formulation
holds for all .
Proof.
The continuous enthalpy formulation is given by
Define the time interpolants from the discrete sequence :
and the piecewise linear interpolant
so that
From the a priori estimates in Theorem 1, the following uniform bound holds
Consequently,
From the discrete weak form
we obtain
Hence,
Using that , we obtain
with a uniform bound. By the Aubin–Lions compactness lemma with , , , there exists a subsequence such that
Moreover, since is bounded in , it is weak-* relatively compact. Thus, up to a subsequence, weak-* in for some .
The discrete energy inequalities, derived in Theorem 1, are recalled here for the subsequent analysis. Testing the discrete weak form
with and using convexity of yields
Summing over gives
Since is monotone, for any ,
Passing to the limit using (35) and the weak convergence of yields
which implies that is the correct weak limit.
Finally, the interpolants satisfy the time-integrated discrete weak form
2.5. Lipschitz Continuity of the Enthalpy Solution with Respect to Boundary Control
Let be a bounded Lipschitz domain, be a measurable subset, and define , . We consider the enthalpy formulation
with boundary and initial conditions
Throughout, we assume that is strictly increasing and Lipschitz-continuous with inverse . The natural control space is
This space is the most natural for the analysis in weak formulation, as it ensures that the boundary term is well defined. We note that the more regular space is continuously embedded in , a fact that we will use when formulating the optimal control problem.
Theorem 3
(Dual-norm Lipschitz continuity). Let and let be the corresponding enthalpy solutions with initial data . Then, the following stability estimate holds:
where the constant depends only on the domain Ω, the conductivity κ, and the constants associated with the trace theorem and Neumann map (in particular, it is independent of the final time T).
Proof.
Let , , and . The weak formulation of the enthalpy problem, tested with an arbitrary , yields
Let be the solution operator for the Neumann problem with zero mean. Specifically, for , is the unique solution to
Choosing gives
To establish the coercivity structure, we note that the dual norm satisfies
Differentiating this identity with respect to time yields
However, by the definition of , we have , which establishes the key identity
Furthermore, by the trace theorem and the boundedness of , there exist constants such that
Using Cauchy’s inequality and the previous bound, we obtain
The coercivity now follows from the monotonicity of . Since is maximal monotone, we have
By the definition of , this implies that
which provides the essential coercivity estimate. The positive term can be dropped, yielding
Integrating this inequality from 0 to t and applying Cauchy–Schwarz in time gives (40) and completes the proof. □
If, in addition, and , the standard discrete sign test argument yields the sharper -estimate:
Define the set-valued nonlinear operator with a homogeneous Neumann boundary condition by
and, for ,
Then, A is m-accretive on and, thus, generates a nonlinear contraction semigroup. The boundary-controlled problem can be written abstractly as
where is the bounded linear operator mapping a boundary flux to the corresponding source term via the Neumann map. The accretivity of A combined with the boundedness of the control operator B directly implies the stability bound (40) and guarantees uniqueness in the natural topology; see, e.g., [19] for the analysis of evolution equations with boundary inputs.
We adopt controls , continuously embedded in for the state equation; all boundary pairings are interpreted via the trace map.
For the natural control space , the dual-norm estimate (40) is the sharp and natural stability result, directly implying continuous dependence and uniqueness. When boundary fluxes are more regular—that is, integrable on —one recovers the classical -contraction principle.
3. Optimal Control Problem for the Motion of the Interface of the Stefan Problem
In this section, we consider controlling the motion of the moving interface via a boundary heat-flux control applied on a portion of the boundary . The goal is to control the evolution of the interface toward a desired trajectory by appropriate heating or cooling at . This leads to an optimal control problem where the state equations are the Stefan PDEs and the objective functional measures the deviation from a desired outcome together with the cost of applying control. We use the enthalpy formulation to describe the phase-change dynamics. Let denote the enthalpy; the state system is given by
together with zero-flux conditions on and initial condition .
We introduce an enthalpy-tracking cost functional that measures the discrepancy between the state and a target while penalizing the control effort.
where is the desired enthalpy trajectory and is the desired terminal enthalpy state, subject to the control constraint , while weights the terminal tracking, and penalizes control energy.
To define the moving-interface tracking criterion, let be a desired interface, and let be the signed distance. Then,
In general, the cost functional may be summarized as
for some functional that represents the tracking objective.
While the interface-tracking formulation provides the physical motivation for controlling the solidification front, the enthalpy-tracking formulation offers significant mathematical advantages for analysis and computation. The enthalpy tracking serves as a regularization of the interface-tracking objective, where guiding the full enthalpy field indirectly controls the interface position while avoiding the mathematical complexities of singular measures and geometric sensitivities. For the remainder of this work, we employ the enthalpy-tracking formulation to establish well-posedness and derive optimality conditions.
3.1. Existence of Optimal Control
We establish the existence of the optimal boundary control for the Stefan system via the direct method of the calculus of variations. Establishing existence is essential before one can pursue uniqueness, regularity, or numerical approximation results. The argument is based on the direct method in the calculus of variations, which provides a systematic methodology for proving existence by combining coercivity, compactness, and weak lower semicontinuity.
We show that the quadratic control cost enforces coercivity of the functional, while the control-to-state operator exhibits sufficient compactness properties to guarantee convergence of minimizing sequences. Together with the weak lower semicontinuity of the cost functional, these properties ensure the existence of an admissible control that minimizes the objective. Consequently, there exists an admissible boundary heat flux that optimally drives the solidification interface motion toward a desired target, while balancing accuracy against control effort. For related developments in free boundary optimal control, we refer to [5,20,21].
Theorem 4
(Existence of an optimal control). Let . Define the admissible control set
Proof.
Let be the reduced composite functional. By definition of J,
Thus, is coercive on . Let be a minimizing sequence. Since is convex, closed, and bounded in the reflexive space , it is weakly sequentially compact, up to a subsequence
Let be the associated enthalpy solutions. From the well-posedness theory (Section 2) and , we have uniform bounds
By the Aubin–Lions lemma, there exist and such that, up to a subsequence,
By the monotonicity of and the strong convergence of , we identify a.e. For all , passing to the limit gives
Using the convergences , and , we obtain
so satisfies the state system.
By weak convergence in and weak lower semicontinuity of the norm,
Similarly, by weak convergence in ,
Finally, from the boundedness and , we have weakly in ; hence,
Combining these inequalities,
so is a minimizer. □
3.2. Lagrangian Functional and Adjoint Equation
We derive the adjoint equation for the optimal control problem using a Lagrangian approach. The adjoint variable measures the sensitivity of the cost functional with respect to small perturbations in the state. This technique is classical in PDE-constrained optimization [21] and has been applied to Stefan-type problems in [5,20].
Theorem 5
(Adjoint equation). For the regularized enthalpy function with , the adjoint state p satisfies the backward parabolic equation
Proof.
The state equation in weak form is
for all . Define the Lagrangian functional
Integration by parts in time gives
For a variation h in E,
The Lagrangian becomes
The Gâteaux derivative in the direction h is given by
Integrating the spatial term by parts (using ),
Requiring for all admissible h with yields the adjoint equation and terminal condition. The regularization parameter ensures that is differentiable and , which is essential for the well-posedness of the adjoint equation. □
We emphasize that the adjoint derivation is consistent with the weak formulation written in the enthalpy variable E, using the temperature–enthalpy relation. A similar scalar nonlinear diffusion structure is analyzed in [22], where the operator arises naturally in the Gurtin–MacCamy-type equation. We follow this consistent formulation to ensure that the adjoint equation remains thermodynamically coherent.
Theorem 6
(Discrete existence). Let be a uniform partition of with time step , where and . Consider the regularized enthalpy function:
The backward Euler discretization of the adjoint equation (solved backward in time from to ) reads
Here, is computed from , with . Then, for each n from N down to 1, given , there exists a unique solution .
Proof.
Equation (47) is equivalent to the elliptic problem for :
The weak form seeks such that, for all ,
where
Since , the bilinear form is coercive and continuous on . The linear functional is continuous. By the Lax–Milgram theorem, there exists a unique solution . □
To obtain stability estimates, we test (47) with (formally, assuming sufficient regularity). This yields
Using the energy identity
together with , the left-hand side becomes
Applying Young’s inequality to the term and using , we obtain the following for each step:
Multiplying by and summing from down to 1 yields
This provides uniform bounds for the discrete solutions, initialized with the given value of . By weak compactness and consistency, the limit p (as ) satisfies
The adjoint state p propagates backward in time, reflecting the reversed causality of sensitivities: terminal perturbations influence the entire trajectory. In PDE-constrained optimization, the adjoint bridges state dynamics with the gradient of the cost functional with respect to the control. The regularization is essential for establishing well-posedness: without it, may vanish or blow up, leading to degeneracy. The condition restores uniform ellipticity, and the energy bound above guarantees the stability and regularity of solutions.
Corollary 1
(Existence of the regularized adjoint). Let E be the enthalpy state associated with a given control g, and let be defined in (46) so that . Then, the regularized adjoint equation
admits a unique weak solution
Moreover, if Ω is and , then
Proof.
The backward Euler scheme (47) produces a sequence with the uniform estimate
Using standard time-interpolants, this yields boundedness of the interpolated sequence in and of the time differences in . By weak compactness (and Aubin–Lions), up to a subsequence, weak-* in , and strongly in .
Since is bounded and continuous, a.e. implies strongly in for any finite q (dominated convergence). Together with in , this yields in , so we can pass to the limit in (47) to obtain the weak form of the regularized adjoint. The terminal condition is inherited from the initialization . Uniqueness follows by testing the homogeneous equation with the difference of two solutions and using . The temporal regularity follows from the uniform bounds on the discrete time differences. □
Remark 1.
The regularization with ensures that the corresponding functional from Equation (14) becomes strictly convex. Since everywhere, the convex potential associated with is strongly convex. Combined with the convex Dirichlet energy term and the linear terms, the functional is strictly convex, guaranteeing both the existence and uniqueness of the minimizer.
3.3. Necessary Optimality Conditions
We derive the first-order necessary optimality conditions for the boundary control problem governed by the Stefan system. The method of Lagrange multipliers yields a coupled system of forward and backward PDEs characterizing local optima.
We define the control operator as the bounded linear operator given by for all . Its adjoint is given by when interpreted appropriately through the trace theorem.
Theorem 7.
Let be a locally optimal pair for the control problem, and let p denote the associated adjoint state. Then, satisfies the following optimality system:
Proof.
The proof follows by taking first variations of the Lagrangian functional
with and .
For a variation , the first variation gives (for all )
Hence, the control condition
understood in the sense.
For a variation with , we compute
Requiring for all v yields the adjoint PDE
with terminal condition and on .
Variation with respect to p recovers the weak form of the state equation with boundary flux .
Let be the control-to-state map and define the reduced cost . At a local optimum , the first variation satisfies for all admissible . The adjoint construction above computes and yields the optimality relation on . Collecting the three stationarity conditions gives exactly the optimality system (48). □
The optimality system (48) couples the forward enthalpy equation with the backward adjoint problem. The optimality condition shows that the optimal flux is determined by the boundary trace of the adjoint state through the adjoint operator . The backward adjoint dynamics transmit information from the final-time cost to earlier times, linking the desired terminal state to the boundary control strategy.
4. Numerical Methods for Enthalpy-Based Formulation of the Controlled Two-Phase Stefan Problem
Many optimal-control treatments of Stefan-type problems yield nonsymmetric linearized/adjoint operators, motivating Krylov solvers whose performance can be sensitive to non-normality. Prior work includes free boundary control in a level-set setting [5,20] with connections to classical level-set solvers [23] and enthalpy/phase-field formulations [3,4]. In contrast, our contribution enforces an SPD structure throughout: a temperature-linearized semismooth Newton step for the forward problem and a diagonal congruence for the discrete adjoint produce strictly SPD systems, enabling preconditioned CG within a reduced-space SQP algorithm.
We develop a numerically stable scheme for optimal boundary control of the two-phase Stefan problem in enthalpy formulation. The scheme integrates a cell-centered spatial discretization with homogeneous Neumann boundary conditions and a Kronecker-sum Laplacian, a temperature-linearized semismooth Newton method whose linear systems are strictly symmetric positive definite (SPD), an SPD-transformed discrete adjoint obtained via a diagonal congruence that enables efficient solution by Conjugate Gradients (CGs) for backward sweeps, and a reduced-space Sequential Quadratic Programming (SQP) algorithm that incorporates preconditioning, an Armijo line search, and checkpointing. In addition, the scheme provides expanded numerical validation, including convergence behavior, sensitivity to the interface slope, and performance comparisons.
We consider a unit square discretized by a uniform Cartesian grid with cells and spacing . Shifted temperature is represented as and evaluated at cell centers (the stored primary unknown is Eij).
Let I denote the identity and h the standard one-dimensional second-difference operator with zero normal flux:
This h is the negative discrete Laplacian () with homogeneous Neumann boundary conditions; hence, it is symmetric positive semidefinite. The two-dimensional negative discrete Laplacian with homogeneous Neumann boundary conditions is the Kronecker sum
By construction, H is symmetric positive semidefinite (SPSD) and has a one-dimensional nullspace of constants under Neumann boundary conditions.
Let be the central segments of the top and bottom boundaries. The Neumann control g acts on . We define the discrete boundary pairing
and absorb into the sparse injection operator B so that consistently maps boundary-flux degrees of freedom into the state equation, and the control norm is grid-independent.
Figure 3 provides intuition regarding the geometry and the effect of boundary fluxes on the shifted temperature field. Related geometric/front-capturing ideas for Stefan problems date back to level-set solvers [23], but here we keep a fixed grid with enthalpy closure.
Figure 3.
Snapshot at on ; control on via g.
The grid is cell-centered so that face-normal fluxes from g pair naturally with shifted temperature unknowns; H is assembled as a Kronecker sum to preserve symmetry and sparsity patterns.
Using the backward Euler with time step and (for clarity in this study) a constant thermal conductivity (taken as ), the discrete enthalpy state equation is
Here, and throughout, we adopt the convention , so that matches the continuous diffusion term , where the enthalpy–shifted temperature relation is
Equation (51) is the backward Euler discretization of the enthalpy balance: the change in enthalpy over equals diffusion (via ) plus the imposed boundary flux . The piecewise-linear in (52) encodes liquid/solid/mushy behavior. The analysis here assumes exact knowledge of material parameters such as , , , and L. In practice, these may vary, but prior studies (e.g., [8]) show that boundary-controlled Stefan systems remain stable under bounded parameter perturbations. Extending the framework to explicitly handle uncertainty through robust or adaptive control is left for future work.
The framework extends to provided the variable-coefficient operator is discretized symmetrically (e.g., face-centered harmonic/centered averaging). In particular, we discretize the SPD form ; when is constant, this reduces to and is represented by . This preserves the symmetry of the linearized operators; conditioning changes and motivates stronger preconditioners.
In the interface interval , we regularize with a small slope
which clamps near 0 while ensuring semismooth differentiability. Unless stated otherwise, ; we provide a sensitivity study below.
We initialize with a central solid disk at 25 °C (radius 0.2) surrounded by liquid at 33 °C. To reduce grid-scale noise, we smooth by solving , and then we set
Linearizing in shifted temperature improves symmetry and conditioning. Define . At Newton iteration k, we solve for the shifted temperature increment:
Since and , the coefficient matrix in (53) is strictly SPD. We use CG with Jacobi preconditioning
tolerance , and max 100 iterations.
We use the residual merit with Armijo backtracking: choose , with , until
where is the Jacobian of F. In practice, .
Warm start with for . Stop when
Now, we minimize the reduced cost
All discrete norms in the objective are implemented with standard quadrature weights. For the domain we use , and for the boundary control, denotes , where on . These weighted norms converge to their continuous counterparts under mesh refinement and are consistent with the theory established in Section 3.
The parameters (control penalty) and (terminal tracking weight) do not admit a universal optimal value; they determine the trade-off between control effort and tracking accuracy. Increasing the ratio improves final-time matching but yields stronger boundary fluxes. The forward residual is
Figure 4 and Figure 5 provide visual anchors for the tracking term and transient behavior.
Figure 4.
Target state at , obtained from a full-horizon simulation with constant boundary control .
Figure 5.
Enthalpy field at the half-horizon using the computed optimal control .
The standard adjoint in enthalpy variables is nonsymmetric. Therefore, we introduce the diagonal change of variables to obtain the symmetric system
Since H is symmetric SPSD (by our finite-difference discretization) and is diagonal positive, the congruence remains symmetric SPSD. The congruence transformation preserves the SPSD property because H is symmetric and is diagonal positive definite. Therefore adding produces an SPD system. We note that this argument relies on our chosen symmetric discretization of the Laplacian; a nonsymmetric scheme would not generally guarantee symmetry. We solve (57) by CG with Jacobi preconditioner
which is algebraically equivalent to , since is diagonal but cheaper to assemble. The computed optimal flux often begins with a short cooling phase to stabilize the solid core, followed by heating that accelerates melting near the controlled boundary layers—behavior consistent with previous optimal-control studies of Stefan systems [5] and illustrated in Figure 6.
Figure 6.
Spatiotemporal distribution of on (initial cooling, then heating).
From , the reduced gradient is
which matches the discrete optimality condition on . Here, the operator B already incorporates the boundary quadrature weight , so that the discrete boundary pairing corresponds to the continuous inner product.
We employ reduced-space line-search SQP. Each outer iteration comprises one forward semismooth Newton solve, one adjoint sweep, gradient evaluation (58), one CG solve for the reduced quadratic model, and Armijo line search. Hessian–vector products are applied with one tangent (forward-linearized, SPD) and one adjoint sensitivity (backward-linearized, SPD) solve. The method is detailed in Algorithm 1.
| Algorithm 1 Reduced-space SQP with SPD forward/adjoint/tangent solves and checkpointing |
|
The overall complexity of our approach is dominated by the Krylov solves. For a 2D grid with spatial degrees of freedom and time steps, each CG iteration costs due to the sparsity of H. With optimal preconditioning, CG converges in iterations, where is the condition number. For our Jacobi-preconditioned systems, leading to CG iterations per solve. Thus, each Newton step costs operations. The adjoint and sensitivity solves have similar complexity. The overall SQP method typically requires outer iterations, yielding total complexity for the complete optimal control solution. This favorable scaling compared to direct methods () makes our approach suitable for moderate-scale 2D problems and provides a foundation for 3D extensions with stronger preconditioners.
Figure 7 shows quadratic convergence in early Newton iterations (semismooth regime), transitioning to linear once globalization and tolerances dominate. In the SQP loop, gradient norms typically drop by several orders within ∼10–15 iterations.
Figure 7.
Convergence of the SQP algorithm: norm of reduced gradient vs. iteration.
Figure 8 illustrates the trade-off: smaller improves tracking but can induce oscillatory controls; larger smooths controls at the cost of terminal error. We adopt .
Figure 8.
Effect of regularization parameter on control performance (effort vs. tracking error).
Refining to and alters the objective by <1.5% and shifts the interface by <2 cells, indicating adequate resolution for , .
Varying : smaller values tighten the plateau near 0 and generally increase CG iterations (stiffer ), while larger values shorten Newton but can bias the interface location. The smoothing parameter was set to , as sensitivity tests showed that this value achieves the best trade-off between interface sharpness and numerical stability—smaller values cause ill-conditioning, while larger ones overly diffuse the phase interface.
The method converges for discontinuous initial data (sharp solid/liquid boundary), large time steps (), and poor Newton initial guesses (50% perturbation).
Table 1 compares the optimal control to a constant-control baseline; the optimal control reduces final-state error substantially with nearly identical effort by leveraging temporal modulation of the boundary flux. Table 2 reports spectral condition numbers for the two SPD linear systems used in our solver: the forward Newton step (53) and the adjoint system (57), evaluated on a grid (). Applying diagonal (Jacobi) preconditioning reduces by about three orders of magnitude (forward: ; adjoint: ). This explains the observed efficiency of our CG-based solves and justifies the choice of Jacobi as a cheap yet effective preconditioner for the SPD formulations.
Table 1.
Performance comparison between optimal-control and constant-control strategies.
Table 2.
Illustrative condition numbers for SPD systems () with/without Jacobi.
5. Conclusions
In this work, we developed a comprehensive theory–algorithm scheme for optimal boundary control of the solidification process governed by the Stefan problem. On the analytical side, we formulated an enthalpy-based variational model and proved well-posedness: existence of weak solutions via a priori estimates and the Aubin–Lions compactness lemma, together with Lipschitz stability with respect to boundary data and initial conditions. Building on this, we posed a tracking-type optimal control problem for the interface and established the existence of minimizers by coercivity, compactness of the control-to-state map, and weak lower semicontinuity. First-order necessary conditions were derived through a Lagrangian formulation, yielding a coupled state–adjoint system.
On the computational side, we designed a structure-preserving discretization and an optimization method that make all major linear subproblems symmetric positive definite, enabling efficient preconditioned CG within a reduced-space SQP setting. Numerical experiments validated the analysis, demonstrating accurate tracking, robust convergence across a wide range of parameters, and competitive cost relative to standard reference strategies.
The foundation developed in this paper opens several directions for further research and applications. Our methodology can be extended beyond the classical Stefan model. From a mathematical perspective, several open problems remain. One direction is to extend our analysis to include convection effects or anisotropic thermal conductivities, both relevant in practical settings [11]. Another direction is the incorporation of state or control constraints beyond simple bounds, such as requiring the interface to remain within prescribed regions. Finally, the development of scalable algorithms for three-dimensional problems with realistic material parameters is an important challenge [19].
Author Contributions
Conceptualization, K.A.A.; Methodology, K.A.A.; Software, K.A.A.; Validation, K.A.A. and J.S.; Formal Analysis, K.A.A. and J.S.; Investigation, K.A.A. and J.S.; Resources, K.A.A.; Writing—Original Draft Preparation, K.A.A.; Writing—Review and Editing, K.A.A. and J.S.; Visualization, K.A.A. and J.S.; Supervision, K.A.A.; Project Administration, K.A.A. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
Data are contained within the article.
Acknowledgments
The authors are very grateful to the editors and the anonymous referees for their constructive and valuable comments and recommendations, which have greatly contributed to improving the quality and clarity of this paper.
Conflicts of Interest
The authors declare that there are no conflicts of interest.
References
- Bermúdez, A.; Otero, M.V. An existence result for a two-phase Stefan problem arising in metal casting. Math. Methods Appl. Sci. 2006, 29, 325–350. [Google Scholar] [CrossRef]
- Hill, J.M.; Wu, Y.-H. On a nonlinear Stefan problem arising in the continuous casting of steel. Acta Mech. 1994, 107, 183–198. [Google Scholar] [CrossRef]
- White, R.E. An enthalpy formulation of the Stefan problem. SIAM J. Numer. Anal. 1982, 19, 1129–1157. [Google Scholar] [CrossRef]
- Voller, V.; Cross, M. Accurate solutions of moving boundary problems using the enthalpy method. Int. J. Heat Mass Transf. 1981, 24, 545–556. [Google Scholar] [CrossRef]
- Hinze, M.; Ziegenbalg, S. Optimal control of the free boundary in a two-phase Stefan problem. J. Comput. Phys. 2007, 223, 657–684. [Google Scholar] [CrossRef]
- Pawłow, I. Optimal control of solutions of parabolic variational inequalities. Numer. Math. 1987, 51, 271–288. [Google Scholar]
- Koga, S.; Diagne, M.; Krstić, M. Backstepping control of the one-phase Stefan problem. Automatica 2019, 100, 182–192. [Google Scholar]
- Koga, S.; Krstić, M. Control of two-phase Stefan problems via backstepping and energy shaping. Syst. Control Lett. 2019, 123, 144–151. [Google Scholar]
- Liang, X.; Qi, Q.; Zhang, H.; Xie, L. Decentralized Control for Networked Control Systems With Asymmetric Information. IEEE Trans. Autom. Control 2022, 67, 2076–2083. [Google Scholar] [CrossRef]
- Liang, X.; Xu, J. Control for Networked Control Systems with Remote and Local Controllers over Unreliable Communication Channel. Automatica 2018, 98, 86–94. [Google Scholar] [CrossRef]
- Tarwidi, D.; Pudjaprasetya, S.R. Godunov method for Stefan problems with enthalpy formulations. East Asian J. Appl. Math. 2013, 3, 107–119. [Google Scholar] [CrossRef]
- Azaïez, M.; Jelassi, F.; Brahim, M.; Shen, J. Two-phase Stefan problem with smoothed enthalpy. Commun. Math. Sci. 2016, 14, 1625–1641. [Google Scholar] [CrossRef]
- Damlamian, A. Some results on the multi-phase Stefan problem. Commun. Partial Differ. Equ. 1977, 2, 1017–1044. [Google Scholar] [CrossRef]
- Crank, J. Free and Moving Boundary Problems; Clarendon Press: Oxford, UK, 1984. [Google Scholar]
- Elliott, C.M. The Cahn–Hilliard model for the kinetics of phase separation. In Mathematical Models for Phase Change Problems; Birkhäuser: Basel, Switzerland, 1989; pp. 35–73. [Google Scholar]
- Aubin, J.-P. Un théorème de compacité. C. R. Acad. Sci. 1963, 256, 5012–5014. [Google Scholar]
- Zheng, S. Nonlinear Evolution Equations; CRC Press: Boca Raton, FL, USA, 2004. [Google Scholar]
- Simon, J. Compact sets in the space Lp(0, T; B). Ann. Mat. Pura Appl. 1986, 146, 65–96. [Google Scholar] [CrossRef]
- Ito, K.; Kunisch, K. Semi-smooth Newton methods for state-constrained optimal control problems. Syst. Control Lett. 2003, 50, 221–228. [Google Scholar] [CrossRef]
- Bernauer, M.K.; Herzog, R. Optimal control of the classical two-phase Stefan problem in level set formulation. SIAM J. Sci. Comput. 2011, 33, 342–363. [Google Scholar] [CrossRef]
- Ito, K.; Kunisch, K. Lagrange Multiplier Approach to Variational Problems and Applications; SIAM: Philadelphia, PA, USA, 2008. [Google Scholar]
- Covei, D.P. A nonlinear diffusion equation of the Gurtin–MacCamy type: Existence, uniqueness, and numerical simulations. arXiv 2025, arXiv:2504.19823. [Google Scholar]
- Chen, S.; Merriman, B.; Osher, S.; Smereka, P. A simple level set method for solving Stefan problems. J. Comput. Phys. 1997, 135, 8–29. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).