ProjectPhysX / FluidX3D

The fastest and most memory efficient lattice Boltzmann CFD software, running on all GPUs via OpenCL. Free for non-commercial use.
https://youtube.com/@ProjectPhysX
Other
3.81k stars 301 forks source link

Is that possible to do an abstraction layer to calculate the drag forces? #68

Closed randomwangran closed 1 year ago

randomwangran commented 1 year ago

I see some people complaining about the drag calculation. For example:

How the Cd Cl and pressure distribution? Otherwise this is a cartoon. Cartoon then, appreciate the confirmation

There's nothing wrong against that people. I just feel we can do something to lower the bar to to analyzing force.

OpenFOAM is notably good at these things. Look at how many tutorials they had and how easy those tutorials can be executed. Here's an example. The user can prescribe the simulation configuration at a high level and start caring about those details.

  forces
{
    type            forceCoeffs;
    libs            ("libforces.so");
    writeControl    timeStep;
    writeInterval   1;

    patches         ("motorBike.*");
    rho             rhoInf;      // Indicates incompressible
    log             true;
    rhoInf          1;           // Redundant for incompressible
    liftDir         (0 0 1);
    dragDir         (1 0 0);
    CofR            (0.72 0 0);  // Axle midpoint on ground
    pitchAxis       (0 1 0);
    magUInf         20;
    lRef            1.42;        // Wheelbase length
    Aref            0.75;        // Estimated
}

I'm not a LBM coder, very new to this new solver, but if I really seriously want to use this code, this is something I really need to figure out first.

ProjectPhysX commented 1 year ago

Force calculation is already implemented in an abstracted manner, see issue #16. For a first validation case on drag force in the turbulent regime, see here: https://github.com/ProjectPhysX/FluidX3D/discussions/58#discussioncomment-5192266

I will soon do tutorial videos to lower the bar, and also more turbulence validation cases. I'll keep you updated!