Equilibrium conditions
Equilibrium statePermalink
When setting up an equilibrium yourself, Legolas allows for a time-independent background equilibrium of the form
ρ0=ρ0(u1),T0=T0(u1),v0=v01(u1)e1+v02(u1)e2+v03(u1)e3,B0=B01e1+B02(u1)e2+B03(u1)e3.where (u1,u2,u3) denotes the coordinate system: (x,y,z) in Cartesian and (r,θ,z) in cylindrical geometries.
Equilibrium requirementsPermalink
The combination of the equilibrium state and the full system of equations yields conditions that have to be fulfilled. More specifically, every setup has to satisfy the force balance and thermal balance equations:
(ρ0T0+12B202+12B203)′+ρ0g+ε′ε(B202−ρ0v202)=0,ρ0L0−1ε(εκ⊥,0T′0)′=0,where ε=r and ε′=1 in cylindrical geometries, and ε=1 and ε′=0 in Cartesian geometries. The prime denotes the derivative with respect to u1.
Note that the above set of equations is actually a reduced form of the actual conditions. For typical use cases (where v01=B01=0) these are sufficient, however, for general equilibria (v01≠0,B01≠0) these expand to the following set:
(εv01)′ρ0+εv01ρ′0=0,(ρ0T0+12B202+12B203)′+ρ0(g+v01v′01)+ε′ε(B202−ρ0v202)=0,B01ε(εB02)′−ρ0v01(ε′εv02+v′02)=0,B01B′03−ρ0v01v′03=0,T0ρ0(εv01)′ε+ρ0L0−B201[κ∥,0−κ⊥,0B20T′0]′−1ε(εκ⊥,0T′0)′+1(γ−1)T′0ρ0v01=0,(B02v01−B01v02)′=0,[ε(B01v03−B03v01)]′=0.Note: There is no need to check these yourself. Legolas inspects at runtime if the appropriate equations are satisfied, and warnings will be logged if one or more of these are not fulfilled. It will also tell you were exactly in the grid the largest discrepancy occurs, what its value is and how many gridpoints fail to satisfy the conditions.