Find answers, ask questions, and connect with our <br>community around the world.

Home Forums OpenFOAM Forum motorBike case not getting cl and cd

  • motorBike case not getting cl and cd

    Posted by Srinivas K on February 10, 2023 at 7:44 am

    following  is my system/controlDict/function Dict

    i got this from openfoam website.

    forceCoeffs1
    {
    // Mandatory entries
    type forceCoeffs;
    libs (forces);
    patches (motorBike); // (wall1 “(wall2|wall3)”);
    magUInf 20;
    lRef 1.8;
    Aref 3.6;

    // Optional entries
    //coefficients (<wordHashSet>);
    //directForceDensity <bool>;
    // porosity <bool>;
    // writeFields <bool>;
    // useNamePrefix <bool>;

    // Conditional mandatory entries

    // Cartesian coordinate system specification when evaluating
    // force and moment coefficients, either of the below

    // Option-1, i.e. the centre of rotation
    // by inherently using e3=(0 0 1) and e1=(1 0 0)
    CofR (0 0 0); // Centre of rotation
    dragDir (1 0 0);
    liftDir (0 0 1);

    // Option-2, i.e. local coordinate system specification
    origin (0 0 0);
    e1 (1 0 0);
    e3 (0 0 1); // (e1, e2) or (e2, e3) or (e3, e1)

    // Option-3, i.e. general coordinate system specification
    coordinateSystem
    {
    type cartesian;
    origin (0 0 0);
    rotation
    {
    type axes;
    e3 (0 0 1);
    e1 (1 0 0); // (e1, e2) or (e2, e3) or (e3, e1)
    }
    }

    // Conditional optional entries

    // if directForceDensity == true
    fD <word>;

    // if directForceDensity == false
    p p;
    U U;
    rho rhoInf;

    rhoInf  1; // redundant for incompressible-flow cases
    pRef 0;

    // Inherited entries

    }

    Barış Bicer replied 1 year, 3 months ago 2 Members · 19 Replies
  • 19 Replies
  • Srinivas K

    Member
    February 10, 2023 at 7:49 am

    forceCoeffs forceCoeffs1 write:
    Coefficient Total Pressure Viscous Internal
    Cd: 0 0 0 0
    Cd(f): 0 0 0 0
    Cd(r): 0 0 0 0
    Cl: 0 0 0 0
    Cl(f): 0 0 0 0
    Cl(r): 0 0 0 0
    CmPitch: 0 0 0 0
    CmRoll: 0 0 0 0
    CmYaw: 0 0 0 0
    Cs: 0 0 0 0
    Cs(f): 0 0 0 0
    Cs(r): 0 0 0 0

    writing force and moment coefficient files.

    Time = 458

    smoothSolver: Solving for Ux, Initial residual = 0.165137, Final residual = 0.0945866, No Iterations 1000
    smoothSolver: Solving for Uy, Initial residual = 0.438995, Final residual = 0.00528226, No Iterations 1
    smoothSolver: Solving for Uz, Initial residual = 0.441934, Final residual = 0.00497155, No Iterations 1
    GAMG: Solving for p, Initial residual = 0.0259716, Final residual = 0.000142681, No Iterations 2
    time step continuity errors : sum local = 1.58027e-15, global = 3.86627e-17, cumulative = -7.10061e-15
    ^C

  • Barış Bicer

    Moderator
    February 12, 2023 at 8:37 pm

    Hi Srinivas,

    there are 3 options that are activated in the above forceCoeffs file. So deactivate option 2 and 3 please and try again.

  • Srinivas K

    Member
    February 13, 2023 at 10:15 am

    I did the changes as per you said, but it still not works. still cl and cd values are zero.

    after running to post process the results, i give the command touch .foam but in paraview P, U options are not present.

    after the run fields (P, U ,Q, T) are getting generated in 100, 200, 300, 400, 500 folder. but I cant post process the results.

  • Srinivas K

    Member
    February 13, 2023 at 10:15 am

    • Barış Bicer

      Moderator
      February 14, 2023 at 4:40 pm

      It is strange why you cant view the results in paraview. Can you send a picture what do you do in paraview?

  • Srinivas K

    Member
    February 13, 2023 at 10:17 am

    functions
    {

    forceCoeffs1
    {

    type forceCoeffs;
    libs (“libforces.so”);
    patches (motorBike); // (wall1 “(wall2|wall3)”);
    writeControl timeStep;
    writeInterval 1;
    rho rhoInf;
    log true;
    rhoInf 1.225;
    CofR (0 0 0); // Centre of rotation
    dragDir (1 0 0);
    liftDir (0 0 1);
    magUInf 20;
    lRef 1.42;
    Aref 0.75;

     

  • Srinivas K

    Member
    February 13, 2023 at 10:18 am

  • Srinivas K

    Member
    February 13, 2023 at 10:19 am

  • Barış Bicer

    Moderator
    February 14, 2023 at 4:43 pm

    Ok understood problem.

    listen your 1 2 3 folders are mesh folder ok? If you make check mesh most probably you will see only background mesh not your real mesh. And ı feel that you didnt run your case with real mesh bcs after snappy you have created 1 2 3 folders where inside 3 folder there is /polyMesh folder which is your real mesh.

    So copy it into your constant/ folder and rerun your case. After that you will have results.

    For your information

  • Srinivas K

    Member
    February 16, 2023 at 8:39 am

    sir I have saw lots of video sir online, but no one is doing special to calculate the cl and cd. i will show the my commands one by one. one of my contact said the change the virson with openFoam.org. but still not working.

     

  • Srinivas K

    Member
    February 16, 2023 at 8:39 am

  • Srinivas K

    Member
    February 16, 2023 at 8:40 am

  • Srinivas K

    Member
    February 16, 2023 at 8:40 am

    snappyHexmesh

  • Srinivas K

    Member
    February 16, 2023 at 8:41 am

  • Srinivas K

    Member
    February 16, 2023 at 8:42 am

  • Srinivas K

    Member
    February 16, 2023 at 8:44 am

Page 1 of 2

Log in to reply.

error: Content is protected !!