def METHOD_NAME(self, variables):
    p_n = variables["Negative electrode pressure [Pa]"]
    p_s = variables["X-averaged separator pressure [Pa]"]
    p_p = variables["Positive electrode pressure [Pa]"]
    # Boundary conditions in x-direction for p_n and p_p
    self.boundary_conditions = {
        p_n: {"left": (pybamm.Scalar(0), "Neumann"), "right": (p_s, "Dirichlet")},
        p_p: {"left": (p_s, "Dirichlet"), "right": (pybamm.Scalar(0), "Neumann")},
    }