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

Home Forums OpenFOAM Forum functionObjects | forcCoeffs

  • functionObjects | forcCoeffs

    Posted by Zeinab on April 14, 2022 at 9:27 am

    Hello Dr. Baris,

    I have a question regarding forceCoeffs, the forceCoeffs function object requires an entry for the lift and drag directions. If I am operating on a different AoA other than zero, I have to change the directions to match the new lift and drag direction. My question is whether there is a way to let OpenFOAM calculate it? I mean if we can use an expression that includes (cos(AoA) sin(AoA) 0) for the drag direction. Or maybe calculate them outside OpenFOAM using Matlab or so, and then import it. This will reduce too much effort when I am running simulations for a large number of AoA. Thank you!

    Regards,
    Zeinab

    Barış Bicer replied 2 years ago 2 Members · 3 Replies
  • 3 Replies
  • Barış Bicer

    Moderator
    April 14, 2022 at 12:49 pm

    Hi Zainab,

    Thank you for nice question.

    Truly speaking, we did these lift and drag direction calculation based on AoA manually at the very beginning of our works. However, we have automated external flow simulations using python scripting where all those parameters based on AoA are automatically calculated.

    Also, you know that when you change AoA you must also change velocity directions as well.

    I think that you can also use matlab script. But my offer is just to write simple one python & matlab script where you can calculate all the variables based on AoA and output those values into an input file. then you can read those values as input for those lines in your case…

    I hope that it addresses your question.

    Best.

    Barış

  • Zeinab

    Member
    April 14, 2022 at 5:41 pm

    Hello Dr. Baris,
    for the velocity directions, I’ve used groovyBC, and it’s working, thank god :D. Writing the script should be easy. Okaay yess, this should be easy. To write the script and output its values as input to the forceCoeff files. Thank you. This was helpful.

  • Barış Bicer

    Moderator
    April 17, 2022 at 7:07 am

    Hi Zainab,

    It is nice to hear that groovyBC is working for it. Could you paste here an example related to groovyBC that can be useful for everyone.

    Best.

    Barış

Log in to reply.

error: Content is protected !!