# Pressure force UDF with Fluent

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

 August 4, 2015, 07:56 Pressure force UDF with Fluent #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 11, 2015, 06:00 #2 Senior Member   Bruno Machado Join Date: May 2014 Posts: 271 Rep Power: 13 This macro ( F_P(c,t) ) returns the static pressure. Check if this difference is not caused because in the report GUI the pressure force is computed by the total pressure. The total pressure can be obtained by: operating_pressure = RP_Get_Real("operating-pressure"); real total_pressure; begin_c_loop(c,t) { real velocity_mag = cellVelocityMagnitude(c,t); total_pressure = C_P(c,t) + (C_R(c,t)*SQR(velocity_mag))/2 + operating_pressure; }

 January 20, 2020, 02:19 #3 New Member   Deep Morzaria Join Date: Jan 2020 Posts: 10 Rep Power: 6 even adding the operating pressure does not make a difference. The force values still dont match. Please let me know if anyone has found the solution.

 May 24, 2021, 11:35 #4 Member   Join Date: Jan 2018 Posts: 31 Rep Power: 8 @Bruno Machado Also, what is this cellVelocityMagnitude(c,t)? Couldn't find it in the reference? Could you tell where is this macro available in documentation, or, perhaps how else did you manage to obtain total pressure?