The principle of virtual dissipation for irreversible processes in open systems given a new formulation where variations are unconstrained everywhere including the boundary. As a complementary development a new chemical thermodynamics of open systems initiated earlier is given a simplified derivation and new results are presented. A new evaluation of entropy production for fully nonlinear reaction-diffusion along with the variational principle provide field and lagrangian equations of evolution far from local equilibrium with inertia and gravity forces. The earlier inconvenient use of the entropy produced as an auxillary state variable is eliminated. It is shown that the description by lagrangian equations is complete and rigorous and constitutes a universal formalism derived from first principles. It does not require prior knowledge of coitinuum field equations and leads directly to a large variety of finite element methods. Applications to internal relaxation with quantum kinetics are also indicated.