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 to be written in different patches (http://www.cfd-online.com/Forums/openfoam-post-processing/112469-forces-written-different-patches.html)

Joanna Huang January 29, 2013 12:16

Forces to be written in different patches
 
Hi Foamers:
I am calculating the forces of a train.stl cases, it contains different patches like bogie, pantagraph, coach body, etc. I want to export the forces of different patches, so I write all the patches in the forces function file, but it does not work, the forces.dat file are alway the total forces, Can anyone help me with this, Thank you so much for that.

Joanna Huang January 29, 2013 12:27

the OF version i used is v2.1.1

tomf January 30, 2013 05:33

Hi Joanna,

You can get multiple versions of the forces by just making more forces entries in the controlDict. The example below gives you different folders, in this case:

Total, Body, pantagraph. Of course you have to put in the correct patch names for all the different parts.

Code:

    Total //name of output folder   
    {      type forces;
            functionObjectLibs ("libforces.so");
            patches //includes the contributions of these patches       
            (
              Patch1 Patch2 Patch3
            );       
            rhoName        rhoInf;
            pName            p;
            rhoInf          1.225;
            CofR            (0 0 0);       
            outputControl  timeStep;       
            outputInterval  1;
    }
    pantagraph //name of output folder   
    {      type forces;
            functionObjectLibs ("libforces.so");
            patches //includes the contributions of these patches       
            (
              pantagraph
            );       
            rhoName        rhoInf;
            pName            p;
            rhoInf          1.225;
            CofR            (0 0 0);       
            outputControl  timeStep;       
            outputInterval  1;
    }
    Body //name of output folder   
    {      type forces;
            functionObjectLibs ("libforces.so");
            patches //includes the contributions of these patches       
            (
              coachBody
            );       
            rhoName        rhoInf;
            pName            p;
            rhoInf          1.225;
            CofR            (0 0 0);       
            outputControl  timeStep;       
            outputInterval  1;
    }

Regards,
Tom

Joanna Huang January 30, 2013 06:20

Hi Tom:

Thank you so much for that. I will try that.

openfoam_user February 4, 2013 11:44

Hi Joanna,

can you upload some pictures (mesh, pressure contours, streamlines, ...) of your work about train aerodynamics ?

Best regards,
Stephane.


All times are GMT -4. The time now is 19:22.