CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Pressure force calculations by FLUENT UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 5, 2015, 07:15
Default Pressure force calculations by FLUENT UDF
  #1
New Member
 
Rakesh
Join Date: Jan 2014
Location: Delft
Posts: 13
Rep Power: 12
rsarma is on a distinguished road
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
rsarma is offline   Reply With Quote

Old   August 5, 2015, 13:16
Default
  #2
Senior Member
 
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 14
Kokemoor is on a distinguished road
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.)
Kokemoor is offline   Reply With Quote

Old   August 5, 2015, 13:39
Default
  #3
New Member
 
Rakesh
Join Date: Jan 2014
Location: Delft
Posts: 13
Rep Power: 12
rsarma is on a distinguished road
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?
rsarma is offline   Reply With Quote

Old   August 6, 2015, 11:35
Default
  #4
Senior Member
 
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 14
Kokemoor is on a distinguished road
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.
Kokemoor is offline   Reply With Quote

Old   January 24, 2018, 05:59
Default
  #5
New Member
 
hashem
Join Date: Dec 2015
Posts: 6
Rep Power: 11
fatemi is on a distinguished road
Quote:
Originally Posted by rsarma View Post
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?
fatemi is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read pressure at discrete points paka OpenFOAM 16 April 28, 2020 08:26
UDF for specific heat as function of pressure ghobold Fluent UDF and Scheme Programming 20 August 22, 2019 09:19
The fluent stopped and errors with "Emergency: received SIGHUP signal" yuyuxuan FLUENT 0 December 3, 2013 23:56
Fluent natural ventilation pressure boundary condition pierresandre FLUENT 24 November 8, 2011 15:32
Setup/monitor points of pressure and force coefficients siw CFX 3 October 22, 2010 07:07


All times are GMT -4. The time now is 16:27.