# Pressure force calculations by FLUENT UDF

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

 August 5, 2015, 06:15 Pressure force calculations by FLUENT UDF #1 New Member   Rakesh Join Date: Jan 2014 Location: Delft Posts: 13 Rep Power: 12 Hi all, I am using a UDF to calculate the pressure force on the surface of a wing which is deforming under aerodynamic forces. A part of the code is shown here: begin_f_loop(f,t) { F_AREA(A,f,t); PF_x+ = F_P(f,t)*A[0]; PF_y+ = F_P(f,t)*A[1]; PF_z+ = F_P(f,t)*A[2]; ForceP = ForceP + F_P(f,t)*NV_MAG(A); } end_f_loop(f,t) The code works fine as a whole, but when I compare the pressure force components with that reported by FLUENT GUI (going to Results --> Reports --> Force Reports, the results don't match. However if I compare the pressure surface integral (from FLUENT reports) and ForceP (shown above in the code), they match. I am not sure why this discrepancy. Please let me know if you have any idea. Best Regards, RS

 August 5, 2015, 12:16 #2 Senior Member   Andrew Kokemoor Join Date: Aug 2013 Posts: 122 Rep Power: 13 Remember that force is a vector, not a scalar. When you integrate the pressure over an area, you want the component of that force in a certain direction, not the total integral of pressure over that area. Your definitions of PF_x, PF_y, and PF_z look correct, have you compared those to your force report? (You'll need to include wall shear to get the full force value, but those should match the pressure contribution.)

 August 5, 2015, 12:39 #3 New Member   Rakesh Join Date: Jan 2014 Location: Delft Posts: 13 Rep Power: 12 Hi Andrew, Thank you for the reply. As I already stated, the results obtained for PF_x, PF_y, PF_z don't match the force reports from FLUENT. I am somewhat confused now. F_P(f,t) gives me the pressure acting on a certain face, right? Now if I multiply this pressure (scalar) with the effective area along any direction, I should arrive at the force acting in that direction? However I am not able to find the same value as reported by FLUENT force reports. But as I said, if I multiply magnitude of area with this pressure (scalar) and sum it, I obtain the same value as reported in FLUENT surface integral report. I am not sure how FLUENT calculates the x-face, y-face and z-face area. Can that be a reason for this?

 August 6, 2015, 10:35 #4 Senior Member   Andrew Kokemoor Join Date: Aug 2013 Posts: 122 Rep Power: 13 Yes, it sounds like you have the right idea, and your code looks right. When you make a force report, it will give you the net force in the direction you specify, but also break it down into the contribution from pressure and the contribution from wall shear. Your UDF should match the pressure contribution.

January 24, 2018, 04:59
#5
New Member

hashem
Join Date: Dec 2015
Posts: 6
Rep Power: 10
Quote:
 Originally Posted by rsarma Hi all, I am using a UDF to calculate the pressure force on the surface of a wing which is deforming under aerodynamic forces. A part of the code is shown here: begin_f_loop(f,t) { F_AREA(A,f,t); PF_x+ = F_P(f,t)*A[0]; PF_y+ = F_P(f,t)*A[1]; PF_z+ = F_P(f,t)*A[2]; ForceP = ForceP + F_P(f,t)*NV_MAG(A); } end_f_loop(f,t) The code works fine as a whole, but when I compare the pressure force components with that reported by FLUENT GUI (going to Results --> Reports --> Force Reports, the results don't match. However if I compare the pressure surface integral (from FLUENT reports) and ForceP (shown above in the code), they match. I am not sure why this discrepancy. Please let me know if you have any idea. Best Regards, RS

i have the same problem

could you finally fixed it?