CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Unknown function type forces and forceCoeffs (https://www.cfd-online.com/Forums/openfoam-post-processing/197849-unknown-function-type-forces-forcecoeffs.html)

richard.chung.jones January 19, 2018 00:13

Unknown function type forces and forceCoeffs
 
Dear Foamers,

For OF4.1 and 4.x, I cannot run the "forces" and "forceCoeffs" anymore. I always get this following error.
Code:

--> FOAM Warning :
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 671
    Caught FatalError
--> FOAM FATAL ERROR:
Unknown function type forces

Valid functions are :

15
(
abort
coded
patchProbes
probes
psiReactionThermoMoleFractions
removeRegisteredObject
residuals
rhoReactionThermoMoleFractions
setTimeStep
sets
surfaces
systemCall
timeActivatedFileUpdate
writeDictionary
writeObjects
)



    From function static Foam::autoPtr<Foam::functionObject> Foam::functionObject::New(const Foam::word&, const Foam::Time&, const Foam::dictionary&)
    in file db/functionObjects/functionObject/functionObject.C at line 100.

--> FOAM Warning :
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 671
    Caught FatalError
--> FOAM FATAL ERROR:
Unknown function type forceCoeffs

Valid functions are :

15
(
abort
coded
patchProbes
probes
psiReactionThermoMoleFractions
removeRegisteredObject
residuals
rhoReactionThermoMoleFractions
setTimeStep
sets
surfaces
systemCall
timeActivatedFileUpdate
writeDictionary
writeObjects
)



    From function static Foam::autoPtr<Foam::functionObject> Foam::functionObject::New(const Foam::word&, const Foam::Time&, const Foam::dictionary&)
    in file db/functionObjects/functionObject/functionObject.C at line 100.

I don't why forces disappeared from the list and I also don't know where is the functionObject.C too.

Here is the settings code for reference.

Code:

functions
{
        forces
        {
                type                    forces;
                lib                            ("libforces.so");
                writeControl    runTime;
                writeInterval  0.5;
                rho            rhoInf; // Incompressible solver
                rhoInf                  1.184;

                patches        (airfoil);
                CofR            (0.25 0 0);
                pitchAxis      (0 0 1);

                log            on;
        }

        forceCoeffs
        {
                type                    forceCoeffs;
                lib                            ("libforces.so");
                writeControl    runTime;
                writeInterval  0.5;
                rho            rhoInf; // Incompressible solver
                rhoInf                  1.184;

                magUInf                0.01568;
                lRef                    1;
                ARef                    1;

                patches        (airfoil);
                CofR            (0.25 0 0);
                pitchAxis      (0 0 1);

                liftDir                (0 1 0);
                dragDir                (1 0 0);
                log            on;
        }
}


hulli January 19, 2018 10:38

it took me also al while but

this worked for me: Just hit> yoursolvername -postProcess < into the comand line and it ran through

here ist my compute forcescoefs as an examle (copy pase in the controlDict) and run the yoursolvername -postProcess -newTimes


forces_coef
{
type forceCoeffs;
libs ( "libforces.so" );
writeControl outputTime;
writeInterval 1;
patches ( "mystl" );
rho rhoInf; // Indicates incompressible
log true;
rhoInf 1000; // Redundant for incompressible
liftDir (0 0 1);
dragDir (1 0 0);
CofR (1.0 0.3 0.06); // Axle midpoint on ground
pitchAxis (0 1 0);
magUInf 0.9;
lRef 0.1; // Wheelbase length
Aref 0.2; // Estimated
// Reference pressure [Pa]
pRef 101325;
}

I hope that helps

Wolfram June 21, 2022 08:53

I assume your approach does not allow to track the force coefficients "on the fly" while running the solver?

I am facing the same issue atm ... "Unknown function type forceCoeffs" in foam extend 4.0

In foam extend 4.1 the same setup does not throw any error.


All times are GMT -4. The time now is 08:48.