I'm designing a program to analyse large-scale electrical circuit transients involving linear/nonlinear R, L & C elements and (ideal) switches. First challenge is forming the meshes. I want to select the meshes so that nonlinear & switched branches are in the co-tree: so preserving/maximising sparsity and ensuring independent meshes.
Any ideas on suitable tree-forming algorithms? Most mesh analysis texts assume you can choose the meshes 'by eye' or 'just write them down'.
Seems to me there are two choices: (i) select the tree branches according their 'type' so that inductive/nonlinear/switched branches are in the co-tree; (ii) form the tree ignoring branch type(?) then sequentially swap tree and co-tree branches to the same end. But how to aim for sparsity? All suggestions welcomed, and maybe even acknowledged.