A polynomial model of transmission and reflection of electromagnetic monochromatic plane waves in lossy, non-magnetic multilayer thin films subjected to an external transverse voltage

Simulation of the electrical and optical response of a multilayer thin film composed of lossless material coupled with adjacent lossy material in an alternating arrangement when applying a transverse voltage across the multilayer thin film is conducted using a polynomial approach. The modelling of the lossy–lossless multilayer thin film is a generalization of our previous work on multilayer thin film made up of alternating lossy–lossy materials. It is the propagation matrix of the electromagnetic wave in the thin film that governs its propagation, while the interface matrix represents the coupling between layers at an interface. The present solution models the multilayer thin film as an effective capacitor constructed from a series of coupled capacitors, with every layer being considered as a capacitor coupled to the next. A transverse voltage can affect the amounts of electric charges that accumulate at the interface between adjacent ‘capacitors’. The present model is constructed to describe nonmagnetic, lossy and lossless materials. With the aid of a home-developed code implementing the model, the reflection and transmission of multilayer Ge/MgO thin films are simulated. By tuning the transverse electric potential, geometrical and electrical parameters of an arbitrary lossy–lossless multilayer thin film, the code is capable of predicting nontrivial optical responses in terms of Tλ,Rλ,ϕTλ,ϕR(λ)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$T\left(\lambda \right), R\left(\lambda \right), {\phi }_{T}\left(\lambda \right), {\phi }_{R}(\lambda )$$\end{document}. The code can serve as a useful tool for designing and optimizing lossless-lossy or lossless-lossless multilayer thin films to deliver desired optical functions.


Introduction
In an earlier publication, we presented an analytical study, along with a simulation package (dubbed 'Wave Tensor', WT) Elhabbash 2022 implementing the optical response of nonmagnetic lossless thin film exposed to an external transverse voltage using a polynomial approach Elhabbash et al. 2021. In the model, a propagation matrix (PM, denoted by " [ ] j ") was associated with each layer j in a multilayer thin film, while another independent matrix, the interface matrix (IM, denoted by [A] j ) was used to model the coupling between adjacent layers at an interface, where electric charges accumulate. It had been demonstrated that the WT code Elhabbash 2022 was capable of satisfactorily simulating the reflection and transmission of multilayer lossless thin films with a tunable transverse potential. The code could readily predict non-trivial optical responses, providing a handy tool to design and manually optimize desired optical functions of an arbitrary multilayer thin film by tuning its transverse potential and geometric parameters. In our previous publication (Elhabbash et al. 2021)), we verified that several known limiting optical scenarios were reproduced correctly by the Wave Tensor code. Specifically, the WT code is capable to reproduce the right Brewster and critical angles for a given one-layer lossless medium. The WT was tested for the conservation of the current density of the electromagnetic field in all layers of a multi-layer film when a beam of light traverses it. A numerical output of the WT code has also been verified to be consistent with theoretical expectations of Fresnel coefficients for an N = 2 layer corresponding to a beam of EM waves shining on a film with an incident angle fixed at the corresponding Brewster angle. Based on these verifications, we are confident that the polynomial model and the lossless WT code function as expected.
This paper is a natural generalization of Elhabbash et al. (2021) where the same polynomial approach is extended to a multilayer thin film comprised of non-magnetic, lossy-lossless layers. A 'lossy' material, basically, is one which causes the energy of an electromagnetic wave to get dissipated when traversing through the medium. From the perspective of mathematical description based on the framework of Maxwell's equations, a material is lossy if the permittivity of the material is complex. By definition, the permittivity of the material is inherently related to its electric susceptibility and electrical conductivity. Effectively, the effect of EM absorption in lossy material is encoded in the imaginary parts of both electrical conductivity ( ̃ ) and electric susceptibility ( ̃ e ). The permittivity of a material is defined based on both ̃ and ̃ e . Modelling a lossy material in the polynomial model will oblige us to implement mathematical operations in complex vector space, namely the Hermitian inner product, due to the admission of the complex permittivity. To this end, an extended version of the Wave Tensor code, dubbed WT-II, is developed by one of the authors (MKME) to handle both lossy and lossless materials that are non-magnetic. The WT-II code can be used to compute the average reflection, transmission, and their corresponding reflection and transmission phases of a multilayer thin film composed of lossy-lossless, nonmagnetic materials. It is available for free download (Elhabbash and "WaveTensor-II-Lossy", 2022). The version of the WT reported in our previous work (Elhabbash et al. 2021) developed for the lossless-lossless multilayer thin films shall be referred to as WT-I hereafter.
In this manuscript, alternating layers of germanium-magnesium oxide are formulated, constructed, and simulated to determine specific optical properties of multilayer thin films using the WT-II code. The results obtained shall serve as proof of principle that the WT-II code is capable of simulating optical properties of generic complex systems for potentially useful applications. The pseudocode and flowchart to explain and clarify the purpose and functionality of the WT code are included in the Appendix. In this manuscript the multilayer thin film being modelled assumes to be layered in an alternating manner such that one lossless layer (LL) is coupled to a neighbouring lossy (LS) one, i.e., in an "LL-LS-LL-…-LS-LL", "LS-LL-LS-…-LL-LS", "LL-LS-LL-…-LL-LS" or "LS-LL-LS …-LS-LL" arrangement. The terminating ends of the multilayer thin film can be either LL or LS materials. All layers are assumed nonmagnetic. Each layer is labelled with the variable j ∈ [1, 2, … , N] , where N denotes the total number of film layers. The layer with the label j = 0 or j = N + 1 refers to the vacuum exterior of the terminating layers. The same label j is also used to denote a boundary sandwiched between layers j − 1 and j . For example, the boundary labelled j = 1 refers to the boundary sandwiched between the j = 0 (vacuum) and j = 1 layers, while the boundary labelled j = N + 1 refers to the boundary sandwiched between the j = N and j = N + 1 (vacuum) layers. In this labelling scheme, a boundary j is sitting at the left-hand side of the layer labelled j . EM wave is assumed to propagate from left to right, see Fig. 1.
Here, we shall assemble the mathematical description of the current lossless-lossy alternating multilayer thin film model in a bottom-up manner by systematically referring to our previous paper for non-magnetic, lossless-lossless materials (Elhabbash et al. 2021). For a concise description of the following mathematical procedure, we shall avoid vindicating every single step in the development of the lossy-lossless model as they are largely similar to that in the lossless-lossless model.
For the case of a lossy, non-magnetic medium, the permittivity is generalized to the following complex form (see page 34, in Stratton (2007)):

Fig. 1
The electromagnetic wave is incident from left to right along z direction through a thin film consisting of N layers. The index j labels each layer and the interface between adjacent layers. The incident angle is also labelled as 0 , 1 , … N . z j denotes the thickness of the interface j where 0 denotes the permittivity of the vacuum. ̃ = � + i �� and ̃ r = � r + i �� r denote the complex electrical conductivity and complex permittivity of the lossy material respectively.
As a comparison, the permittivity of a lossless material is conventionally expressed in terms of = � r 0 where both , and ′ r are real quantities. The corresponding definition of c r for a lossless material is obtained by switching off the complex quantities in Eq. (2), i.e., �� r + � 0 → 0 and ′′ → 0 , resulting in c r = � r . In other words, there is no distinction between c r and r for a lossless material. Note that for a lossless material, by definition, ′′ → 0 because the complex part of conductivity is zero. r is often expressed in terms of the complex susceptibility ̃ e via The complex refractive index ñ for a lossy material is defined as per (see page 21 in Dressel et al. (2002)) where is the complex component of ñ . In terms of complex permittivity, the complex wave vector k = √̃ ̃ is expressed in the form of (see page 21, in Dressel et al. (2002))  In this manuscript ̃ m is set to 0 and ̃ r = 1 throughout as only non-magnetic materials are being considered.
The propagation matrix [ ] j corresponding to a lossy layer j is given as Grossel et al. 1994;Vigoureux 1991;El-Agez et al. 2010 Taya andEl-Agez 2011;Shabat and Taya 2003, In a lossy medium, the elements j in the PM, the so-called 'Hermitian inner product', is expressed in terms of where ⇀ k j =k xjx +k yjŷ +k zjẑ , k * xj , k * yj and k * zj are the complex conjugates of the components k xj , k yj . and k zj . Here the angle j and displacement d j in a layer labelled j are illustrated in Fig. 1. In the above expression, we have made use of the relation k j = cñ j = 2 0ñ j , where 0 = c is the wavelength associated with the EM wave with angular frequency . Note that the components of the complex wave vector �� ⃗ k j in the Hermitian inner product are defined in terms of the complex conjugates k * xj ,k * yj ,k * zj rather than k * xj , k * yj and k * zj Kwak and Hong 2013;Larson and Falvo 2008. In the case a layer j is lossless, j is given by Table 1 compares the physical parameters in lossy, non-magnetic and lossless, nonmagnetic materials relevant for the modelling of the present polynomial model. The WV-II code presented in this manuscript is basically constructed by generalising the definitions of the lossless parameters in the initial version of WT code (WT-I) reported in Elhabbash et al. (2021) to that for the lossy ones.
The interface matrix [A] j is calculated via where t j ( r j ) is the Fresnel transmission (reflection) coefficient of an interface j . Explicitly, t j and r j in both TM and TE modes are given in Table 2.
Fresnel reflection coefficient (P-polarised) The effective matrix that governs how light propagates through a multilayer thin film, [M] , is a periodic product of [ ] j alternating with [A] j , as shown in Eq. (12): where The matrices [M] j ,[A] j and [ ] j represent transfer, interface, and prorogation matrices, respectively. Basically, the transfer matrix [M] 'transfers' the electric field, E ± z 1 , in the incident wave, EM, at z = z 1 , to the exit field E ± z N+1 at the other edge of the thin film . A depletion layer of thickness z j is induced by applying a transverse voltage at a boundary j , and this boosts the surface conductivity s j , which is caused by the initial misbalance at the interface between the Fermi levels of the adjacent dielectrics (Khorasani and Rashidian 2001;Wang 1989), where e , , and m * j are respectively the charge of the electron, angular frequency of the EM wave, and the effective mass of the electron in layer j , and V is the transverse voltage applied on the whole thin film. The thickness and the electric conductivity of the layer of index j are d j and j respectively. The term V is the absolute value of charge density at the interface j , i.e., the total charge per area accumulates between two adjacent layers (namely, j and j − 1 , j ∈ [2, N] ). Furthermore, the summation term at the numerator, ∑ N j=1 d j j , expounds the time constant needed to develop the charge layers from the moment the voltage V is applied across the structure. The surface conductivity s j is applied at any angular frequency without limitation or restrictions (Khorasani and Rashidian 2001).
Note that in the version of the polynomial model presented in this manuscript, the dielectric constant (a.k.a. permittivity) of the layering materials j enters the modulation of the optical responses via Eq. (15), where only the static limit of the dielectric constant is required, i.e., j ( = 0) → static j . In addition, despite the resistivity of a layering material j ( ) is in general frequency dependent, they are approximated to be frequency independent, i.e., j ( ) → j . s j=1 , the interface conductivity between the vacuum and the first layer, at the interface j = 1 , is taken to be 0 since there is no charge accumulation at z = z 1 . Similarly, the interface conductivity follows the same assumption at the interface j = N + 1 at z = z N+1 , the border between the last layer j = N and vacuum, i.e., s j=N+1 = 0 . Be noted that the boundary condition of Eq. (16) holds true irrespective of whether the terminating ends are made of lossless or lossy material. In addition, the surface conductivity s j at any interface j ∈ {2, 3, .., N} in Eq. (15), despite being sandwiched between a lossy and lossless layer, still assumes the same form as that of a multilayer thin film where each individual layer is made of different kinds of lossless material (such as that considered in Elhabbash et al. (2021)). By changing the external potential knob V , it follows from Eq. (15) that the interface conductivity s j can be controlled and hence the total optical response of the thin film to an EM wave travelling through it can be modified.
Assume that applying a transverse voltage across the multilayer thin films is modelled as a multi-capacitors in series that is subjected to the external potential V , then each couple of adjacent layers will form a capacitor C j . Each coupled-layers, in this case, has the same electric capacitance because of a periodic arrangement of thin films, and hence the voltage across each coupled-layers is equal. The total accumulated charge can be calculated via Q j = q j × A j or Q j = C j V j , where A j , and V j are respectively the area the charges occupy, and the voltage across the coupled layers j , and j + 1 . By excluding the voltage V , the absolute-value term in Eq. 15 represents the effective capacitance per area A polarized EM wave can exist in two modes: TM and TE. To deal with these two modes separately, the superscript is used to label the matrices Given that the EM wave at z N+1 is travelling through a vacuum with no reflected wave, E − z N+1 = 0 , the following relations follow: The modulation effect of EM waves traversing a multilayer thin film may be determined experimentally or empirically. In principle, the effect may be extracted theoretically from the transfer matrix [M] . The transmission ( T ) and the corresponding phase ( T ), as well as the reflection ( R ) and the corresponding phase ( R ), are the parameters of interest in quantifying the optical response of the current situation. These quantities can be deduced from [M] as follows: (Markos and Soukoulis 2008)      The averages of both modes are used to calculate the average (effective) reflection and transmission of a non-polarized EM field. They are calculated by taking the average of the Y , and Z matrices.
tan R = Im(Z) Re(Z) . When light passes across an interface between two mediums, Fresnel's reflection ( r ) and transmission ( t ) coefficients are defined in terms of electric field amplitudes incident ( E oi ), reflected ( E or ) and transmitted ( E ot ) by Markos and Soukoulis (2008); Azzam and Bashara 1977;Knittl 1976;Jackson 1998. For both transverse electric (TE, or S-polarised), and transverse magnetic (TM, or P-polarised) polarization, Fresnel transmission and reflection coefficients are expressed in terms of the interface conductivity ( sj ) and refractive index ( ñ j or n j ) via the following relations. (Elhabbash et al. 2021).
From the perspective of materials design, it is feasible to construct a multilayer thin film that satisfies pre-defined, desirable optical functionality (in the form of its responses T, R , R , and T ) by modulating its electrical structure. This can be done by tuning four types of adjustable parameters in the model, namely, (i) the materials constituting the multilayer thin film, i.e., j ,ñ j , static j ,m * j , (ii) the geometrical structure of the multilayer thin film, i.e., N, d j , (iii) the external potential V, and (iv) the incidence EM angle 0 . Wave Tensor provides a handy tool to construct and design a structured multilayer thin film. The code can Comparing the case of a multilayer thin film made up of alternating lossless-lossless layers to the present case (multilayer thin film made up of alternating lossy-lossless layers), Table 2 shows that the major difference between them lies in the replacement of n (in the lossless-lossless case) with ñ (in the lossy-lossless case). The lossy-lossless alternating multilayer thin film admits an additional parameter in comparison to the losslesslossless case. The parameter provides an additional degree of freedom that is expected to render a favourable impact for the sake of tunning the optical response of the lossy-lossless multilayer thin film. The rich structure of the lossy-lossless system, in conjunction with a tuneable transverse potential, can be leveraged for designing pre-defined specifications imposed on an optical response.

Computational procedure
The operation and implementation of the WT-II are essentially the same as for the lossless-lossless version, with the minor exception that the real refractive index in the lossless-lossless WT-I code n is replaced by the complex version ñ( ) = n( ) + i ( ) in WT-II. The structure of a multilayer thin film must be first constructed before the WT-II is used to calculate the optical responses of an EM wave traversing through it. The structure of the multilayer thin film is specified by the following list of physical variables, namely, It is understood that for a lossless layer j , n j 0 is used in place of ñ j 0 . Online resources such as the "Filmetrics refractive-index-database"(Acquired by K. xxxx) can be used to retrieve the experimentally measured values of j , static j , d j , m * j ,ñ j 0 = n j 0 + i 0 for the material listed in the database. The WT-II code also requires the specification of the incident EM wavelength 0 , which is tied to the incident angular frequency 0 via 0 = 2 c 0 . It is assumed that the incident wavelength 0 is defined as the wavelength in a vacuum. In the operation of the WT-II code, the refractive index in a fixed layer j is first calculated for a set of discrete angular frequencies  fixed points for interpolation. When considering wavelengths inside a vacuum 0 (or its equivalent, 0 ), it is important to differentiate them from wavelengths propagating inside a layer with differing refractive indices. The chosen range of the EM wavelength [ 0min , 0max ] is parameterized using the superscripted parameter i = {0, 1, 2, .., i max } with step size Δ 0 , Apart from the above-mentioned variables, initial settings of external transverse voltage, V , and incident angle 0 are also required to calculate the optical responses. . Comprehensive technical detail of the computational procedure is described in our previous work (Elhabbash et al. 2021). The WT-II code was deployed to examine the sensitivity of the optical responses to the variation in the parameters as discussed in this subsection. The numerical results obtained, along with their discussion, are presented in the following section.

Results and discussion
The WT-II code developed for the lossy-lossless multilayer thin film is a generalization of WT-I designed only for lossless-lossless structures. WT-II should be 'backwards-compatible', i.e., able to reproduce the results of WT-I. Indeed, using the WT-II code, we were able to reproduce the optical response curves as reported in the previous work  on lossless-lossless multilayer thin films by using the WT-II code. These were structures with N = 2, 3, 4, 5, and 6 layers of alternating lossless-lossless materials made of MgO and CaF 2 . The curve for an N = 1 layer thin film made of MgO was also checked. The optical curves for a set of external potential V = {0, 300V, 600V, 900V} , as shown in the left column in Figs. (2, 3, 4, 5, 6 and7), were reproduced by the WT-II code using the same input parameters as that used in Elhabbash (2022. We have checked that indeed the curves in the left column in Figs. (2-7) are identical to that produced by WT-I as reported in . This provides positive confirmation that the WT-II code reproduces the results produced by the WT-I version, as one would expect.
To further verify the correctness of the WT-II code, another independent check was conducted. To this end, an imaginary part was artificially introduced into the refractive index of the MgO layers, n MgO →ñ MgO = n MgO + i , whereas the refractive index for CaF 2 remained the same. If were tiny, e.g., = 0.1 , the optical response curves are expected to be perturbed only slightly as compared to that produced by n MgO alone with = 0 . On the other hand, if were relatively larger say by a factor of 10, e.g., = 1.0 , the optical curves are expected to display a more significant deviation compared to that of the = 0 and = 0.1 cases. It is to be stressed that whether a material with a non-zero refractive index of ñ MgO = n MgO + i exists is immaterial here. It is merely a hypothetical material conveniently contrived so that it can be used as a testing ground for checking whether the WT-II code is behaving in an expected manner in the → 0 limit. Figs. (2-7) show the optical responses of the N-layer MgO − CaF 2 thin films for the three cases, = 0, 0.1, 1.0 . It is seen that adding a tiny imaginary part = 0.1 to the refractive index of magnesium oxide results only in a small perturbation to the optical response curves, whereas a much more significant deviation is observed for the case with the large imaginary part of = 1.0 . The successful reproduction of these curves shows that the WT-II code passes the 'backwards-compatible' test and produces the results within the limit of a multi-layer thin film comprised of alternating lossless materials.
Having established the verification check on the WT-II code, we now apply it on an Nlayer thin film comprised of germanium (a lossy material) and magnesium oxide (a lossless material), N = 1, 2, 3, 4, 5, 6 . The Ge-MgO multilayer thin films are devised as an illustrative example to demonstrate the applicability of the WT-II code in predicting the variation in the optical responses when the number of layers N and the external voltage V varies in a lossless-lossy system. The modulation effects on the optical responses of the multilayer thin film are caused by the accumulated charges and conductivity at the interfaces, which The accumulated charges at the interfaces between layers modulate the conductivity at the interfaces, sj , as a result of tuning the transverse voltage V which is a hand way to alter the optical response.
It is intuitively expected that the lossy-lossless thin film should demonstrate qualitatively a larger degree of variation in its optical responses as compared to similar losslesslossless thin films as reported in Elhabbash et al. (2021). In these thin films, Ge was serving as the initial medium onto which the EM wave was incident at an angle of 0 . In this illustration, we set the value of 0 = 0 • but it is to be understood that any other value of 0 would be equally valid. The configuration of the N = 6 layers thin film was arranged in the Ge-MgO-Ge-MgO-Ge-MgO manner, while that of an N = 1 layer was just a single layer Ge film. The arrangement of intermediate N layer film can be trivially inferred from these two limiting cases. For example, for the N = 4 layer case, the arrangement is Ge-MgO-Ge-MgO, etc. The thickness of each layer was set to d j = d = 36.293 nm, j = 1, 2, … , 6. The range and step size of the wavelengths used were 0min , 0max ;Δ = 0.4μm, 5.4μm;0.5μm . The frequency-independent dielectric constant static were 16 and 9.65 F/m for Ge and MgO respectively (Dunlap and Watters 1953;Germanium dielectric constant;Crystran Ltd, MgO dielectric constant;Clinard et al. 1982). The electric resistivity is 5 × 10 −7 and 5 × 10 12 Ωm for Ge and MgO respectively (Yamaka and Sawamoto 1954;Lewis and Wright 1968;Germanium Electrical Resistivity, periodictable.com, Figs. 8,9,10,11,12,13,14,15,16,17,18,19,20 and 21 illustrate the output R 0 , T 0 , T ( 0 ), R ( 0 ) produced by the WT-II code for an EM wave incident at an angle 0 = 0 • on an N-layer thin film at an applied transverse voltage of V = 0, 300, 600, and 900Volt . For the sake of clarity, the results are divided into two classes: (i) Figs. 8-13 show the average reflection and transmission curves for a thin film with a fixed number of layers, N , and a family of voltage V ∈ {0, 300, 600, 900V} , which makes it possible to visually compare the impact of the number of layers N in a thin film at a fixed voltage. (ii) the average reflection and transmission curves for a family of thin films with a varying number of layers N ∈ {1, 2, 3, 4, 5, 6} at fixed voltage V are shown in Figs. 14-21, in which the impact of the number of layers N in a thin film at fixed voltage can be visually contrasted.
The R and T curves in Figs. 9-13 show that when V grows from 0 to 900 V, the R curves get suppressed while the T curves enhance. For a thin film with a given N, the sensitivity of the suppression/enhancement effect caused by variations in V , in general, is quite consistent and relatively minor in the wavelength range of 0.4 m ∼ 5.4 m . We hence conclude that the external potential V is not a very useful 'knob' to control the optical responses of a lossy-lossless multilayer thin film due to its relative insensitivity.
Referring to Figs. 14-21, the shape of the reflection and transmission curves, on the other hand, displays a higher degree of variation and sensitivity as the number of layers N is raised at fixed V , a behaviour that qualitatively displays a larger variation than the corresponding lossless-lossless cases. At fixed V , the variation in T due to N depends on the value of N . In the case of N = 2, 4, 6 , the T curves display a non-monotonous, fluctuating trend (but not for the N = 2 curve) with a peaking feature occurring at specific wavelengths. The modulation effect is considered significant in the sense that the shape of the T curve at N = 2, 4, 6 deviates substantially from the N = 1 nominal T curve. For the case of N = 3, 5 , the deviation of the T curve from the nominal N = 1 curve is relatively moderate.
At fixed V , the variation in R due to N is generally significant. The R curves display a nonmonotonous, largely fluctuating trend with the number of sharp peaks and troughs occurring for larger N . For a 1-layer Ge film, R is seen to drop from a peak value of ≈ 0.72 at 0 ≈ 0.5μm to a plateau value at an approximate value of 0.6 for 0 > 2μm . Additional layers could enhance or suppress the value of R at selective wavelengths while significantly altering the profile of the R curve. It is thus feasible to assume that there is a lot of degree of freedom in the lossy-lossless multilayer thin film, in the sense that the function of the R curve displays non-monotonic features such as sharp or moderately sharp peaks and troughs in the range of wavelength investigated. In addition, the profile of the R curve is also sensitively dependent on the parameters of the system. These are favourable properties for materials design purposes.
The phases, R ( ), T ( ) , in general display drastic variation or even abrupt change as the wavelength varies across certain thresholds. The occurrence of abrupt transitions depends on the number of layers. For a thin film with one layer "Ge" and thin films with two layers (Ge-MgO), one abrupt transition of the transmission phase from + ∕ 2 to − ∕ 2 occurs. It is also observed that the phase angles are also strongly modulated by the external potential. The occurrence of such transition increases with the number of layers, N . However, as a matter of physical significance, the phase angle curves R ( ), T ( ) are relatively less important in the sense that only the real optical responses curve T( ) and R( ) are directly measured in practical settings.
It is to be emphasised that the results presented in this manuscript are not meant for the purpose of reporting the numerical values and optical curves of the Ge-MgO multilayer thin film per se. It is meant to demonstrate the practicality and potential application of the WT-II code that, once the structure of a lossy-lossless multilayer thin film is specified, the resulting optical response curves can be computationally obtained. Such a simulator is very useful for designing a multilayer thin film that could produce a given predefined optical curve. This situation could arise for example in applications where optimized optical reflection or transmission at a specific range of wavelength is desired (Strelniker and Bergman 2022). In order to qualify for such capability, it is necessary that the model must possess a sufficient degree of freedom to meet the demand of producing an arbitrarily specified optical profile. It can be envisaged that if the variation and diversity of the output profile have only a weak sensitivity dependence on the input parameters, the code may not be able to produce an arbitrary optical response profile due to the limitation arising from a lack of sufficient degree of freedom in the current polynomial model. As a tally, the set of free parameters that are necessary for producing an optical response curve in the current model includes d j , V , ñ j , static j and j for each layer of j , which itself can be made up of a distinct material. The current model evidently has a large number of free parameters while still remaining practically feasible to materialize in reality. However, to achieve an automated functionality of designing a thin film structure that conforms to a predefined optical curve, the WT-II simulator has to be coupled to a global optimization algorithm (e.g., genetic algorithm) for tweaking the parameters living in multi-dimensional parameter space. In fact, the WT-II code was constructed with the intention of coupling it with an external global optimiser for achieving the customization functionality in mind. Such a program, however, will be a topic for future exploration.

Conclusion
In this manuscript, we have generalized our previous polynomial model that models the optical responses of a lossless-lossless to that of a lossy-lossless multilayer thin film. The EM interactions with nonmagnetic, lossy material exposed to an externally supplied transverse electric potential can be modelled by means of describing the interactions in complex vector space. The present model has the advantage that it allows one to study and simulate the averaged reflection and transmission as functions of wavelength, R( ), T( ) , and their related phases, R ( ), T ( ) , when EM waves pass through a multilayer thin film composed of lossy-lossless materials or lossless-lossless materials alternating one after the other.
The polynomial model suggested in this study has been computationally implemented in a home-grown MATLAB tool, and is dubbed Wave Tensor II, WT-II for short, to distinguish it from the WT-I code that was previously designed for lossless-lossless multilayer thin films. Verification tests have been conducted to confirm that WT-II indeed reproduced the expected numerical behaviour in the lossless-lossless limit as that produced by the WT-I code. Having established the verification, a single-layer thin film of lossy material Ge, and lossy-lossless multilayer thin films made up of N = 2, 3, 4, 5, 6 alternating Ge, MgO layers were used to illustrate the functionality of the WT-II code. The optical response curves for these demo structures at four different V (0, 300, 600, 900 V) were presented. The optical responses, in particular the R curve, exhibit a rich, non-monotonic profile with peaks and troughs at specific wavelengths and are sensitively depending on the tunable parameters of the system, particularly the number of layers in the thin film. It was also found that the external potential strongly modulated the averaged phase angles but only mildly so on the R and T curves.
The WT-II code has demonstrated its capabilities in generating the optical responses for a set of generic, illustrative non-magnetic, alternating lossy-lossless multilayer thin films. As such, it can be used as a convenient computational tool for the simulation of optical responses of more complex, alternating lossy-lossless or lossless-lossless structures. The sensitivity of a multilayer thin film to the 'knobs' (a.k.a. the free parameters) of the polynomial model, such as the type of materials, number of types of materials, composition pattern of each layer d j , incident angle 0 , provides ample free parameter space to allow the generation of non-trivial optical responses. The such desired feature makes the WT-II code a suitable simulator that can be coupled to a global optimization algorithm package in a potential material design package that has an automated functionality to custom design a thin film structure that could produce a predefined optical curve.