# How to precompute and supply a parameter-dependent 2D boundary lifting field (Robin BCs) in PyBaMM? 

**URL:** <https://pybamm.discourse.group/t/how-to-precompute-and-supply-a-parameter-dependent-2d-boundary-lifting-field-robin-bcs-in-pybamm/464>\
**Category:** Model sharing\
**Created:** [11 April 2026 14:13 UTC](https://pybamm.discourse.group/t/how-to-precompute-and-supply-a-parameter-dependent-2d-boundary-lifting-field-robin-bcs-in-pybamm/464 "2026-04-11T14:13:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![himanshu](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@himanshu](https://pybamm.discourse.group/u/himanshu)\
**Post date:** [11 April 2026 14:13 UTC](https://pybamm.discourse.group/t/how-to-precompute-and-supply-a-parameter-dependent-2d-boundary-lifting-field-robin-bcs-in-pybamm/464/1 "2026-04-11T14:13:31Z")

</div>

Hi PyBaMM team,

I’m working on a custom x-lumped (y–z) thermal submodel for a pouch cell based on a Chebyshev–Galerkin reduced formulation (DOI: [doi.org/10.1109/TPEL.2020.3027561](https://doi.org/10.1109/TPEL.2020.3027561)). The approach introduces a boundary “lifting” temperature field T\_e(y,z) that satisfies heterogeneous Robin boundary conditions on the four edges (left/right/top/bottom may have different heat transfer coefficients). The reduced model then evolves only the coefficient states a\_k(t), with the temperature reconstructed as  
T(y,z,t)=T\_e(y,z)\*T\_\infty(t)+\sum\_k a\_k(t)\psi\_k(y,z),  
and with face cooling handled in the usual x-lumped form (i.e., proportional to T-T\_{\text{surf}}).

To keep runtime low, I’d like to precompute once (or once per parameter set) and inject it into the model, rather than solving an auxiliary boundary-value problem repeatedly during time integration. What’s the recommended PyBaMM pattern for this kind of precomputation, which involves parameter inputs from the user?

Thanks!
