We present a structure-preserving and thermodynamically consistent numerical scheme for classical magnetohydrodynamics, incorporating viscosity, magnetic resistivity, heat transfer, and thermoelectric effect. The governing equations are shown to be derived from a generalized Hamilton's principle, with the resulting weak formulation being mimicked at the discrete level. The resulting numerical method conserves mass and energy, satisfies Gauss' magnetic law and magnetic helicity balance, and adheres to the Second Law of Thermodynamics, all at the fully discrete level. It is shown to perform well on magnetic Rayleigh-B\'enard convection.
翻译:暂无翻译