Numerical modeling for terahertz testing of non-metallic pipes