Force function for laminar case with interDyMFoam
I tried to add the "force" function shown below to the sloshingTank2D case in the OpenFOAM tutorials.
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.
PS: I'm attaching the file if anybody would like to try to replicate the problem.
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.
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.
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.
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.
|All times are GMT -4. The time now is 19:08.|