CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Problem calculating forces on blades 2 (for finding forces) (https://www.cfd-online.com/Forums/openfoam-solving/178985-problem-calculating-forces-blades-2-finding-forces.html)

bye bye my blue October 20, 2016 11:20

Problem calculating forces on blades 2 (for finding forces)
 
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
libs
(
"libincompressibleTurbulenceModel.so"
"libincompressibleRASModels.so"
);
application pimpleDyMFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 3.15;

deltaT 1e-3;

writeControl adjustableRunTime;

writeInterval 0.01;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

adjustTimeStep yes;

maxCo 20.0;



functions
(
forces_blade
{
type forces;
functionObjectLibs ("libforces.so");
patches (blades);
CofR (0 0 0);
//pName p;
//UName U;
//verbose true;
rhoName rhoInf;
rhoInf 1.225;
//factor 19.7363;
outputControl timeStep;
outputInterval 100;
}
);


// ************************************************** *********************** //
--> FOAM FATAL IO ERROR:
'functions' entry is not a dictionary

file: /home/pcl/OpenFOAM/pcl-4.0/run/OpenFOAM-2D-VAWT-master/system/controlDict from line 18 to line 75.

From function bool Foam::functionObjectList::read()
in file db/functionObjects/functionObjectList/functionObjectList.C at line 555.

FOAM exiting

this message appeared... -0-;;

how can i solve it ?

gkarlsen October 20, 2016 11:58

Use different brackets {}. See http://cfd.direct/openfoam/user-guid...ction-objects/

bye bye my blue October 20, 2016 20:49

Problem calculating forces on blades 2 (for finding forces)
 
in contolDict,

functions
{
forces_blade
{
type forces;
functionObjectLibs ("libforces.so");
patches (blades);
CofR (0 0 0);
//pName p;
//UName U;
//verbose true;
rhoName rhoInf;
rhoInf 1.225;
//factor 19.7363;
outputControl timeStep;
outputInterval 100;
}
};


--> FOAM FATAL ERROR:
Could not find rho

From function void Foam::functionObjects::forces::initialise()
in file forces/forces.C at line 197.

FOAM exiting


how can I solve it ?? why this message occurs?????????

ordinary October 24, 2016 07:01

Quote:

Originally Posted by bye bye my blue (Post 622330)
in contolDict,

functions
{ -------------------------- >This must be (
forces_blade
{
type forces;
functionObjectLibs ("libforces.so");
patches (blades);
CofR (0 0 0);
//pName p;
//UName U;
//verbose true;
rhoName rhoInf;
rhoInf 1.225;
//factor 19.7363;
outputControl timeStep;
outputInterval 100;
}
}; ---------------------------------------------->This must be )


--> FOAM FATAL ERROR:
Could not find rho

From function void Foam::functionObjects::forces::initialise()
in file forces/forces.C at line 197.

FOAM exiting


how can I solve it ?? why this message occurs?????????

I think the red parentheses must be ( and )

bye bye my blue October 24, 2016 22:01

it didn't work..
 
Quote:

Originally Posted by ordinary (Post 622726)
I think the red parentheses must be ( and )

your red parentheses are not answer.


it had been previous problem and already solved.

i still don't know...

bentkj November 7, 2016 01:55

I have the exact same error, but for a 2D airfoil case (with reference to the airfoil2D tutorial). It would be great if someone could provide a solution to this.

Thank you,
Ben

piroshki November 17, 2016 16:53

Same here / FOAM FATA ERROR: Could not find rho
 
I am getting the exact same problem, and I don't understand why since I have triple-checked for typos, and I am using what others have claimed works online...

Might this be a bug? Anyone ever managed to solve this one?

piroshki November 18, 2016 12:10

"Could not find rho" - problem with forces output
 
Hello all,

I've been researching this issue for 2 days now, and can't seem to figure out what I am doing wrong. I am attempting to record the forces on a particular item in my simple icoFoam run. (A streamlined bulbous shape in a simple water "tunnel").

The issue I hit is I when the solver tries to write the output to a file I get the error "could not find rho". If I have writeInterval = 1 then I will get this error after the first timestep is complete. If I have writeInteral = 5 then it happens after 5 timesteps.

--> FOAM FATAL ERROR:
Could not find rho

From function void Foam::functionObjects::forces::initialise()
in file forces/forces.C at line 196.



I also tried to run the run with no force output and then do a -postProcess and I get the exact same error, immediately after loading the mesh.


forces forces:
Not including porosity effects
Time = 0

Reading fields:
volScalarFields: p
volVectorFields: U

Executing functionObjects


--> FOAM FATAL ERROR:
Could not find rho

From function void Foam::functionObjects::forces::initialise()
in file forces/forces.C at line 196.

FOAM exiting




Here is my "forces" file:

forces
{
type forces;
functionObjectLibs ("libforces.so");
writeControl timeStep;
writeInterval 5;
patches (bulb_sd8020);
rhoName rhoInf;
CofR (0 0 0);
pName p;
UName U;
log yes;
verbose true;
rhoInf 1025;
}


I am getting to grips with OpenFoam and wish I could figure this out for myself, but I am stuck...

Thanks for any pointers!

Tom.

Tobi November 21, 2016 07:06

I do not know which OpenFOAM version you are using but the rhoName is wrong if you use the latest one. Also your message tells you that you cannot find the entry rho :) So finally you should do it like:
Code:

rho          rhoInf;
rhoInf      1000;

See also, tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs


By the way ... you should use code - tags for your posts.
Cheers.

piroshki November 21, 2016 14:52

Hello Tobias,
Many thanks for such a quick response. It is much appreciated. I saw the rhoName variable so often in examples it never occurred to me the solution would be so simple...! Your comments are also duly noted with regards to quoting text!
Kind regards,
Tom.

wyldckat November 22, 2016 08:47

Greetings to all,

This has come to my attention, thanks to the following bug report: http://bugs.openfoam.org/view.php?id=2347

Unfortunately, no one in this thread provided detailed steps on how to reproduce the same error, therefore I'm going to focus on the bug report, until this is fixed or at least understood.

edit: Wait, sorry, bentkj did mention which tutorial can be used, namely the airfoil2D case.



edit 2: OK, I've noticed just now what the problem is and here is what I wrote on the bug report:
Quote:

OK, I then looked in more detail and the problem is that the settings have changed. If you look at the documentation: http://cpp.openfoam.org/v4/a00866.html#details - you'll see that the '*Name' entries have been changed to this:
Code:

      rho rhoInf;
      p p;
      U U;

Please try this and let us know if it solves the problem.

edit 3: the previous 3 posts from another thread, given these are all in the same topic.

Best regards,
Bruno

mukul92 November 22, 2016 10:23

Problem solved using the suggested changes
 
Okay, I confirm that making the above changes solves the issue. :)
Moving to OF-4 just helped us get around some bug which was crashing parallel runs of pimpleDyMFoam.
Thank you very much!

Tobi November 22, 2016 11:28

It is the third topic about that "rho" :D

No one uses the search engine ! :P

wyldckat November 22, 2016 17:17

Quote:

Originally Posted by Tobi (Post 626448)
It is the third topic about that "rho" :D

Hopefully I've merged the remaining other thread onto this one that was on this topic.


Quote:

Originally Posted by Tobi (Post 626448)
No one uses the search engine ! :P

Ironically, the problem was that people used the search engine and found the outdated information...

piroshki November 23, 2016 10:00

Yup - plenty of examples of rhoName all over the place, not too many showing just rho... In any case this thread will be a useful reference. Perhaps the error message could be amended - "could not find rho (rhoName has been deprecated)"? Thanks much to the fast responses.

tubois January 10, 2017 10:45

I just had the same problem. It comes with the Visual CFD case set up.
I haven't experienced this problem when I run the motobike example by coping the tutorials, but have this error when I use Visual CFD for the case set up. Maybe it should be told to ESI GROUP.

Quote:

Originally Posted by wyldckat (Post 626485)
Hopefully I've merged the remaining other thread onto this one that was on this topic.



Ironically, the problem was that people used the search engine and found the outdated information...


jan2re April 19, 2018 10:48

Solved it.
 
Quote:

Originally Posted by Tobi (Post 626241)
I do not know which OpenFOAM version you are using but the rhoName is wrong if you use the latest one. Also your message tells you that you cannot find the entry rho :) So finally you should do it like:
Code:

rho          rhoInf;
rhoInf      1000;

See also, tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs


By the way ... you should use code - tags for your posts.
Cheers.

Thanks this solved the problem for me.


All times are GMT -4. The time now is 19:36.