Skip to content

forceCoeff writeFields option producing strange values: areaIntegrate of forceCoeff field != forceCoeff

I have been using the forceCoeffs function object for a long time, and am trying the writeFields option in v1712. However, it produces very strange values. I have a test case with one wall patch, and from the solving log, I can see that the forceCoeff for that patch is quite different from the areaIntegrate of forcesAll:forceCoeff on that patch. I would expect the integral to give a value close to Cd pressure+viscous.

When I plot contours of forcesAll:forceCoeff in paraview, I see very low max values (~0.0002), when I should see surface normal*Cp, and Cp is roughly between -2 and 1.

I can supply a solved test case, and the relevant /system files and log files are attached.

forceCoeffs forcesAll execute:
    Coefficients
        Cm       : -239.9753	(pressure: 176.0671	viscous: 0.6762368	porous: -416.7187)
        Cd       : 2.021964	(pressure: 1.242636	viscous: 0.005935802	porous: 0.7733919)
        Cl       : 2.230875	(pressure: 0.2968915	viscous: 0.001180773	porous: 1.932802)
        Cl(f)    : -238.8599
        Cl(r)    : 241.0908

surfaceFieldValue surfaceFieldValue1 write:
    total area = 2.59955
    areaNormalIntegrate(wall_l_body) of forcesAll:forceCoeff = (-0.0001750436 0 0)

surfaceFieldValue surfaceFieldValue2 write:
    total area = 2.59955
    areaIntegrate(wall_l_body) of forcesAll:forceCoeff = (9.107523e-05 -9.712166e-06 2.222456e-05)

forcesAll

controlDictlog.solve_OF.log

## Reattaching the author to the issue ticket: @aerogt3 ##

Edited by Kutalmış Berçin