CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Pressure force UDF with Fluent (https://www.cfd-online.com/Forums/fluent-udf/157654-pressure-force-udf-fluent.html)

rsarma August 4, 2015 08:56

Pressure force UDF with Fluent
 
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

Bruno Machado August 11, 2015 07:00

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;

}

deepmorzaria January 20, 2020 03:19

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.

UchihaMadara May 24, 2021 12:35

@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?


All times are GMT -4. The time now is 04:32.