  We present a general, constructive method to derive thermodynamically
consistent models and consistent dynamic boundary conditions hierarchically
following the generalized Onsager principle. The method consists of two steps
in tandem: the dynamical equation is determined by the generalized Onsager
principle in the bulk firstly, and then the surface chemical potential and the
thermodynamically consistent boundary conditions are formulated subsequently by
applying the generalized Onsager principle at the boundary. The application
strategy of the generalized Onsager principle in two-step yields
thermodynamically consistent models together with the consistent boundary
conditions that warrant a non-negative entropy production rate (or equivalently
non-positive energy dissipation rate in isothermal cases) in the bulk as well
as at the boundary. We illustrate the method using phase field models of binary
materials elaborate on two sets of thermodynamically consistent dynamic
boundary conditions. These two types of boundary conditions differ in how the
across boundary mass flux participates in boundary surface dynamics. We then
show that many existing thermodynamically consistent, binary phase field models
together with their dynamic or static boundary conditions are derivable from
this method. As an illustration, we show numerically how dynamic boundary
conditions affect crystal growth in the bulk using a binary phase field model.
