Modeling of encapsulated cell systems.