# pressureInletUniformVelocity vs pressureInletVelocity

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 3, 2020, 06:08 pressureInletUniformVelocity vs pressureInletVelocity #1 New Member   Arash Join Date: May 2017 Posts: 17 Rep Power: 8 What is the difference between pressureInletUniformVelocity and pressureInletVelocity? Based on the source code for the first one we have: Code: `operator==(patch().nf()*gSum(patch().Sf() & *this)/gSum(patch().magSf()));` and for the second one Code: `operator==(n*phip/magS);` in which n and magS are defined as before: Code: ```tmp n = patch().nf(); const Field& magS = patch().magSf();``` Can someone explain how does gSum work and what difference does it make?

 July 10, 2020, 20:22 #2 Senior Member   Joachim Herb Join Date: Sep 2010 Posts: 650 Rep Power: 21 The first one applys the area averaged value of the velocities of the faces of the patch (so one value) to all faces of the patch. For each face of the patch the velocity vector is in the direction of the face normal vectors. The second one sets different velocity values (again in the direction of the face normals) based on the calculated flux values. arashgmn likes this.

July 11, 2020, 04:57
#3
New Member

Arash
Join Date: May 2017
Posts: 17
Rep Power: 8
Quote:
 Originally Posted by jherb The first one applys the area averaged value of the velocities of the faces of the patch (so one value) to all faces of the patch. For each face of the patch the velocity vector is in the direction of the face normal vectors. The second one sets different velocity values (again in the direction of the face normals) based on the calculated flux values.
Thanks Joachim. It resolved my confusion.

 Tags boundaries condition