saving . . . saved Force Coefficients fioe flow over cylinder in openfoam has been deleted. Force Coefficients fioe flow over cylinder in openfoam has been hidden .
Force Coefficients fioe flow over cylinder in openfoam
Title
Question
I am trying to solve the flow over cylinder using mhdFoam solver in \r\nopenFoam. When i am including the force coefficient script in the \r\ncontrolDict file as follows:
\r\nfunctions
\r\n{
\r\nforceCoeffs
\r\n {
\r\n type forceCoeffs;
\r\n functionObjectLibs ( "libforces.so" );
\r\n writeControl timeStep;
\r\n writeInterval 100;
\r\n
\r\n patches ( "cylinder" );
\r\n pName p_rgh;
\r\n UName U;
\r\n rho rhoInf;
\r\n log true;
\r\n
\r\n liftDir (0 1 0);
\r\n dragDir (1 0 0);
\r\n CofR (0 0 0);
\r\n pitchAxis (0 0 1);
\r\n
\r\n magUInf 1;
\r\n rhoInf 1;
\r\n lRef 1.0; // Diameter of Cylinder.
\r\n Aref 1; // Projected Area = Diameter * Length of Cylinder.
\r\n // Note for 2D cylinder flow Length is size of mesh in Z-direction (usually taken as unity)
\r\n }
\r\n}
\r\n
\r\nwhen i am running, the following error is coming:
\r\n--> FOAM FATAL IO ERROR:
\r\nwrong token type - expected word, found on line 19 the punctuation token '['
\r\n
\r\nfile: /home/AMRITAVIDYA/p2tf17008/Desktop/mhdFlow/cylinder_mhdFoam/TRAIL/constant/transportProperties.nu at line 19.
\r\n
\r\n From function Foam::Istream& Foam:<img alt="" border="0" class="inlineimg" src="https://www.cfd-online.com/Forums/images/smilies/redface.gif" title="Embarrassment">perator>>(Foam::Istream&, Foam::word&)
\r\n in file primitives/strings/word/wordIO.C at line 74.
\r\n
\r\nFOAM exiting
\r\n
\r\nCan some one help me with is error???
\r\nThanks in advance.\r\n\t\t

OpenFOAM General None min None sec 02-08-18, 1:20 p.m. ravindra336

Answers:

Dear Ravindra,
Kindly check the transportProperties file located in the constant directory.
In the line,
nu              [0 2 -1 0 0 0 0] 0.01;
You missed the ending square bracket.

Regards,
Sathish
02-08-18, 2:20 p.m. sathishk12
Thank you for the reply. It is i should give it as
 nu   nu [0 2 -1 0 0 0 0]0.01
02-08-18, 3:06 p.m. ravindra336

Login to add comment


Log-in to answer to this question.