CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Pressure force UDF with Fluent

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

LinkBack Thread Tools Search this Thread Display Modes
Old   August 4, 2015, 07:56
Default Pressure force UDF with Fluent
New Member
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:

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);

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,
rsarma is offline   Reply With Quote

Old   August 11, 2015, 06:00
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13
Bruno Machado is on a distinguished road
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;

Bruno Machado is offline   Reply With Quote

Old   January 20, 2020, 02:19
New Member
Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 6
deepmorzaria is on a distinguished road
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.
deepmorzaria is offline   Reply With Quote

Old   May 24, 2021, 11:35
Join Date: Jan 2018
Posts: 31
Rep Power: 8
UchihaMadara is on a distinguished road
@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?
UchihaMadara is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
UDF for specific heat as function of pressure ghobold Fluent UDF and Scheme Programming 20 August 22, 2019 08:19
Fluent natural ventilation pressure boundary condition pierresandre FLUENT 24 November 8, 2011 14:32
Setup/monitor points of pressure and force coefficients siw CFX 3 October 22, 2010 06:07
correct UDF code for unsteady pressure boundary James W FLUENT 0 November 2, 2005 11:38
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 10:44

All times are GMT -4. The time now is 23:40.