Reconfigurable intelligent surface (RIS) is a promising technology for future wireless communication systems. Conventional RIS is constrained to a diagonal scattering matrix, which limits its flexibility. Recently, beyond-diagonal RIS (BD-RIS) has been proposed as a more general RIS architecture class that allows inter-element connections and shows great potential for performance improvement. Despite extensive progress on BD-RIS, most existing studies rely on simplified channel models that ignore practical electromagnetic (EM) effects such as mutual coupling and impedance mismatching. To address this gap, this paper investigates the architecture design and optimization of BD-RIS under the general physics-consistent model derived with multiport network theory in recent literature. Building on a compact reformulation of this model, we show that band-connected RIS achieves the same channel-shaping capability as fully-connected RIS, which extends existing results obtained for conventional channel models. We then develop optimization methods under the general physics-consistent model; specifically, we derive closed-form solutions for single-input single-output (SISO) systems, propose a globally optimal semidefinite relaxation (SDR)-based algorithm for single-stream multi-input multi-output (MIMO) systems, and design an efficient alternating direction method of multipliers (ADMM)-based algorithm for multiuser MIMO systems. Using the proposed algorithms, we conduct comprehensive simulations to evaluate the impact of various EM effects and approximations, including mutual coupling among RIS antennas and the commonly adopted unilateral approximation, on system performance.