Previous Article in Journal
The Health-Wealth Gradient in Labor Markets: Integrating Health, Insurance, and Social Metrics to Predict Employment Density
Previous Article in Special Issue
Multifidelity Topology Design for Thermal–Fluid Devices via SEMDOT Algorithm
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Topology Optimisation of Heat Sinks Embedded with Phase-Change Material for Minimising Temperature Oscillations

by
Mark Bjerre Müller Christensen
and
Joe Alexandersen
*
Institute of Mechanical and Electrical Engineering, University of Southern Denmark, 5230 Odense M, Denmark
*
Author to whom correspondence should be addressed.
Computation 2026, 14(1), 23; https://doi.org/10.3390/computation14010023 (registering DOI)
Submission received: 14 December 2025 / Revised: 7 January 2026 / Accepted: 13 January 2026 / Published: 16 January 2026
(This article belongs to the Special Issue Advanced Topology Optimization: Methods and Applications)

Abstract

This study presents a gradient-based topology optimisation framework for heat sinks embedded with phase-change material (PCM) that targets the mitigation of temperature oscillations under cyclic thermal loads. The approach couples transient thermal diffusion modelling in FEniCS with automatic adjoint sensitivities and GCMMA, and uses a simple analytical homogenisation to parametrise a composite of PCM and conductive material. With latent-heat buffering using PCM, the optimised layouts reduce the temperature variance by 41% when the full time history is used and by 32% when only the quasi-steady-state cycle is used. To improve physical manufacturability, explicit penalisation yields near-discrete designs with only ∼10% performance loss, preserving most oscillation reduction benefits. The results demonstrate that adjoint-driven PCM topology optimisation can systematically suppress thermal oscillations.

Graphical Abstract

1. Introduction

1.1. Motivation

As electronics become a larger part of our everyday lives, the importance of the reliability, cost, and life-time of electronic components increases. A major cause for failure in electronic components is the mechanical stresses induced by the mismatch in thermal coefficient of expansion (TCE) across materials in an electronic component and an increase in temperature. In cases where the electronic component has a transient cyclic heat production, these mechanical stresses can further lead to fatigue failures [1] if not managed correctly through adequate cooling. In practice, the temperature of electronic components with high heat production are kept cool with heat sinks, which are placed on top of the component and dissipate the heat produced by the component to the surrounding air; an “example” can be seen in Figure 1.
This paper focuses on heat sinks with embedded phase-change material (PCM) (henceforth referred to as “PCM heat sink”) for controlling the amplitude of the temperature oscillations caused by a transient thermal load. PCMs are materials that change phase over a certain temperature interval. During this phase change, energy is stored or released through the latent heat of fusion. The idea is to use the thermal storage potential in the latent heat of fusion as a thermal buffer to smoothen the temperature oscillations caused by cyclic thermal loading.
A major issue with PCM from a thermal design aspect is that most common PCMs have low thermal conductivity, making it hard to transfer the heat from the electronic component into the PCM. Therefore, PCM is usually paired with a highly thermally conductive material (HCM) in the form of fins or foams which ensure the distribution of heat to the PCM [2]. In the literature, numerous simple fin designs in just as many operational modes have been investigated through extensive parametric investigations in order to determine the best-performing design [2,3]. Most of these studies are based on a steady thermal loading, which makes the physical problem easier to compute. This approach results in a poor understanding of the best use of PCM in an PCM heat sink under transient thermal loading. This paper aims to deepen the understanding of the optimal design of PCM heat sinks with respect to reducing the amplitudes in thermal oscillation induced by cyclic thermal loading. However, instead of continuing the tradition of parametric investigations, which are costly to perform, limited by the parametrisation of the HCM design, and specific in their applications, this paper seeks to deepen understanding with the help of gradient-based topology optimisation (TO). Unlike prior steady or parametric PCM studies, this work formulates a transient, adjoint-based topology optimisation for PCM heat sinks that directly targets oscillation suppression under cyclic loads.
There is no commercially available software capable of performing TO with respect to reducing the amplitudes in thermal oscillation induced by cyclic thermal loading. Therefore, a Python implementation was developed. The Python code uses the FEniCS package in conjunction with the dolfin-adjoint module to perform the TO. Following the preprint and code release, it has already been used by others to further extend it to a level-set method [4] and further applied to the design of electric aircraft battery packs [5].

1.2. Literature

Several numerical and experimental studies have been conducted to improve the performance of two-dimensional plate fin-based PCM heat sinks investigating the effects of the number of fins, heat sink height, and fin thickness [2,3,6]. However, these studies have focused on optimising the performance with regard to the temperature or time until a critical temperature is reached. These studies also suffer from a restriction to simple designs, as this makes the construction of parametric studies possible. As an alternative to this restrictive approach, this paper seeks to employ TO to optimise the two-dimensional plate fin-based PCM heat sinks.
For a general overview of TO for heat transfer applications, we recommend that the reader look at the available review papers [7,8,9] on the subject. The usage of TO for optimising the layout of PCM and HCM for heat sinks is sparsely represented in the literature, whereas the use of PCM and HCM for thermal energy storage is more common. Varanasi and Ananthasuresh [10] presented the first use of TO for PCMs, using a density-based TO to minimise the difference between the initial and final temperature over a selected part of the heat sink boundary. They modelled the PCM heat sink as a transient thermal diffusion problem involving phase change using COMSOL Multiphysics and MATLAB. They used an enthalpy method for modelling the phase change, a solid isotropic material with penalisation (SIMP) method for interpolating the conductivity, and an optimality criterion method to update the design. The results showed a 35% reduction in the objective functional when the optimised design was compared to a conventional design. However, the designs suffer from poor resolution due to the limited computational power available at the time. Ho et al. [11] optimised PCM heat sinks for maximum cooling in lieu of convective cooling, thus storing the energy from the heat source in the PCM. They applied a transient thermal diffusion problem with the modified heat capacity method, comparing performance between designs optimised using steady and unsteady models both numerically and experimentally. Subsequently, they added the effect of natural convection in the melted PCM [12]. Iradukunda et al. [13] does indeed treat the subject of PCM-integrated heat sinks using TO, but uses a very simple steady-state heat transfer model for the actual optimisation. Thus, it cannot be classified as true TO of PCM heat sinks. However, they did show improved thermal buffering from topology-optimised designs, which is the objective pursued in the present work. Similarly, Bianco et al. [14] optimised using a steady-state model with heat generation in place of an actual phase change model, but investigated the application of density-based TO to minimise the thermal resistance under constant wall temperature. Despite using a simplified model, the optimised design showed an up to two times improvement of the heat flux compared to a conventional design. Recently, Guibert et al. [4] presented a level-set method for heat sinks with PCMs, heavily based on the preprint of the present manuscript [15] and the associated freely available code [16]. They subsequently extended and applied their method to the design of electric aircraft battery packs [5].
As mentioned, the use of TO for thermal energy storage systems is more common and still relevant to summarise, since all of the work actually makes use of transient heat transfer analysis using models that include the latent heat of fusion. Pizzolato et al. [17] was the first to use TO to improve heat transfer performance in a latent heat thermal energy storage system (LHTES). In the initial study, only thermal diffusion was considered, but this was later extended to include the effects of natural convection [18,19]. They found that optimised designs based on pure thermal diffusion had higher heat transfer rates during the initial melting phase compared to optimised designs based on models including convective heat transfer in the liquid PCM. Meanwhile, designs based on models including convection had a higher charge rate if the storage unit had stored more than 80.2% of its energy storage capacity. There exist several further examples on TO for the PCM and HCM of LHTES [20,21,22,23,24,25], the details of which will not be discussed herein.
FEniCS [26,27] is a widely used collection of open-source components for automating the process of solving partial differential equations using the finite element method. In the context of TO, it has been used by a number of authors, and the following only presents a brief selection. Laurain [28] presented a compact educational structural TO code written using FEniCS to perform compliance minimisation using a level-set method. Qian [29] used FEniCS to perform TO to improve the printability of the optimised design on a three-dimensional printer by adding undercut and overhang angle control. Mezzadri et al. [30] used FEniCS to perform TO of self-supporting support structures for additive manufacturing. Yan et al. [31] presented a general-purpose TO platform for multidisciplinary problems with FEniCS as the multiphysics solver. Jauregui et al. [32] presented a reusable modular TO software, capable of using FEniCS as the simulation tool. Recently, Jia et al. [33] presented a TO software built upon the newer FEniCSx library.

1.3. Contributions

This paper aims to build upon the current understanding of PCM heat sinks with help of gradient-based TO with a specific focus on reducing the temperature oscillation in the electronic components resulting from a transient cyclic thermal load from the electronic components. Based on a simplified model of a PCM heat sink, a TO code using FEniCS version 2019 is applied to optimise the layout of the PCM and HCM in order to reduce the amplitude of temperature oscillations. The novelty in this research lies in the application of density-based TO to a complex time-dependent objective functional; providing insight into the complex problem that is reducing the amplitude of the temperature oscillations; and the use of a simple homogenisation-based design parametrisation for TO of PCMs and HCMs. For latent-heat buffering using PCM, the framework reduces the temperature variance objective by 41% (full transient) and 32% (quasi-steady-state), and delivers near-discrete layouts with only ∼10% loss.
This paper presents the major methods and assumptions used for the simulation and optimisation of the heat sink, and the resulting designs from the optimisation under different conditions. The optimised designs are investigated, and based on these investigations it is expected that some patterns will emerge that can help further the understanding of PCM heat sinks.

1.4. Paper Layout

The rest of the paper is organised as follows: Section 2 presents the methods and assumptions used to set up a physical model of the PCM heat sink; Section 3 presents the optimisation problem and methods used to perform TO; Section 4 describes how the methods are implemented to produce the results and presents the verification of the implementation of the methods; Section 5 presents the optimised designs of PCM heat sinks for different use cases; Section 6 discusses the results and assumptions behind the physical model and TO and their implications; and Section 7 presents the main conclusions of the paper.

2. Physical Model

As this paper aims to optimise PCM heat sinks with respect to the temperature of electronic components, the thermal problem is the most important to solve. The presence of PCM adds a lot of complexity to the thermal problem; the melting and solidification requires a transient model, the latent heat of fusion introduces non-linearities, and the liquid PCM causes natural convection heat transfer due to buoyancy effects, which requires a fluid simulation to model fully.
TO requires many subsequent evaluations of the physics. Therefore, it is desired to keep the physical model as simple as possible to keep the computational time to a manageable level. Therefore, the effects of natural convection will be neglected in this study. This choice is expected to result in some errors in the physical model, as a review of modelling PCMs in LHTES [34] found that natural convection had a major effect on the melting of PCMs. Pizzolato et al. [18] showed that optimised designs for LHTES differ significantly when only melting is considered, but that the designs look similar when treating only solidification. Nonetheless, herein it is assumed that the PCM heat sinks can be modelled as a transient thermal diffusion problem with two materials and phase change. The effect of these errors will need to be investigated in future works.
For this paper, the PCM heat sink is modelled as a simplified two-dimensional model consisting of a unit square with a heat flux applied at the boundary Ω H S simulating the heat produced in the electronic component and a cooling flux applied at the boundary Ω C . The remaining boundaries are considered adiabatic. A sketch of the simplified two-dimensional model of the PCM heat sink can be seen in Figure 2.

2.1. The Transient Thermal Diffusion Problem

The PCM heat sink is modelled using the following thermal diffusion problem:
ρ m c p T t k T 2 T x i x i = 0
where ρ m c p T t is the thermal storage term; k T 2 T x i x i is the diffusion term; T is the continuous temperature field; x i is a vector containing all the spatial dimensions; k T is the thermal conductivity; ρ m is the mass density; c p is the specific heat; and t is time.
In order for FEniCS to solve the thermal diffusion problem, the weak form has to be derived. Using a backward difference scheme to handle the time derivative, the weak form is derived to the following after integration-by-parts:
R = Ω ρ m c p v T ( n ) T ( n 1 ) Δ t d A + Ω k T v x i T ( n ) x i d A + Ω v k T T ( n ) n d s = 0
where Δ t is the size of the time step used for the backward difference scheme; T ( n ) is the continuous temperature field at the current time step n; T ( n 1 ) is the continuous temperature field at the previous time step; v is test function; Ω is the boundary of the design domain; and k T T n is the normal flux over the boundary. Note that the weak form is provided in the semi-discrete form, being continuous in the spatial dimension and discrete over time, in order to be consistent with the notation used in the code.

2.2. Material Interpolation

As the PCM heat sink consists of both PCM and HCM, the physical model has to be able to handle two materials. To make the subsequent implementation of TO easier, the two materials were implemented with an interpolation scheme depending on the material density variable field, ρ , representing the percentage of HCM, such that ρ = 0 is PCM, ρ = 1 is HCM, and ρ ] 0 ; 1 [ is a mixture. The material properties important for the physical model are ρ m c p and k T .
As seen in Section 1.2, the SIMP method is a common method for material interpolation when performing TO. It introduces a power-law interpolation that artificially decreases the material properties per volume for intermediate densities, which usually incentivises TO to create optimised designs without intermediate material (henceforth referred to as “discrete designs”) to make the best use of the material. However, during the initial testing it was found that the optimised designs based on the SIMP and other interpolation methods had a tendency to contain significant amounts of intermediate material, making them unphysical. Therefore, it was deemed necessary to implement an interpolation scheme that has a physical meaning for intermediate density variables. To do this, a simple analytical homogenisation was chosen.
Homogenisation is a method that computes effective macroscopic material properties of a microstructure consisting of a locally, periodically repeating pattern of a base cell; see Figure 3.
A microstructural design variable is then connected to the macroscopic effective properties to allow for optimisation. The chosen microstructure is a square base cell with a square of PCM in the centre with a frame of HCM around it. The macroscopic design variable is defined as the relative material density of HCM, ρ = Ω H C M Ω H C M Ω P C M , which in turn is coupled to the microscopic design variable, defined as the width of the HCM frame dictated by the volume of HCM. This definition is further described in Appendix A, where the simple analytical homogenisation is derived and verified with acceptable accuracy.
The thermal conductivity k T is computed as the total thermal conductivity based on an one-dimensional steady-state heat conduction analysis of the base cell:
k T ( ρ ) = 1 1 1 ρ k T H C M + 1 ρ ( 1 1 ρ ) k T H C M + ( 1 ρ ) k T P C M
The volumetric heat capacity, defined as the mass density multiplied by the specific heat capacity, ρ m c p , is computed as a volumetric average:
ρ m c p ( ρ ) = ( ρ ) ρ m H C M c p H C M + ( 1 ρ ) ρ m P C M c p P C M

2.3. Latent Heat of Fusion

To model the latent heat of fusion, the apparent heat capacity method is used. The method introduces a temperature-dependent apparent heat capacity, c p P C M c p P C M T ( n ) , where the value of the heat capacity is increased in the phase change temperature range to incorporate the latent heat of fusion into the thermal storage term. Assuming the change in heat capacity between the liquid and solid state of the PCM is negligible, c p P C M T ( n ) can be modelled as the following piece-wise function:
c p P C M ( T ( n ) ) = c p P C M if T ( n ) < T m e l t Δ T m e l t 2 c p P C M + L h e a t Δ T m e l t if T m e l t Δ T m e l t 2 T ( n ) T m e l t + Δ T m e l t 2 c p P C M if T ( n ) < T m e l t + Δ T m e l t 2
where T m e l t is the melting temperature; Δ T m e l t is the phase change temperature range; and L h e a t is the latent heat of fusion. Deriving the sensitivities in later steps requires a continuous function; therefore, the piece-wise function is approximated with smooth Heaviside step functions:
c p P C M ( T ( n ) ) = c p P C M + L h e a t Δ T m e l t 1 1 + e 2 k H T ( n ) Δ T m e l t 2 1 1 + e 2 k H T ( n ) + Δ T m e l t 2
where k H is a factor that corresponds to the sharpness of the transition.
For clarity of what the Heaviside function does, the temperature-dependent apparent heat capacity, c p P C M ( T ( n ) ) is plotted using the piece-wise function and the smooth Heaviside step function; see Figure 4.

2.4. Boundary Conditions

The fluxes used to model the heat source and cooling are modelled as Neumann boundary conditions. For the heat source, a uniformly distributed time-dependent heat rate is used to simulate the transient thermal loading from the electrical component:
k T T n Ω H S = q H S ( t ) = P e l e c A ( 1 + s i n ( 2 π ω t ) )
where k T T n Ω H S is the heat flux normal to the boundary Ω H S ; P e l e c is the average heat transfer rate produced by the electronic component; A is the area of the electronic component; ω is the oscillation frequency of the heat rate produced by the electronic component.
The cooling is modelled as a convection cooling rate using Newton’s law of cooling:
k T T n Ω C = q C ( T s ) = h c o n v ( T s T )
where k T T n Ω C is the heat flux normal to the boundary Ω C ; h c o n v is the convection heat transfer coefficient; T s is the surface temperature; and T is the temperature of the surroundings. Note that the term for the heat source is negative, while the term for the cooling is positive. This is due to the fact that FEniCS considers the normal to be positive in the direction away from the body.

2.5. Weak Form and Approximations

Inserting Equations (3), (4) and (6)–(8) into (2) results in the following weak form, which can be used to model the physics behind the PCM heat sink:
R = Ω ρ m c p ( ρ , T ( n ) ) v T ( n ) T ( n 1 ) Δ t d A + Ω k T ( ρ ) v x i T ( n ) x i d A Ω H S v q H S ( t ) d s + Ω C v h c o n v ( T ( n ) T ) d s = 0
This weak form is a non-linear function due to the implementation of the latent heat of fusion, where the heat capacity is dependent on the current temperature T ( n ) , which means it requires a non-linear solver to solve the model. A non-linear solver takes extra iterative solver steps to deal with the non-linearity, which increases the computational cost and time of solving the model.
To keep the computational time as short as possible, the non-linear model is approximated by a time-lagging model by making the ρ m c p dependent on the temperature from the previous time step T ( n 1 ) rather than the current time step T ( n ) . This removes the need for the extra iterative solver steps from the non-linear solver at the cost of introducing an error into the model. The final weak form used to model the PCM heat sink in this paper thereby becomes
R = Ω ρ m c p ( ρ , T ( n 1 ) ) v T ( n ) T ( n 1 ) Δ t d A + Ω k T ( ρ ) v x i T ( n ) x i d A Ω H S v q H S ( t ) d s + Ω C v h c o n v ( T ( n ) T ) d s = 0

3. Optimisation Problem

3.1. Topology Optimisation

TO aims to find the most optimal distribution of two materials to minimise a chosen objective functional. In density-based TO, the material distribution is described with a spatially varying material density variable field, ρ . To avoid simple solutions and keep different cases comparable, a volume constraint is added to the optimisation problem, restricting the use of HCM. A constraint on the HCM is used for the simple fact that it is the best material from a heat transfer performance point of view. This is also common in the literature and, thus, this is a sensible option. The optimisation problem used in this paper can be seen in the following equation:
min ρ f 0 ( T ( ρ ) , ρ ) s . t . h 0 ( ρ ) = Ω ρ ( x i ) d A Ω Φ d A 1 0 0 ρ ( x i ) 1
where f 0 is the objective functional; ρ is the continuous material density variable field; T ( ρ ) is the temperature field that satisfies the physical model; h 0 ( ρ ) is the volume constraint; Ω is the continuous design domain; and Φ is the maximum allowable volume fraction of HCM.

3.2. Objective Functional

The objective of the optimisation is to minimise the amplitude of the temperature oscillation at the electronic component that is introduced by the cyclic transient heat rate from the electronic component. This is quantified with the ϕ , which is the temporal average variance of the spatial average temperature at Ω H S , as this is where the PCM heat sink is connected to the electronic component (henceforth referred to as “the variance”). In order for the TO to reduce the amplitude of the temperature oscillation, the variance, ϕ , is chosen as the objective functional f 0 for the TO. Thereby, the objective function is defined as
f 0 = ϕ = 1 N t n = 1 N t T e l e c ( n ) T ¯ e l e c 2
where N t is the final number of time steps; n is the time step; T e l e c ( n ) is the spatial average temperature over the heat source boundary, Ω H S , at each time step (henceforth referred to as “the temperature at the heat source”); and T ¯ e l e c is the temporal mean of T e l e c ( n ) . The temperature at the heat source T e l e c ( n ) is defined as
T e l e c ( n ) = Ω H S L z T ( n ) d s Ω H S L z d s
where L z is the out-of-plane length of the heat sink; and T ( n ) is the temperature field at time step n. The temporal mean of T e l e c ( n ) is computed with
T ¯ e l e c = 1 N t n = 1 N t T e l e c ( n )
The chosen objective function exclusively focuses on minimising the temperature variation over time. However, in practical electronics thermal management, the maximum temperature level is an important metric and is usually constrained from above. This is not included in the present work, but a constraint on the maximum heat source temperature could be added to Equation (11) for practical use cases.

3.3. Filtering

A direct implementation of the density-based TO method to a heat transfer problem can result in designs that are mesh-dependent and may contain unphysical chequerboard patterns [35]. To alleviate these problems, different filtering strategies have been proposed [36]. For this paper, a filtering method based on a partial differential equation (PDE) [37] is used, as it takes advantage of the ease of implementing and solving PDEs in FEniCS. The filtered density field ρ ˜ is found by solving the following PDE [37]:
r 2 2 ρ ˜ x i x i + ρ ˜ = ρ
where r is a filter parameter linked to the amount of smoothing applied by the filter. The PDE is combined with a homogeneous Neumann boundary condition, to ensure that volume is conserved throughout the filtering process. For the optimisation, the filtered density variable ρ ˜ is used as the design input for the physical model of the PCM heat sink.

3.4. The Adjoint Method

In order to perform gradient-based TO, the sensitivities of the constraint and objective functionals with respect to the material density variable field, ρ , have to be computed. As the TO is characterised by having a large number of design variables and a small number of constraints, the adjoint method is particularly efficient for computing the sensitivities, as it only requires one additional problem per functional to compute it.
In short, the adjoint method computes the sensitivities using the following Equation:
d f j d ρ = f j ρ λ T R ρ
where f j are functionals of interest; ρ is a vector containing the density variables; R is a vector containing the residuals; and λ is a vector containing the adjoint variables. The adjoint variables are computed by solving the adjoint system of Equations:
R u T λ = f j u T
where u is a vector containing the state variables.
For time-dependent systems, the adjoint system also becomes time-dependent and, thus, another full time series solution must be solved. Furthermore, the full time history of the state variables and the system Jacobian must be saved (or recomputed) for the adjoint system. Although this is “just” a doubling of the computational cost, this is much more significant for time-dependent problems, since their computational cost is so high already from the time stepping procedure. For further details on adjoint sensitivity analysis of time-dependent systems, please see the literature on the subject [38,39]. To circumvent the cumbersome work of deriving and implementing the full time-dependent adjoint system, the automatic adjoint capabilities of the dolfin-adjoint module [40] are used in combination with FEniCS.

4. Implementation

4.1. Packages

In order to implement the methods described in the previous section, a Python code was created, for which a minimal working example is available on GitHub—see the “Data Availability Statement” at the end of the paper. Python (version 3.10) was chosen due to its open source nature and vast number of modules that can automate many of the computational steps required for TO. For this paper, the FEniCS (legacy FEniCS version 2019.1.0) module is used for solving the physical model, and the dolfin-adjoint (dolfin-adjoint version 2019.1) module is used to compute the adjoint sensitivities. The optimisation problem is solved using the Globally Convergent Method of Moving Asymptotes (GCMMA) [41] and was implemented into the Python code through the code provided by Deetman [42].

4.2. The Code

In order to perform TO, the process is broken down into the following computational steps:
  • Defining the initial design as a uniform distribution of material.
  • Solve the physical problem with FEniCS.
  • Compute the objective and constraint sensitivities using the adjoint method.
  • Update the design using GCMMA.
  • Check for convergence. If the convergence criteria are not satisfied, update the geometry and go back to step 2; otherwise, stop the optimisation loop.
  • Save the final optimised design.
First, the physical model is defined. The material properties, model parameters, geometry, discretisation schemes, and boundary conditions are defined using FEniCS. The geometry is meshed with a mapped mesh using triangular elements in a cross pattern; see Figure 5. The mesh uses triangular elements as these are the only ones compatible with the FEniCS version used for this paper. The temperature fields, T ( n ) and T ( n 1 ) are approximated with continuous first-order elements, while the material density variable field, ρ , is approximated using piece-wise constant discontinuous elements.
The solver for the physical problem is set up as a custom function, forward(), that takes in the filtered material design variable field, ρ ˜ , as an input. In order to solve the physical model, an iterative time loop is set up, solving the physical model for each time step until the final time step is reached, n = N t . The temperature at the heat source T e l e c ( n ) is stored for each time step and used to compute the variance ϕ .
The computation of the sensitivities is automated with dolfin-adjoint. For this, the objective and constraint functionals have to be defined in a ReducedFunctional class, which stores all the operations performed with FEniCS and defines the control parameter. With this, the dependencies are stored, and both the functionals and the sensitivities of the functionals can be computed based on the current material design variable field, ρ .
In order to update the design, GCMMA requires the current material design variable field, ρ , and the resulting objective and constraint functionals, together with the sensitivities of the functionals, which pair up nicely with the capabilities of the ReducedFunctional class from dolfin-adjoint. The GCMMA is set to run a maximum of two inner iterations to keep the computational time to a reasonable level, since transient simulations are very costly. To check whether the optimisation has converged, the code uses the change in the objective functional, f 0 , and the measure of non-discreteness, M n d (described in detail in Section 5.4.1), over the optimisation iteration. The optimisation is considered converged if the absolute changes in both f 0 and M n d are below 10 3 for three consecutive optimisation iterations. If the convergence criterion is not met, the optimisation is allowed to run a maximum of 300 optimisation iterations.
The TO is set up as a custom function, optimisation(), which takes in the initial material density variable field, ρ , the initial filtered material density variable field ρ ˜ , Reduced functionals of the objective and constraint functionals, lists of historical values for convergence plots, and the α value. The operations of optimisation() are enveloped in with a “with pyadjoint.stop_annotating() as _:” command which stops the dolfin-adjoint from storing the operations, which can otherwise lead to a large memory consumption. A minimal working example of the code is available on GitHub—see the “Data Availability Statement” at the end of this paper.
Verification of the implementation is presented in Appendix B.

4.3. Data

This section presents the data used for the production of the results, unless stated otherwise. The dimensions used for the model are presented in Table 1, the material properties are presented in Table 2, and the model parameters are presented in Table 3.
The material properties are chosen arbitrarily but represent physically relevant contrasts in material properties. The ratio in thermal conductivity is 1000:1, which is common for metals as the HCM. The contrast in effective heat capacity between solid/fluid and melting PCM can be computed based on Equation (5) from the latent heat of fusion. For the values in Table 2, the effective heat capacity is 21 during melting/solidification, which yields a contrast of 21:1. There are many commercially available PCMs on the market, with a wide range of properties [43,44], and our values lie within that range.

5. Results

This section presents and discusses the results obtained from running the TO under different conditions. All designs are visualised with grey-scale plots of the filtered material density variable field, ρ ˜ , where white indicates the PCM, black indicates the HCM, and grey indicates a mix of the two materials. The colourbar for all the designs can be seen in Figure 6.
To test the effect of including phase change, three different cases are considered for the TO. The three cases considered are Case 1—Without phase change and with c p P C M = 1 ; Case 2—Without phase change and with c p P C M = 21 ; and Case 3—With phase change and with c p P C M = 1 . Note that the two materials are still referred to as HCM and PCM, even though no phase change occurs to keep the descriptions consistent. The phase change is designed so that the effective heat capacity of the PCM is equal to the high c p P C M when phase change is occurring and low c p P C M otherwise. The c p P C M used for the cases are shown in Figure 7. These cases are chosen to see how effectively the TO can make use of the phase-change process itself and to determine what favourable design features can be attributed to the inclusion of phase change and what is due to the increase in thermal storage.

5.1. Considering the Full Time History

The results presented in this section are based on a 20 s simulation of the PCM heat sink, and ϕ is computed using all time steps. The TO takes 39 h for Case 1, 37 h for Case 2, and 37 h for Case 3 to produce the optimised results on a single core of an Intel Xeon Gold 6130 @ 2.776 GHz. For the TO of all cases, it is found that ϕ decreases as the number of optimisation iterations increases, and all cases reach the defined convergence criteria. The resulting optimised designs and their performances compared to the initial design are presented in Figure 8. The initial design consists of a uniform distribution of material, equivalent to a foam consisting of 30% HCM and 70% PCM.
It can be seen that the optimised design for Case 1 consists of two major narrowing fins of HCM reaching from the heat source to the cooling side, with smaller branches reaching into the PCM. The major fins are not connected directly to the cooling side, but are separated by smaller sections of intermediate material located at the ends of the major fins. The optimised designs for Case 2 and Case 3 consist of shorter fins close to the heat source reaching towards the cooling side, followed by a section of intermediate material, and then an expanding structure connecting the section of intermediate material to the cooling side. The designs generally have fewer fins reaching into the PCM than when compared to the design based on Case 1. The optimised design for Case 3 has more PCM layered in-between the HCM when compared to the optimised design for Case 2.
From the plots of T e l e c over time in Figure 8, it can be seen that all optimised designs result in a reduced amplitude in the temperature oscillation. For Case 2 and Case 3, the optimised designs also reduce the time until a quasi-steady-state is reached. This makes sense as both the amplitude and the initial transient have an effect on the variance ϕ , as the TO considers the entire 20 s simulated as input.
It can also be seen that all three optimised designs improved the performance of the heat sink by reducing the variance, ϕ . Comparing the ϕ values to those of the initial design, the optimised design based on Case 1 shows a 50% reduction, the optimised design based on Case 2 shows a 52% reduction, and the optimised design based on Case 3 shows a 41% reduction. Overall, Case 3 has the best performance of the three cases, which is because all of the PCM phases have a large heat capacity for all temperatures.The plots of the accumulated ϕ over time in Figure 8, show that the improvements in ϕ occur at different points of the time history. It can be seen that the optimised design based on Case 1 reduces ϕ gradually over time, while the designs based on Case 2 and Case 3 reduce the variance ϕ drastically in the first 5 s of the simulated time, after which it is further reduced gradually over time. This further supports that reducing the time until quasi-steady-state is reached has an effect on the performance for Case 2 and Case 3.
To verify the optimised designs from the TO, a cross-check is performed, where the variance ϕ of the designs based on the three cases is tested. If the TO is set up correctly, the designs should perform best in the cases they were optimised for and worse in other cases, compared to the designs that were optimised for that case. The results from the cross-check are shown in Table 4.
It can be seen that the majority of the optimised designs perform best in the cases they were optimised for, indicating that the TO is generally effective at optimising the design in most cases. However, when testing at Case 3, the optimised design for Case 2 performs ever so slightly better than the optimised design for Case 3. This is likely a result of the complicated objective functional or the severe non-linearity introduced with the apparent heat capacity method, which makes it difficult for the TO to optimise the designs without becoming stuck in a local minimum.

Thermal Energy and Heat Flux Fields

To further understand the optimised designs, the time history of the thermal energy field and heat flux in the y-direction are investigated. The thermal energy field is defined as
E t e r m ( n ) = ρ m c p ( ρ ˜ ) T ( n ) + ( 1 ρ ˜ ) L h e a t f m e l t ( n )
where f m e l t ( n ) is the melt fraction. The melt fraction is a piece-wise function that varies linearly from zero, when no material has changed phase, to one, when all material has changed phase, over the phase change temperature range Δ T m e l t . For this paper it is approximated with smooth Heaviside step functions:
f m e l t ( n ) = T ( n ) T m e l t Δ T m e l t 2 Δ T m e l t 1 1 + e 2 k H T ( n ) Δ T m e l t 2 T ( n ) T m e l t + Δ T m e l t 2 Δ T m e l t 1 1 + e 2 k H T ( n ) + Δ T m e l t 2
The results of all the simulations are presented as animated GIFs in the Supplementary Materials. In order to illustrate the transient process in this paper, plots of the thermal energy field and heat flux are presented at t = 19.24 s, t = 19.48 s, and t = 19.76 s. The chosen times correspond to the time steps closest to the highest, medium, and lowest values of the oscillating heat input rate q H S ( t ) for the last oscillation period simulated.
First, the fields for the initial design are investigated. The overall characteristics of the physics are very similar for all three cases, so only Case 1 is shown in Figure 9. It can be seen that both the thermal energy and the heat flux in the y-direction are smooth. The stored thermal energy is highest when q H S ( t ) is at its medium level and most of the stored energy is located close to the heat source. The thermal energy is relatively low when q H S ( t ) is at its lowest level. From the flux in the y-direction, it can be seen that the heat is transferred from the heat source to the cooling side when q H S ( t ) is at its high and medium levels. When q H S ( t ) is at its lowest level, only very limited heat transfer occurs. This indicates that the initial design of the heat sink transports most of the thermal energy from the heat source to the cooling side, which leads to the large variance seen in Figure 8.
For the optimised design based on Case 1, the thermal energy and the heat flux in the y-direction can be seen in Figure 10. It can be seen that most of the thermal energy is stored in the PCM in the bottom half of the PCM heat sink when q H S ( t ) is at its high and medium levels. When q H S ( t ) is at its low level, there is a lot less thermal energy in the heat sink. It can be seen that the thermal energy is led out into all the corners of the heat sink, resulting in a fairly even energy distribution, which is probably a result of the PCM and HCM having the same heat capacity. By looking at the heat flux in the y-direction, the heat transfer into the PCM in the corners of the heat sink can be observed in the high positive heat flux in the smaller fins reaching into the PCM when q H S ( t ) is at its high and medium levels. When q H S ( t ) is at its low level, a negative heat flux can be seen in the smaller fins, indicating that the thermal energy is drawn out of the PCM.
For the optimised design based on Case 2, the thermal energy and the heat flux in the y-direction can be seen in Figure 11. The design looks very different from the design based on Case 1. From the thermal energy, it can be seen that energy is stored very locally in the PCM closest to the heat source when q H S ( t ) is at its high and medium levels and is expended when q H S ( t ) is at its low level. The design seems to isolate the main bulk of the PCM at the sides behind a thin region of intermediate material, resulting in a relatively low amount of energy being stored in it throughout the presented time frames. The section with intermediate material also seems to limit heat transfer away from the lower half of the PCM heat sink, as the thermal energy in the upper half of the heat sink is a lot lower than that in the area close to the heat sink. Looking at the heat flux in the y-direction, it can be seen that the highest heat flux, when q H S ( t ) is high, is located close to the heat source. When q H S ( t ) is medium and low, it is located just above the section with intermediate material. Furthermore, when q H S ( t ) is low, a negative heat flux can be seen close to the heat source, indicating heat transfer back to the heat source. It is the interpretation of the authors that the optimised design is aimed at reducing the transient time as much as possible. As the shorter fins close to the heat source are surrounded by the low thermally conductive PCM, the optimised design keeps the heat from being stored in the PCM further away, which reduces the thermal storage capacity available to the heat sink, leading to a shorter transient period.
For the optimised design based on Case 3, the thermal energy and the heat flux in the y-direction can be seen in Figure 12. In general, the thermal energy looks very similar to the Case 2. Thermal energy is stored very locally in the PCM closest to the heat source when q H S ( t ) is at its high and medium levels, and is expended when q H S ( t ) is low. Like the design for Case 2, this design also seems to isolate the main bulk of the PCM at the sides behind a thin region of intermediate material, resulting in a relatively low amount of energy being stored in the bulk. The section with intermediate material also seems to limit heat transfer away from the lower half of the PCM heat sink, as the thermal energy in the upper half of the heat sink is a lot lower than that in the area close to the heat sink. When looking at the heat flux in the y-direction, it can be seen that the flux is lot lower when q H S ( t ) is low, when compared to the Case 2 design, and that there is no negative heat flux close to the heat source.
In general, it can be seen that the TO is able to produce optimised designs that reduce the variance in T e l e c compared to the initial designs. It was found that apart from the amplitude of the temperature oscillation, the transient time until the quasi-steady-state is reached also has an effect on the variance, and that the optimised designs exploit this. Especially for the designs based on Case 2 and Case 3, we can see a reduction in contributions to ϕ in the first 5 s of the simulated time.
The investigation of thermal energy and heat flux in the y-direction shows that the optimised designs based on Case 1 tend to spread out the thermal energy into the PCM when the q H S ( t ) is at its high and medium levels, while the designs based on Case 2 and Case 3 keep the thermal energy very close to the heat source. For Case 2 and Case 3, the heat transfer to the cooling side is further restricted with a section consisting of intermediate material, which limits the heat flux in the y-direction.

5.2. Considering Only the Quasi-Steady-State

There are three ways the TO can reduce the variance ϕ : by reducing the amplitude in the temperature oscillation; by reducing the transient period to move the mean closer to the centre of the oscillation; or by reducing the mean, which also reduces the effect of the initial transient period. In terms of preventing thermal fatigue, the amplitude of the temperature oscillation is the most important factor. Therefore, the transient part is removed by only considering the physics once the quasi-steady-state is reached—a point which will depend on the current design. It would be a cumbersome exercise to derive and implement the adjoint problem by hand, since this introduces design-dependent simulation times and initial conditions for the integration. However, this process is fully automated with dolfin-adjoint, and thus relatively easy to implement. This is expected to result in optimised designs that are better at reducing the amplitude of the temperature oscillation compared to the optimised designs based on the entire 20 s temperature history.
For this TO, the simulation is run until the maximum relative change in the temperature oscillation period is below 1%. The T e l e c signal from the last period is then used to calculate the mean and variance. In order to make comparisons, the TO was performed on all the three cases. The TO takes 10 h for Case 1, 40 h for Case 2, and 34 h for Case 3 to produce the optimised results on one core of Intel Xeon Gold 6130 @ 2.776 GHz. This is a big reduction for Case 1, as the simulation reaches the quasi-steady state a lot earlier than 20 s, due to its low thermal storage. The computational times for Case 2 and Case 3 are more comparable to the 20 s simulations, as their simulations reach steady state around the 20 s mark.

5.2.1. Optimised Designs and Performance

The resulting optimised designs and their performances compared to the initial design and 20 s designs are presented in Figure 13. The temperature at the heat source, T e l e c , is plotted for the last two periods after the quasi-steady state is reached. The variance, ϕ , is computed based on the last period for all cases, in order to make the results comparable. It can be seen that the optimised design based on Case 1 and its T e l e c over time look very similar to those based on the 20 s simulation, which makes sense as Case 1 only has a short transient period. The optimised designs based on Case 2 and Case 3, however, differ significantly from the 20 s designs. The design based on Case 2 consists of one major fin and two less prominent fins of intermediate material connecting the heat source to the cooling side, shorter fins that reach from the heat source to the PCM in the lower half of the heat sink, and intermediate material that is located close to the heat source. The optimised design based on Case 3 consists of three major fin structures reaching from the heat source towards the side with cooling, smaller fins reaching from the heat source into the PCM in the lower half of the heat sink, and intermediate material at the ends of the fins, leaving more PCM close to the heat source when compared to the Case 2 design.
The optimised designs based on Case 2 and 3 show a reduction in the amplitude of the oscillation of T e l e c and an increase in the average T e l e c when compared to the 20 s designs. Comparing the variance, ϕ , to the 20 s designs, the optimised design based on Case 2 shows a 78% reduction and the optimised design based on Case 3 shows a 32% reduction. This is expected, as the TO can only reduce the ϕ by reducing the amplitude of the oscillation of T e l e c when considering the quasi-steady-state.
It can be seen that when considering only the quasi-steady-state, the temperature variance, ϕ , is lower in Case 2 than Case 3. This is contrary to what was found when looking at the 20 s designs, but makes sense from a physics perspective. When reducing the transient part has a big impact on the variance, then Case 3 must be better, as it has a lower thermal storage capacity and can therefore reach the quasi-steady-state earlier. Meanwhile, in this case, where the transient part is neglected, the higher thermal storage capacity of Case 2 allows it to store more heat to smoothen out the temperature oscillations.
To verify the optimised designs from the TO, a cross-check is performed, where the variance ϕ of the designs based on the three cases is tested. The result from the cross-check are shown in Table 5.
It can be seen that all the optimised designs are performing best in the cases they were optimised for, indicating that the TO is effective at optimising the design for this problem. However, it can be seen that Case 2 has a very similar performance to Case 3 when tested on Case 2.As it is Case 2 that is close to performing worse than the other designs in this case, it is postulated that the complicated objective function has a larger effect on the TO reaching a local minimum than the non-linearity on the apparent heat capacity method.

5.2.2. Thermal Energy and Heat Flux Fields

The optimised designs are further investigated by looking at the thermal energy and flux in the y-direction. The results of this investigation are shown in Figure 14, Figure 15 and Figure 16.
For the optimised design based on Case 1, the thermal energy and the heat flux in the y-direction can be seen in Figure 14. It can be seen that the thermal energy and the heat flux in the y-direction are very similar to what was seen in Figure 10 for the 20 s design. This makes sense as the designs are very similar.
For the optimised design based on Case 2, the thermal energy and the heat flux in the y-direction can be seen in Figure 15. Looking at the thermal energy, it can be seen that the thermal energy is stored in much more evenly in the PCM when compared to the 20 s design. Most of the thermal energy is stored in the PCM in the sides. The differences in the thermal energy over the presented time steps are fairly small compared to the general level of thermal energy in the heat sink, making the hard to detect in the presented times frames. However, a higher thermal energy can be seen in the PCM just outside the intermediate material close to the heat sink when q H S ( t ) is at its medium level and low level than when q H S ( t ) is at its high level. The small change in thermal energy indicates a smaller temperature oscillation, and the reason for seeing the high thermal energy when q H S ( t ) is at its medium and low levels can be explained by the slow thermal response due to the high thermal storage and low heat conductivity in the intermediate material around the heat source. From the flux in the y-direction, it can be seen that the flux in the upper half of the heat sink stays approximately the same over time, indicating that the heat transferred when q H S ( t ) is low must come from stored energy in the bottom half of the PCM heat sink.
For the optimised design based on Case 3, the thermal energy and the heat flux in the y-direction can be seen in Figure 16. Looking at the thermal energy, it can be seen that the thermal energy is stored much more evenly in the PCM when compared to the 20 s design. The majority of the stored thermal energy is located in the PCM at the sides and between the major fins close to the heat source. The fact that the PCM is placed closer to the heat source than in the Case 2 design makes sense, as the PCM needs to enter the phase change temperature range before it obtains its increased thermal storage—whereas for Case 2, the full thermal storage potential is achieved at any temperature. From the flux in the y-direction, it can be seen that the flux in the upper half of the heat sink stays approximately the same over time, again indicating that the heat transferred when q H S ( t ) is low must come from stored energy in the bottom half of the PCM heat sink.
From the investigation of the optimised designs based on the quasi-steady-state, it is found that the amplitude of the temperature oscillation can be better reduced by only considering the quasi-steady-state as input to TO. This has the greatest impact on designs based on Case 2 and Case 3, which utilise a lot more of the PCM for storing thermal energy compared to the 20 s designs, resulting in a more even distribution of thermal energy and a lower final variance, ϕ . It is found that reaching the quasi-steady-state is computationally faster for Case 1 and Case 3, but took longer time for Case 2, when comparing the computation times from the TO of the 20 s designs.

5.3. Varying Time Step Sizes

Reaching the quasi-steady-state can take a very long simulation time, especially if the thermal storage is high, which increases the computational time. Therefore, the possibility of using varying time step sizes is investigated.
For this investigation, the simulation initially uses large time steps, scaled by the thermal diffusivity of the PCM, until the heat transfer rate over the cooling side has surpassed 95% of the average heat transfer from the heat source. At that point, the time step is reduced to the time steps size used in the other simulations and the simulation is run until the maximum relative change in the temperature oscillation period is below 1%. The initial large time step size is computed by the following expression:
Δ t l a r g e = L y 2 ρ P C M c p P C M k T P C M
which characterises the diffusion time scale. As for the previous quasi-steady-state designs, T e l e c from the last period is then used to calculate the variance, ϕ . In order to make comparisons, the TO is performed on the same three cases from earlier sections. The TO using the varying time step size takes 6 h for Case 1, 10 h for Case 2, and 13 h for Case 3 to produce the optimised results on a single core of an Intel Xeon Gold 6130 @ 2.776 GHz. This is equivalent to a 40% to 75% reduction in computational time compared to using a constant time step size. However, this speed-up comes at the cost of accuracy, as will be seen below.
Figure 17 shows the resulting optimised designs and their performances, compared to the optimised designs based on the quasi-steady-state from Section 5.2, which use a constant time step size. It can be seen that the topologies of the optimised designs are somewhat similar to their constant time step counterparts. However, there are significant differences in the amount of fins, placement of major fins, and the amount of intermediate material. Especially for the non-linear PCM case (Case 3), the degree of greyscale is significant for the constant time step case, whereas the adaptive time step case is significantly more discrete.
From the temperature signal over time, it can be seen that for Case 1 and Case 2 there is a good agreement in T e l e c between the two methods for time stepping. However, for Case 3 there is a rather large difference, where the design based on varying time step sizes results in a higher average and a larger amplitude of the oscillation. This indicates that the more discrete design is actually a poorer-performing local minimum. This discrepancy is probably caused by the initial large time step size introducing a substantial error due to ignoring the full non-linearity introduced into the model with the apparent heat capacity method, as described in Section 2.5. This size of the discrepancy could be reduced by decreasing the large time step size, but this increases the computational time again and makes the varying time step size approach less effective. Overall, the simple adaptive scheme introduced herein cannot be recommended for the non-linear problem with PCM. More theoretically rigorous adaptivity should be considered in the future.

5.4. Effect of Forcing Discrete Designs

Thus far, a composite material has been considered, where intermediate material density variables represent a porous HCM skeleton embedded with PCM. This causes the manufacturing to be more expensive, as it requires precise control of the density of an HCM foam to create such a composite material. Therefore, the effects of forcing discrete designs were investigated to see whether creating a more manufacturable design would be possible, without losing too much performance.

5.4.1. Explicit Penalisation

As briefly discussed in Section 2.2, classical material penalisation approaches, such as SIMP, cannot be applied successfully to the presented design problem. Thus, to push the optimised designs towards being discrete, the objective functional was modified using the following explicit penalty on the design variables:
f 0 = ϕ + α Ω ρ ( 1 ρ ) d A
where α is the explicit penalisation factor, used to control the level of explicit penalisation. The integral Ω ρ ( 1 ρ ) d A has a minimum when ρ is equal to zero or one, whereby the non-discrete designs are penalised. It should be noted that the explicit penalty is applied on the mathematical design field, ρ , not the physical density field, ρ ˜ . This approach is prone to converge to poor local minima if the α value is set to high. Therefore, a continuation approach is used, where the optimisation is allowed to converge before the explicit penalisation factor, α , is gradually increased.
The non-discreteness of a design is quantified with the measure of non-discreteness, M n d , defined by Sigmund [45] as the following functional:
M n d = 100 4 Ω ρ ( 1 ρ ) d A Ω 1 d A
This normalises the integral from (21) to be zero for an entirely discrete design and 100 for an entirely non-discrete design with ρ = 0.5 .

5.4.2. Optimised Designs and Performance

In order to investigate the effect of removing the intermediate material, explicit penalisation is added to optimised designs based on the quasi-steady-state for all three cases, presented in Section 5.2. All optimisations reach the defined convergence criteria.
The resulting optimised designs can be seen in Figure 18. In general, it can be seen that the optimised designs become more discrete and simpler as the explicit penalisation factor α is increased. From the optimised designs, it can be seen that the smaller fins reaching into the PCM disappear and the HCM is moved to the major fin structures as explicit penalisation is increased. This makes sense, as the filter, in combination with a high penalisation of intermediate material, effectively penalises the boundary between the PCM and the HCM. It is found that for higher explicit penalisation factors, α > 10 0 , further penalisation does not cause any major design changes. Essentially, the explicit penalisation has a two-fold contribution towards manufacturability. Firstly, it reduces the amount of intermediate composite material, and secondly, it reduces the complexity of the design.
To investigate the relation between the performance and explicit penalty, the variance, ϕ , was plotted against the measure of non-discreteness, M n d , for the three cases, with different levels of explicit penalisation. The results can be seen in Figure 19 and show that ϕ generally increases as M n d decreases towards the lower end. This is primarily because the complexity of the design is reduced significantly when the explicit penalty is high. It can be seen that the optimised designs can generally become more discrete without worsening the performance too much—and significantly so for Cases 2 and 3. By allowing a 10% increase in the variance, ϕ , from the optimised design without penalisation, the measure of non-discreteness, M n d , can be reduced to M n d = 22 with α = 10 1 for Case 1, M n d = 20 with α = 10 2 for Case 2, and M n d = 22 with α = 10 2 for Case 3.
To verify the optimised designs, a cross-check is performed, where the performance of the designs with varying explicit penalisation factors are tested. To attribute significance to design characteristics, the designs should perform best in the cases they were optimised for and worse in other cases, compared to the design that was optimised for that case. For the cross-check, α = [ 0 , 10 1 , 10 1 ] were considered.
Table 6 shows that the majority of the optimised designs perform best in the cases that they were optimised for, indicating that the TO is effectively optimising the design in most cases. However, the optimised designs for Case 2 when α = 10 1 and α = 10 1 are not the best performing designs when tested on Case 2. When α = 10 1 , the design optimised for Case 3 performs slightly better than that for Case 2, and when α = 10 1 , both the designs optimised for Case 1 and Case 3 perform significantly better than that for Case 2. This indicates that the explicit penalisation results in the optimised design based on Case 2 being stuck at a local minimum. A cause for this could be that the initial design based on Case 2 only contains one major fin instead of two major fins found in the optimised designs based on Case 1 and Case 3. As the explicit penalisation removes the smaller fins close to the heat source, the contact boundary between the HCM and PCM is reduced, resulting in a reduction in the thermal storage capacity. As the two major fin designs have a larger contact boundary between the HCM and the PCM than a single major fin, it makes sense that the optimised designs based on Case 1 and Case 3 perform better than the optimised design based on Case 2, as the penalisation is increased. This local minimum may be avoided by using another continuation strategy.

6. Discussion

From the presented results, it can clearly be seen that it is possible to generate designs that reduce the temperature oscillation by applying TO to the layout of the PCM and the HCM. The results show that a PCM heat sink has the best performance in Case 2, indicating that actual PCM with phase change is not as effective at storing heat as a material with a constant higher heat capacity. However, in practice, not many materials have a heat capacity to match the thermal storage capacity equivalent to a material in phase change. So, the quest for the most optimal layout of PCM is still relevant. Furthermore, the effects of natural convection in the melted PCM are neglected in this paper, which results in a lower effective heat transfer through the PCM compared to the real world. This could further affect the ranking of PCM versus solid material with high heat capacity.
The physical model and material properties used to model the heat sink in this paper are purely academic, and the designs produced are therefore not directly applicable to any real-world problems. The reason for this was to investigate the effect of certain parameters in a systematic way. For real-world application, the PCM will most likely have a smaller phase change temperature range compared to the general temperature ranges and have a significantly higher latent heat of fusion, making the problem even more non-linear. For a real-world problem, the transient model is therefore expected to require significantly smaller time steps or solve the full non-linear system every time step. Both will increase the computational time significantly.
The computational times reported in this paper are relatively high (up to 40 h) for the relatively small models with only 40,000 nodes. Moving forwards, this can be sped up by running the TO code in parallel, but the limited size of the spatial discretisation limits the scalability. Furthermore, since the physical model requires a transient solver to model the phase change, the time stepping part of the code will inherently be serial, and, thus, the speed up from parallel computing will be limited to the scalability of the solver for each time step. The approach of using varying time step size shows some promise in reducing the computational time, but also shows an increase in error for the case of the phase change. This error could probably be reduced with a more sophisticated method of adapting the time step size.

7. Conclusions

This paper presented a framework for topology optimisation of the layout of PCM and HCM in heat sinks to reduce temperature oscillations in electronic components under cyclic thermal loads. Leveraging the thermal-buffering effect of PCM, optimised layouts achieved a 41% reduction in temperature variance over the full transient history and 32% in the quasi-steady regime.
The Python implementation combined FEniCS for transient thermal analysis, dolfin-adjoint for automatic sensitivity computation, and an open-source GCMMA solver for optimisation. The physical model treated the PCM heat sink as a transient thermal diffusion problem, neglecting natural convection in the melted PCM. This is a significant simplification that introduces physical errors, but allows for efficient computations using a simplified model. Phase change was modelled using the apparent heat capacity method, and material interpolation employed an analytical homogenisation approach. The objective functional was defined as the temporal variance of the spatially averaged temperature at the electronic component.
Three cases were considered: Case 1 (no phase change, low c p P C M ), Case 2 (no phase change, high c p P C M ), and Case 3 (with phase change). Using the full 20 s time history, all optimised designs outperformed the initial layout. For Cases 2 and 3, improvements were achieved by reducing both oscillation amplitude and transient duration, making it difficult to isolate the effect of oscillation suppression alone. To address this, a second batch of optimisations focused on the quasi-steady-state cycle. Here, Case 2 showed a 78% reduction in variance, while Case 3 achieved 32%, confirming the importance of thermal storage capacity in minimising oscillations.
To reduce computational cost, a varying time-step approach was tested, cutting runtime by 40% for Case 2 and 75% for Case 3. However, this came at a significant expense of accuracy for Case 3. More advanced adaptive schemes could improve this trade-off in the future.
Finally, manufacturability was explored by introducing explicit penalisation to remove intermediate material. This produced near-discrete designs with only ∼10% performance loss, though smaller fin structures were eliminated as penalisation increased.
In summary, gradient-based topology optimisation can effectively tailor PCM-HCM layouts to mitigate temperature oscillations under cyclic loads. The greatest improvements were obtained when optimisation targeted the quasi-steady-state regime. The results highlight the critical role of thermal storage capacity and demonstrate practical strategies for balancing performance, manufacturability, and computational efficiency.
Future work should validate these findings experimentally, incorporate de-homogenised designs, and extend the framework to realistic material properties and boundary conditions for industrial applications.

Supplementary Materials

The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/computation14010023/s1, Figure S1: initialDesigns_energy, Figure S2: initialDesigns_fluxy, Figure S3: case1_20s_energy, Figure S4: case1_20s_fluxy, Figure S5: case2_20s_energy, Figure S6: case2_20s_fluxy, Figure S7: case3_20s_energy, Figure S8: case3_20s_fluxy, Figure S9: case1_qss_energy, Figure S10: case1_qss_fluxy, Figure S11: case2_qss_energy, Figure S12: case2_qss_fluxy, Figure S13: case3_qss_energy, Figure S14: case3_qss_fluxy.

Author Contributions

Conceptualisation, J.A.; methodology, M.B.M.C. and J.A.; software, M.B.M.C.; validation, M.B.M.C.; formal analysis, M.B.M.C. and J.A.; investigation, M.B.M.C. and J.A.; resources, J.A.; data curation, M.B.M.C.; writing—original draft preparation, M.B.M.C.; writing—review and editing, J.A. and M.B.M.C.; visualisation, M.B.M.C.; supervision, J.A.; project administration, J.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

A minimal working example is available on GitHub: https://github.com/sdu-multiphysics/heatSinkPCM/ (accessed on 13 December 2025).

Acknowledgments

Part of the computations were performed on the UCloud interactive HPC system, which is managed by the eScience Center at the University of Southern Denmark.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Simple Homogenisation-Based Parametrisation

Appendix A.1. Derivation of kT(ρ)

The base cell can be viewed as a composite wall with one-dimensional heat transfer, based on the assumption that dominant heat transfer is along the fin direction. While two-dimensional effects exist in practise, the approach is intended as a computationally efficient surrogate.
Assuming one-directional heat transfer, the thermal conductivity k T of the base cell can be derived as the total thermal resistance of the composite wall:
k T o t a l = L t o t a l R t o t a l A t o t a l
where k T o t a l is the total thermal conductivity through the composite wall; R t o t a l is the total thermal resistance; L t o t a l is the total length of the composite wall in the direction of the heat transfer; and A t o t a l is the total cross-sectional area of the wall.
In order to compute the total thermal resistance, the base cell is broken down into three distinct sections and their thermal resistances are computed; see Figure A1.
Figure A1. By assuming one-dimensional heat transfer, the base cell can be broken down into sections with their own thermal resistance. The red arrow shows the heat flux direction.
Figure A1. By assuming one-dimensional heat transfer, the base cell can be broken down into sections with their own thermal resistance. The red arrow shows the heat flux direction.
Computation 14 00023 g0a1
The thermal resistance depends on the material properties and dimensions of the section:
R = L k A
where L is the length in the direction of the heat transfer; k is the thermal conductivity; A is the cross-sectional area through which the heat transfer occurs. With this, the thermal resistances of the three sections are derived:
R 1 = a 2 k T H C M 1 t b c
R 2 = 1 a k T H C M ( a 2 ) t b c
R 3 = 1 k T P C M t b c
where t b c is the thickness of the base cell (out of plane dimension); and a is a parameter describing the amount of HCM.
The middle section of the composite wall consists of three sections in parallel; the equivalent resistance is expressed as
1 R m i d = 1 R 2 + 1 R 3 + 1 R 2
leading to:
R m i d = R 2 R 3 2 R 3 + R 2
Now the total thermal resistance can be considered as sections in series:
R t o t a l = R 1 + R m i d + R 1
The total thermal conductivity becomes
k T o t a l = 1 ( 2 R 1 + R m i d ) t b c
which can be reduced to the following term where k T o t a l is dependent on a:
k T o t a l ( a ) = 1 a k T H C M + 1 a a k T H C M + ( 1 a ) k T P C M
The relation between a and the ρ can be expressed by the following function:
ρ = 1 ( 1 a ) 2
from which it follows that
a = 1 1 ρ
Combining (A12) into (A10), k T can be expressed in terms of ρ :
k T ( ρ ) = 1 1 1 ρ k T H C M + 1 ρ ( 1 1 ρ ) k T H C M + ( 1 ρ ) k T P C M

Appendix A.2. Verification of Homogenisation

To verify the accuracy of the above simple homogenisation approach, a test problem is computed using both full-scale and homogenised models. The problem is a 1 × 1 square with a heat flux along the lower half of the left-hand side and a fixed zero temperature along the right half of the top side. The size of the PCM inclusion, a, is set in both to be constant value of 0.5, as well as linearly increasing from the outer edge to the middle. The simulations are carried out in COMSOL Multiphysics [46].
Figure A2 shows the temperature fields, as well as flux arrows and temperature contours, for the two different designs. It can clearly be seen that the overall distributions are very similar for the full-scale and homogenised models. The homogenised model does predict lower temperatures at the heat source, meaning that it over-predicts the heat transfer abilities of the composite microstructure. However, the contour lines are incredibly similar in shape, with small variations in the full scale solution due to fully resolving the discontinuous material properties. Lastly, the flux vectors are also very similar in an average sense, but the homogenised model obviously does not capture small-scale variations in direction due to the homogenisation model—completely as expected.
Figure A3 shows the volume-averaged relative error between the full-scale and homogenised models for an increasing number of unit cells for various sizes of the PCM inclusion. It can be seen that generally the error is below 14 % when 20 × 20 unit cells are used. This is an acceptable accuracy given the high degree of qualitative agreement in the fields, as shown in Figure A2. The values of the temperatures do not matter too much, as long as the correct distributions and tendencies are observed. For the varying field, shown in Figure A2c,d, the volumetric-averaged relative error is only 4.9 % . This lends credibility to the accuracy of the homogenised model even for varying fields, such as those resulting from TO.
Figure A2. Temperature fields using full-scale and homogenised analysis for a design field with both constant and varying sizes of PCM inclusion. Fluxes are illustrated using white arrows and contour lines are shown in green.
Figure A2. Temperature fields using full-scale and homogenised analysis for a design field with both constant and varying sizes of PCM inclusion. Fluxes are illustrated using white arrows and contour lines are shown in green.
Computation 14 00023 g0a2
Figure A3. Volume-averaged relative error between full-scale and homogenised models for an increasing number of unit cells for various sizes of PCM inclusion.
Figure A3. Volume-averaged relative error between full-scale and homogenised models for an increasing number of unit cells for various sizes of PCM inclusion.
Computation 14 00023 g0a3

Appendix B. Verification of Implementation

Appendix B.1. Comparison with COMSOL

To verify the implementation of the physical model in FEniCS, a 20 s simulation of a benchmark design was conducted and compared to results from the same model simulated with the commercial finite element programme COMSOL Multiphysics [46] using a non-linear solver. Figure A4 shows the design and results from the comparison. It was found that there is a good agreement between the results, with a maximum relative error of 1.451%, whereby the implementation of the physical model in FEniCS is considered verified.
Figure A4. Verification of the implementation of the physical problem with FEniCS by comparison with COMSOL Multiphysics. The results are based on a 4 × 100 × 100 mesh using a time step size of 0.02 s. Left: Design used as benchmark for the comparison. Middle: The temperature at the heat source, T e l e c , over time. Right: The relative error of the temperature at the heat source, T e l e c , over time.
Figure A4. Verification of the implementation of the physical problem with FEniCS by comparison with COMSOL Multiphysics. The results are based on a 4 × 100 × 100 mesh using a time step size of 0.02 s. Left: Design used as benchmark for the comparison. Middle: The temperature at the heat source, T e l e c , over time. Right: The relative error of the temperature at the heat source, T e l e c , over time.
Computation 14 00023 g0a4
The accuracy of the physical model largely depends on the choice of time step size, due to the highly non-linear smooth Heaviside step function used for the apparent heat capacity method and by the approximation of the non-linear physical model with a time-lagging one. However, the time step size also has a great impact on the computational time. Therefore, the effects of time step size on the error and computational time are investigated by comparing the results from FEniCS with varying time step sizes with the results from COMSOL using a much smaller time step size and a non-linear solver. For the FEniCS simulation, both the time-lagging and non-linear solver are also used to show the effects of using a time-lagging physical model. The result of this comparison is the maximum relative error in T e l e c plotted against the time step size and computational time; see Figure A5.
Figure A5. Investigation of maximum relative error in the temperature at the heat source T e l e c for different time step sizes when comparing FEniCS simulations with a COMSOL simulation using a non-linear solver. The results are based on a COMSOL simulation using a time step size of 2 × 10 3 . Left: The error plotted against time step size. Right: The error plotted against computational time. The computational time is based on the average simulation time when the physical model is run on i7-1165G7 @ 2.80 GHz with 4 GB.
Figure A5. Investigation of maximum relative error in the temperature at the heat source T e l e c for different time step sizes when comparing FEniCS simulations with a COMSOL simulation using a non-linear solver. The results are based on a COMSOL simulation using a time step size of 2 × 10 3 . Left: The error plotted against time step size. Right: The error plotted against computational time. The computational time is based on the average simulation time when the physical model is run on i7-1165G7 @ 2.80 GHz with 4 GB.
Computation 14 00023 g0a5
From Figure A5 it can be seen that the maximum relative error converges with a decrease in time step size, as there is a linear relationship between the time step size and maximum relative error in the log–log plot. It can be seen that the maximum relative error is similar when using a time-lagging and non-linear physical model when using the same time step size. Looking at the computational time for solving the physical model, the non-linear model is much more computationally expensive compared to the time-lagging model. In order to limit the computational time, a maximum relative error of 5% is deemed acceptable, whereby the time-lagging physical model with a time step size of 0.04 s is chosen for the simulation of the physical model when evaluating the designs for the TO.

Appendix B.2. Finite Difference Check

To verify the accuracy of the adjoint sensitivities, a finite difference check is performed using a central difference scheme. Figure A6 shows the relative error between the finite difference approximation and the adjoint sensitivity of the objective functional at element number 2400, f 0 ρ 2400 , at different perturbation sizes. From Figure A6, it can be seen that the convergence rate for ε 10 3 agrees with the expected convergence rate of a central difference scheme of O ( ε 2 ) [47]. For perturbation size ε < 10 3 , the rounding errors become significant, which increases the relative error. This relation between perturbation size and error is well known in finite difference approximations and is called “step-size dilemma” [47]. Conducting finite difference checks for additional element numbers showed that the tendencies seen in f 0 ρ 2400 are representative of all elements. As the convergence rate for ε 10 3 matches the expected convergence rate for the central difference scheme and the relative error is small, the implementation of the adjoint method is considered verified.
Figure A6. Finite difference check, showing the relative error between the adjoint sensitivity computed with dolfin-adjoint and central difference scheme at different perturbation sizes at different stages of the optimisation. The expected convergence rate of a central difference scheme O ( ε 2 ) is plotted for reference. The optimisation is based on a 4 × 40 × 40 mesh.
Figure A6. Finite difference check, showing the relative error between the adjoint sensitivity computed with dolfin-adjoint and central difference scheme at different perturbation sizes at different stages of the optimisation. The expected convergence rate of a central difference scheme O ( ε 2 ) is plotted for reference. The optimisation is based on a 4 × 40 × 40 mesh.
Computation 14 00023 g0a6

References

  1. Depiver, J.a.; Mallik, S.; Harmanto, D. Solder joint failures under thermo-mechanical loading conditions—A review. Adv. Mater. Process. Technol. 2021, 7, 1–26. [Google Scholar] [CrossRef]
  2. Sahoo, S.K.; Das, M.K.; Rath, P. Application of TCE-PCM based heat sinks for cooling of electronic components: A review. Renew. Sustain. Energy Rev. 2016, 59, 550–582. [Google Scholar] [CrossRef]
  3. Kalbasi, R.; Afrand, M.; Alsarraf, J.; Tran, M.D. Studies on optimum fins number in PCM-based heat sinks. Energy 2019, 171, 1088–1099. [Google Scholar] [CrossRef]
  4. Guibert, A.T.R.; Bookwala, M.; Kim, H.A. Level-set topology optimization of heat sinks with phase-change material. Int. J. Heat Mass Transf. 2024, 231, 125818. [Google Scholar] [CrossRef]
  5. Guibert, A.T.; Bookwala, M.; Kim, A.A. Design of Electric Aircraft Battery Packs Embedded With Phase-Change Material via Level-Set Topology Optimization. In Proceedings of the AIAA SCITECH 2025 Forum, Orlando, FL, USA, 6–10 January 2025. [Google Scholar] [CrossRef]
  6. Hosseinizadeh, S.; Tan, F.; Moosania, S. Experimental and numerical studies on performance of PCM-based heat sink with different configurations of internal fins. Appl. Therm. Eng. 2011, 31, 3827–3838. [Google Scholar] [CrossRef]
  7. Dbouk, T. A review about the engineering design of optimal heat transfer systems using topology optimization. Appl. Therm. Eng. 2017, 112, 841–854. [Google Scholar] [CrossRef]
  8. Alexandersen, J.; Andreasen, C.S. A Review of Topology Optimisation for Fluid-Based Problems. Fluids 2020, 5, 29. [Google Scholar] [CrossRef]
  9. Fawaz, A.; Hua, Y.; Le Corre, S.; Fan, Y.; Luo, L. Topology optimization of heat exchangers: A review. Energy 2022, 252, 124053. [Google Scholar] [CrossRef]
  10. Varanasi, S.; Ananthasuresh, G.K. Analysis and Topology Optimization of Heat Sinks with a Phase- Change Material on COMSOL MultiphysicsTM Platform. In Proceedings of the COMSOL Users Conference 2006, Bangalore, India, 7 November 2006. [Google Scholar]
  11. Ho, J.; See, Y.; Leong, K.; Wong, T. An experimental investigation of a PCM-based heat sink enhanced with a topology-optimized tree-like structure. Energy Convers. Manag. 2021, 245, 114608. [Google Scholar] [CrossRef]
  12. See, Y.; Ho, J.; Leong, K.; Wong, T. Experimental investigation of a topology-optimized phase change heat sink optimized for natural convection. Appl. Energy 2022, 314, 118984. [Google Scholar] [CrossRef]
  13. Iradukunda, A.C.; Vargas, A.; Huitink, D.; Lohan, D. Transient thermal performance using phase change material integrated topology optimized heat sinks. Appl. Therm. Eng. 2020, 179, 115723. [Google Scholar] [CrossRef]
  14. Bianco, N.; Fragnito, A.; Iasiello, M.; Mauro, G.M. Design of PCM-based heat sinks through topology optimization. J. Phys. Conf. Ser. 2023, 2509, 012001. [Google Scholar] [CrossRef]
  15. Christensen, M.B.M.; Alexandersen, J. Topology optimisation of heat sinks embedded with phase-change material for minimising temperature oscillations. HAL, 2023; p. hal-04185641. Available online: https://hal.science/hal-04185641v1/ (accessed on 13 December 2025).
  16. Christensen, M.B.M.; Alexandersen, J. Online Resource, heatSinkPCM Code at GitHub. 2023. Available online: https://github.com/sdu-multiphysics/heatSinkPCM/ (accessed on 12 January 2026).
  17. Pizzolato, A.; Sharma, A.; Maute, K.; Sciacovelli, A.; Verda, V. Topology optimization for heat transfer enhancement in Latent Heat Thermal Energy Storage. Int. J. Heat Mass Transf. 2017, 113, 875–888. [Google Scholar] [CrossRef]
  18. Pizzolato, A.; Sharma, A.; Maute, K.; Sciacovelli, A.; Verda, V. Design of effective fins for fast PCM melting and solidification in shell-and-tube latent heat thermal energy storage through topology optimization. Appl. Energy 2017, 208, 210–227. [Google Scholar] [CrossRef]
  19. Pizzolato, A.; Sharma, A.; Ge, R.; Maute, K.; Verda, V.; Sciacovelli, A. Maximization of performance in multi-tube latent heat storage—Optimization of fins topology, effect of materials selection and flow arrangements. Energy 2020, 203, 114797. [Google Scholar] [CrossRef]
  20. Zhao, M.; Tian, Y.; Hu, M.; Zhang, F.; Yang, M. Topology optimization of fins for energy storage tank with phase change material. Numer. Heat Transf. Part A Appl. 2020, 77, 284–301. [Google Scholar] [CrossRef]
  21. Yao, Q.; Zhao, C.; Zhao, Y.; Wang, H.; Li, W. Topology optimization for heat transfer enhancement in latent heat storage. Int. J. Therm. Sci. 2021, 159, 106578. [Google Scholar] [CrossRef]
  22. Tian, Y.; Liu, X.; Xu, Q.; Luo, Q.; Zheng, H.; Song, C.; Zhu, Z.; Gao, K.; Dang, C.; Wang, H.; et al. Bionic topology optimization of fins for rapid latent heat thermal energy storage. Appl. Therm. Eng. 2021, 194, 117104. [Google Scholar] [CrossRef]
  23. Laasri, I.A.; Elmaazouzi, Z.; Outzourhit, A.; Mghazli, M.O. Investigation of different topology-optimized fin structures in a cylindrical latent heat thermal energy storage unit. Therm. Sci. Eng. Prog. 2022, 33, 101372. [Google Scholar] [CrossRef]
  24. Peremans, B.; Blommaert, M.; Baelmans, M. Topology optimization of a rectangular phase change material module. J. Energy Storage 2023, 70, 107891. [Google Scholar] [CrossRef]
  25. Zhang, X.; Yang, X.; Zhang, Y.; Xu, J.; Guo, X. Phase change heat transfer enhancement based on topology optimization of fin structure. Int. J. Heat Mass Transf. 2023, 214, 124402. [Google Scholar] [CrossRef]
  26. Alnæs, M.; Blechta, J.; Hake, J.; Johansson, A.; Kehlet, B.; Logg, A.; Richardson, C.; Ring, J.; Rognes, M.E.; Wells, G.N. The FEniCS Project Version 1.5. Arch. Numer. Softw. 2015, 3, 9–23. [Google Scholar] [CrossRef]
  27. Logg, A.; Mardal, K.A.; Wells, G. (Eds.) Automated Solution of Differential Equations by the Finite Element Method: The FEniCS Book; Lecture Notes in Computational Science and Engineering; Springer: Berlin/Heidelberg, Germany, 2012; Volume 84. [Google Scholar] [CrossRef]
  28. Laurain, A. A level set-based structural optimization code using FEniCS. Struct. Multidiscip. Optim. 2018, 58, 1311–1334. [Google Scholar] [CrossRef]
  29. Qian, X. Undercut and overhang angle control in topology optimization: A density gradient based integral approach. Int. J. Numer. Methods Eng. 2017, 111, 247–272. [Google Scholar] [CrossRef]
  30. Mezzadri, F.; Bouriakov, V.; Qian, X. Topology optimization of self-supporting support structures for additive manufacturing. Addit. Manuf. 2018, 21, 666–682. [Google Scholar] [CrossRef]
  31. Yan, J.; Xiang, R.; Kamensky, D.; Tolley, M.T.; Hwang, J.T. Topology optimization with automated derivative computation for multidisciplinary design problems. Struct. Multidiscip. Optim. 2022, 65, 151. [Google Scholar] [CrossRef]
  32. Jauregui, C.M.; Hyun, J.; Neofytou, A.; Gray, J.S.; Kim, H.A. Avoiding reinventing the wheel: Reusable open-source topology optimization software. Struct. Multidiscip. Optim. 2023, 66, 145. [Google Scholar] [CrossRef]
  33. Jia, Y.; Wang, C.; Zhang, X.S. FEniTop: A simple FEniCSx implementation for 2D and 3D topology optimization supporting parallel computing. Struct. Multidiscip. Optim. 2024, 67, 140. [Google Scholar] [CrossRef]
  34. Jegadheeswaran, S.; Pohekar, S.D. Performance enhancement in latent heat thermal storage system: A review. Renew. Sustain. Energy Rev. 2009, 13, 2225–2244. [Google Scholar] [CrossRef]
  35. Sigmund, O.; Petersson, J. Numerical instabilities in topology optimization: A survey on procedures dealing with checkerboards, mesh-dependencies and local minima. Struct. Optim. 1998, 16, 68–75. [Google Scholar] [CrossRef]
  36. Lazarov, B.S.; Wang, F.; Sigmund, O. Length scale and manufacturability in density-based topology optimization. Arch. Appl. Mech. 2016, 86, 189–218. [Google Scholar] [CrossRef]
  37. Lazarov, B.S.; Sigmund, O. Filters in topology optimization based on Helmholtz-type differential equations. Int. J. Numer. Methods Eng. 2011, 86, 765–781. [Google Scholar] [CrossRef]
  38. Michaleris, P.; Tortorelli, D.A.; Vidal, C.A. Tangent operators and design sensitivity formulations for transient non-linear coupled problems with applications to elastoplasticity. Int. J. Numer. Methods Eng. 1994, 37, 2471–2499. [Google Scholar] [CrossRef]
  39. Choi, K.K.; Kim, N.H. Structural Sensitivity Analysis and Optimization 1; Mechanical Engineering Series; Springer: New York, NY, USA, 2005. [Google Scholar] [CrossRef]
  40. Mitusch, S.; Funke, S.; Dokken, J. dolfin-adjoint 2018.1: Automated adjoints for FEniCS and Firedrake. J. Open Source Softw. 2019, 4, 1292. [Google Scholar] [CrossRef]
  41. Svanberg, K. A Class of Globally Convergent Optimization Methods Based on Conservative Convex Separable Approximations. SIAM J. Optim. 2002, 12, 555–573. [Google Scholar] [CrossRef]
  42. Deetman, A. GCMMA-MMA-Python. 2020. Available online: https://github.com/arjendeetman/GCMMA-MMA-Python (accessed on 3 October 2022).
  43. Hirschey, J.; Gluesenkamp, K.R.; Mallow, A.; Graham, S. Review of Inorganic Salt Hydrates with Phase Change Temperature in Range of 5 °C to 60 °C and Material Cost Comparison with Common Waxes. In Proceedings of the 5th International High Performance Buildings Conference at Purdue, West Lafayette, IN, USA, 9–12 July 2018. [Google Scholar]
  44. Kraiem, M.; Karkri, M.; Fois, M.; Sobolciak, P. Thermophysical Characterization of Paraffins versus Temperature for Thermal Energy Storage. Buildings 2023, 13, 877. [Google Scholar] [CrossRef]
  45. Sigmund, O. Morphology-based black and white filters for topology optimization. Struct. Multidiscip. Optim. 2007, 33, 401–424. [Google Scholar] [CrossRef]
  46. COMSOL Multiphysics, Version 6. Software for Multiphysics Simulation. COMSOL AB: Stockholm, Sweden, 2023.
  47. Haftka, R.T.; Gürdal, Z. Elements of Structural Optimization, 3rd revised and expanded ed.; Number v. 11 in Solid Mechanics and Its Applications; Kluwer Academic Publishers: Dordrecht, The Netherlands; Boston, MA, USA, 1992. [Google Scholar]
Figure 1. Three-dimensional sketch of generic electronics cooling problem.
Figure 1. Three-dimensional sketch of generic electronics cooling problem.
Computation 14 00023 g001
Figure 2. Two-dimensional sketch of the simplified PCM heat sink used to define the design domain for the TO.
Figure 2. Two-dimensional sketch of the simplified PCM heat sink used to define the design domain for the TO.
Computation 14 00023 g002
Figure 3. Homogenisation is based on the assumption that intermediate material can be seen as a local, regular, periodical repetition of a base cell.
Figure 3. Homogenisation is based on the assumption that intermediate material can be seen as a local, regular, periodical repetition of a base cell.
Computation 14 00023 g003
Figure 4. The temperature-dependent apparent heat capacity, c p P C M ( T ( n ) ) plotted at different temperatures with the piece-wise function and the smooth Heaviside step function.
Figure 4. The temperature-dependent apparent heat capacity, c p P C M ( T ( n ) ) plotted at different temperatures with the piece-wise function and the smooth Heaviside step function.
Computation 14 00023 g004
Figure 5. Plot of the mapped mesh using triangular element used for this paper.
Figure 5. Plot of the mapped mesh using triangular element used for this paper.
Computation 14 00023 g005
Figure 6. Colourbar for all the designs presented in this paper.
Figure 6. Colourbar for all the designs presented in this paper.
Computation 14 00023 g006
Figure 7. Effect heat capacity for the three cases investigated: Case 1—No phase change with low c p P C M ; Case 2—No phase change with high c p P C M ; Case 3—With phase change.
Figure 7. Effect heat capacity for the three cases investigated: Case 1—No phase change with low c p P C M ; Case 2—No phase change with high c p P C M ; Case 3—With phase change.
Computation 14 00023 g007
Figure 8. Optimised designs, T e l e c over time and accumulated ϕ over time for the three cases. The T e l e c over time, and accumulated ϕ over time are plotted against the values from the initial design. Top: Optimised design based on Case 1, Middle: Optimised design based on Case 2, Bottom: Optimised design based on Case 3.
Figure 8. Optimised designs, T e l e c over time and accumulated ϕ over time for the three cases. The T e l e c over time, and accumulated ϕ over time are plotted against the values from the initial design. Top: Optimised design based on Case 1, Middle: Optimised design based on Case 2, Bottom: Optimised design based on Case 3.
Computation 14 00023 g008
Figure 9. The thermal energy field and heat flux in the y direction at t = 19.24 s, t = 19.48 s, and t = 19.76 s. Based on the initial design under the conditions of Case 1.
Figure 9. The thermal energy field and heat flux in the y direction at t = 19.24 s, t = 19.48 s, and t = 19.76 s. Based on the initial design under the conditions of Case 1.
Computation 14 00023 g009
Figure 10. The thermal energy field and heat flux in the y direction at high q H S ( t ) , medium q H S ( t ) , and low q H S ( t ) , for the optimised design based on Case 1.
Figure 10. The thermal energy field and heat flux in the y direction at high q H S ( t ) , medium q H S ( t ) , and low q H S ( t ) , for the optimised design based on Case 1.
Computation 14 00023 g010
Figure 11. The thermal energy field and heat flux in the y direction at high q H S ( t ) , medium q H S ( t ) , and low q H S ( t ) for the optimised design based on Case 2.
Figure 11. The thermal energy field and heat flux in the y direction at high q H S ( t ) , medium q H S ( t ) , and low q H S ( t ) for the optimised design based on Case 2.
Computation 14 00023 g011
Figure 12. The thermal energy field and heat flux in the y direction at high q H S ( t ) , medium q H S ( t ) , and low q H S ( t ) , for the optimised design based on Case 3.
Figure 12. The thermal energy field and heat flux in the y direction at high q H S ( t ) , medium q H S ( t ) , and low q H S ( t ) , for the optimised design based on Case 3.
Computation 14 00023 g012
Figure 13. Optimised designs based on the quasi-steady-state compared to the 20 s designs and the initial designs for the three cases. The ϕ values are computed using T e l e c from the last period only. The plots shows T e l e c over time at the last two periods of the simulated time for the three cases.
Figure 13. Optimised designs based on the quasi-steady-state compared to the 20 s designs and the initial designs for the three cases. The ϕ values are computed using T e l e c from the last period only. The plots shows T e l e c over time at the last two periods of the simulated time for the three cases.
Computation 14 00023 g013
Figure 14. The thermal energy field and heat flux in the y direction at high q H S ( t ) , medium q H S ( t ) , and low q H S ( t ) for the optimised design based on the quasi-steady-state under Case 1.
Figure 14. The thermal energy field and heat flux in the y direction at high q H S ( t ) , medium q H S ( t ) , and low q H S ( t ) for the optimised design based on the quasi-steady-state under Case 1.
Computation 14 00023 g014
Figure 15. The thermal energy field and heat flux in the y direction at high q H S ( t ) , average q H S ( t ) , and low q H S ( t ) for the optimised design based on the quasi-steady-state under Case 2.
Figure 15. The thermal energy field and heat flux in the y direction at high q H S ( t ) , average q H S ( t ) , and low q H S ( t ) for the optimised design based on the quasi-steady-state under Case 2.
Computation 14 00023 g015
Figure 16. The thermal energy field and heat flux in the y direction at high q H S ( t ) , average q H S ( t ) , and low q H S ( t ) for the optimised design based on the quasi-steady-state under Case 3.
Figure 16. The thermal energy field and heat flux in the y direction at high q H S ( t ) , average q H S ( t ) , and low q H S ( t ) for the optimised design based on the quasi-steady-state under Case 3.
Computation 14 00023 g016
Figure 17. Optimised designs based on the quasi-steady-state with adaptive time step sizes compared to optimised designs based on the quasi-steady-state with a constant time step size for the three cases. The plots shows T e l e c over time at the last two periods of the simulated time for the three cases.
Figure 17. Optimised designs based on the quasi-steady-state with adaptive time step sizes compared to optimised designs based on the quasi-steady-state with a constant time step size for the three cases. The plots shows T e l e c over time at the last two periods of the simulated time for the three cases.
Computation 14 00023 g017
Figure 18. Overview of optimised designs for t f i n = 20 s of three different cases with varying amount of explicit penalisation.
Figure 18. Overview of optimised designs for t f i n = 20 s of three different cases with varying amount of explicit penalisation.
Computation 14 00023 g018
Figure 19. Variance in T e l e c , ϕ , plotted against the measure of non-discreteness M n d for the three cases.
Figure 19. Variance in T e l e c , ϕ , plotted against the measure of non-discreteness M n d for the three cases.
Computation 14 00023 g019
Table 1. Geometry and discretisation.
Table 1. Geometry and discretisation.
DescriptionSymbolValueUnits
Domain size L x × L y × L z 1 × 1 × 1 m
Mesh size n e p s q × n x × n y 4 × 100 × 100 [-]
Final time t f i n 20 s
Number of time steps N t 500[-]
Time step size Δ t 0.04 s
Table 2. Material properties.
Table 2. Material properties.
DescriptionSymbolValueUnits
Thermal conductivity HCM k T H C M 10 W m · K  
Density HCM ρ m H C M 1 kg m 3  
Heat capacity HCM c p H C M 1 J kg · K  
Thermal conductivity PCM k T P C M 0.01 W m · K  
Density PCM ρ m P C M 1 kg m 3  
Heat capacity PCM c p P C M 1 J kg · K  
Melting temperature T m e l t 0.5 K  
Melting temperature range Δ T m e l t 0.5 K  
Latent heat of fusion L h e a t 10 J kg
Table 3. Model parameters.
Table 3. Model parameters.
DescriptionSymbolValueUnits
Heat transfer coefficient h c o n v 5 W m 2 · K
Initial temperature T i n i 0 K
Surrounding temperature T 0 K
Average heat rate from electronic component P e l e c 1 W
Heat rate oscillation frequency ω 1 Hz
Maximum volume fraction of HCM Φ 0.3[-]
Steepness factor for smooth Heaviside step function k H 25[-]
Filter parameterr0.01[-]
Table 4. Results from cross-check designs based on full time history, showing normalised ϕ for each design tried in three different cases: Case 1—No phase change and low c p P C M ; Case 2—No phase change and high c p P C M ; Case 3—With phase change.
Table 4. Results from cross-check designs based on full time history, showing normalised ϕ for each design tried in three different cases: Case 1—No phase change and low c p P C M ; Case 2—No phase change and high c p P C M ; Case 3—With phase change.
Tested atOptimised for
Case 1Case 2Case 3
Case 112.962.63
Case 22.0611.29
Case 31.590.991
Table 5. Results from cross-check designs based on the quasi-steady-state, showing normalised ϕ for each design tried in three different cases: Case 1—No phase change and low c p P C M ; Case 2—No phase change and high c p P C M ; Case 3—With phase change.
Table 5. Results from cross-check designs based on the quasi-steady-state, showing normalised ϕ for each design tried in three different cases: Case 1—No phase change and low c p P C M ; Case 2—No phase change and high c p P C M ; Case 3—With phase change.
Tested atOptimised for
Case 1Case 2Case 3
Case 111.391.26
Case 21.4411.01
Case 31.321.361
Table 6. Results from cross-check, showing normalised ϕ for each design tried in three different cases: Case 1—No phase change and low c p P C M ; Case 2—No phase change and high c p P C M ; Case 3—With phase change. The designs are optimised using the quasi-steady-state.
Table 6. Results from cross-check, showing normalised ϕ for each design tried in three different cases: Case 1—No phase change and low c p P C M ; Case 2—No phase change and high c p P C M ; Case 3—With phase change. The designs are optimised using the quasi-steady-state.
Tested atOptimised for
α = 0 α = 10 1 α = 10 1
Case 1Case 2Case 3Case 1Case 2Case 3Case 1Case 2Case 3
Case 111.391.2612.021.6111.481.05
Case 21.4411.011.0110.930.7010.71
Case 31.321.3611.021.3511.121.521
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.

Share and Cite

MDPI and ACS Style

Christensen, M.B.M.; Alexandersen, J. Topology Optimisation of Heat Sinks Embedded with Phase-Change Material for Minimising Temperature Oscillations. Computation 2026, 14, 23. https://doi.org/10.3390/computation14010023

AMA Style

Christensen MBM, Alexandersen J. Topology Optimisation of Heat Sinks Embedded with Phase-Change Material for Minimising Temperature Oscillations. Computation. 2026; 14(1):23. https://doi.org/10.3390/computation14010023

Chicago/Turabian Style

Christensen, Mark Bjerre Müller, and Joe Alexandersen. 2026. "Topology Optimisation of Heat Sinks Embedded with Phase-Change Material for Minimising Temperature Oscillations" Computation 14, no. 1: 23. https://doi.org/10.3390/computation14010023

APA Style

Christensen, M. B. M., & Alexandersen, J. (2026). Topology Optimisation of Heat Sinks Embedded with Phase-Change Material for Minimising Temperature Oscillations. Computation, 14(1), 23. https://doi.org/10.3390/computation14010023

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop