CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

'keyword nu is undefined' error - interDyMFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 5, 2012, 08:38
Default 'keyword nu is undefined' error - interDyMFoam
  #1
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Hello everyone,

greetings from Germany. I'm attempting to simulate a simple rectangular object floating with 6 DoF in a 2-D tank with laminar flow. However, even when I'm not trying to calculate any forces on the object, still I'm getting the following 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


I have gone through the extensive discussions on this topic on the forums here and somebody suggested to change the following line in forces.C

dimensionedScalar nu(transportProperties.lookup("nu"));

to

dimensionedScalar nu(transportProperties.lookupEntry("phase1").dict( ).lookup("nu"));

I have tried that too but to no avail. I don't seem to understand why the solver needs the value of nu when I'm not calculating any forces. Please help.

If necessary, I'll be happy to share my entire case files.

Thanks,
Sagun
Sagun is offline   Reply With Quote

Old   December 5, 2012, 13:21
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
What does your transport properties file look like? This is a simple dictionary look up, and if this isn't working, there may be more configuration we need to do for the case...
mturcios777 is offline   Reply With Quote

Old   December 5, 2012, 13:26
Default
  #3
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Thank you for your reply. This is my transportProperties file:

phase1
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 998.2;
}

phase2
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
}

sigma sigma [ 1 0 -2 0 0 0 0 ] 0;


I also tried to define a nu whose definition is independent of the two phases. But then I got this floating point exception error:


sixDoFRigidBodyMotion constraints converged in 8 iterations
Constraint force: (-90392.2 0 0)
Constraint moment: (0 0 0)
Centre of mass: (6 0.05 -0.00933008)
Linear velocity: (-7.88612e-06 4.27282e-21 -1.34221)
Angular velocity: (-4.79635e-22 -2751.34 -8.84724e-22)
GAMG: Solving for cellDisplacementx, Initial residual = 0.975008, Final residual = 7.33219e-06, No Iterations 9
GAMG: Solving for cellDisplacementz, Initial residual = 0.993633, Final residual = 5.39243e-06, No Iterations 10
Execution time for mesh.update() = 0.2 s
time step continuity errors : sum local = 0.000824028, global = -8.93018e-11, cumulative = -4.83076e-05
GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 3.18105e-06, No Iterations 7
time step continuity errors : sum local = 0.0765713, global = -1.87054e-08, cumulative = -4.83263e-05
MULES: Solving for alpha1
Phase-1 volume fraction = -7.47356e+292 Min(alpha1) = -2.69444e+296 Max(alpha1) = 2.85399e+289
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4 void Foam::multiply<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/interDyMFoam"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > Foam:perator*<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#6 Foam::fv::gaussConvectionScheme<double>::flux(Foam ::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#7
at interDyMFoam.C:0
#8
in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/interDyMFoam"
#9 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#10
in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/interDyMFoam"
Floating point exception


I have no idea what's going wrong.
Sagun is offline   Reply With Quote

Old   December 5, 2012, 13:29
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
Your file looks fine for the second option of selecting a phase. Does this happen at the case start or during the simulation? If the latter, is your mesh changing?
mturcios777 is offline   Reply With Quote

Old   December 5, 2012, 13:32
Default
  #5
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Well, the case doesn't even run for a single iteration because I get the error right in the very beginning. I can send you my case files if you want to take a look.
Sagun is offline   Reply With Quote

Old   December 5, 2012, 13:35
Default
  #6
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
Sure, I can have a look. And just to be clear, you are using the standard interDyMFoam? Which version?
mturcios777 is offline   Reply With Quote

Old   December 5, 2012, 13:39
Default
  #7
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Thank you so much. Yes I'm using the standard interDyMFoam solver in OF-2.1.1. Here is the link to my case files:

https://www.yousendit.com/download/W...bEpOQnk5TE1UQw
Sagun is offline   Reply With Quote

Old   December 5, 2012, 13:49
Default
  #8
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Is the link working? For some reason, a part of it is getting truncated.
Sagun is offline   Reply With Quote

Old   December 5, 2012, 14:14
Default
  #9
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
The link is behaving badly. If the file isn't too large, just email it to me.
mturcios777 is offline   Reply With Quote

Old   December 5, 2012, 14:16
Default
  #10
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
This has never happened before. The files are just about 2 MB. Where can I find your email ID?
Sagun is offline   Reply With Quote

Old   December 5, 2012, 14:18
Default
  #11
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
marco >.< turcios gmail >.< com. Just remove all the special characters.
mturcios777 is offline   Reply With Quote

Old   December 5, 2012, 14:24
Default
  #12
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Sent you the files.
Sagun is offline   Reply With Quote

Old   December 5, 2012, 15:03
Default
  #13
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
The problem is due to a quirk in the simulation model "laminar" (it doesn't play nicely with the twoPhaseMixture). To fix this, make the simulation type turbulent (RAS or LES, doesn't matter), then selecting the RAS/LES model "laminar" in RASProperties/LESProperties.

Look at the interDyMFoam tutorial floatingObject; you also have some entries missing in your fvSchemes file that you can copy from the tutorial case.
mturcios777 is offline   Reply With Quote

Old   December 6, 2012, 08:48
Default
  #14
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
By missing entries, did you mean div(phi,k) and div(phi,epsilon)? I commented them out since I thought they were not needed for a laminar simulation.

Also, does changing the simulation type to RASModel also mean that I will have to define nut, k and epsilon files in the 0 sub-directory? If yes, then could you also tell me how to define these values on a generic patch since in my case the inlet as well as outlet patch types are not 'wall'? I have never simulated a turbulent case before so I really don't know how to go about it.

Thanks,
Sagun
Sagun is offline   Reply With Quote

Old   December 6, 2012, 09:08
Default
  #15
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Okay so I made the changes and the k, nut and epsilon files were not required after all. However, I got this error instead:

Interface Courant Number mean: 0.000535203 max: 0.209637
Courant Number mean: 0.042629 max: 0.451474
deltaT = 0.00061539
Time = 0.00553003

sixDoFRigidBodyMotion constraints converged in 8 iterations
Constraint force: (-90392.2 0 0)
Constraint moment: (0 0 0)
Centre of mass: (6 0.05 -0.00933008)
Linear velocity: (-7.88624e-06 7.05546e-21 -1.34221)
Angular velocity: (-4.05472e-23 -2751.34 -6.02554e-23)
GAMG: Solving for cellDisplacementx, Initial residual = 0.975008, Final residual = 7.33219e-06, No Iterations 9
GAMG: Solving for cellDisplacementz, Initial residual = 0.993633, Final residual = 5.39243e-06, No Iterations 10
Execution time for mesh.update() = 0.2 s
time step continuity errors : sum local = 0.000824028, global = -8.93018e-11, cumulative = -4.83076e-05
GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 3.18105e-06, No Iterations 7
time step continuity errors : sum local = 0.0765713, global = -1.87054e-08, cumulative = -4.83263e-05
MULES: Solving for alpha1
Phase-1 volume fraction = -7.47356e+292 Min(alpha1) = -2.69444e+296 Max(alpha1) = 2.85399e+289
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4 void Foam::multiply<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/interDyMFoam"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > Foam:perator*<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#6 Foam::fv::gaussConvectionScheme<double>::flux(Foam ::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#7
at interDyMFoam.C:0
#8
in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/interDyMFoam"
#9 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#10
in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/interDyMFoam"
Floating point exception


Could you tell me how to fix this?
Sagun is offline   Reply With Quote

Old   December 6, 2012, 13:18
Default
  #16
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
This is more related to your case setup. I am not very familiar with the interFoam solvers (other than a running the tutorial cases and examining the solver code) so I'm not sure if this is an issue with initial conditions, boundary conditions, or possibly schemes/solution tolerance. I hope someone on the forum is able to provide more guidance from this point in.

The missing term was related to temperature [div*muEff*dev(T(grad(U)))))]. You don't need k and epsilon for the laminar RAS model, as it's just a dummy turbulence model where mut/nut = 0.

Good luck!
mturcios777 is offline   Reply With Quote

Old   December 7, 2012, 08:06
Default
  #17
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Well, I hope someone does. Thanks for your help
Sagun is offline   Reply With Quote

Old   December 7, 2012, 08:13
Default
  #18
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Just one last question though, why would I need the temperature term [div*muEff*dev(T(grad(U)))))]? I didn't find it anywhere in the fvSchemes of floatingBox too.
Sagun is offline   Reply With Quote

Old   December 7, 2012, 13:40
Default
  #19
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
Really? Because I copied over from the included 2.1.x case (tutorials/multiphase/interDyMFoam/ras/floatingBox). My guess is that the term is actually related to turbulence, not temperature.
mturcios777 is offline   Reply With Quote

Old   December 7, 2012, 17:54
Default
  #20
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 4
Sagun is on a distinguished road
Actually now that you mentioned it, I ran the floatingObject tutorial and it didn't work! I think the tutorial files that I have are incomplete or something. Would it be possible for you to send me your copy of the floatingObject tutorial?
Sagun is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Second Derivative Zero - Boundary Condition fu-ki-pa OpenFOAM 10 May 1, 2014 16:26
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 13:38
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 01:34


All times are GMT -4. The time now is 03:01.