Lift coefficient of a wing

Hello everyone,
I am trying to compute lift coefficient of a wing with immersed boundary. The code I am using is as below:

forceConversion = param.rho * (param.dxFinest * param.dxFinest * param.dxFinest * param.dxFinest) / (param.dtFinest * param.dtFinest);
force = -reduceImmersedForce<T>(*container, iSurface) * forceConversion

My question is whether the variable ‘force’ is the lift coefficient I want, or it is just a non-dimensionial force.

S. Chu

By the way, I also use grid refinement. When maxOctreeLevel increases by 1, the value of force nearly doubles.

‘force‘ is you want, you should use “forceConversion =2* param.rho * (param.dxFinest * param.dxFinest * param.dxFinest * param.dxFinest) / (param.dtFinest * param.dtFinest);”

My case is 3D, so is the form of forceConversion like this? (wing area is 1^2 * AspectRatio)

forceConversion = 2 * param.rho * (param.dxFinest * param.dxFinest * param.dxFinest * param.dxFinest) / (param.dtFinest * param.dtFinest) / AspectRatio;

I think that if you want to get force coefficient, you can use " / AspectRatio". if you want to get force ,not use" / AspectRatio"

Hello Lin,
Thank you for your explanation. What do you think of my second question? When I refine the grid, the force doubles as well.

May I can see dinfination of your “container”?I want to see your setting ,then I try to make it.

Hello Lin,
My “container” is defined by the function createFluidBlocks, which is modified from the example “generalExternalFlow” in palabos.

    MultiScalarField3D<T> *rhoBar = nullptr;
    MultiTensorField3D<T,3> *j = nullptr;
    MultiContainerBlock3D *container = nullptr;
    std::vector<MultiBlock3D*> lattice_rho_bar_j_arg;

    createFluidBlocks(param, lattices, rhoBar, j, container, lattice_rho_bar_j_arg, order);

void createFluidBlocks(SimulationParameters& param, MultiLevelCoupling3D<T,DESCRIPTOR,RESCALER>*& lattices,
        MultiScalarField3D<T>*& rhoBar, MultiTensorField3D<T,3>*& j, MultiContainerBlock3D*& container,
        std::vector<MultiBlock3D*>& lattice_rho_bar_j_arg, plint& order)
    Dynamics<T,DESCRIPTOR> *dynamics = new ConsistentSmagorinskyBGKdynamics<T,DESCRIPTOR>([0], param.cSmago);
    param.incompressibleModel = false;
    pcout << "Dynamics: Smagorinsky BGK." << std::endl;

    lattices = new MultiLevelCoupling3D<T,DESCRIPTOR,RESCALER>( param.ogs, dynamics->clone(), order );

    for (plint iLevel = 0; iLevel < lattices->getNumLevels(); iLevel++) {
        pcout << "Info for lattice at level: " << iLevel << std::endl;
        pcout << getMultiBlockInfo(lattices->getLevel(iLevel)) << std::endl;

    rhoBar = generateMultiScalarField<T>((MultiBlock3D&) lattices->getLevel(param.finestLevel), param.largeEnvelopeWidth).release();

    j = generateMultiTensorField<T,3>((MultiBlock3D&) lattices->getLevel(param.finestLevel), param.largeEnvelopeWidth).release();

    container = new MultiContainerBlock3D((MultiBlock3D&) *rhoBar);

            new BoxRhoBarJfunctional3D<T,DESCRIPTOR>(),
            lattices->getLevel(param.finestLevel).getBoundingBox(), lattice_rho_bar_j_arg, 0);
            new ComputeWallVelocityFunctional<T,DESCRIPTOR>(&param),
            lattices->getLevel(param.finestLevel).getBoundingBox(), lattice_rho_bar_j_arg, 1);

    // Integrate the immersed boundary processors in the lattice multi-block.

    std::vector<MultiBlock3D*> args;

    plint pl = 2;

            new InstantiateImmersedWallDataWithIndexedTagging3D<T>(param.vertices, param.areas, param.flags),
            container->getBoundingBox(), lattices->getLevel(param.finestLevel), args, pl);

    for (plint i = 0; i < param.ibIter; i++) {
            new IndexedInamuroIteration3D<T,VelFunction>(
                VelFunction(param), 1.0 /[param.finestLevel], param.incompressibleModel),
            rhoBar->getBoundingBox(), lattices->getLevel(param.finestLevel), args, pl);
            new ExternalRhoJcollideAndStream3D<T,DESCRIPTOR>(),
            lattices->getLevel(param.finestLevel).getBoundingBox(), lattice_rho_bar_j_arg, pl);

I know it, i use it to simulate ,too. in this part, which one you choose
lattices.collideAndStream(0, useExecuteInternalProcessors, extProcFunIds, computeStats, statsId, ids, results);
" global::timer(“lb-iter”).start();
lattice->executeInternalProcessors(); // Execute all processors and communicate appropriately.

I use the first one.

    std::map<plint, bool> useExecuteInternalProcessors;
    for (plint iLevel = 0; iLevel <= param.finestLevel; iLevel++) {
        useExecuteInternalProcessors[iLevel] = false;
    useExecuteInternalProcessors[param.finestLevel] = true;

   lattices->collideAndStream(0, useExecuteInternalProcessors, extProcFunIds, computeStats, statsId, ids, results);

I think it was no problem. AND the model"Smagorinsky BGK" and incompressible ,i think whether the model is a problem? can you show the article about your case?

Maybe I should try a MRT model?
The case I am testing is a horizontally flapping wing (HFW) in this paper. The motion data and force are in Fig. 10.

but MRT model is not for this.( // The “order” is about how Palabos rescales the populations. For now, we work at order 0.
// RESCALER means: we use convective scaling,
// Palabos scales only the populations and no external scalars, and
// this works for BGK but not for MRT.
plint order = 0;)

I forgot this. :sweat_smile:

In next days, i will simulate it . if I succeed , i will inform you of it.

Hello,S. Chu:
Although this paper ,i find you can choose the model"incBGK" and param.incompressibleModel = true.ThenI tried to use IBM and grid refinement, but I fail it,Can you help me ?

Hello Lin,
Is 598459670 your QQ number? I can add you to talk about it in detail.

Yes, it is my QQ.THINK YOU very much

Yes, it is my QQ.THINK YOU very much

Hello, I just checked the paper(Aerodynamic Power Efficiency Comparison of Various Micro-Air-Vehicle Layouts in Hovering Flight) you shared, and in the upperleft part of page 4 it says CF = F/0.5ρU^2S. Based on your discussion I see the area is “AspectRatio”. But why the coefficient is

forceConversion = 2 * param.rho * (param.dxFinest * param.dxFinest * param.dxFinest * param.dxFinest) / (param.dtFinest * param.dtFinest) / AspectRatio;

I am curious does this “forceConversion” matches the equation? Appreciate your kindly reply.