Modularization is an approach for system architecting and design simplification by encapsulating complex interactions among components within modules and reducing dependencies across modules. Design structure matrix (DSM) based clustering algorithms have proven helpful for such analysis, owing to their convenience in manipulating a large number of elements using conventional software. However, there are problems where constraints must be maintained in the modularization, for example, coping with functions or systems that either cannot or must be performed in regions with excessive heat, pressure, magnetic or other fields. Excluding such field boundary considerations can result in DSM computed modular architectural solutions that bundle field-incompatible functions or components that are not practical. Such regional field constraint considerations are not taken into account using conventional DSM clustering algorithms. We introduce a DSM-based clustering algorithm that incorporates these practical embodiment constraints through a constraint matrix indicating which elements can or cannot be placed in the same field region. We then employ reinforcement learning to allow the clustering algorithm to exploit its learnings from the previous attempts and during the clustering to facilitate the optimization under constraints. We demonstrate two examples of a medical contrast injector and the controller board of a three-phase pump motor.