Effective mechanical potential of cell–cell interaction in tissues harboring cavity and in cell sheet toward morphogenesis