1 Introduction

Thermocapillary flows have received historically notable attention in applied mathematics, in micro-gravity applications such as liquid bridges and half-zone crystal growth techniques, or recently in laser-assisted additive manufacturing or thermal management control with phase-change materials [1,2,3,4,5,6,7,8]. Much less acknowledged is the presence of thermocapillary flows in energy-related applications. Recently, the Marangoni effect has been shown to be an effective mechanism for enhancing the thermoelectric transformation of the ambient thermal fluctuations into electric energy [9].

The thermoelectric generator (TEG) use the Seebeck effect to transform temperature gradients into electric current. Nowadays, they are formed by unions of thermocouples joined electrically in series and thermally in parallel [10]. They are used in a broad range of industrial applications when an intense heat source is available. Apart from these traditional applications, the development of wireless sensor networks formed by nodes with low-consumption sensors to monitor environment variables has prompted the need to power these low-consumption electronics in an autonomous way [11, 12]. Batteries are not a viable energy source for these devices due to their location and ambient conditions. Because of that, naturally available energy sources like thermal gradients are a convenient solution to power these devices with TEGs.

Despite the advantages of generating electric energy by accessing a ubiquitous energy source like ambient thermal fluctuations, the deployment of thermoelectric devices is limited by the very low efficiency in the transformation of thermal fluctuation into electric energy, usually below \(1\%\) for commercial thermoelectric generators under the typical ranges of ambient thermal fluctuations. Experiments and modeling work during the last decade has shown that TEGs can be coupled to a heat storage (HSU) unit filled with phase-change materials (PCM) to enhance the efficiency of the transformation of thermal fluctuations into electricity [13,14,15,16,17,18]. Phase-change materials are materials that use the latent heat of the solid/liquid transition to store (during melting) or release (during solidification) large amounts of energy, barely changing the temperature. The key idea behind these developments is that the heat entering the HSU (or flows from it) is not used entirely to homogenize the temperature within the HSU but also to change the phase of the PCM. In such a way, the temperature difference between the hot and cold plates of the TEG (cf. Figure 1a) is higher during a more extended period, leading to more voltage generation.

A pivotal point in enhancing the harvester’s efficiency is the effective heat transfer rate between HSU and TEG. This can be accomplished by introducing metallic structures to increase the effective conductivity of the HSU [19,20,21]. In addition, it is well known that convective motions increase the heat transfer rate. In a previous work [9], we have shown for the first time how the Marangoni effect can effectively promote convective motions within the PCM and multiply the conversion of thermal fluctuations to electric energy. This harvesting energy boost has the critical feature that uses a fundamental physics property of liquids: the dependence of the surface tension with the temperature. Hence, this basic notion can be the basis for further optimization in the efficiency of transforming thermal gradients into electric energy. This work will address one of these possible optimizations.

This work combines two effects that have been shown to enhance the performance of the TEG/PCM devices: metallic foams and thermocapillary driving. These types of mechanisms can be used under gravity and also under microgravity applications. In particular, in the absence of natural convection in microgravity, the thermocapillary flows are a natural mechanism to induce convective flows. In addition, they have been proven to be effective mechanisms for improving the heat storage and thermal management efficiency of PCMs under thermocapillary driving [7, 8, 22, 23].

We describe in Sect. 2 the momentum and energy equations for PCMs embedded in porous media. Section 3 presents the boundary conditions for a PCM saturating a porous media under thermocapillary effects and the HSU and TEG thermal boundary conditions. Results are provided in Sect. 4, and conclusions in Sect. 5.

2 Governing equations and geometry

We use the TEG\(1-9.1-9.9-0.8/200\) manufactured by Eureca with dimensions 3.3 mm \(\times\) 1 cm coupled to an HSU through a plate (named cold side). The other plate of the TEG (named hot side) is exposed to an ambient thermal load \(T_{\textrm{ext}}\), cf. Figure 1b. HSUs of various dimensions are used: \(1\,\textrm{cm} \times 1\,\textrm{cm}\), \(2\,\textrm{cm} \times 1\,\textrm{cm}\), \(4\,\textrm{cm} \times 1\, \textrm{cm}\), and \(8\,\textrm{cm} \times 1\,\textrm{cm}\). The HSU is filled with the PCM n-octadecane (melting temperature \(T_{\textrm{L}}=26.1\,^\circ\)C ) embedded in a metallic aluminum foam. The PCM is held initially at a solid phase (\(T_{\textrm{i}}=25 ^\circ\)C). The Marangoni driving acts on the top free surface of the PCM-foam.

2.1 Governing equations of the thermoelectric generator (TEG)

TEG modules are formed by n-type and p-type semiconductors joined by metallic junctions and mechanically protected with ceramic plates. The Seebeck effect originates a difference of potential in the TEG module as \(V_{\textrm{T}}=\alpha \Delta T_{\textrm{eff}}\); where \(\alpha\) is the combined Seebeck coefficient of the thermocouples forming the module. \(\Delta T_{\textrm{eff}}=T_{\textrm{HJ}}-T_{\textrm{CJ}}\) is the temperature difference between the hot and cold junctions of the module. Since commercial modules are protected physically with ceramic plates, the ambient difference of temperature \(\Delta T=T_{\textrm{H}}-T_{\textrm{C}}\) across these protective plates is related to the \(\Delta T_{\textrm{eff}}\) through the relation \(\Delta T_{\textrm{eff}}=\frac{K}{K+2\,K_{\textrm{in}}+\frac{2\alpha ^2T_{\textrm{m}}}{R_{\textrm{in}}+R_{\textrm{L}}}}\Delta T\), where \(R_{\textrm{in}}\) is the internal resistance of the TEG, \(R_{\textrm{L}}\) is the external load of the circuit the TEG is connected to, K is the thermal conductance of the ceramic plates, \(K_{\textrm{in}}\) is the internal conductance of the module, and \(T_{\textrm{m}}=(T_{\textrm{H}}+T_{\textrm{C}})/2\) is the external mean temperature imposed on the TEG [10, 24].

The heat flux across the TEG generates a transient temperature field calculated through the heat equation

$$\begin{aligned} \rho _{\textrm{teg}} c_{\textrm{teg}}\frac{\partial T}{\partial t}=\kappa _{\textrm{teg}} \nabla T. \end{aligned}$$
(1)

where \(\rho _{\textrm{teg}}\), \(c_{\textrm{teg}}\), and \(\kappa _{\textrm{teg}}\) are the effective density, specific heat, and conductivity of the TEG module. The calculations of this work use the module TEG\(1-9.1-9.9-0.8/200\) manufactured by Eureca [25]. Its thermoelectric properties along the coefficients of the heat equation are provided in Tables 1 and 2 of Ref. [9]).

2.2 Governing equations of the PCM embedded in the metallic foam (HSU)

The metallic foam is a rigid and uniform matrix that allows the flow through it. The PCM saturates the voids, either in a solid or liquid phase. A control volume of the domain \(\Omega\) is formed by the PCM volume \(\Omega _{\textrm{pcm}}=\epsilon \Omega\) and the porous matrix \(\Omega _{\textrm{matrix}}=(1-\epsilon )\,\Omega\), where \(\epsilon\) is the porosity [26]. A given control volume of the PCM is formed by liquid PCM with volume \(\Omega _{\textrm{pcm,l}}=f_{\textrm{L}}\,\Omega _{\textrm{pcm}}\) and solid PCM \(\Omega _{\textrm{pcm,s}}=(1-f_{\textrm{L}})\,\Omega _{\textrm{pcm}}\), where the field \(f_{\textrm{L}}\) is the volume fraction of PCM in the liquid phase to the total volume of PCM in the control volume.

The momentum equation for a phase-change material in a porous media reads

$$\begin{aligned}{} & {} \frac{\rho _{\textrm{L}}}{f_{\textrm{L}} \epsilon +\delta _1}\frac{\partial }{\partial t}\textbf{u} + \frac{\rho _{\textrm{L}}}{\left( f_{\textrm{L}} \epsilon +\delta _1\right) ^2}\nabla \cdot \left( \frac{\textbf{u}\textbf{u}}{f_{\textrm{L}} \epsilon +\delta _1}\right) = \nonumber \\{} & {} \quad - \nabla P + \frac{\mu }{f_{\textrm{L}} \epsilon } \nabla ^2\textbf{u} -\left( \frac{\mu }{K} + \frac{\rho _{\textrm{L}} c_{\textrm{F}}}{K^{1/2}} \Vert \textbf{u} \Vert \right)\textbf{u} \nonumber \\{} & {} - \frac{C\left( 1-f_{\textrm{L}}\right) ^2}{f_{\textrm{L}}^3+\delta _2}\textbf{u}. \end{aligned}$$
(2)

This equation includes the linear Darcy term and non-linear Forchheimer term [27] of a flow past a porous media. The last term is the Kozeny–Carman equation to damp and eventually suppress the velocity at the solid PCM. It equals zero in the liquid phase (\(f_{\textrm{L}}=1\)) and becomes very large in the solid region (\(f_{\textrm{L}}=0\)), effectively suppressing the velocity field. In this term, C is a large constant that modules the damping strength, usually selected by data fitting to experiments. \(\delta _1\) and \(\delta _2\) are tiny constants to avoid divisions by zero without physical meaning. The Darcy number is defined as \(\textrm{Da}=K/L^2\) (L is the horizontal dimension of the HSU). For the Forchheimer term, we use the drag coefficient \(c_{\textrm{F}}\) derived by Bhttaacharya [28, 29].

The enthalpy equation for PCMs embedded in porous media under local thermal equilibrium [26] reads:

$$\begin{aligned} \overline{\rho \,c} \frac{\partial T}{\partial t}+\rho c_{\textrm{L}} \textbf{u}\cdot \nabla T= \nabla \left( \kappa _{\textrm{eff}} \nabla T \right) - \epsilon \rho \,\delta h\,\frac{\partial f_{\textrm{L}}}{\partial t}, \end{aligned}$$
(3)

Here, \(\kappa _{\textrm{eff}}\) is the effective conductivity of the porous media whose value is dependent on the topology of the porous matrix and base PCM. We use an expression derived by Yan [30], and \(\overline{\rho c}= f_{\textrm{L}} \epsilon \rho c_{\textrm{L}} + \left( 1-f_{\textrm{L}}\right) \epsilon \rho c_{\textrm{s}} + \left( 1-\epsilon \right) \rho _{\textrm{p}} c_{\textrm{p}}\). The energy equation determines the phase of the PCM. When the temperature is above the liquid temperature \(T_{\textrm{L}}\), the PCM is in a liquid phase (\(f_{\textrm{L}}=1\)); when it is below the solidus temperature \(T_{\textrm{s}}\), the PCM is in a solid phase (\(f_{\textrm{L}}=0\)), and when it is between solidus and liquidus \(T_{\textrm{s}}<T<T_{\textrm{L}}\), there is a coexistence between both phases of the PCM generating a solid/liquid diffuse interface ( \(0<f_{\textrm{L}}=(T-T_{\textrm{s}})/(T_{\textrm{L}}-T_{\textrm{s}})<1\)).

3 Boundary conditions

We use a relation derived by Hennenberg, Saghir et al. [31, 32] to provide the boundary condition that relates the shear stress with the Marangoni coefficient for a liquid embedded in a porous matrix

$$\begin{aligned} \mu \partial _y u= -\epsilon \gamma \partial _x T. \end{aligned}$$
(4)

Notice that the strength of the Marangoni driving decays linearly with the porosity. We define a static Marangoni number per each configuration as

$$\begin{aligned} \textrm{Ma}=\frac{\epsilon \gamma \,\beta \,H^2}{\mu \,\alpha _{\textrm{eff}}}. \end{aligned}$$
(5)

with \(\alpha _{\textrm{eff}}=\kappa _{\textrm{eff}}/(c_{\textrm{L}}\,\rho )\) the effective diffusivity, \(\beta =\frac{T_{\textrm{H}}-T_{\textrm{m}}}{L}\) the temperature gradient between the left wall at temperature \(T_{\textrm{H}}\) and the melting front at temperature \(T_{\textrm{m}}=(T_{\textrm{L}}+T_{\textrm{s}})/2\). Notice that this definition, for simplicity, only considers the domain geometry and not the evolving gap of the melted phase, as done in Refs. [8, 23].

There is no liquid penetration on the top free surface, and the free surface is supposed to be adiabatic: \(w=0\), \(\partial _y T =0\). The temperature at the interface between the TEG and HSU is calculated from the heat flux conservation \(\kappa _{\textrm{teg}}T_x=\kappa _{\textrm{pcm}}T_x\). Finally, the hot plate of the TEG is subjected to an ambient temperature load \(T_{\textrm{ext}}\).

We use the temperature data estimated in a study of the thermal load at the solar panel of a micro-satellite in a circular orbit at \(400\,\textrm{km}\) [33] (cf. Figure 1b). The harvesting period is \(10,980\,\textrm{s}\) and covers two-orbit cycles. The mean temperature of \(T_{\textrm{ext}}\) is \(305.7\,\textrm{K}\), \(\textrm{max}(T_{\textrm{ext}})=335.5\,\textrm{K}\), and \(\textrm{min}(T_{\textrm{ext}})=269.2\,\textrm{K}\), with a temperature range of \(66.3\,\textrm{K}\). The phase-change temperature makes the organic PCM n-octadecane suitable. Table 2 of Ref. [9] shows the thermophysical properties used in this work. The initial temperature is slightly below solidus temperature \(T_{\textrm{s}}\) to keep the PCM in a solid phase. Thus, the two-orbit cycle induces three melting stages of the PCMs and two solidifications. The maximum Marangoni number occurs when \(T_{\textrm{H}}\) reaches the maximum ambient temperature (\(T_{\textrm{H}}=\textrm{max}(T_{\textrm{ext}})\)). For a heat storage unit of thickness \(H=0.01\,\textrm{m}\), \(T_{\textrm{H}}=\textrm{max}(T_{\textrm{ext}})=335.5\,\textrm{K}\), the Marangoni number decreases with the porosity as \(\textrm{Ma}=11.2\times 10^4\) for \(\epsilon =1\), \(\textrm{Ma}=3.6\times 10^3\) for \(\epsilon =0.95\), \(\textrm{Ma}=1.8\times 10^3\) for \(\epsilon =0.9\), and \(\textrm{Ma}=1.2\times 10^3\) for \(\epsilon =0.85\).

A structured mesh of square cells is used for the heat storage unit: \(100\times 100\) cells for domains of size \(0.01\times 0.01\,\textrm{m}\), \(200\times 100\) for \(0.02\times 0.01\,\textrm{m}\), \(400\times 100\) for \(0.04\times 0.01\,\textrm{m}\), and \(800\times 100\) for \(0.08\times 0.01\,\textrm{m}\). Results are checked to be mesh independent.

We use a finite volume code based on the open-source software OpenFOAM to solve the momentum and energy equations. The coupling between temperature and the liquid fraction is solved by an enthalpy-porosity method [34, 35]. Momentum and energy equations are solved using a PIMPLE algorithm. Time integration and space discretization use second-order methods: Crank–Nicolson for time evolution, linear upwind for convective terms, and Gauss for diffusive terms.

4 Results

Fig. 1
figure 1

a Sketch of the pPCM/MaranTEG device. It consists of a thermoelectric generator module (TEG) and a heat storage unit (HSU) filled with a PCM embedded in a metallic foam. The top surface of the HSU is open and free, leading to thermocapillary flows when subjected to a temperature gradient. The blue region within the HSU corresponds to solid PCM and red to liquid PCM. The simulations are made with a single TEG manufactured by Eureca TEG\(1-9.1-9.9-0.8/200\), an HSU filled with the PCM n-octadecane, and metallic aluminum foam. The left side of the TEG is exposed to the ambient temperature \(T_{\textrm{ext}}\) shown in panel (b), where the horizontal line corresponds to the melting temperature of the PCM n-octadecane

We carry out 2D simulations at four porosities (\(\epsilon =0.85,0.90,0.95\), and 1) and three Darcy numbers (\(\textrm{Da}=10^{-2}, 10^{-3}\), and \(10^{-4}\)) to evaluate the impact of the amount of metallic foam and permeability in the heat transfer rate of the HSU and the resulting efficiency of the energy harvester to transform thermal fluctuations into electric energy.

Fig. 2
figure 2

Snapshots of the temperature fields and stream function at the HSU for \(\textrm{Da}=10^{-2}\) (top row) and \(\textrm{Da}=10^{-4}\) (bottom row). Snapshots correspond to representative times of the melting and solidifying cycles of Fig. 1b. Red (blue) regions are in liquid (solid) state. The arrows indicate the direction of motion of the solid/liquid interface: melting toward the right and solidification toward the left side

The temperature field and stream functions at an HSU of \(4\,\textrm{cm}\times 1\,\textrm{cm}\) are presented in Fig. 2 for permeabilities \(\textrm{Da}=10^{-2}\) (top row) and \(\textrm{Da}=10^{-2}\) (bottom row). The liquid phase of the PCM expands during the heating sun-front periods of the orbit and contracts during the cooling sun-back periods. Melting phases generate an expanding liquid phase during a longer period than cooling phases. Higher permeability promotes a faster melting rate (cf. solid/liquid interface of \(t=600\,\textrm{s}\) at Fig. 2) and strength of the convective motions (cf. stream functions of \(t=600\,\textrm{s}\) at Fig. 2). Also, the inhibition of the convective motions at lower permeabilities results in less deformed solid/liquid interfaces.

Figure 3b shows the voltage generation along the time for porosity \(\epsilon =0.85\) (top row) and \(\epsilon =0.95\) (bottom row). Vertical lines correspond to the maxima and minima of the ambient temperature \(T_{\textrm{ext}}\). The overall behavior across porosities and permeabilities is similar: voltage peaks about the maxima of \(T_{\textrm{ext}}\), and voltage troughs about the minima of \(T_{\textrm{ext}}\). At the voltage peaks, the liquid phase is in expanding phase, whereas at the voltage troughs, the solid phase is in an expanding stage. Because of that, the voltage peaks occur in a Marangoni convection-dominant stage and the troughs at a conduction-dominated stage. Interestingly, despite the near symmetric profile of the thermal load \(T_{\textrm{ext}}\) around the maxima/minima, the decay phase of the voltage from peak to troughs is slower than the fast recovery from voltage troughs to peaks. This happens because solidification and melting are not symmetric with respect to the heat transfer rate between TEG and HSU. Solidification occurs with a strong inhibition of the Marangoni flows, whereas convective Marangoni flows speed up melting.

Fig. 3
figure 3

Cumulative electric energy (left) and voltage (right) harvested as a function of the time. Curves correspond to porosities \(\epsilon =0.85\) (top) and \(\epsilon =0.95\) (bottom) for Darcy numbers \(\textrm{Da}=10^{-2},10^{-3}\), and \(\textrm{Da}=10^{-4}\). The HSU size is \(4\,\textrm{cm} \times 1\,\textrm{cm}\)

Fig. 4
figure 4

Total harvested electric energy as a function of the porosity for HSUs of dimensions \(1\,\textrm{cm}\times 1\,\textrm{cm}\) (a), \(2\,\textrm{cm} \times 1\,\textrm{cm}\) (b), \(4\,\textrm{cm} \times 1\,\textrm{cm}\) (c), and \(8\,\textrm{cm} \times 1\,\textrm{cm}\) (d)

At lower porosity, the voltage peaks are slightly higher for larger permeabilities. However, overall the voltage curves exhibit little dependence on the permeability and are very close. This conducts to a very small change in the accumulated electric energy generated (cf. Figure 3a) by increasing the permeability (\(22\,J\) for \(\textrm{Da}=10^{-4}\) and \(24.2\,\textrm{J}\) for \(\textrm{Da}=10^{-2}\) for \(\epsilon =0.85\) and an HSU of size \(4\,\textrm{cm} \times 1\,\textrm{cm}\)). The small variation in the harvested energy at low porosities across permeabilities is due to the strong suppression of convective flues at a high fraction of the metallic foam. Larger porosities, \(\epsilon =0.95\) in Fig. 3c, d, reduce metallic foam’s volume fraction, offering less resistance to the flow. This results in a stronger dependence on the permeability of the voltage curves. Now, voltage peaks for larger permeabilities are noticeably higher, whereas smaller permeabilities cause lower and smoother peaks of voltage generation. The increased area under the curve of the voltage curves of larger permeabilities results in a significant difference in the harvested energy: \(13.4\, \textrm{J}\) for \(\textrm{Da}=10^{-4}\) and \(18.1\, \textrm{J}\) for \(\textrm{Da}=10^{-2}\), a \(35\%\) enhanced transformation into electric energy from the same thermal load using a larger permeability foam. Overall, the more elevated effective conductivity of lower porosity \(\epsilon =0.85\) overcomes the decay of Marangoni flow in the heat storage unit, giving rise to a faster heat transfer rate and more electric energy. Also, all the porosities benefit from larger permeabilities and the subsequent decrease in flow resistance. However, this is only taken advantage of at larger porosities, where the convective flows are not strongly suppressed.

Figure 4 shows the total harvested energy as a function of the porosity for HSUs of different lateral extensions: \(1\,\textrm{cm}\times 1\,\textrm{cm}\), \(2\,\textrm{cm} \times 1\,\textrm{cm}\), \(4\,\textrm{cm} \times 1\,\textrm{cm}\), and \(8\,\textrm{cm} \times 1\,\textrm{cm}\). Overall, adding metallic foam substantially enhances the harvested energy for all the permeabilities. The higher relative increase corresponds to adding a small amount of metallic foam \(\epsilon =0.95\). Further increases in the metallic foam volume permit more electric energy to be harvested, but the relative increase diminishes. The reason is that while lower porosities increase the effective conductivity meaningfully, they do at the expense of a volume reduction of the PCM. The lower content of available latent heat to sustain phase change reduces the benefit of filling the HSU with PCMs.

As appreciated in the significant discrepancies in harvested electric energy across different sizes of HSU, the size of the heat storage unit is a key factor in the performance of the energy harvesters. At the lower porosity \(\epsilon =0.85\), there is roughly six times more harvested energy using HSUs of size \(8\,\textrm{cm} \times 1\,\textrm{cm}\) than using \(1\,\textrm{cm} \times 1\,\textrm{cm}\). The reason for such a large variation is the existence of long periods where the PCM is in the solid or liquid phase, without phase change, in the smaller geometries. During these periods, the temperature homogenizes within the HSU, wasting the advantage that provides the solid/liquid latent heat to sustain more heightened temperature differences across the TEG plates. The reduction of single-phase periods in the HSU by increasing the HSU size leads to a progressive increase in harvested energy. We report here up to \(8\, \textrm{cm} \times 1 \,\textrm{cm}\), which still exhibits a full liquid phase around the peaks of the ambient temperature \(T_{\textrm{ext}}\), and there is still room for additional increases of electric energy, increasing the domain size. For all the sizes, the highest relative increase corresponds to passing from non-porous media \(\epsilon =1\) to \(\epsilon =0.95\).

5 Conclusion

We present a model for enhanced thermoelectric micro-energy harvesting of thermal fluctuations into electric energy. The model couples a standard thermoelectric module to a heat storage unit filled with a phase-change material embedded in a metallic foam driven by thermocapillary driving. This work is based on the findings from Madruga and Mendoza [9] on using the Marangoni effect to enhance the heat transfer rate of the heat storage unit to design more efficient micro-energy harvesters.

The metallic foam enhances the heat transfer rate by increasing the effective conductivity of the porous-PCM system. At the same time, the metallic foam opposes the heat transfer through two mechanisms: (i) reducing the convective heat transfer which will difficult the liquid phase flow, and (ii) weakening the shear stress responsible for the Marangoni effect.

The modeling of the heat storage unit includes phase change through the enthalpy-porosity formulation, linear Darcy and non-linear Forchheimer porous drag forces, and a shear stress boundary condition responsible for the Marangoni effect that scales linearly with the porosity for saturated porous media derived by Hennenberg and Saghir.

The calculations are bi-dimensional, use a realistic cyclic thermal load with maximum amplitude in the temperature \(\Delta T=66.3^\circ\) C, porosities \(\epsilon =0.85, 0.9, 0.95,1\), and permeabilities \(\textrm{Da}=10^{-2},10^{-3}\), and \(10^{-4}\). Decreasing the porosity (adding volume fraction of metallic foam) produces a strong enhancement of the effective conductivity. The enhanced heat transport increases harvesting capacity strongly with respect to an HSU filled with a base PCM. Thus, for a heat storage unit of \(8\,\textrm{cm}\,\times 1\,\textrm{cm}\), there is an increase from 7.3 to \(31\,\textrm{J}\), a \(325\%\) more from \(\epsilon =1\) to \(\epsilon =0.85\). This happens despite the decay of the Marangoni effect that occurs lowering the porosities, from \(\textrm{Ma}=11.2\times 10^4\) for \(\epsilon =1\) to \(\textrm{Ma}=1.2\times 10^3\) for \(\epsilon =0.85\). We also find that larger permeabilities that offer less resistance to convective flows are more efficient in electricity production, but their effect is much smaller than varying the porosity.

Overall, there is a substantial increase in the efficiency in transforming thermal fluctuations into electricity with respect to using a base PCM in the heat storage unit driven by thermocapillarity. The heating and cooling cycles of the external ambient temperature are responsible for the burst of voltage generation. During the cooling cycles, the convective motions are strongly suppressed, being almost null for low porosities and permeabilities. As a consequence, during the heating and cooling periods, the thermocapillary driving induced by the Marangoni effect is, on average, less relevant to the heat transfer rate as the increased effective conductivity from more elevated fractions of metallic foam at lower porosities. Consequently, during the heating and cooling periods, the thermocapillary driving induced by the Marangoni effect is, on average, less relevant to the heat transfer rate. The increased effective conductivity that brings higher fractions of metallic foam at lower porosities offsets the decay of Marangoni flows.