Entropy current and equilibrium partition function in fluid dynamics

Existence of an entropy current with non-negative divergence puts a lot of constraints on the transport coefficients of a fluid, so does the existence of equilibrium. In all the cases we have studied so far we have seen an overlap between these two sets of constraints. In this note we shall try to explore the reason for such an overlap. We shall also see how a part of the entropy current could be determined from the equilibrium partition function.


Introduction
Fluid dynamics is an effective description for systems that are locally in thermodynamic equilibrium. For a fluid system, in a sufficiently small patch of space-time, we can always associate some local temperature, energy density and other thermodynamic variables. These properties may vary in space and time but in such a slow fashion that the concept of local thermodynamic equilibrium is valid always. These local thermodynamic properties are the basic variables of fluid dynamics. We can choose them to be temperature T (x), chemical potentials µ i (x) and four-velocity u µ (x). The equations of fluid dynamics are simply the conservation equations for the stress tensor and the conserved currents of the system. In fluid dynamics the basic input is the constitutive relations which are expressions for the stress tensor and the conserved current in terms of the fluid variables.
Since the fluid variables are slowly varying with respect to space-time, we can treat the dynamics of fluid in a derivative expansion. Constitutive relations are also expanded in terms of the derivative of the fluid variables. By naive symmetry analysis we could count the number of independent terms possible in each order in derivative expansion. Every independent term should be multiplied by some unknown coefficient, called the transport coefficients [1].
It is very difficult to compute the transport coefficients from the microscopic theory and therefore it is useful to constrain their number and structure from several other physical requirement that a consistent theory must satisfy.
One such requirement is the local version of the second law of thermodynamics. According to the second law of thermodynamics total entropy should always increase for any evolution from one equilibrium to another equilibrium configuration. For a local theory like fluid dynamics we expect the entropy to increase locally. In other words there should exist an entropy current whose divergence is always positive definite for every non equilibrium fluid flow, consistent with fluid equations. We shall call this condition as 'entropy condition'.
It turns out that just the existence of such an entropy current restricts the number and the structure of the transport coefficients significantly [2], [3], [4], [5], [6], [7], [8], [9]. We can classify the constraints arising from 'entropy condition' into two different categories. The expected ones are the 'inequalities' for the values of different transport coefficients. The others are the 'equality-type' constraints. These are the ones that genuinely reduce the number of transport coefficients by equating several of them which otherwise look independent from naive symmetry analysis.
Like the local version of second law, the existence of equilibrium is another physical requirement [10], [11]. More precisely we expect that fluid dynamics, when studied on a time independent background must admit atleast one time independent equilib-rium solution. Also we should be able to generate the stress tensors and the charge currents of this equilibrium fluid from some partition function constructed out of the background metric and the gauge field. We shall refer to this condition as 'equilibrium condition'. This condition also is not guaranteed by naive symmetry of the system and imposes several constraints on the transport coefficients [8], [10], [11], [12], [13], [14], [15], [16], [17], [18]. So far in every cases that have been analysed, we have seen that the 'equality-type' constraints arising from 'entropy condition' are same as the constraints imposed by 'equilibrium condition' [4], [6], [7], [8], [10], [11], [13], [15]. In this note we shall explore the possible reason for such an equivalence in a general context. Eventually we shall show the following. If the 'equilibrium condition' is satisfied by some constitutive relation, then we should always be able to construct an entropy current whose divergence is non negative for any consistent fluid flow provided some transport coefficients (ones that are unconstrained by the 'equilibrium condition') satisfy some further inequalities.
In order to establish this, we shall develop an explicit algorithm for the construction of an entropy current, starting from the equilibrium partition function of the system. Below we shall briefly describe how this construction works.
It is obvious that the equilibrium partition function will constrain the form of the entropy current to some extent. This is because once the partion function is known, using the rules of thermodynamics we can always compute the total entropy of the system in equilibrium. On the other hand, by definition, the integration of the time component of the entropy current over any space-like slice produces the total entropy of the system. Hence the time component of our entropy current, in equilibrium, must reduce to what we get from the partition function. As expected, this condition only partly fixes the entropy current since those terms that vanish in equilibrium could never be fixed this way [10], [15].
However, in the most general form of the entropy current, it is certainly possible to have many more terms which vanish when evaluated on equilibrium. In order to fix them we now turn to the study of the system in a time-dependent background. But we shall assume that the background changes with time adiabatically, i.e. the time variation is so slow that we shall keep track of only upto first order in time derivative. Now an entropy current, whose divergence is always non-negative, must be conserved for such adiabatic processes since the divergence could have any sign if we are considering only the first order time derivatives [1]. Many terms that could have been in the entropy current, but vanish in equilibrium, are non zero in this adiabatic situation. They naturally get fixed in terms of the partition function once we demand that the entropy current is conserved also in case of this adiabatic variation of the background upto the appropriate order in space-derivatives. In addition to this, it turns out that we could construct an adiabatically conserved entropy current if and only if the equilibrium stress tensor and currents of the system are generated from the same partition function, we are using to construct the entropy current. Therefore at this step we show that the existence of an equilibrium along with the partition function is a necessary condition for local production of entropy in every fluid flow consistent with equation of motion. In other words it explains why the constraints (on the transport coefficients) arising from the 'equilibrium condition' are always a subset of the constraints arising from the 'entropy condition'. Now from the explicit examples we already know that the existence of equilibrium, though necessary, is not sufficient for the existence of an entropy current with non-negative divergence. There are also some 'inequality type' constraints that we have to impose on the transport coefficients in order to ensure the 'entropy condition'. The positivity of the viscosity or the diffusion constant are the examples. But working out specific examples at some given orders generally do not tell us how universal these inequalities are or whether we need new inequalities at every order in derivative expansion to satisfy the 'entropy condition'. To understand this aspect, we next turn to the study of the system away from adiabatic variation. We first compute the divergence of the entropy current, we have already determined using equilibrium partition function and its adiabatic variation. This time the divergence is computed exactly without ignoring terms that are zero under adiabatic approximation. In fact by construction each term in this divergence will necessarily have more than one time derivatives. Its form will depend on the coefficients of the partition function as well as the dissipative transport coefficients (i.e. the transport coefficients whose effects vanish in strict equilibrium). The transport coefficients enter the expression of divergence through equation of motion.
Unlike the adiabatic stuation, now we do not have any conservation equation to impose, rather only an inequality that the divergence is non-negative. So it is natural that at this stage we could only generate some inequlaities for the dissipative transport coefficients (ones that appear in the expression of the divergence). The naive guess would be that at every order in derivative expansion there is some new inequality that we have to impose. But we shall show that only the first order dissipative transport coefficients are the ones that have to be constrained by inequalities to ensure the 'entropy condition', all the rest are completely unconstrained. This we could show order by order in derivative expansion by modifying the entropy current further with adding new terms that are zero even in adiabatic approximation. The sole effect of these new terms are to absorb the contribution of the higher order dissipative terms into a positive definite form in the expression of the divergence. We give an explicit algorithm for how to do this showing that it could always be done. So finally we have shown that if equilibrium exists and the first order transport coefficients have appropriate signs, the local production of entropy in every consistent fluid flow is gauranteed.
The result we found on inequalities could also be explained physically in terms of the stability of the equilibrium. We know that when we do a linearized analysis of small fluctuations, the dissipative transport coefficients control the time evolution of the system. The appropriate sign of the transport coefficient is important in this matter as it ensures that the fluctuations eventually dissipate out and thus maintaining the the dynamical stability of the equilibrium. Also in derivative expansion, it is only the leading dissipative terms (in our case the first order coefficients like viscosity etc.) that will dominate the dissipation and as long as they satisfy the appropriate inequalities, the equilibrium is dynamically stable irrespective of the nature of the higher order coefficients. Therefore the result we found in this note could also be re-worded as follows. Whenever there exits a dynamically stable equilibrium, entropy will always be locally produced for every fluid flow consistent with equations of motion.
The organization of this note is as follows. First in section (2) we shall roughly sketch our argument with a little more mathematical details. Next in section (3) we shall explain our set up and the notation. In section (4) we shall explain how to constructĴ µ , a current formed purely out of the background and treated as a precursor to the full fluid entropy current. In section (5) and section (6) we schematically describe how we can extendĴ µ to the full entropy current J µ . In section (7) we shall discuss about the ambiguities involved in this prescription. In section (8) we shall implement this prescription for a very simple partition function to explicitly see how it works. Finally in section (9) we conclude.
In appendix(A) we shall give some more arguments in support of the statements made in section (6). In appendix(B) we derive some of the equations used in the main text. In appendix(C) we shall solve some simple equations in a background with very slow time dependence to motivate one main assumption we used throughout this note.
All the analysis we have done here are for a four dimensional, parity preserving fluid with a single conserved abelian charge. But it can be easily generalized to multiple charges and other dimensions at least for parity-even cases. If the current and the stress tensor are anomalous, then there might be subtlety involved in determining the entropy current. See [19], [20] for some recent analysis in this direction.

Rough sketch of the method
In this section, we shall give a rough sketch of our construction with a little more mathematical detail. The method will have two parts. In the first part, using the equilibrium partition function of the system we shall determine an entropy current which is conserved in equilibrium and adiabatically. In the next step we shall extend this current in a way so that at every order in derivative expansion its divergence is non-negative.
So we shall start with the most general background with a time-like Killing vector, which we identify with our 'time-direction'. In such a background the system will be described by its partition function. From the partition function of the system, we calculate its total entropy, which is also time-independent to begin with. Now suppose, the background starts changing with time very slowly (so that we can do an independent expansion in time derivatives where ∂ 2 0 is always negligible compared to ∂ 0 ). The total entropy inside the bulk will also change. However in the leading order in '∂ 0 expansion', algebraically the change could have either sign. But this will violate the second law of thermodynamics. Therefore at leading order the change in the net entropy must vanish. In other words the entropy change inside the bulk must be compensated by the entropy entering the region through some boundary current.
In terms of equation this means the following. If spaceĴ 0 is the total entropy (as derived from the equilibrium partition function) then where ω is the frequency 1 of time dependence for the background satisfying ω 2 ≪ ω. LHS of equation (2.1) could be determined using the partition function and usual rules of thermodynamics. We shall explicitly see that whenever the equations of motion and the 'equilibrium condition' is satisfied, the LHS will be equal to a pure boundary term. From this boundary term we shall be able to figure out whatĴ i should be. Intuitively this is very similar to the aruguments used for the derivation of Wald entropy in case of higher derivative theories of gravity [22], [23]. The gravity lagrangian there, has been replaced here by the expression of total entropy. If we vary a lagrangian, we generate a term which is directly proportional to the variation of the basic fields (identified as 'equation of motion') along with a boundary term. In our case the 'equation of motion' is replaced by the 'equilibrium condition' and will always vanish by our starting assumption. The boundary term is analogous to our 'Ĵ i '. Now if we substitute the variation of the basic fields (i.e. the functions appearing in the background metric and gauge field) with the Lie derivative along the original time-like Killing direction (which is no longer Killing once we are in an adiabatic situation) we shall get the equation (2.1).
J 0 andĴ i together will form a four-component currentĴ µ , constructed only from the background. Also by construction,Ĵ 0 is of order O(ω 0 ),Ĵ i is of order O(ω) and four-divergence ofĴ µ is non-zero only at order O(ω 2 ). 1 Here each dimensionful quantity is measured in the units of the equilibrium temperature T 0 We can see thatĴ µ is constructed purely out of a very specific form of background metric and the gauge-field. Nowhere it involves the fluid variables. On the other hand the entropy current J µ for a general fluid should be a function of the fluid variables and a background that is slowly varying but completely general otherwise. Therefore we could not identifyĴ µ with fluid entropy current J µ . But we know that J µ must reduce toĴ µ upto order O(ω) when we evaluate it on a background with very slow time dependence 2 . In general we would expect this condition to fix the entropy current partially. By construction whenever the 'equilibrium condition' is satisfied the divergence of this partially fixed entropy current will be of order O(ω 2 ) if evaluated on a background with a very slow time dependence.
Our next step would be to go away from the adiabatic regime. As mentioned in the previous section, at this stage we shall exactly compute the divergence of the entropy current we have determined from the adiabatic condition. By construction all the terms in this divergence will vanish whenever the system has a Killing time-like direction (i.e. in equilibrium). In addition to this, we also know that the divergence will vanish even in an adiabatic situation. Naively it implies that every term in this expression of divergence must contain at least two factors of the Killing equation (i.e. the Lie derivative of the background along the initial Killing direction) and/or its derivative. This is because in an adiabatic situation, the Killing equation which vanishes in perfect equilibrium, will evaluate to terms of order O(ω). Schematically the divergence will be of the form Where L ∂t denotes the Lie derivative in the time direction or L ∂t (Background) is essentially the Killing equations. The m derivatives will be distributed among the n factors of Killing equations in many different possible ways. Once we have recasted the divergence in this form, it would be easy to figure out how we need to further modify the entropy current so that the final expression of the divergence is a positive definite form (see section (6) for details). We shall argue that such modification is always possible once the leading terms (in our case the divergence at second order in derivative expansion) are of appropriate signs.
In summary our observations are the following.
1. If the background has very slow time dependence, it is possible to construct a currentĴ µ (whose divergence is of order O(∂ 2 0 )), whenever the 'equilibrium condition' is satisfied. J µ will be constructed in terms of a specific background with very slow time dependence.
2. WheneverĴ µ exists, we can construct an entropy current J µ in terms of fluid variables whose divergence will be non negative on any slowly varying background provided some transport coefficients (ones that are unconstrained by the 'equilibrium condition') satisfy some inequalities.
3. Only the first order transport coefficients (in fact a subset of them 3 ) have to satisfy some inequalities in order to ensure the 'entropy condition'. It is not required to impose any 'inequality type' constraint on the higher order transport terms.
The main point here is that the existence ofĴ µ require the 'equilibrium condition' to be satisfied and onceĴ µ exists, the 'entropy condition' does not require any further 'equality type' constraints.

The set up
In this section we shall explain the basic set-up and the notation that we shall use later in various sections. We shall mostly follow the notation and convention of [10].
For the construction ofĴ µ our set up is as follows. The fluid lives in a (3+1) dimensional background that slowly varies in space and and also in time. However the time variation is slower than the space variation. In terms of equation what we mean is the following  Now we shall explain the notations 4 . '∇ µ ' denotes covariant derivative with respect to the full metric 'G µν ' and '∇ i ' denotes covariant derivative with respect to the spatial metric 'g ij '. For the fluid variables we shall use u µ , T, µ to denote the 4-velocity, temperature and the chemical potential respectively. u µ is normalized to (−1). Instead of µ we shall often used ν as the independent variable, related to µ as ν = µ T . Let us also fix some notations that we shall use later.
In general if B(u µ , T, ν) is some arbitrary function of fluid variables then byB we denote the same quantity evaluated on {û µ ,T ,ν} and the background as given in We should note that if we identify {u µ =û µ , T =T , ν =ν}, then it will solve the fluid equations only at O(ω 0 ) but to all order in space derivatives (see [11] for a more detailed description on this fluid frame).
To constructĴ µ , we shall use the following decomposition for the stress tensor and the current in terms of the hatted quantities.
In equation (3.3)Ê,P andQ denote the expressions for the energy density, pressure and charge density respectively as derived from the zeroth order partition function. Outside strict equilibrium (strict ω → 0 limit) hatted quantities are not a solution to the fluid equations. Thereforeπ µν need not admit a local expansion in terms of the derivatives of {û µ ,T ,ν} outside strict equilibrium. The partition function Z is defined only in the limit ω → 0.
As usual W is expressed in derivative expansion and it will have only space derivatives. L = L (0) + L (1) + L (2) + · · · 4 In equation (3.1) we have assumed that all functions in the background metric and the gauge field have a single frequency in time. This might seem too restrictive and it is actually not needed for the whole analysis as such. What we need is an independent expansion in ∂ t or ∂ 0 operator, on top of the expansion in terms of the space-derivatives. In (3.1) the derivative with respect to time is the smallest parameter. We shall use ω to count the number of time derivatives and we find it notationally simple if we have a single ω parameter for this purpose Varying the partition function with respect to the metric and the gauge field we get the various components of the stress tensor and the current evaluated on equilibrium [10], [11], [16].
Next we have to construct the full entropy current J µ in a general background. By D µ we shall denote the covariant derivative with respect to any arbitrary metric G µν .
For J µ , we shall use a different decomposition for the stress tensor and the current [1].
T µν = Eu µ u µ + P P µν + π µν C µ = Qu µ + j µ where P µν = u µ u ν + G µν (3.5) π µν and j µ will contain all the terms that have derivatives of the fluid variables. Therefore all the transport coefficients are contained in π µν and j µ . In equilibrium E, P and Q will evaluate to the energy density, pressure and the charge density of the system. They will be related to the equilibrium partition function by the usual laws of thermodynamics. Outside equilibrium their interpretation will depend on the choice of the fluid frame.

Entropy current as a function of background
In this section we shall try to construct the currentĴ µ as described in section (2).
We shall first compute the total entropy in terms of a partition function expressed as a functional of the background metric and gauge field. Then we shall take the time derivative of the total entropy and using the 'equilibrium condition' (i.e. equation (3.4)) we shall explicitly show that it can be written as a pure boundary term as we have explained in section (2). Finally from the expression of the total entropy and the boundary term we shall read off the currentĴ µ .
First we shall give a brief description of what we are going to do in the following subsections.
1. The formula for total entropy in terms of the partition function is given as follows [10].
with p(T ,ν), some arbitrary function of its arguments 2. We shall rewrite the total entropy in the following from Here K i is some vector whose explicit form will depend on W , but we shall not need it for our construction (see the point (4) below). The content of equation (4.2) is just that the total entropy could be expressed as a sum of the first two terms in the RHS of equation (4.2) upto total derivatives.
3. Now we would like to see what constraintsπ µν andj µ have to satisfy so that the rate of change of the total entropy with respect to time could be expressed purely as an influx of entropy through the boundary at leading order in (ω).
So we shall compute the time derivative of the total entropy and we shall do it term by term. 4. It is clear that ∂ 0 of a total derivative piece (the last term in equation (4.2)) is trivially a boundary term and it does not require any constraints to be imposed on the stress tensor and the current. So we shall simply ignore it in the construction of the current.
5. Next we shall see that the time derivative of the first two terms can be combined into a boundary term whenever the 'equilibrium condition' is satisfied.
6. Finally from this boundary term we shall read off the space component of the current and we shall combine the time and the space component together in J µ in a covariant four-vector notation.
At this point we would like to point out that upto second order, relativistic hydrodynamics has already been studied in great detail through many different approaches (see [21] and references therein). But here our main aim is to develop a general algorithm for the construction of the entropy current that is valid to all orders in derivative expansion. As we shall explain below, we need not truncate the derivative expansion to any given order for our construction ofĴ µ .

Total entropy in appropriate form
In this subsection we shall try to show equation (4.2). This has been shown in [15] in the context of superfluid with an anomalous current. For completeness we shall repeat the calculation here again but in a simpler situation of normal fluid without any anomaly.
As before Now we are going to compute the contribution of W (p) in total entropy. Ignoring the total derivative pieces we get the following.
In the third line we have used equation (3.4) (ie. the 'equilibrium condition') and in the fourth line we have used the explicit expressions forû µ ,T ,ν andP i µ in terms of the background (see equation (3.2)).
Using equation (4.3) and (4.4) we can rewrite the total entropy in the desired form.
In the last line we have used the decomposition of the stress tensor and current as given in equation (3.3) and used the fact that

Rate of entropy change at leading order in (ω)
In this subsection we shall compute the derivative of the total entropy with respect to time at leading order in ω. We shall see that once the 'equilibrium condition' is satisfied, (∂ 0 S T ) can be expressed as a pure boundary term.
As we have mentioned before, we shall compute this time derivative term by term.
First we shall compute the time derivative of the first term in equation (4.5). This can be processed using the conservation of the full stress tensor and current as written in equation (3.3).
To derive equation (4.6) we have used the following thermodynamic relations between Ê ,P , s andT andν. 5 dP = sdT +Qdμ E +P =T s +μQ, whereμ =Tν (4.7) We shall rewrite the last two terms in the RHS of equation (4.6) in the following way.
Combining equations (4.6) and (4.8) we finally get the time derivative for the first 5 These identities can be derived once we identify the stress tensor and the current at zero derivative order (the stress tensor and current of an ideal fluid) with variation of the zeroth order partition function with respect to the metric and the gauge field. In terms of equation this implies the following term in total entropy as given in equation (4.5).
See appendix (B) for a detailed derivation of equations (4.6) and (4.8). Now we are going to compute the time derivative of the second term in the total entropy.
A schematic form of ∂ 0 W (p) will be the following.
. Now any term with a form as described in equation (4.11) can be re-written as a sum of two terms, one being proportional to ∂ 0 Φ and the other is a total derivative.
In the last line of (4.12) the first term is the functional derivative of W (p) in the bulk.
Here the functional derivative is taken assuming that the infinitesimal change in the field (δΦ ∼ ∂ 0 Φ) vanishes in the boundary (ie. ignoring the total derivative pieces or boundary terms). The second term gives the boundary current U i . It is equal to the change of the partition function exactly on the boundary due to the change in the background field proportional to δΦ ∼ ∂ 0 Φ. In other words U i contains the terms that we have ignored while computing the first term in equation (4.12). From the above argument it is clear that U i will have a unique expression in terms of the background upto terms whose space divergence identically vanish. And it will generically have a factor of the form (∂ 0 Φ) and hence is of order O(ω). Now using equation (3.4) we can relate the first term in equation (4.12) to the equilibrium values of the stress tensor and the current i.e. (π µν ) and (ĵ µ ). Substituting we finally get the following expressions for the time derivative of the second term in the total entropy.
In the last line of equation (4.13) we have used the explicit expressions for all the hatted quantities. See appendix (B) for the derivation of equation (4.14).
Now combining equations (4.13), (4.6) and (4.8) and using the fact that we get the time derivative of the total entropy and we see that the bulk terms cancel upto order O(ω) . Therefore the rate of total entropy change in the bulk can be expressed purely as a boundary term.
To arrive at equation (4.15) we have used equation (3.4) at several places which is equivalent to the 'equilibrium condition'. Secondly we have assumed thatπ µν and j µ have an analytic expression in (ω) for the states that are slowly varying in time.
In terms of equation this means the following But we can see that to derive equation (4.15),π µν andj µ need not admit a derivative expansion in terms of the derivatives ofû µ ,T andν. Finally we can read off the time and the space component ofĴ µ from equation For convenience here we shall repeat the definition of L (p) and U i in words. L(p) is a scalar function of the background metric and the gauge field where each term contains at least one space derivative. Integration of L (p) over space gives the generating function for the stress tensor and the currents at one or higher order in derivative expansion. We denote the generating function as W (p) .
As the background metric and the gauge field vary slowly with time, W (p) also varies. Inside the bulk of the space, the variation of W (p) is captured by the equilibrium values of the stress tensor and the current. And along the boundary of the space the variation could naturally be expressed as a surface integration of some vector. This is the vector which we denote as U i . It is defined only upto some 'exact' vectors whose integration over the boundary identically vanish. This 'exact' piece could be non-vanishing even in equilibrium. But the rest of the U i must be proportional to the time derivative of the background. Now we shall try to combineĴ 0 andĴ i in a covariant four-vectorĴ µ . The part that involves s,π µν andj µ can be easily covariantized. Let us denote this part aŝ According to equation (4.18),Ŝ µ is the covariantized version of the part involving L (p) and U i . At this point it would be interesting to note that the construction ofŜ µ is very much like the construction of Noether current corresponding to the diffeormorphism symmetry of W (p) along 'time' direction. Such Noether current is the starting point for computing Wald entropy of higher derivative gravity theory [22], [23]. In [22] or [23] this current is conserved upto equations of motion i.e. the linear variation of the gravity 'action' with respect to the metric and other dynamical fields. Of course, in our case the metric is not dynamical and we cannot set the bulk term δW (p) δΦ ∂ 0 Φ (which is analogous to the 'equations of motion' in [22]) to zero. However here the 'equations of motion' is replaced by the 'equilibrium condition'. We have seen that once the 'equilibrium condition' is satisfied, the current is conserved upto the leading order in adiabatic expansion.
It is not possible to write a general covariant expression ofŜ µ as we have done it forĴ µ can . We can do it only in a case by case basis 6 . However for our purpose we shall not need any explicit expression forŜ µ .

Entropy current in terms of fluid variables
The currentĴ µ that we have constructed so far is a function of the background geometry. But the entropy current J µ is generally a function of the fluid variables like the velocity, temperature or the chemical potential. In this section we shall see how we can extendĴ µ to the full entropy current J µ .
According to the 'entropy condition', J µ should satisfy the following properties.
1. In a time independent situation the integration of J 0 over any spatial slice must give the total entropy of the system.
2. Divergence of J µ should be non negative for any fluid flow consistent with the equations of motion.
As a consequence, for a very slow time dependence, the divergence of J µ must vanish till order O(ω).
Generically J µ is a function of the fluid variables and if we want to evaluate it or its divergence on any time dependent background we need to know the solution of the fluid equations on that background. It is difficult to solve the fluid equations exactly. But we need the solution only upto order O(ω). Here we shall assume that in our case there exists at least one time dependent but approximate solution where the fluid variables simply follow the equilibrium (slowly shifting with time). In terms of equations we mean the following. 6 It might be possible that the part of the entropy current involving L (p) and U i could be covariantized only after we add some further 'exact' terms to U i whose integral over the boundary vanish. This could be the case for parity odd situations.
then the only way to covariantize it would be to add a new term to U i of the form Integration of this U i over the boundary will vanish and therefore it will not affect the total entropy influx or outflux through the boundary.
If u µ , T and ν are the solutions for fluid velocity, temperature and the chemical potential respectively then they can be written as Through equation (5.1) we also partially fix the fluid frame. This equation implies that the fluid frame that we are choosing is the one that reduces to {û µ ,T ,ν} in equilibrium (see [11], [13], [19], [20] for the use of this fluid-frame in case of parity odd terms in anomalous fluids). We shall have some more discussion about the existence of such solution in appendix (C). Now we shall first write a prescription for how to construct J µ with the help ofĴ µ already determined. Next we shall see how this way of constructing J µ is consistent with the 'entropy condition'.

5.1
The prescription to go fromĴ µ to J µ 1. We shall decompose J µ in two parts as we have done forĴ µ in equation (4.18).
Next we demand that when evaluated on {û µ ,T ,ν}, J µ can and S µ should reduce toĴ µ can andŜ µ respectively.
3. The obvious choice for J µ can is the following.
Here we have used equation (3.5) for the decomposition of the stress tensor and the current in ideal and derivative part.
4. For S µ we shall write the most general covariant vector expression possible at a given derivative order. The number of independent terms would be equal to the number of on-shell independent scalars or vectors constructed out of the fluid variables and background at that particular order in derivative expansion.
5. Next we shall evaluate it on {û µ ,T ,ν} and compare the result withŜ µ upto order O(ω). This will fix several unfixed coefficients in S µ in terms of the coefficients in partition function.
6. The 'entropy condition' will further constrain the remaining coefficients. However these new constraints will not depend on the partition function.

The divergence of J µ and the 'entropy condition'
In this subsection we shall partially compute the divergence of J µ using our knowledge about the divergence ofĴ µ . First we shall compute the divergence for the canonical part. Using the conservation of stress tensor and the current we can calculate the divergence exactly 7 . Here Here D µ denotes the covariant derivative with respect to the general background G µν . By explicit computation we can see that Θ, h µ , v µ and σ µν vanish in strict equilibrium. Hence if we evaluate these quantities on {û µ ,T ,ν} and in the background as given in equation (3.1), they will be of order O(ω).
Now we have to compute the divergence of S µ . First we should note that using the equation(4.13) we could explicitly determine what the divergence ofŜ µ should be.∇ 7 Equation (5.2) has been derived and used in several cases before, see for instance [3], [7] whereP µν = G µν +û µûν In the second line of equation ( Suppose we also compute the divergence of S µ without using any equations of motion, i.e. we treat each space-time derivative of the fluid variables as locally independent piece of data 9 . Naively the final expression of the divergence would contain all the off-shell independent scalars that could be constructed out of the fluid variables and the metric and gauge field upto the derivative order we are interested in. However we also know that S µ reduces toŜ µ when evaluated on {û µ ,T ,ν} upto some appropriate order in ω. It follows that D µ S µ must evaluate to equation (5.4) when evaluated on {û µ ,T ,ν} upto order O(ω 2 ). Therefore we expect that the divergence of S µ could be rewritten in the following form (which would just be an identity relating the derivatives of the fluid variables) Where S c , S T , S π , K µ , H µ and A µν are some scalar, vector and tensor functions of the fluid variables satisfyinĝ 8 This is true because by definitionû µĥ µ =û µv µ = 0 andû µσ µν =û µP µν = 0 9 In other words, the computation that we have in mind is just a rewriting of D µ S µ in terms of our chosen basis of off-shell independent scalars at that particular order in derivative expansion. It is an identity and therefore true for any profile of fluid variables even if they do not satisfy the conservation equations.
The equation (5.6) should be true for any profile of the velocity (u µ ), temperature (T ) and the chemical potential (ν) and therefore in particular the ones that satisfy the equations of motion (whereas the equation (5.2) Where the first six terms are of order O(ω). We can combine equations (5.2) and (5.8) to compute the divergence of the full entropy current J µ , The following seems to be true by construction. 2. All those terms in the stress tensor and current that are non-zero in equilibrium are not there in the final expression of the divergence.
Next we would like to show that once the equation (5.8) is true, we can always find a a choice of coefficients for the rest of the unfixed terms in S µ such that the 'entropy condition' is satisfied. This choice will depend on those parts of the stress tensor and current that vanish in equilibrium, but its existence will not require any further 'equality type' constraints among the transport coefficients. In section (8)we shall explicitly see how it works for a simple example.
We shall mainly follow the line of arguments presented in [5]. We have to express the final divergence as a sum of squares. However now we have to do the analysis for an arbitrary background and in this case it is very difficult to say anything general about the solutions of the fluid equations. So we have to argue with the minimum use of the equations of motion.
First we note the following features which could lead to a rewriting of the divergence as required.
1. Transport coefficients enter the expression of divergence only through the divergence of the canonical part.
2. Only those parts of the stress tensor and the current that vanish in equilibrium, will enter the expression of divergence.
Let us call all these terms collectively as 'dissipative terms' and corresponding transport coefficients as 'dissipative coefficients'.
Now consider a fluid profile where locally only one such dissipative term is non zero. Since this term is dissipative, it must produce entropy and also according to the assumption of fluid dynamics and the 'entropy condition', this entropy should be produced locally. Hence apart from the linear pieces, the divergence must contain quadratic or higher order pieces of the dissipative terms as well.
Because the quadratic and higher order pieces of the dissipative terms are present, it should be possible to rewrite the divergence as sum of squares with each square term multiplied by some positive definite coefficient.
These positive definite coefficients will necessarily contain the dissipative transport coefficients but they have to satisfy only some inequality to maintain the positivity of the divergence.
From this condition it seems that to maintain 'the entropy condition' no further 'equality type' constraints are required other than the ones imposed by the 'equilibrium condition'.
Below in section (6) we shall try to use our intuition to construct these higher order (in terms of ω expansion) terms in J µ .

Construction of the higher order pieces in J µ
Here we shall see how we can ensure the entropy positivity by adding new terms to the entropy current, we have already determined using the partition function. We would like to argue that such construction is always possible and the coefficients of these new terms will not be fixed by any transport coefficients though their ranges may be restricted by the dissipative terms in the stress tensor and the current.
where π µν (non−diss) and j µ (non−diss) do not vanish in equilibrium (and hence will be called 'non-dissipative'), π µν (diss) and j µ (diss) vanish in equilibrium (and hence will be called 'dissipative') 11 . Once the 'equilibrium condition' is satisfied the divergence of the entropy current will contain only π µν (diss) and j µ (diss) . From equation (5.2) it follows that in the expression of the divergence they will appear in the following way (through the divergence of the canonical part).
Next we observe that at first order in derivative expansion the exhaustive list of dissipative terms contains only the following elements.
Let us denote all higher order (in derivative expansion) dissipative terms by H. For convenience we shall further classify the elements of H into three types. We shall use subscript to distinguish between different higher order dissipative terms. Naively we can construct any element of H either by applying D µ operator repeatedly on elements of D or by applying u µ D µ operator on any lower order non-dissipative scalar. We can also construct the composite dissipative terms (products of lower order terms) where at least one factor is an element of H at lower order.
π µν (diss) and j µ (diss) will contain terms of the form D at first order in derivative expansion and of the form H at higher order.
The full divergence of the entropy current will have the following type of scalars.

A scalar quadratic form in the elements of D.
We shall denote these terms together by Q 1 2. Scalars of type H (many) .

Scalars of type H (one) .
If the 'equilibrium condition' is satisfied, then by construction, our entropy current would be such that if we evaluate it on {û µ ,T ,ν} it would be of order O(ω 2 ). This should be true of all the four types of scalars that we have mentioned above. Now we shall analyse each of these four types of terms. We shall start from Q 1 . Q 1 is a quadratic form in the elements of D. Therefore it is second order in derivative expansion and it contains all the first order dissipative transport coefficients. We can always diagonalise this quadratic form in the space of D and write it as a sum of squares. Let us denote the eigen vectors as e i , i = 1, · · · , 6. So this part of the divergence schematically takes the following form.
In a generic case all eigenvalues α i s will be non-zero. And if we are interested in an entropy current with non-negative divergence upto second order in derivative expansion we should constrain all these eigenvalues to be positive.
Next we come to H (many) . The terms of the form H (many) are non zero only if Q 1 is non-zero and also H (many) are always much smaller in magnitude than Q 1 in the regime of validity for the derivative expansion. From here it immediately follows that the presence of H (many) type terms in the divergence can never determine the sign of the divergence. So if we are interested only about the constraints imposed by the 'entropy condition' we can ignore these H (many) terms.
Finally we shall analyse H (zero) . We should note that though H (zero) does not have any factors from the elements of D, it vanishes in equilibrium. We shall use this property to rewrite all H (zero) terms as a sum of H (one) and H (many) upto total derivative. In terms of equation we mean the following.
Where J µ is a lower order current that also necessarily vanish in equilibrium. The intuition behind equation (6.3) is the following. In our analysis the defining characteristic of 'equilibrium' is that it is time independent. In other words ∂ t or ∂ 0 is a Killing vector for the equilibrium background. In the language fluid variables the Killing vector could be written asξ µ =û μ T . According to the Killing equation, in perfect equilibrium the symmetrized derivative ofξ µ vanishes, so does the Lie derivative of the gauge field in the direction ofξ µ (see [19] for more detail). Now consider the symmetric tensor Clearly both S µν and V µ vanish in equilibrium as a consequence of the Killing symmetry of the background 12 and both of them could be expressed in terms of the elements of D.
It is natural to expect that any non-trivial function of fluid variables and their derivatives that vanishes only in equilibrium must have some component of S µν , V µ or their derivatives as one of the factors. Then from equation (6.4) it follows that all H (zero) terms must contain factors where one or more derivatives are acting on the elements of D with appropriate contractions so as to make it a scalar 13 . Now we could always rearrange such a dissipative term and decompose it in the form of equation (6.3). The idea is to shift the derivatives acting on the elements of D to the other factors by repeatedly adding total derivative terms. To give a very simple example, consider a H (zero) scalar X = a µ u ν D µ D ν Θ. We would like to rewrite it in form of equation (6.3). The steps are as follows.
In (6.5) the last line has the desired form of equation (6.3). Equation (6.3) is the key equation that determines the inequalities to be satisfied to ensure the 'entropy condition'. In appendix (A) we shall give some more arguments for why equation (6.3) seems to be true at all orders. The main point that needs further explanation is that we could often find dissipative term that apparently does not have any elements from D. For example, consider the scalar (u.D) 2 (D µ a µ ), which manifestly vanish in equilibrium. Equation(6.3) requires a rewriting of such terms in a form where the derivatives are acting on the elements of D. In appendix (A) we essentially tried to construct an explicit algorithm that we can use for such rewriting.
Once we have rewritten H (zero) as in equation (6.3) the full divergence will have terms of the form Q 1 , H (many) and H (one) plus a total derivative piece (i.e. a term of the form D µ J µ ). We again rewrite this H (one) as eigenvectors of Q 1 times H (zero) type higher order dissipative terms. So this part of the divergence schematically takes the following form.
denotes different higher order dissipative terms. At this stage Now we shall redefine our entropy current by absorbing J µ in J µ . Then the divergence will take the following form.
If we want this divergence to be positive definite we have to add new terms to the entropy current so that its divergence produces terms of the form H (zero) i 2 . This we can do order by order in derivative expansion. Suppose we are interested at some fixed n(> 1)th order in derivative expansion. Hence π µν (diss) and j µ (diss) will contain H of order n. The same will happen for the divergence as given in RHS of equation (6.6).

Now consider the scalars of the form H
for some (2n − 1)th order vector T µ and ψ j are some arbitrary functions of scalar fluid variables like temperature and charges. From here onwards we shall remove the superscript '(zero)' for convenience. All H's that we have mentioned in the next few paragraphs are of H (zero) type. In equation (6.7) the H s appearing in LHS are all different from the the H ′ s appearing in the RHS. We have an extra prime in RHS to denote this difference. In derivative expansion H ′ s are of order (2n − 1).
Therefore it follows that adding T µ to the previous entropy current, we can generate the terms of the form H 2 in the divergence. At this stage the divergence will be another quadratic form in e and H and a term of the form e times H ′ .
To see whether these linear terms in H ′ s could be further absorbed in a positive quadratic form we have to add terms to the entropy current so that its divergence produces (H ′ ) 2 which is of order O(4n − 2). This we can do exactly in the same way we did in the previous order. So we can continue this process infinite times.
But if we are interested in constraints at order O(n) we can simply ignore all these H ′ s. We shall diagonalize the quadratic form between e and H and write the divergence as sum of squares. Finally if we demand that the coefficient of each of these square terms is non-negative, it will satisfy the 'entropy condition'. Clearly the final constraints will only be in the form of inequalities.
This shows that the entropy current that we have generated from the partition function can always be extended to an entropy current with non negative divergence without any further 'equality type' constraints on the transport coefficients. Now a couple of comments about our argument.
1. We can arrive at this positive definite form of the divergence even without using any equations of motion or without fixing any frame. We expect that equations of motion will make the analysis simpler as it will reduce the number of independent terms.
2. We have started with an entropy current as determined from the partition function. At each order we added new terms to it so that the divergence could be written as a quadratic form in the space of independent dissipative terms upto the given order we are interested in.
3. If we are interested about the transport coefficients of order n we have to add terms of order (2n − 1) to the entropy current. The inequalities will definitely involve the coefficients of these new terms in the entropy current. So we should not consider them as any physical constraint.
4. For n = 1 we do not need to add new terms (in fact from explicit calculation it follows that we cannot add new term to the entropy current maintaining the positivity of the divergence [5], [7]). Therefore in derivative expansion this is the only order where the resultant inequalities will involve the transport coefficients alone and not any coefficient from the entropy current.
5. From here it follows that the first order transport coefficients are the only ones that have to satisfy some inequalities to maintain the 'entropy condition'.

Equation (6.3) is the key equation behind all these arguments. In appendix(A)
we give some more arguments about why we believe this equation to be true.

Ambiguities
In the previous sections we have given a prescription of how, from partition function, we can construct one example of entropy current whose divergence is always nonnegative. But we should emphasize that this is just one example and there is no claim of uniqueness for this construction. In this section we shall see what are the possible sources of this non-uniqueness.

Terms with zero divergence
Consider a covariant vector whose divergence vanishes identically. One could argue that such a vector must be of the form R µ = D ν K µν where K µν is some antisymmetric tensor. [D µ R µ = 0] simply because of the antisymmetry of K µν . At any given order in the entropy current we can always add terms of this form without affecting the 'entropy condition'. In the language of differential forms this ambiguity is just equivalent to the freedom of adding an 'exact' form without affecting the exterior derivative. This is the same ambiguity that any conserved Noether current might have. We have already noted in section(4.2) that our construction of entropy current has similarities with the construction of Noether current and Wald entropy in the theories of higher derivative gravity ( [22], [23]). The ambiguities that we are describing here are also similar to the ones found in the context of gravity. See [23] for more detailed explanation on this. Now we would like to see what these ambiguities translate to when we are using the 'equilibrium partition function' to determine the entropy current. We should note that the time component of these vectors (R 0 ) could well be non-zero in equilibrium and therefore naively they contribute to the total entropy. We have also seen that in equilibrium the 'non-canonical' part of the total entropy is exactly equal to the derivative corrections to the partition function. Hence we should be able to relate R 0 to some terms in the partition function itself. On the other hand, it is obvious that from the point of view of 'entropy condition', R µ cannot play any role to determine the constraints on the transport coefficients. This would be possible only if R 0 evaluates to a total derivative in equilibrium. By explicit evaluation we can see that this is true.
shows that any term in the entropy current with identically vanishing divergence could be related to a total derivative term in the partition function. Next we would like to see whether the converse of the above statement is true, that is, whether for every total derivative piece in the partition function we could write a term of the form of R µ in the entropy current. Consider a total derivative piece in the partition function According to the prescription described in section(4) W total derivative will generate the following entropy currentŜ µ total derivative near equilibrium.
Now we have to find a vector S µ total derivative such that on {û µ ,T ,ν} it reduces tô S µ total derivative . The first step would be to covariantizeX i . Suppose X µ is the vector that evaluates toX i in equilibrium 14 . Then we should construct S µ total derivative in the following way.
To check we can evaluate S µ total derivative explicitly on {û µ ,T ,ν}.
Thus we see that for every total derivative term in the partition function we could construct an entropy current whose divergence vanish identically. In other words there is a one to one correspondence between every total derivative piece in the partition function and the zero divergence term in the entropy current, both having no impact on the transport coefficients.

Ambiguity in covariantizingĴ µ
As we have explained before, from the partition function we could determine a current J µ . But this current is highly non-covariant since here the variation in time is much slower than the variation in space and so time and space are treated on a different footing. We have defined the covariant current J µ to be such that it reduces tô J µ upto order O(ω 2 ) when evaluated on {û µ ,T ,ν}. Clearly this construction is not unique since we can always add any term to J µ that is of order O(ω 2 ) on {û µ ,T ,ν}, 14 It is possible thatX i is not invariant under KK gauge transformation (coordinate transformation that changes t → t ′ = t + f ( x)). SupposeX i is of the form Here ifĈ ji is an antisymmetric but KK invariant tensor, then (∇ i X i ) would be an allowed term in the partition function. This is because under KK gauge transformation it generates only a boundary term. See [10], [12], [13], [14], [19], [20] for examples.
In such a case it is not possible to find a covariant vector X µ whose i component is X i . Instead we have to covariantizeĈ ij into an antisymmetric tensor C µν with both indices projected in the direction perpendicular to u µ . Then D ν C µν would be the desired term in the entropy current. Unlike the other terms in the entropy current, this particular one will have non-zero space component even when evaluated on {û µ ,T ,ν} in perfect equilibrium. without affecting the above requirement. This is the part of the entropy current that could not be determined using the partition function. However in section(6) we have seen how any such order O(ω 2 ) term in the entropy current could be handled by adding new higher order terms and hence the presence of such terms do not give any new constraints on the transport coefficients.
One way to characterize this ambiguity would be to write out the most general possible form of the entropy current upto some given order. This will simply be determined by the symmetry of the system. Then we should evaluate it on {û µ ,T ,ν} and compare the answer withĴ µ we have already derived from the partition function. There will be some part in the most general form of the entropy current that could not be fixed by this method. This is a genuine ambiguity which might even have a physical significance. It probably says that the entropy current is a concept that is uniquely defined only in solutions that are very close to being static. If one is far away from a stationary state, even to define it properly we need something more than the physical principle of local entropy production that we are using here throughout.

One 'toy' example
In this section we shall implement the above algorithm to construct the entropy current for a very simple system. We should emphasize that this example is designed just to explicitly show how our construction works in a simple situation and it does not have any other physical significance. Please, see [24] for application of this method to a physically relevant and more complicated case of non-anomalous charged fluid at second order.
Consider uncharged fluid at second order in derivative expansion. The partition function for such a case generically will have three independent terms multiplied by three arbitrary coefficients which are functions of temperature [10], [11]. But for simplicity here we shall set two of these three coefficients to zero. There is no physical reason for doing this and most likely it will result in a very unnatural set of transport coefficients. However, as explained above, this simple case will serve the technical purpose of showing how effectively the formalism developed so far, could be implemented.
So here the equilibrium partition function has a single term at second order in derivative expansion. This is a special case of the fluid considered in [5], [10], [11]. Therefore the entropy current will also be a special case of what has been constructed in [5].
Suppose, the partition function is given as follows.
The partition function does not depend on the gauge field. So clearly for this simple case the current is zero. Substituting equation (8.1) in equation (3.4) we can read offÊ,P and also the various components ofπ µν .
The 'equilibrium condition will be satisfied provided lim ω→0 π µν =π µν (8 .3) where different components ofπ µν are determined in terms of the partition function through equation (8.2). Using the rules of thermodynamics we can derive the total entropy from the partition function.
In equation (8.4) we have used equations (8.1) and (8.2) and also we have used s = entropy density = dp dT Now the total entropy is related to the integration of the zero component of the entropy current over some space-like slice.
Comparing equation (8.5) with (8.4) we can determineĴ 0 upto total derivatives. We findĴ is some vector constructed out of background and we have used thatπ i 0 is zero for our case. Now we have to compute the time derivative ofĴ 0 .
We shall first process the last term in equation (8.6) or (8.4). This term, being a total derivative is a purely boundary term to begin with and therefore will remain so after ∂ 0 acts on it. In other words the time derivative of the total derivative terms in the entropy can be trivially rewritten as a boundary term and this will not require any constraint to be satisfied in the bulk. Therefore in what follows we shall simply ignore the total derivative pieces in the expression of total entropy in equilibrium or in the expression ofĴ 0 .
So for our purpose we shall writeĴ 0 and S T aŝ We can see that equation (8.7) is a special case of equation (4.5) and therefore we can directly apply equation (4.6), (4.8), (4.10) and finally equation (4.14) for the time derivative of the first two terms of equation (8.7). We get the following.
Now we are going to compute the time derivative of the third term in equation In the last line we have used equation (8.2) which is a consequence of the 'equilibrium condition'. Now we see that if we combine equations (8.8) and (8.9), the part involving the equilibrium stress tensor cancels and we get pure boundary terms. From equations(8.8) and (8.9) it follows that Now we have to construct a current J µ that will reduce toĴ µ when evaluated on {û µ ,T ,ν} upto order O(ω). One obvious choice in our case would be the following 15 .
. We should note that this is not any unique choice since from partition function nothing is determined beyond order O(ω). Now the choice ofS µ will depend on the dissipative part of the stress tensor and the current. But for any form of the dissipative part we should be able to 15 To covariantizeĴ µ we have simply replaced all ∇ i by D µ . Ideally we should replace ∇ i by P α µ D α . But the difference is of order O(ω 2 ) in this case and therefore it does not matter. This step also indicates the non-uniqueness of the covariant form of the entropy current choose at least oneS µ such that the divergence is positive definite upto the required order in derivative expansion provided dissipative transport coefficients satisfy some inequalities.
Now we shall write the most general form of the stress tensor consistent with the partition function. If we just use symmetry at second order there could be 15 independent transport coefficients [5]. 7 of them are dissipative i.e. they vanish in equilibrium. Rest 8 are constrained by the partition function. [10] and [11] have done the analysis for the most general partition function for uncharged fluid. But here we have chosen a very special and simple form for the partition function. So the non-dissipative part of the stress tensor will be a special case of what is presented in [10] or [11]. However for the dissipative part we shall choose the most general form. At second order it will have 7 transport coefficients.
Higher order terms (8.12) Here for any tensor A µν implies the following.
In equation (8.12) the all terms in the first two lines vanish in equilibrium 16 . The rest evaluates to something non-zero in a time independent situation and we can explicitly check that (8.12) is consistent with the 'equilibrium condition' i.e.. equation (8.1).
Using equation (8.12) we can explicitly compute the divergence of J µ .
16 Equation (8.13) is actually a redundant description of the stress tensor since we can always absorb some of the transport coefficients in a frame redefinition. For example, in Landau frame the first terms in the first and the fourth line will be removed by frame redefinition. But here we are not going to fix any frame and we have allowed this redundancy. If we can construct an entropy current whose divergence is non negative in one frame it will remain so in all other frames since frame redefinition is just a rewriting of the same expression in a different language See appendix (B) for a derivation of this equation. In equation (8.13) the first three terms together form the Q 1 (quadratic form in the space of D as we have defined in section 6). For this very special case Q 1 is diagonal here to begin with.
All the scalars appearing in the second line are of H (many) type. They are always suppressed compared to the first line in equation (8.13) in the derivative expansion. Therefore these terms can never change the sign of the divergence as we have explained in section (6). We observe the following Equation (8.14) is an example of the statement we made in equation (6.3). Clearly if we chooseS µ asS we shall generate the required terms. With this choice ofS µ the full divergence of the entropy current takes the following form.
In equation (8.15) the sum of the first 6 terms will always be positive provided the following inequalities are satisfied.
The last two terms in (8.15) at this stage could have any sign, but we can further modifyS µ by adding 5th order terms in derivative expansion so that this term can again be absorbed in sum of squares. This process could go on indefinitely. However if we are interested only upto second order in derivative expansion we can truncate the process here and ignore all the higher order terms including the ones appearing in the last two lines of equation (8.15). From equation (8.16) we could also see that only the first order transport coefficients are the ones that have to satisfy genuine inequalities to ensure the 'entropy condition' as claimed in section (6).

Conclusion
In this note we have reasoned why, in a general context, the existence of equilibrium partition function and the existence of an entropy current lead to similar constraints for the transport coefficients. We showed the equivalence by explicit construction of one entropy current with non-negative divergence, starting from the partition function of the system. So our starting assumption is that the equilibrium partition function exists in a static background and the equilibrium values for the stress tensor and the current could be generated from this partition function. The fact that our general entropy current must be conserved in perfect equilibrium, and also it must integrate to the same total entropy we determined from partition function, gives the first set of constraints on its possible form.
Next we introduced a very slow time dependence in the background. We argued that in such cases the net entropy production must vanish in the bulk of the space, that is the entropy current must be adiabatically conserved. Using this fact we could further constrain the entropy current of the system in terms of the variation of the partition function on the boundary. In addition, we also see that an adiabatically conserved entropy current is possible only if the equilibrium values of the stress tensor and the charge current are consistent with the partition function.
Finally we have seen that we can always add some new terms (order by order in derivative expansion) to this entropy current so that its divergence is non-negative on any solution of fluid equations. The coefficients of these new terms are not fixed in terms of any transport coefficients and they are allowed to take a range values without violating the condition of local entropy production. Also only at first order in derivative expansion, some transport coefficients have to satisfy some inequalities to ensure the local entropy production. There are no other 'inequlaity' type constraints for higher order transport coefficients.
So in summary our observation are the following. For a fluid system if an equilibrium partition function exists in a static background and if the first order dissipative transport coefficients satisfy some inequalities, then we can always construct an entropy current whose divergence is non negative on any consistent fluid flow. Part of this entropy current is completely determined in terms of the partition function. The coefficients for the rest of the terms are not fixed. We could choose them from a range of values. These ranges might depend on some dissipative transport coefficients.
The main assumptions that go into these arguments are as follows.
1. In a situation with slow time dependence in the background there exists at least one solution that approximately follows the previous equilibrium, now slowly shifting with time.
2. For such a solution any regular function of fluid variables (including the stress tensor and the current) has an analytic expression around the zero frequency limit for any arbitrary space variation.
It is necessary to rigorously justify all these assumptions so that our statement about the relation between the entropy current and the partition function is properly proved.
Also we have restricted our analysis strictly to non-anomalous fluid. However, we know that the presence of anomaly completely determines some of the transport coefficients. The entropy current is also already determined for these anomalous cases. It would be nice to generalize our algorithm to account for anomaly as well and rederive the known entropy currents using this method in all dimensions.
It seems that if we do a linear fluctuation analysis around some equilibrium configuration of the fluid system, the signs of the leading dissipative terms will control the dynamical stability. The leading dissipative terms are nothing but the ones appearing in the stress tensor and current at first order in derivative expansion. And the signs that we predict from the inequalities generated from the 'entropy condition' are same as required for the stability. These dissipative transport coefficients act like 'damping terms' in the fluid equations. It is possible that the type of adiabatic solutions that we have assumed throughout this note exists for a range of initial conditions only if these inequalities are satisfied 17 . Therefore in short, it seems that the existence of equilibrium and its stabilty is enough to ensure the existence of an entropy current with non-negative divergence. It would be nice to make this connection more rigorous by doing a complete linear stability analysis for the most general equilibrium fluid configuration on an arbitrary static background.
We know that each of the fluid transport coefficients measure certain retarded correlators of the stress tensor and the currents in the long wavelength limit [25], [26], [27]. As an effective description of some underlying quantum field theory we expect these correlators to obey several symmetry conditions in the fluid limit. Equilibrium partition function consistently encodes all zero frequency correlators, but it says nothing about finite frequencies. For example, we know that time reversal symmetry of the correlators generate 'Onsagar relations' among the dissipative transport coefficients [1], which, neither the 'equilibrium condition' nor 'the entropy condition' could capture. It would be very nice if we could also derive these 'Onsagar relations' from such near equilibrium analysis.
Our final goal would be to write a single principle from which we can dertermine all the constraints that a physically consistent fluid must satisfy. In other words we want a principle that has the information about all correlators of the system in the long wavelength limit. These aspects are being studied for long time [28], [29]. We have seen that it is possible to write an 'action' for fluid systems, at least in the non-dissipative cases [30], [31]. It would be interesting to see if all these different approaches could finally fit into a single line of thought.
Finally it would be very interesting to see what all these equivalences say about a gravity system that is dual to some fluid using the 'fluid-gravity map'. We have already seen that our method has some similarities with the construction of Wald entropy in the higher derivative theories of gravity [22], [23]. We do not yet know whether this Wald entropy satisfies the second law of thermodynamics in the most general situation. It would be nice if our method could somehow be extended in the direction of gravity theories, where the α ′ correction of string theory could be treated on the same footing as the derivative expansion in fluid dynamics.
In general any scalar will admit a power series expansion in terms of ω.
Now ω k i s k i (i.e. the leading term in the expansion) could have only the following terms.

Factors of
2. The factors described above, could also be multiplied by terms without any ∂ 0 operator In the expression of ω k i s k i we shall apply the reverse of equation (4.14) and shall do the following replacement.
Dissipative terms: Non-dissipative terms: Terms at zero derivative order: and also individual derivatives as Since we do not have any replacement rules for symmetric space derivatives of a i or undifferentiated a i , it is important that in this leading term in ω expansion, a i will enter only through f ij and/ or its derivatives we could see this in the following way. The scalars must be invariant under any coordinate transformation and therefore in particular the transformation of the form Under this coordinate transformation the change in the background metric will also admit an ω expansion and we know that a i is the only metric function that will transform even at ω → 0 limit.
We also know that finally in S, the net effect of all such changes should mutually cancel order by order in ω expansion. However, there would be no candidate to cancel the change in the leading term in S, generated due to the transformation of a i at order O(ω 0 ) From here it follows that in the leading term in ω expansion, a i could enter only as f ij = ∂ i a j − ∂ j a i or its derivatives or as ∂ k 0 a i . Now these sets of replacement as given in equation (A.1) will produce another covariant scalar S ′ k i . It is clear that if we again evaluate the covariant difference (S − S ′ k i ) on {û µ ,T ,ν} it will be a scalar of higher order in terms of ω expansion (though in terms of derivative expansion the order will remain same).
Next we shall apply the same process of replacement for the leading term (in ω expansion) in this difference (S − S ′ k i ). We shall keep repeating this procedure. Since S is a term of fixed order in derivative expansion, the total number of derivatives will remain constant at each step (only space derivatives will change to time derivatives) and therefore this process must stop at some point.
At the end of this process we shall get a new scalar S ′ which has the desired form and also reduces to S on {û µ ,T ,ν} in the background with slow time dependence. This implies S = S ′ + terms that identically vanish on {û µ ,T ,ν} By construction both S ans S ′ are of order n in derivative expansion.
Suppose {S i } is the basis of independent scalars at order n. On {û µ ,T ,ν} each S i must evaluates to some different functions of the background 18 and therefore no linear combination of {S i }s could vanish on {û µ ,T ,ν}. Hence it follows that S = S ′ In other words we can always rewrite any dissipative scalar in a form where, in atleast one factor, the D µ operator repeatedly acts (with appropriate contractions) on the elements of D.
Now we can rearrange such terms further to recast them in the form as given in equation (6.3). We need to move the outermost derivatives one by one by adding total derivative pieces to it. See equation (6.5) or (8.14) for an example. 18 This we can see by induction. It is true at first order in derivative expansion. Next we assume that all orders upto (n − 1) every independent term evaluates to some different functions of the background. Independent terms at order n could be written either as product of lower order terms or in a form where a symmetric string of (n − 1) D µ operators (appropriately contracted) acts on a first order term. In either case they will evaluate to different functions of background because of our starting assumption.

B. Derivation for some equations
In this section we shall derive the important equations that we have used.
First we shall manipulate the stress tensor conservation equation in presence of external electromagnetic field.

B.2 Explicit expressions for the hatted quantities
Here we shall derive the equations (4.14). In equations (4.14) we have the explicit expressions forΘ,σ µν ,ĥ µ ,v µ , (û.∂)T and (û.∂)ν. The last two are very simple and we do not need any derivation for them. for the first four we have to do a bit of computation. The first point to note is that all them vanish in equilibrium and therefore their values must be proportional to ∂ 0 Φ where Φ collectively denotes all the metric functions and the gauge fields.
First we shall list all the values for all the Christoffel symbol for the background metric G µν as given in equation (3.1).
Γ 0 00 = −e 2σ (a.∂)σ + a i ∂ 0 e 2σ a i − a j a k ∂ i a k + a i a k ∂ j a k − 1 2 (a.∂)(e 2σ a i a j ) + e −2σ 2 ∂ i (e 2σ a j ) + ∂ j (e 2σ a i ) − 1 2 a 2 − e −2σ ∂ 0 g ij − e 2σ a i a j Γ k ij = Γ k ij − e 2σ 2 g km a j ∂ i a m + a i ∂ j a m + 1 2 ∂ k (e 2σ a i a j ) + a k 2 ∂ 0 g ij − e 2σ a i a j (B.11) Here ∂ j denotes g jk ∂ k and Γ k ij 's are the Christoffel symbols for the metric g ij . The expression for electric field is as follows.
Also from the fact thatĥ µ ,v µ andσ µν are perpendicular toû µ it follows that h 0 = −a iĥ i ,v 0 = −a iv î σ 00 = a i a jσ ij ,σ 0k = a iσ ik (B.14) So it is only the space components ofĥ µ ,v µ andσ µν that we have to compute explicitly. Time components are related to the space-components through equation (B.14).
Now we shall use the definitions of v µ , h µ and σ µν as given in equation (4.9) and shall plug in the expressions of Christoffel symbols and electric field as derived in equation (B.11) and (B.12). This will give us the equation (4.14). For this derivation it is enough to track only those terms that has one explicit factor of ∂ 0 . We already know that the terms without any ∂ 0 factor must cancel among themselves as all these terms vanish in equilibrium. and equation

B.3 Divergence of the explicit entropy current constructed in the example
In this subsection we shall derive equation (8.13). The explicit expression for the entropy current is as follows.
The first term in the square bracket is the canonical part of the entropy current and its divergence we have computed in the previous sections. The final expression for the divergence of the most general canonical entropy current is given in equation (5.2) where we have to substitute the expression for the stress tensor as given in equation (8.12) (In this example the current vanishes). Divergence of the last term has also been computed for a special case in section (8).
Here we shall derive the divergence of the second term in equation (B.15). Here by (DT ) 2 we mean (D α T )(D α T ) and (u.D) denotes the operator (u α D α ).
In the third line we have used the following decomposition.
In this equation the coefficient α is the damping term and therefore analogous to the dissipative coefficients like viscosity (η) and bulk viscosity (ζ) etc. a(t) is equivalent to the slow time dependence of the equilibrium. The existence of this fine tuned solution for the equation (C.1) motivates our assumption about the existence of a fluid solution that admits a power series expansion in terms of ω around ω = 0.

C.2 Chemical potential in a slowly varying electric field
Here we shall study another simple equation which has a little more resemblance with fluid equations than the previous one.
Suppose we are studying the current conservation equation where chemical potential is the only fluid variable and A 0 is the only background component that has non trivial dependence on space-time.
Suppose the constitutive relation for the current is the following.
Current conservation equation reads as follows.
Suppose A 0 (x i , ω) =Ā 0 e ik i x i +iωt and ω ≪ k i for every k i At ω = 0 only time-independent solution for the system would be For non-zero ω one particular solution to the equation (C.6) could be written as As before this particular solution admits a power series expansion in terms of ω.
The homogeneous solution is as follows.
The full solution is ν = ν h + ν p As before if ∆ < 0, ν h will grow with time and the full solution cannot be written as slowly shifting equilibrium plus small correction. On the other hand if ∆ > 0 the effect of the homogeneous part will decay with time and at large time the solution is effectively the particular part. However, theoretically we can always choose an initial condition so that B = 0. For this very fine tuned case ν p (x i , t) is a solution for all time. Thus we see that irrespective of the sign of ∆ there exists a solution of the desired form. Another point we note here is that in the solution ν p (x i , t), for different powers of ω, we have different powers of space momenta in the denominator. This indicates that the solution is non-local in the space direction.
We believe that these qualitative features will be true even for the solutions to the actual fluid equations which are highly non-linear and coupled. But we do not have any proof for this.