A fundamental thermodynamic theory on nonhydrostatic field and on the stability of mineral orientation and phase equilibrium