Pressure BC for chamber

Dear All,

I wanted to simulated flow in a chamber with one inlet and outlet at the top surface. My domain is D2Q9.
I am using forcing term to include pressure (as mentioned in the forum)
my question is how to set pressure at inlet and though out the domain?
does it be like gradP = 0.5rhoU^2?
and for inside domain gradP= 0.5rhoU^2/(distance between inlet & outlet)?

Please help me
Thanks in Advance