

co-efficient of drag and lift
Hi everyone, I am studying flow past a cylinder kept between two infinitely large plates. Reynolds no. is 500 and strouhal no. is 0.18.I want to get the co-efficient of drag and lift. How can i get the values? Thanks in advance. regards Subhankar
OpenFOAM


Dear Subhankar,
Add the following lines at the end of controlDict file
functions
\r\n{
\r\nforces
\r\n{
\r\ntype forces;
\r\nfunctionObjectLibs ( "libforces.so" ); // lib to load
\r\noutputControl timeStep;
\r\noutputInterval 1;
\r\npatches
\r\n(
\r\nwall // change to your patch name
\r\n);
\r\n// name of fields
\r\npName p;
\r\nUName U;
\r\nlog true; // dump to file
\r\nrhoInf 1025;
\r\nCofR ( 0 0 0 );
\r\n}
\r\nforcesCoeffs
\r\n{
\r\ntype forceCoeffs;
\r\nfunctionObjectLibs ( "libforces.so" ); // lib to load
\r\noutputControl timeStep;
\r\noutputInterval 1;
\r\npatches
\r\n(
wall // change to your patch name
\r\n);
\r\n// name of fields
\r\npName p;
\r\nUName U;
\r\nlog true; // dump to file
\r\nrhoInf 1025;
\r\nCofR ( 0 0 0 );
\r\nliftDir ( 0 1 0 );
\r\ndragDir ( 1 0 0 );
\r\npitchAxis ( 0 0 0 );
\r\nmagUInf 1.0; // velocity magnitude
\r\nlRef 0.305;
\r\nAref 0.001525;
\r\n}
\r\n}
This will create a file for lift and drag values.
Add the following lines at the end of controlDict file
functions
\r\n{
\r\nforces
\r\n{
\r\ntype forces;
\r\nfunctionObjectLibs ( "libforces.so" ); // lib to load
\r\noutputControl timeStep;
\r\noutputInterval 1;
\r\npatches
\r\n(
\r\nwall // change to your patch name
\r\n);
\r\n// name of fields
\r\npName p;
\r\nUName U;
\r\nlog true; // dump to file
\r\nrhoInf 1025;
\r\nCofR ( 0 0 0 );
\r\n}
\r\nforcesCoeffs
\r\n{
\r\ntype forceCoeffs;
\r\nfunctionObjectLibs ( "libforces.so" ); // lib to load
\r\noutputControl timeStep;
\r\noutputInterval 1;
\r\npatches
\r\n(
wall // change to your patch name
\r\n);
\r\n// name of fields
\r\npName p;
\r\nUName U;
\r\nlog true; // dump to file
\r\nrhoInf 1025;
\r\nCofR ( 0 0 0 );
\r\nliftDir ( 0 1 0 );
\r\ndragDir ( 1 0 0 );
\r\npitchAxis ( 0 0 0 );
\r\nmagUInf 1.0; // velocity magnitude
\r\nlRef 0.305;
\r\nAref 0.001525;
\r\n}
\r\n}
This will create a file for lift and drag values.


Dear Subhankar,
Please remove and from the above code.
Dear rahul,
Thanks for the reply. But i couldn't find 'and' you wanted me to remove from the code.
Thanks for the reply. But i couldn't find 'and' you wanted me to remove from the code.
Dear rahul,
Thanks for the reply. But i couldn't find 'and' you wanted me to remove from the code.
Thanks for the reply. But i couldn't find 'and' you wanted me to remove from the code.
Login to add comment


Dear subhankar,
Please remove and from the above code. Remove backslash with r and n.
Hi rahul
Thanks for the reply. Which solver/scheme should i use for my problem case? And what should be my boundary case files?
Thanks for the reply. Which solver/scheme should i use for my problem case? And what should be my boundary case files?
Login to add comment


Hi rahul
Thanks for the reply. Which solver/scheme should i use for my problem case? And what should be my boundary case files?
Thanks for the reply. Which solver/scheme should i use for my problem case? And what should be my boundary case files?
Login to add comment