CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Contrib wpcRAS: utility to calculate wind pressure coefficient (http://www.cfd-online.com/Forums/openfoam-solving/105541-contrib-wpcras-utility-calculate-wind-pressure-coefficient.html)

hfs August 2, 2012 04:44

Contrib wpcRAS: utility to calculate wind pressure coefficient
 
I just found this tool to calculate wind pressure coefficients (works for OF1.6, OF2.0)

http://openfoamwiki.net/index.php/Contrib_wpcRAS

I tried it on OF 2.1.x... did not work..
I hope that I can find a similar tool for OF 2.1.x


Any ideas??

roth November 12, 2012 12:35

octree stuff changed
 
In readDict.H comment out all the octree stuff and replace with a single line i.e. modify as per below:
Code:

    Info << "Reference Static Pressure Location = " <<
        referenceStaticPressureLocation << endl;

    //~ // make octree  data cells
    //~ const cellList& cells = mesh.cells();
    //~ const pointField& points = mesh.points();

    //~ treeBoundBox meshBb(points);

    //~ scalar typDim = meshBb.avgDim()/(2.0*pow(cells.size(), 1.0/3.0));

    //~ treeBoundBox shiftedBb
    //~ (
        //~ meshBb.min() - vector(typDim, typDim, typDim),
        //~ meshBb.max() + vector(typDim, typDim, typDim)
    //~ );

    //~ octreeDataCell shapes(mesh);

    //~ octree<octreeDataCell> oc
    //~ (
        //~ shiftedBb,  // overall bounding box
        //~ shapes,    // all information needed to do checks on cells
        //~ 1,          // min. levels
        //~ 10.0,      // max. size of leaves
        //~ 10.0        // maximum ratio of cubes v.s. cells
    //~ );


    // label cellRefPstat = oc.find(referenceStaticPressureLocation);

    label cellRefPstat = mesh.findCell(referenceStaticPressureLocation);

and comment out the octree stuff in wpcRAS.C:
Code:

#include "incompressible/RAS/RASModel/RASModel.H"
//~ #include "octree.h"
//~ #include "octreeDataCell.H"
#include "wallFvPatch.H"

Should work. I just grabbed a mesh lookup from the probes source code.


All times are GMT -4. The time now is 00:01.