Getting Qideal from Bernouli and continuity

So, I found a paper relating to a lab report that I've been working on that says that I can get
Qideal=(pi*d^2)/4) √((2ΔP/(ρ(1-D/D')^4 ))
From Bernouli which my book has as:
P1/ρ1+1/2v1^2+gh1=P2/ρ2+(1/2)v2^2+gh2