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,ρ0L01ε(εκ,0T0)=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 (v010,B010) these expand to the following set:

(εv01)ρ0+εv01ρ0=0,(ρ0T0+12B202+12B203)+ρ0(g+v01v01)+εε(B202ρ0v202)=0,B01ε(εB02)ρ0v01(εεv02+v02)=0,B01B03ρ0v01v03=0,T0ρ0(εv01)ε+ρ0L0B201[κ,0κ,0B20T0]1ε(εκ,0T0)+1(γ1)T0ρ0v01=0,(B02v01B01v02)=0,[ε(B01v03B03v01)]=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.