CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Forces on multiple patches in InterDyMFoam (http://www.cfd-online.com/Forums/openfoam-post-processing/104540-forces-multiple-patches-interdymfoam.html)

Claudio July 11, 2012 17:51

Forces on multiple patches in InterDyMFoam
 
Hi,

I want to compute the total forces across multiple patches. I am running a rectangular sloshing tank where each of the 4 walls is its own patch (LeftWall, RightWall, TopWall, BottomWall).
I tried to use the same script in controlDict that I use when the 4 walls form one single patch, but I am not sure that I get the right results.

Here's my controlDict:
Code:

    forces
    {
        type forces;
        functionObjectLibs ("libforces.so"); //Lib to load
        patches (TopWall, BottomWall, LeftWall, RightWall); // change to your patch name
        rhoInf 1000.; //Reference density for fluid
//        rhoName rhoInf;
        rhoName rho;
        pName p;
        UName U;
        CofR (0 0 0); //Origin for moment calculations
        outputControl  outputTime;
        outputInterval 0.108;
    }

Any suggestion on what might be wrong?

Thanks.

Claudio July 13, 2012 11:13

THe answer
 
Found the answer in a pre-processing thread:

Code:

    forces   
{        type forces;
        functionObjectLibs ("libforces.so"); //Lib to load
        patches (TopWall BottomWall LeftWall RightWall); // change to your patch name
        rhoInf 1000.; //Reference density for fluid
        rhoName rho;
        pName p;
        UName U;
        CofR (0 0 0); //Origin for moment calculations
        outputControl  outputTime;
        outputInterval 0.108;    }

No commas in the list of the patches names.

pechwang February 6, 2013 18:08

Hi Claudio,

I'm new to OpenFOAM. And my research is about flow between two plates, one is stationary and one is rotating. I want to know the torques both on the topwall and the bottomwall. However, when I added two patch names, OpenFOAM only gives me the difference between these two torques. Can you help me with this? Thank you.

Quote:

Originally Posted by Claudio (Post 371335)
Found the answer in a pre-processing thread:

Code:

    forces   
{        type forces;
        functionObjectLibs ("libforces.so"); //Lib to load
        patches (TopWall BottomWall LeftWall RightWall); // change to your patch name
        rhoInf 1000.; //Reference density for fluid
        rhoName rho;
        pName p;
        UName U;
        CofR (0 0 0); //Origin for moment calculations
        outputControl  outputTime;
        outputInterval 0.108;    }

No commas in the list of the patches names.



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