I have to run a 3″ vent pipe horizontal for 20′ in a crawl space to tie into a 20′ high chimney in which I will have to install a 4″ chimney liner. will this meet code if I use 3″ metal vent pipe and the rise is 5″?
I don’t know all the variables to fully answer your question. For example, if you’re using single wall connector, its maximum horizontal run can be only 75% of the vertical length (your crawlspace must be conditioned – heated – to use single wall vent connector). In your case they are equal length which would be OK for double wall vent connector.
You’ll get the best answer using Gama Venting Tables at this link – https://www.rhs1.com/support/references/GAMA_Vent_Tables.pdf
Just read the first few pages and choose your installation type from drawings starting at the page#5
Let me know if you have any further questions.