You are an expert at summarizing long articles. Proceed to summarize the following text: 
casimir - lifshitz force in an interaction originating from the fluctuations of the electromagnetic field and existing between any couple of polarizable bodies . it was first theoretically derived by casimir in 1948 @xcite in the idealized configuration of two perfectly conducting parallel plates at zero temperature . later , lifshitz and collaborators generalized the calculation to the case of bodies having arbitrary optical properties and of finite temperature @xcite . the casimir - lifshitz interaction , experimentally verified for several different geometries @xcite , results from two contributions , one originating from vacuum fluctuations and present also at zero temperature , the other one from purely thermal fluctuations . the latter becomes relevant when the distance separating the bodies is larger than the thermal wavelength @xmath0 , of the order of @xmath1 m at ambient temperature . this explains why it has been only very recently experimentally observed at thermal equilibrium @xcite . nevertheless , the situation completely changes out of thermal equilibrium . it was first theoretically predicted in 2005 that the atom - surface interaction ( usually referred to as casimir - polder force ) is qualitatively and quantitatively modified with respect to thermal equilibrium @xcite . new power - law behaviors appear , the force can turn into repulsive ( being only attractive at thermal equilibrium ) and it is strongly tunable by modifying the temperatures involved in the system . this prediction was verified in 2007 , providing the first experimental observation of thermal effects @xcite . these results paved the way to a renewed interest in casimir - lifshitz effects out of thermal equilibrium . in fact , this effect was studied for two slabs @xcite and in presence of atoms @xcite , and more recently several different approaches have been developed to deal with the problem of the force out of thermal equilibrium and heat transfer between two @xcite or more @xcite arbitrary bodies . the physics of the electromagnetic field out of thermal equilibrium has also stimulated the study of other effects , such as the manipulation of atomic populations @xcite and entanglement @xcite . , always assumed to be positive . the gratings , in general made of different materials , are infinite in the @xmath2 plane , and periodic in the @xmath3 direction with the same period @xmath4 . they have corrugation depths @xmath5 ( @xmath6 ) , thicknesses @xmath7 and lengths of the upper part of the grating @xmath8 . this defines the filling factors @xmath9.,width=302 ]    in parallel with the interest in the absence of thermal equilibrium , casimir - lifshitz interactions have been studied in several different geometries , with particular interest in the sphere - plane configuration , the most studied experimentally . more recently , nanostructured surfaces have been theoretically considered in the contexts of both force @xcite and heat transfer @xcite . experimentally , the force have been measured between a sphere and a dielectric @xcite or metallic @xcite grating . the problem we address here for the first time is the calculation of the casimir - lifshitz force out of thermal equilibrium in presence of dielectric gratings , in order to study the combination of non - equilibrium and geometrical effects . in particular we consider a system made of two different gratings having different temperatures , immersed in an environmental bath at a third temperature . our calculations can be relevant both to imagine new experiments measuring the casimir - lifshitz force out of thermal equilibrium and in the more general context of the manipulation of the force in micro- and nano - electromechanical systems @xcite . the paper is structured as follows . in sec . [ secintro ] we introduce our physical system and provide the notation and main definitions . in sec . [ secfmm ] we solve the problem of the scattering upon a single 1d lamellar dielectric grating using the fourier modal method . in sec . [ secnum ] , we apply these results in order to calculate the force out of thermal equilibrium between two different gratings . we explore the behavior of the force as a function of the three temperatures and of the geometrical parameters of the gratings , with a specific attention to the appearance and features of repulsion . we finally give in sec . [ secconcl ] some conclusive remarks . we start by describing the system studied in this paper . we address the casimir - lifshitz force between two dielectric gratings immersed in vacuum ( @xmath10 ) in the geometrical configuration shown in fig . we label the two gratings with an index @xmath11 taking values 1 and 2 . the gratings are infinite in @xmath3 and @xmath12 directions , with periodicity along the @xmath3 axis . their distance @xmath13 is defined in fig . [ fig1 ] and can only take positive values ( i.e. a plane @xmath14 must exist separating the two bodies ) . the gratings share the same period @xmath4 and have corrugation depth @xmath5 , permittivities @xmath15 in the homogeneous zone , permittivities @xmath16 along the grating zone having thickness @xmath7 , and filling factors @xmath9 ( @xmath8 is defined as in fig . [ fig1 ] ) . our physical system is considered in a configuration out of thermal equilibrium ( ote ) . this means that each body is supposed to be in local thermal equilibrium with a constant temperature @xmath17 . we also assume that the two gratings are immersed in a radiation bath coming from bounding walls far from the system and having temperature @xmath18 , in general different from the temperatures of the two gratings ( see also @xcite ) . the whole system is considered in a stationary regime so that the three temperatures involved are constant in time .    in @xcite , this assumption has been used to characterize the properties of the source fields ( the ones emitted by the two bodies and coming from the surrounding walls ) in terms of field correlation functions . this procedure is based on a mode decomposition of the fields , each mode @xmath19 being identified by the direction of propagation @xmath20 along the @xmath21 axis , the polarization index @xmath22 [ assuming the values @xmath23 which respectively correspond to transverse electric ( te ) and transverse magnetic ( tm ) modes ] , the frequency @xmath24 and the transverse wavevector @xmath25 . in this description , the @xmath21 component of the wavevector @xmath26 is a dependent variable defined as @xmath27 based on this mode decomposition , the trace of a given operator @xmath28 is defined as @xmath29 the correlation functions of the field have been expressed as a function of the reflection and transmission operators @xmath30 and @xmath31 associated to each body ( see sec . [ secfmm ] for more details ) . using these correlation functions , the ote casimir - lifshitz force acting on body 1 can be cast in the following form @xcite ( the distance dependence is implicit ) : @xmath32 where @xmath33 is the force acting on body 1 at thermal equilibrium at its temperature @xmath34 . this equilibrium contribution reads @xmath35,\end{aligned}\ ] ] while the non - equilibrium term is    @xmath36\nonumber\\ & + n_{21}u^{(21)}\bigl(f_{-1}(\mathcal{r}^{(2)-})-\mathcal{t}^{(2)-}\mathcal{p}_{-1}^{\text{(pw)}}\mathcal{t}^{(2)-\dag}\bigr)u^{(21)\dag}\bigl(f_2(\mathcal{r}^{(1)+})-\mathcal{t}^{(1)-\dag}\mathcal{p}_2^{\text{(pw)}}\mathcal{t}^{(1)-}\bigr)\bigr]\bigr\}.\end{aligned}\ ] ]    in the equations above we have introduced the thermal population @xmath37,\ ] ] with @xmath38 and the population differences @xmath39 . moreover we have defined the auxiliary functions @xmath40 and the operators @xmath41 finally , in we have introduced the projection operators @xmath42 where @xmath43 is the kronecker delta and being @xmath44 [ @xmath45 the projector on the propagative ( @xmath46 ) [ evanescent ( @xmath47 ) ] sector . in order to calculate the force , we now need to compute the reflection and transmission operators associated to a lamellar 1d grating . this will be achieved in the framework of the fourier modal method ( fmm ) @xcite . in the following , we implement this method for a grating of finite size along the @xmath21 axis ( see fig . [ fig2 ] ) in order to take into account finite - size effects on the casimir - lifshitz force . moreover , we solve the scattering problem directly in te and tm components , in order to be coherent with the formalism presented in sec . [ secintro ] . let us consider a system composed of a grating like the one in fig . the space is divided in four zones : zone 1 ( @xmath48 ) , zone 2 ( @xmath49 ) , zone 3 ( @xmath50 ) and zone 4 ( @xmath51 ) . while zones 1 , 3 and 4 are homogeneous with dielectric permittivities @xmath15 ( @xmath52 ) , zone 2 represents the grating , with a dielectric function @xmath53 , periodic in @xmath3 with period @xmath4 . in each zone , every physical quantity is independent of @xmath12 . we first decompose the electric field in any zone with respect to frequency ( only positive frequencies will be used ) : @xmath54.\ ] ] in virtue of the translational invariance of our system along the @xmath12 axis and of the periodicity along the @xmath3 axis , we will employ a fourier decomposition of any @xmath3-dependent quantity . as a consequence , the wavevector component @xmath55 will be replaced by a new mode variable @xmath56 with @xmath55 taking values in the first brillouin zone @xmath57 $ ] and @xmath58 assuming all integer values .    , corrugation depth @xmath59 , and underlying thickness @xmath60 . this defines four zones ( see text ) with four ( in general different ) dielectric permittivities . the period is @xmath4 and the filling factor is defined as @xmath61.,width=321 ]      in any homogeneous zone , we can use a standard rayleigh expansion for the component of the field at frequency @xmath24 @xmath62}^{(i)\phi}_p(\mathbf{k}_n,\omega)e^{(i)\phi}_p(\mathbf{k}_n,\omega),\end{aligned}\ ] ] where the wavevectors are defined as ( @xmath63 ) @xmath64 and @xmath65 is the @xmath21 component of the wavevector inside each medium @xmath66 the unit polarization vectors appearing in eq . are defined as @xmath67}_{\text{te}}^{(i)\phi}(\mathbf{k}_n,\omega)&=\frac{1}{k_n}(-k_y\hat{\mathbf{x}}+k_{x , n}\hat{\mathbf{y}}),\\ \hat{\bbm[\epsilon]}_{\text{tm}}^{(i)\phi}(\mathbf{k}_n,\omega)&=\frac{c}{\omega\sqrt{\epsilon_i(\omega)}}(-k_n\hat{\mathbf{z}}+\phi k^{(i)}_{z , n}\hat{\mathbf{k}_n}).\end{aligned}\ ] ] for convenience , we assign from now on the following labels to the field amplitudes in the three homogeneous zones ( the dependence on @xmath22 , @xmath68 and @xmath24 is implicit ) : @xmath69 where @xmath70 , @xmath71 and @xmath72 represent the incoming , reflected and transmitted field amplitudes respectively . the amplitude @xmath73 is associated to a possible incoming field coming from the other side of the body . its presence guarantees both the full symmetry of the calculation and the possibility to derive at the same time the reflection and transmission operators @xmath74 and @xmath75 . the magnetic field in any zone can be easily deduced from maxwell s equations and it reads @xmath76}^{(i)\phi}_{s(p)}(\mathbf{k}_n,\omega)e^{(i)\phi}_p(\mathbf{k}_n,\omega),\end{aligned}\ ] ] where the function @xmath77 is defined as @xmath78 and @xmath79 . we now move to the periodic region ( zone 2 ) where we write an arbitrary frequency component of the field as @xmath80 where @xmath81 . we are now ready to write maxwell s equations ( for our system we have @xmath82 ) @xmath83 where we used @xmath84 , @xmath85 , @xmath86 , @xmath87 and defined @xmath88 . from we can easily obtain @xmath89 e_y   \end{pmatrix}\\    & =   \begin{pmatrix }      -\dfrac{i}{k_0}\partial_x\dfrac{1}{\varepsilon(x)}\partial_y & ik_0+\dfrac{i}{k_0}\partial_x \dfrac{1}{\varepsilon(x)}\partial_x \\ -ik_0-\dfrac{i}{k_0}\partial_y \dfrac{1}{\varepsilon(x)}\partial_y & \dfrac{i}{k_0}\partial_y\dfrac{1}{\varepsilon(x)}\partial_x    \end{pmatrix } \begin{pmatrix } \widetilde{h}_x \\[5pt ] \widetilde{h}_y \end{pmatrix},\nonumber\end{aligned}\ ] ]    @xmath90 \widetilde{h}_y \end{pmatrix}\\    & =    \begin{pmatrix }      \dfrac{i}{k_0}\partial_x\partial_y & -ik_0\varepsilon(x)-\dfrac{i}{k_0}\partial_x \partial_x \\      ik_0\varepsilon(x)+\dfrac{i}{k_0}\partial_y \partial_y & -\dfrac{i}{k_0}\partial_y\partial_x    \end{pmatrix } \begin{pmatrix } e_x \\[5pt ] e_y   \end{pmatrix}.\nonumber\end{aligned}\ ] ]    we now employ a fourier factorization for the fields @xmath91 and @xmath92 . correspondingly , the operator @xmath93 is replaced by @xmath94 , @xmath95 being a scalar , whereas the operator @xmath96 is replaced by @xmath97 , where @xmath98 . these replacements allow us to rewrite maxwell s equations of our system in a more compact form : @xmath99 @xmath100      ik_0{\bigg\llbracket\dfrac{1}{\varepsilon}\bigg\rrbracket}^{\!-1}\!\!\!-\dfrac{i\beta^2}{k_0 } & \dfrac{i\beta}{k_0}\alpha    \end{pmatrix } \bm{\mathcal{e}}\nonumber\\    & = \amsbb{g}\bm{\mathcal{e}},\end{aligned}\ ] ] where for an arbitrary field @xmath101 we have introduced the decomposition @xmath102 gathering @xmath3 and @xmath12 components and denoting with @xmath103 a set of scattering orders . we have also introduced the toeplitz matrix @xmath104 , defined by the relation @xmath105 , @xmath106 being the @xmath58-th fourier component of @xmath107 . we remark that going from eqs . - to eqs . - we have used the modified factorization rule introduced in @xcite . of course , in order to exploit numerically the fmm , a truncation has to be made , limiting the number of diffraction orders taken into account . for a given truncation @xmath108 , this corresponds to keeping @xmath109 scattering orders @xmath110 and the size of the corresponding column vector @xmath111 is thus @xmath112 . based on this truncation , we obtain @xmath113 where @xmath114 and @xmath115 are respectively the eigenvectors and eigenvalues @xmath116 matrices of the matrix @xmath117 @xmath118 then , from eqs . and , we obtain that fields are @xmath119 @xmath120 and @xmath121 being arbitrary constant vectors , and where @xmath122 . based on the knowledge of the electric and magnetic fields in the four regions , we can now impose the continuity of the @xmath3 and @xmath12 components of both fields at the three interfaces @xmath123 , @xmath124 and @xmath125 . in the following boundary conditions the values of @xmath55 , @xmath126 and @xmath24 are given . exploiting this fact we use the generic simplified expression @xmath127 to refer to the amplitude @xmath128 . before proceeding in the calculation , we introduce an additional phase factor in the expression of the fields in zones 3 and 4 . in particular , in zone 3 we replace @xmath129 $ ] with @xmath130 $ ] , while in zone 4 we replace @xmath129 $ ] with @xmath131 $ ] . these factors make the calculation easier and can be simply recovered at the end . at the first interface @xmath123 we have for the @xmath3 and @xmath12 components of the electric field ( repeated indices are implicitly summed over )    @xmath132 \frac{k_{x , n}}{k_n}(i_{1,n}+r_{1,n})+\frac{c}{\sqrt{\varepsilon_1}\omega}k_{z , n}^{(1)}\frac{k_y}{k_n}(i_{2,n}-r_{2,n})\end{pmatrix}= \begin{pmatrix}\amsbb{p}^{(11)}_{nm}(a_{x , m}+b_{x , m})+\amsbb{p}^{(12)}_{nm}(a_{y , m}+b_{y , m})\\[5pt ] \amsbb{p}^{(21)}_{nm}(a_{x , m}+b_{x , m})+\amsbb{p}^{(22)}_{nm}(a_{y , m}+b_{y , m } ) \end{pmatrix},\ ] ]    while for the magnetic field we get @xmath133 -\frac{c}{\omega } k_{z , n}^{(1 ) } \frac{k_y}{k_n } \big ( i_{1,n } -r_{1,n } \big ) + \sqrt{\varepsilon_1}\frac{k_{x , n}}{k_n } \big(i_{2,n}+r_{2,n } \big ) \end{pmatrix}=\begin{pmatrix}{\amsbb{p}'}^{(11)}_{nm}(a_{x , m}-b_{x , m})+{\amsbb{p}'}^{(12)}_{nm}(a_{y , m}-b_{y , m})\\[5pt ] { \amsbb{p}'}^{(21)}_{nm}(a_{x , m}-b_{x , m})+{\amsbb{p}'}^{(22)}_{nm}(a_{y , m}-b_{y , m})\end{pmatrix}.\ ] ] the boundary conditions at @xmath124 give us the following equations for the electric field @xmath134 \frac{k_{x , n}}{k_n}({c}_{1,n}+c'_{1,n})+\frac{c}{\sqrt{\varepsilon_3}\omega}k_{z , n}^{(3)}\frac{k_y}{k_n}(c_{2,n}-c'_{2,n } ) \end{pmatrix}\nonumber\\ & = \begin{pmatrix}\amsbb{p}^{(11)}_{nm}\big(e^{\amsbb{d}^{(11)}_{mm}h}a_{x , m}+e^{-\amsbb{d}^{(11)}_{mm}h}b_{x , m}\big)+\amsbb{p}^{(12)}_{nm}\big(e^{\amsbb{d}^{(22)}_{mm}h}\,a_{y , m}+e^{-\amsbb{d}^{(22)}_{m}h}b_{y , m}\big)\\[5pt ] \amsbb{p}^{(21)}_{nm}\big(e^{\amsbb{d}^{(11)}_{mm}h}\,a_{x , m}+e^{-\amsbb{d}^{(11)}_{mm}h}b_{x , m}\big)+\amsbb{p}^{(22)}_{nm}\big(e^{\amsbb{d}^{(22)}_{mm}h}a_{y , m}+e^{-\amsbb{d}^{(22)}_{mm}h}b_{y , m}\big)\end{pmatrix},\end{aligned}\ ] ] and the following ones for the magnetic field @xmath135 -\frac{c}{\omega } k_{z , n}^{(3)}\frac{k_y}{k_n}(c_{1,n}-c'_{1,n})+\sqrt{\varepsilon_3}\frac{k_{x , n}}{k_n}(c_{2,n}+c'_{2,n } ) \end{pmatrix}\nonumber\\ & = \begin{pmatrix } { \amsbb{p}'}^{(11)}_{nm}\big(e^{\amsbb{d}^{(11)}_{mm}h}\,a_{x , m}-e^{-\amsbb{d}^{(11)}_{mm}h}\,b_{x , m}\big)+{\amsbb{p}'}^{(12)}_{nm}\big(e^{\amsbb{d}^{(22)}_{mm}h}\,a_{y , m}-e^{-\amsbb{d}^{(22)}_{mm}h}\,b_{y , m}\big)\\[5pt ] { \amsbb{p}'}^{(21)}_{nm}\big(e^{\amsbb{d}^{(11)}_{mm}h}\,a_{x , m}-e^{-\amsbb{d}^{(11)}_{mm}h}\,b_{x , m}\big)+{\amsbb{p}'}^{(22)}_{nm}\big(e^{\amsbb{d}^{(22)}_{mm}h}\,a_{y , m}-e^{-\amsbb{d}^{(22)}_{mm}h}\,b_{y , m}\big)\end{pmatrix}.\end{aligned}\ ] ] finally , the boundary conditions at @xmath125 read @xmath136 \frac{k_{x , n}}{k_n}\big(e^{i k_{z , n}^{(3)}\delta}\,{c}_{1,n}+e^{-i k_{z , n}^{(3)}\delta}\,c'_{1,n}\big)+\frac{c}{\sqrt{\varepsilon_3}\omega}k_{z , n}^{(3)}\frac{k_y}{k_n}\big(e^{i k_{z , n}^{(3)}\delta}\,c_{2,n}-e^{-i k_{z , n}^{(3)}\delta}\,c'_{2,n}\big ) \end{pmatrix}\nonumber\\ & = \begin{pmatrix}-\frac{k_y}{k_n}(t_{1,n}+i'_{1,n})+\frac{c}{\sqrt{\varepsilon_4}\omega}k_{z , n}^{(4)}\frac{k_{x , n}}{k_n}(t_{2,n}-i'_{2,n})\\[5pt ] \frac{k_{x , n}}{k_n}(t_{1,n}+i'_{1,n})+\frac{c}{\sqrt{\varepsilon_4}\omega}k_{z , n}^{(4)}\frac{k_y}{k_n}\big(t_{2,n}-i'_{2,n } ) \end{pmatrix},\end{aligned}\ ] ] and the ones for the magnetic field are given by @xmath137 -\frac{c}{\omega } k_{z , n}^{(3)}\frac{k_y}{k_n}\big(e^{i k_{z , n}^{(3)}\delta}\,c_{1,n}-e^{-i k_{z , n}^{(3)}\delta}\,c'_{1,n}\big)+\sqrt{\varepsilon_3}\frac{k_{x , n}}{k_n}\big(e^{i k_{z , n}^{(3)}\delta}\,c_{2,n}+e^{-i k_{z , n}^{(3)}\delta}\,c'_{2,n}\big ) \end{pmatrix}\nonumber\\ & = \begin{pmatrix}-\frac{c}{\omega}k_{z , n}^{(4)}\frac{k_{x , n}}{k_n}(t_{1,n}-i'_{1,n})-\sqrt{\varepsilon_4}\frac{k_y}{k_n}(t_{2,n}+i'_{2,n})\\[5pt ] -\frac{c}{\omega } k_{z , n}^{(4)}\frac{k_y}{k_n}(t_{1,n}-i'_{1,n})+\sqrt{\varepsilon_4}\frac{k_{x , n}}{k_n}(t_{2,n}+i'_{2,n})\end{pmatrix}.\end{aligned}\ ] ]      in the following , we are going to cast eqs . - under the form @xmath138 the column vectors @xmath120 and @xmath121 appearing in this equation gather two vectors defined as in eq . . on the contrary , all the six other column vectors gather the two polarizations of the field under the form @xmath139 the system of equations has to be solved for the unknowns @xmath140 , @xmath141 , @xmath120 , @xmath121 , @xmath142 , and @xmath143 . the expression of @xmath140 and @xmath141 as a function of @xmath144 and @xmath145 will provide us the desired reflection and transmission operators . the fact that for @xmath120 and @xmath121 we solve in cartesian components and not in polarization is not an issue since these appear as mute variables not participating to the scattering operators . the explicit expression of the @xmath146 matrices appearing in can be obtained by means of algebraic manipulation of eqs . - . the final result is @xmath147 @xmath148 @xmath149 in these expressions we have defined @xmath150 where @xmath151 the symbol @xmath152 denotes a @xmath153 diagonal matrix having diagonal elements @xmath154 , @xmath155 ,  , @xmath156 . we have also defined the square matrices of dimension @xmath112 @xmath157    using we obtain the final result @xmath158 where @xmath159 having introduced the associative operation @xmath160 , which for three square matrices @xmath161 , @xmath162 and @xmath163 of dimension @xmath164 is defined as @xmath165 where each matrix have been decomposed in four square blocks of dimension @xmath112 . equation allows to identify the four blocks of @xmath146 as the reflection and transmission operators associated to the two sides of the grating . for example , the block @xmath166 is the coefficient linking the reflected amplitudes @xmath140 to the incident ones @xmath144 : it then coincides with the reflection operator @xmath167 for a wave impinging on the grating of fig . from @xmath48 . by analog reasoning , we write the full @xmath146 matrix as @xmath168      we now need to calculate the reflection and transmission operators associated to the two gratings represented in fig . as far as grating 1 is concerned , the problem we need to solve is exactly the one presented in this section , with the appropriate values of the geometrical parameters . concerning grating 2 , we need to take into account the fact that its interface is the plane @xmath169 and not @xmath123 . the modification of the scattering operators with respect to translations has been discussed in @xcite . based on these results , and using the mode expansion used in this work , the @xmath170 operator of grating 2 can be expressed as a function of the @xmath171 derived from fmm as @xmath172{\displaystyle{\langle p,\mathbf{k},n,\omega|}}\widetilde{\mathcal{r}}_2 ^ -{\displaystyle{|p',\mathbf{k}',n',\omega'\rangle}}.\nonumber\end{aligned}\ ] ] as we will show in the next section , this operator is the only one associated to grating 2 appearing in the expression of the force for our configuration . in this section we will present a numerical application concerning the force between two different gratings . being both gratings infinite in the @xmath2 plane , we actually calculate the pressure acting on any of them , as discussed in the case of two slabs in @xcite . in the first configuration we have chosen both gratings to have period @xmath173 m , corrugation depth @xmath174 m and filling factor @xmath175 . as shown in fig . [ fig1 ] , the transition points of the two gratings are aligned , i.e. there is no shift along the @xmath3 axis . grating 1 is made of fused silica ( sio@xmath176 ) and has thickness @xmath177 m , while grating 2 is made of silicon and has infinite thickness . in order to take into account this point we have imposed @xmath178 in the fmm relative to grating 2 ( see sec . [ secfmm ] ) and removed in eq . all the terms proportional to the transmission operators of body 2 . physically , this can be explained by observing that because of the infinite thickness all the radiation coming from the upper side of body 2 is absorbed and does not reach the cavity between the gratings . both silicon and fused silica have been described by means of optical data taken from @xcite . as anticipated in sec . [ secfmm ] , the numerical use of fmm demands to choice of a truncation order , problem that will be addressed in this section . we noted before that by choosing a truncation order @xmath108 in the fmm we obtain as a result reflection operators which are square matrices of dimension @xmath112 , that is two polarizations times @xmath109 diffraction orders . their typical structure is thus    @xmath179 & a_{1,2}[n , n']\\\hline a_{2,1}[n , n ' ] & a_{2,2}[n , n']\end{array}\right)\end{array},\ ] ] where each block @xmath180 $ ] is a @xmath153 matrix , the indices @xmath58 and @xmath181 running from @xmath182 to @xmath108 . it is worth stressing that , for a given @xmath108 , only the elements closer to the center of each block of the matrix ( i.e. close to @xmath183 for each couple of polarizations ) are at convergence . thus , for a given @xmath184 , we can increase the value of @xmath108 starting from @xmath185 in order to extract a @xmath186 ( @xmath187 ) scattering operator whose elements are at convergence with a given accuracy ( in our case of the order of one percent ) . the operators obtained following this procedure can be used to compute the force using eqs . and . since these equations imply a trace containing also a sum over the diffraction orders @xmath58 , the series has to be replaced with a finite sum from @xmath188 to @xmath189 . the value of @xmath189 has to be found by imposing the convergence of the series at a chosen accuracy . also in this case , we required an accuracy smaller than one percent . the calculation of the pressure at a given distance requires the evaluation of the traces and at several different values of the wavevector @xmath190 and the frequency @xmath24 , in order to reach the convergence on the integral on the three variables . we have observed that a single calculation of the trace requires values of @xmath189 of the order of 2 ( with peaks going up to 7 ) and corresponding values of @xmath108 of the order of 5 ( with peaks around 20 ) . a single value of the pressure required a computation time of the order of 16 hours on three 3ghz cpus .      in the configuration described above , we have calculated the pressure acting on grating 1 . to point out the features of our ote configuration we present in fig . [ fig3 ] the pressure as a function of distance for different sets of the temperatures @xmath191 . m , @xmath177 m , @xmath173 m and @xmath192 ) in front of grating 2 ( made of silicon , having @xmath193 m , infinite thickness , @xmath173 m and @xmath194 ) as a function of distance @xmath13 . the four curves correspond to different choices of the three temperatures @xmath191 ( see legend).,width=302 ]    we clearly see that the modification of the three temperatures strongly affects the value of the force . in particular , three of the four curves show a transition from an attractive to a repulsive behavior , not realizable at thermal equilibrium for this configuration . this qualitative difference is a well - known consequence of the absence of thermal equilibrium and it has already been predicted in the case of two parallel slabs @xcite . we stress that the transition point between attraction and repulsion is a function of the temperatures . for the values chosen , it roughly varies from 3 to 5@xmath195 m .    to underline even more the richness of our ote configuration , we focus on the temperatures @xmath196k and compare the pressure to its equivalent at thermal equilibrium at the temperature of body 1 , i.e. @xmath197k . this comparison is presented in fig . [ fig4 ] . in the same figure we also plot the pressure , both at and out of thermal equilibrium , for filling factors @xmath198 ( corresponding to _ filled _ gratings , that is a 11@xmath195m - thick sio@xmath176 slab at distance @xmath13 from an infinite si slab ) and for @xmath199 ( corresponding to _ empty _ gratings , that is a 10@xmath195m - thick sio@xmath176 slab at distance @xmath200 m from an infinite si slab ) . k , solid lines ] compared to equilibrium pressure ( @xmath201k , dashed lines ) for two gratings ( black squares ) , and two slab - slab configurations corresponding to filled gratings ( @xmath202 , green circles ) and an empty ones ( @xmath203 , red triangles).,width=302 ]    apart from the transition to a repulsive behavior , this figure shows that the pressure in presence of a grating always lies between the two results corresponding to filled and empty ones . finally , a comparison between figs . [ fig3 ] and [ fig4 ] shows that the asymptotic value of the pressure can be tuned by varying the temperatures to values comparable ( apart from their sign ) to the pressure at thermal equilibrium at much smaller distances , of the order of 3@xmath195 m .    to conclude this section , we compare the grating - grating pressure obtained using fmm to the result coming from the pfa ( proximity force approximation ) , typically used to deal with complex geometries such as sphere - plane and nanostructured surfaces . in the case of two aligned gratings with equal filling factors @xmath204 it reduces to the following weighted sum of the pressures of simple slab - slab configurations @xcite : @xmath205 where @xmath206 is the pressure acting on a @xmath207-thick slab at a distance @xmath13 from a @xmath208-thick slab .        in fig . [ fig5 ] we plot the ratio between the exact pressure and the pfa results for the four temperature configurations used in fig . we observe that pfa provides in our range of distances a description of the pressure with a relative error typically well below 20% . the fact the pfa predicts a change of sign not exactly at the position predicted by the exact calculation results in the existence of a vertical asymptote of the ratio @xmath209 , clearly shown in the blue and orange curves in fig . [ fig5 ] . it is now interesting to understand how a modification of the geometrical parameters of the gratings is able to tune the value of the pressure . to this aim we have chosen as a reference the pressure at a distance @xmath210 m for @xmath196k , for which the pressure is around @xmath211nm@xmath212 ( see fig . [ fig3 ] ) . starting from this result , we have modified one by one the values of the filling factor @xmath213 , period @xmath4 , corrugation depth @xmath59 and calculated the ratio between the modified pressure and the reference @xmath214 . m [ temperatures @xmath196k ] as a function of the geometrical parameters . the reference point ( black circle ) corresponds to the set of parameters @xmath215 , @xmath216 m , @xmath177 m , infinite @xmath208 , @xmath173 m . the three curves show the variation of pressure when changing one parameter at a time ( red diamonds for the filling factor , green triangles for the period , blue squares for the corrugation depth ) . on the @xmath12 axis , the pressures are normalized with respect to the reference one , while on the @xmath3 axis each varying parameter is normalized with respect to its reference value ( @xmath217 , @xmath218 m , @xmath219 m ) . note that the plot on the right side continues the one on the left with a modified @xmath3 scale.,width=302 ]    k ] for three different values of filling factor , all the other geoemtrical parameters being the reference ones.,width=302 ]    the results are shown in fig . [ fig6 ] , where the pressure ratio is plotted as a function of the ratio between the modified parameter and the reference ones ( @xmath217 , @xmath218 m and @xmath219 m ) . first , we observe that geometrical modifications can tune the pressure by a factor going from 0.5 to 1.6 . in particular , this region can be fully explored by varying the filling factor between the two admitted extreme values @xmath203 and @xmath202 , i.e. between the two limiting slab - slab configurations . concerning the depth @xmath59 , it also allows a wide variation of the pressure . we remark that for @xmath59 going to zero we recover the result corresponding to @xmath202 , that is a filled grating . on the contrary , for increasing values of @xmath59 , we see that we approach to a pressure approximately equal to half the value of the pressure for @xmath202 . this can be interpreted by noticing that roughly speaking at some point the corrugation is so deep that only the upper part ( half of the total surface , being @xmath175 ) contributes to the pressure . differently , the dependence of the pressure on the period @xmath4 is less pronounced , and absent within our accuracy in the case of a lateral shift between the gratings , not reported in figure . as we have shown , the filling factor is a promising tool to tailor the behavior of the pressure . this is further pointed out in fig . [ fig7 ] , where the distance - dependent pressure is plotted for three different values of @xmath213 . whereas the asymptotic value of the pressure is practically the same , we note that for small distances the three curves differ visibly . more interestingly , the attractive - repulsive transition can be tuned approximately from 2.5 to 3.5@xmath195 m by changing @xmath213 from 0.15 to 0.85 . let us focus now on the spectral properties of the pressure , by analyzing the quantity @xmath220 , defined as the spectral component at frequency @xmath24 of the non - equilibrium contribution to the force , that is @xmath221 also in this case , we consider our reference point @xmath210 m and @xmath222 and compare its spectral distribution with the two slab - slab cases ( @xmath203 and @xmath202 ) as well as with some variations of one of the three parameters discussed above . m [ temperatures @xmath196k ] . the solid black line corresponds to filled gratings ( @xmath202 ) , the dot - dot - dashed red line to empty ones ( @xmath203 ) , the dotted blue line to our reference gratings , having @xmath175 . in the other curves we vary the geometrical parameters one by one with respect to our reference case : dot - dashed violet line for @xmath223 , short - dashed green line for @xmath224 m , long - dashed brown line for @xmath225m.,width=302 ]    the result is shown in fig . we see that no striking spectral difference is present between the configurations compared . roughly speaking , no new modes ( such as the spoof plasmons observed in metal gratings @xcite ) are observed in the spectral region of interest , that is up to @xmath24 of the order of @xmath226rads@xmath227 . the spectral properties for any considered value of the geometrical parameters show small differences with respect to the ones of the two slab - slab configurations . m and @xmath228 as a function of @xmath229 and @xmath18 . the solid line corresponds to zero pressure , while the dashed lines to the other contour lines shown in legend.,width=302 ]      as we have seen in sec . [ secgeopar ] , the filling factor is a promising tool to shift the distance at which the transition between attraction and repulsion takes place . nevertheless , from an experimental point of view it is more interesting to understand how this transition can be affected by tuning parameters which can be varied during an experiment , such as the three temperatures . this is topic of this section , where we first consider the case in which the two gratings have a common temperature @xmath228 , in general different from the environmental one @xmath18 . for this configuration , we plot in fig . [ fig9 ] the pressure acting on grating 1 in the reference configuration discussed above as a function of @xmath229 and @xmath18 . the plot is clearly divided in two regions , corresponding to positive and negative values of the pressure , separated by a solid zero - pressure line . following this line , we see that repulsion can be obtained only for body temperatures larger than approximately 312k , and that for larger values of @xmath229 a larger region of @xmath18 realizes repulsion . moreover , we stress the remarkable feature that for values of @xmath229 close to 312k the pressure is approximately zero and almost independent on the environmental temperature for @xmath18 up to approximately 150k .    in the same spirit of our last analysis we now fix only @xmath34 at three different values ( 200 , 300 and 400k ) and let @xmath230 and @xmath18 vary . the pressure as a function of the two temperatures is shown in fig . [ fig10 ] . we see a behavior similar to the one observed in fig . [ fig9 ] , that is the existence of a minimum temperature @xmath231 below which repulsion is impossible , as well as a region where the pressure is close to zero almost independently of @xmath18 . as manifest from fig . [ fig10 ] , the limit temperature @xmath231 is a decreasing function of @xmath34 . m as a function of @xmath230 and @xmath18 for three different values of @xmath34 . same convention of fig . [ fig9 ] for contour lines.,width=680 ]     of attractive - repulsive transition of the pressure as a function of @xmath18 for three different values of @xmath228.,width=302 ]    finally , we discuss how the distance @xmath232 at which the attractive - repulsive transition takes place can be tuned by changing the three temperatures . this is shown in fig . [ fig11 ] , where we fix @xmath233k and plot @xmath232 as a function of @xmath18 . as a general remark , when @xmath18 is smaller than @xmath229 the distance @xmath232 tends to a constant value , which decreases from 5.5@xmath195 m to 3@xmath195 m for @xmath229 going from 200 to 400k . furthermore , when @xmath18 tends to @xmath229 , i.e. the system approaches thermal equilibrium , @xmath232 tends to a vertical asymptote , in accordance to the fact that the pressure is always attractive at thermal equilibrium . we calculated the casimir - lifsthiz pressure out of thermal equilibrium acting on a 1d dielectric lamellar grating in front of another ( in general different ) dielectric grating . to this aim , we implemented the fourier modal method in order to derive the scattering operators associated to each individual grating . using the general formalism for casimir - lifshitz force based on scattering matrices , we calculated the pressure acting on a finite fused silica grating in presence of an infinite silicon grating , and also compared our results to the proximity force approximation . we showed that the combination of geometrical structuring of the surface and absence of thermal equilibrium offers an extremely rich domain of variation both with respect to thermal equilibrium and with respect to planar slabs out of thermal equilibrium . as in the case of two slabs , non - equilibrium is able to produce a repulsive pressure , whose intensity can be tuned by varying the temperatures as well as the several geometrical parameters associated to each grating . we also pointed out the presence of regimes in which the pressure is close to zero and almost independent of the environmental temperature . remarkably , the variations of all the parameters strongly affect the distance at which the transition between attractive and repulsive pressure occurs , allowing to obtain transition distances as low as @xmath234 m . this feature is indeed promising for the experimental observation of a repulsive force . moreover , our results can be relevant in the context of force manipulations on micro - mechanical systems @xcite . finally , an extension of this study to three - body configurations is also promising toward the manipulation of heat transfer @xcite . 99 h. b. g. casimir , proc . akad . wet . * 51 * , 793 ( 1948 ) . h. b. g. casimir - lifshitzand d. polder , phys . rev . * 73 * , 360 ( 1948 ) . i. e. dzyaloshinskii , e. m. lifshitz , and l. p. pitaevskii , adv . * 10 * , 165 ( 1961 ) . _ casimir - lifshitzphysics _ , lecture notes in physics vol . 834 , edited by d. dalvit , p. milonni , d. roberts , and f. da rosa ( springer - verlag , berlin , 2011 ) . a. sushkov et al . , physics * 7 * , 230 ( 2011 ) . m. antezza , l. p. pitaevskii , and s. stringari , phys . lett . * 95 * , 113202 ( 2005 ) . m. antezza , j. phys . a : math . gen . * 39 * , 6117 ( 2006 ) . j. m. obrecht , r. j. wild , m. antezza , l. p. pitaevskii , s. stringari , and e. a. cornell , phys . rev . lett . * 98 * , 063201 ( 2007 ) . m. antezza , l. p. pitaevskii , s. stringari , and v. b. svetovoy , phys . lett . * 97 * , 223203 ( 2006 ) . m. antezza , l. p. pitaevskii , s. stringari , and v. b. svetovoy , phys . a * 77 * , 022901 ( 2008 ) . m. antezza , l. p. pitaevskii , s. stringari , phys . a * 70 * , 053619 ( 2004 ) . s. y. buhmann and s. scheel , phys . lett . * 100 * , 253201 ( 2008 ) . y. sherkunov , phys . a * 79 * , 032101 ( 2009 ) . r. o. behunin and b .- hu , phys . a * 82 * , 022507 ( 2010 ) . r. behunin and b .- hu , j. phys . a : math . theor . * 43 * , 012001 ( 2010 ) . r. o. behunin and b .- hu , phys . rev . a * 84 * , 012902 ( 2011 ) . g. bimonte , phys . rev . a * 80 * , 042102 ( 2009 ) . r. messina and m. antezza , europhys . lett . * 95 * , 61002 ( 2011 ) . r. messina and m. antezza , phys . a * 84 * , 042102 ( 2011 ) . m. krger , t. emig , g. bimonte , and m. kardar , europhys . lett . * 95 * , 21002 ( 2011 ) . m. krger , g. bimonte , t. emig , and m. kardar , phys . b * 86 * , 115423 ( 2012 ) . a. w. rodriguez , o. ilic , p. bermel , i. celanovic , j. d. joannopoulos , m. soljai , and s. g. johnson , phys . lett . * 107 * , 114302 ( 2011 ) . a. p. mccauley , m. t. h. reid , m. krger , and s. g. johnson , phys . rev . b * 85 * , 165104 ( 2012 ) . a. w. rodriguez , m. t. h. reid , and s. g. johnson , phys . b * 86 * , 220302(r ) ( 2012 ) . m. krger , t. emig , and m. kardar , phys . 106 * , 210404 ( 2011 ) . a. w. rodriguez , m. t. h. reid , and s. g. johnson , phys . b * 88 * , 054305 ( 2013 ) . r. messina and m. antezza , phys . rev . a * 89 * , 052104 ( 2014 ) . b. bellomo , r. messina , and m. antezza , europhys * 100 * , 20006 ( 2012 ) . b. bellomo , r. messina , d. felbacq , and m. antezza , phys . a * 87 * , 012101 ( 2013 ) . b. bellomo and m. antezza , europhys . lett . * 104 * , 10006 ( 2013 ) . b. bellomo and m. antezza , new j. phys . * 15 * , 113052 ( 2013 ) . p. s. davids , f. intravaia , f. s. s. rosa , and d. a. r. dalvit , phys . a * 82 * , 062111 ( 2010 ) . f. intravaia , p. s. davids , r. s. decca , v. a. aksyuk , d. lpez , and d. a. r. dalvit , phys . a * 86 * , 042101 ( 2012 ) . j. lussange , r. gurout , and a. lambrecht , phys . a * 86 * , 062502 ( 2012 ) . r. gurout , j. lussange , h. b. chan , a. lambrecht , and s. reynaud , phys . a * 87 * , 052514 ( 2013 ) . j. lussange , r. gurout , f. s. s. rosa , j .- j . greffet , a. lambrecht , and s. reynaud , phys . b * 86 * , 085432 ( 2012 ) . r. gurout , j. lussange , f. s. s. rosa , j .- hugonin , d. a. r. dalvit , j .- j . greffet , a. lambrecht , and s. reynaud , phys . b * 85 * , 180301(r ) ( 2012 ) . h. b. chan , y. bao , j. zou , r. a. cirelli , f. klemens , w. m. mansfield , and c. s. pai , phys . * 101 * , 030401 ( 2008 ) . y. bao , r. gurout , j. lussange , a. lambrecht , r. a. cirelli , f. klemens , w. m. mansfield , c. s. pai , and h. b. chan , phys . rev . lett . * 105 * , 250402 ( 2010 ) . f. intravaia et al . , nat . comm . * 4 * , 2515 ( 2013 ) . h. b. chan , v. a. aksyuk , r. n. kleiman , d. j. bishop , and f. capasso , science * 291 * , 1941 ( 2001 ) . j. zou , a. w. rodriguez , m. t. h. reid , a. p. mccauley , i. i. kravchenko , t. lu , y. bao , s. g. johnson , and h. b. chan , nat . comm . * 4 * , 1845 ( 2013 ) . h. kim , j. park , and b. lee , _ fourier modal method and its applications in computational nanophotonics _ ( crc press , boca raton , 2012 ) . g. granet , b. guizal , j. opt . a * 13 * , 1019 ( 1996 ) . _ handbook of optical constants of solids _ , edited by e. palik ( academic press , new york , 1998 ) . f. j. garca - vidal , l. martn - moreno , and j. b. pendry , j. opt . a : pure appl * 7 * , s97 ( 2005 ) . n. yu et al . , nat . * 9 * , 730 ( 2010 ) . r. messina , m. antezza , and p. ben - abdallah , phys . lett . * 109 * , 244302 ( 2012 ) .
we calculate the casimir - lifshitz pressure in a system consisting of two different 1d dielectric lamellar gratings having two different temperatures and immersed in an environment having a third temperature . 
 the calculation of the pressure is based on the knowledge of the scattering operators , deduced using the fourier modal method . 
 the behavior of the pressure is characterized in detail as a function of the three temperatures of the system as well as the geometrical parameters of the two gratings . 
 we show that the interplay between non - equilibrium effects and geometrical periodicity offers a rich scenario for the manipulation of the force . 
 in particular , we find regimes where the force can be strongly reduced for large ranges of temperatures . 
 moreover , a repulsive pressure can be obtained , whose features can be tuned by controlling the degrees of freedom of the system . remarkably , the transition distance between attraction and repulsion can be decreased with respect to the case of two slabs , implying an experimental interest for the observation of repulsion .