|
[Sponsors] |
Force function for laminar case with interDyMFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 13, 2012, 18:43 |
Force function for laminar case with interDyMFoam
|
#1 |
New Member
Claudio
Join Date: May 2010
Location: Boston, MA
Posts: 28
Rep Power: 16 |
I tried to add the "force" function shown below to the sloshingTank2D case in the OpenFOAM tutorials.
Code:
forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load patches (walls); // change to your patch name rhoInf 998.2; //Reference density for fluid rhoName rho; pName p; UName U; CofR (0 0 0); //Origin for moment calculations outputControl timeStep; outputInterval 1; } Code:
[0] --> FOAM FATAL IO ERROR: [0] keyword nu is undefined in dictionary "/users/ccairoli/OpenFOAM_Test/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/processor0/constant/transportProperties" [0] [0] file: /users/ccairoli/OpenFOAM_Test/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/processor0/constant/transportProperties from line 20 to line 32. [0] [0] From function dictionary::lookupEntry(const word&, bool, bool) const [0] in file db/dictionary/dictionary.C at line 400. [0] FOAM parallel run exiting [0] Am I using it the wrong function for a laminar case? I use the exact same function for a turbulent case and have no errors either. Any help would be greatly appreciated. Claudio PS: I'm attaching the file if anybody would like to try to replicate the problem. |
|
August 14, 2012, 21:42 |
|
#2 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 |
Hi Claudio,
The function is complaining because its looking for a viscosity entry in the constant/transportProperties dictionary but its not finding it. Unfortunately just adding this in will remove the error but give you the wrong results. Because this is a multiphase simulation you have more than one viscosity to worry about and just handing some value will result in incorrect force calculations on the boundaries. I'm not sure of the easiest way to do this correctly, but, you could add in your own post processor that loads up a viscosity field or the two viscosity values and the alpha field. You would then calculate the forces using this local viscosity value. |
|
August 15, 2012, 09:25 |
|
#3 |
New Member
Claudio
Join Date: May 2010
Location: Boston, MA
Posts: 28
Rep Power: 16 |
Thanks Kyle for your reply.
Why then does it work for a turbulent case (BTW, in the transportProperties file I have nu for both phases)? Does it mean it gives the wrong results for the viscous forces in the turbulent case too? Even if that is the case I would like to make it work because I am mostly interested in the pressure forces. In my opinion is doing something different in the force calculation for a laminar case than for a turbulent case. I am not a C++ programmer (always done Fortran), so I am having a bit of a hard time following the logic in forces.C Any help would be appreciated. Cheers. |
|
December 5, 2012, 07:51 |
|
#4 |
Member
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14 |
Hello Kyle and Claudio,
greetings from Germany. I'm getting the same error: --> FOAM FATAL IO ERROR: keyword nu is undefined in dictionary "/home/stripathi/OpenFOAM/stripathi-2.1.1/run/tutorials/multiphase/interDyMFoam/ras/floatingBox/constant/transportProperties" file: /home/stripathi/OpenFOAM/stripathi-2.1.1/run/tutorials/multiphase/interDyMFoam/ras/floatingBox/constant/transportProperties from line 20 to line 32. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 400. FOAM exiting and I'm not even trying to calculate the force on the floating object! I'm attempting to simulate a simple rectangular object floating with 6 DoF in a 2-2 tank with laminar flow. Could you possibly tell me what am I doing wrong? If necessary, I'll be happy to send you my entire case files. Thanks, Sagun |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
what the unit of the results got from force function | lilinghan8 | OpenFOAM | 1 | June 11, 2012 10:07 |
Integral Force calculation in CFX 12 - wind blade case | LittleBart | CFX | 0 | April 27, 2011 05:04 |
force function not working in OF 1.6 | franzisko | OpenFOAM | 3 | August 4, 2009 15:24 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |
Body force - Does it work? | Jan Rusås | CFX | 5 | August 27, 2002 10:50 |