Dear all:

I want to caculate the drag force for flow past a cylinder using stander D2Q9 mode with curved boundary tratmentment. When caculating the drag force, we need to caculate the gradient of velocity at the cylinder surface. I do not know how to do it. Any help or example code is greatly appreciate.

Best Regards

Liang

Hi,

there are 2 different ways to calculate the drag force.

The first one, as you say, is to know the gradient velocity. You can calculate the velocity at the cylinder surface by an extrapolation of the nearest fluid points and then apply the finite differences method to calculate the velocity gradient.

But in my opinion it’s simpler that you calculate the stress tensor on the surface and then use this one to calculate the drag force.

I used this second choice and gained accurated results.

Alessandro

Dear Alessandro:

I think your idea is very good. I will try to caculate it with the second method.

Hello I am Nikul

I am using Khan code for determining drag and lift coefficient. I am using computedrag.cpp code for simulation, now the error is as follow

computeDrag.cpp:121: error: ‘wb’ was not declared in this scope

computeDrag.cpp:123: error: ‘f_1’ was not declared in this scope

computeDrag.cpp:123: error: ‘wall’ was not declared in this scope

in code wb ==1 it means if any node is solid node then it will go inside the loop. can you help to resolve this error.

nikul