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/)
-   -   Openfoam Post Processing Cumulative Drag (https://www.cfd-online.com/Forums/openfoam-post-processing/254001-openfoam-post-processing-cumulative-drag.html)

AybarsSeyhan January 14, 2024 08:05

Openfoam Post Processing Cumulative Drag
 
2 Attachment(s)
Hello, I am doing a project about drag reduction devices for US Trucks. I am trying to add some cumulative drag plots too. But in my graphs it seems like the Cd is decreasing between the truck and the trailer. All the paper that i read says that it should increase due to the pressure difference. I also tested it with vortex traps set in front of the trailer. I am attaching my forceCoeffs file and my graphs. Can you give me feedback about what could went wrong or did i get wrong results.

Thank you all

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2306                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

forceCoeffs1
{
    type            forceCoeffs;

    libs            (forces);

    writeControl    timeStep;
    timeInterval    1;

    log            yes;
   
    writeFields    yes;        // Store and write volume field representations of forces and moments
   
    patches (truckbase symmetry);

    rho            rhoInf;      // Indicates incompressible
    rhoInf          1;          // Required when rho = rhoInf
    liftDir        (0 0 1);
    dragDir        (1 0 0);
    CofR            (0 0 0);        //The point around which your torque will be calculated.
    pitchAxis      (0 1 0);
    magUInf        24.5872;                // INPUT SPEED INITIAL
    lRef            20.315;        // Wheelbase length        the longest line in the x direction will be the lRef.
    Aref            5.196;  //10.392;   
   
  /* binData
    {
        nBin        50;          // output data into 20 bins
        direction  (1 0 0);    // bin direction
        cumulative  yes;
    }*/ 
}


binField1
{
    type                    binField;
    libs                    (fieldFunctionObjects);
    binModel                singleDirectionUniformBin;
    fields                  (forceCoeff);
    patches                (truckbase);
    decomposePatchValues    true;
    CofR                    ${../forceCoeffs1/CofR};

    binData
    {
        nBin        50;          //
        direction  (1 0 0);    // bin direction
        cumulative  yes;
    }
    writeControl            timeStep;
}



All times are GMT -4. The time now is 20:45.