error on cylinder.m

hi all.
I think that you should’nt calculate f inside the cylinder during the calculation and you must omit tha nodes that are in the cylinder during calculation. and bounceback boundary condition must be applied on only the surface of the cylinder.
if you see the streamlines of the existance code they cross the cylinder and they have a wierd behaviour.
please help me on this matter.
thank you

Hi,
qualitatively it seems ok to me. If you add the following lines after “axis equal off; drawnow”

    ux2 = reshape(ux,lx,ly);
    uy2 = reshape(uy,lx,ly);
    [sx sy] = meshgrid(1, 1:10:51);
    h=streamline(ux2',uy2',sx,sy);
    set(h, 'Color', 'red');
    view(2);
    drawnow
    hold off
    clf

You will have the streamlines plotted also. They seem very OK to me…

For the other remarks. Of course you do not need to compute the f in the cylinder, but they have no influence on the rest of the simulation since the bounce back boundary condition just make then “stay inside”.

Orestis

Hi,
thank you .
Hamid Moslemi

Hi,

Can I ask a question about this code?

how can I get the values of Lift and Drag coefficients of the cylinder in this code?

Do you have any additional expressions like above for this results?

Thanks a lot

Can anyone Help me on this ?