Systematic modeling and simulations with analytical solutions of electric and weighting fields of 2D-Planar-Electrode and 3D-Trench-Electrode detectors and detector array in Cartesian and cylindrical coordinates