|
[Sponsors] |
any idea about forces with interFoam in OF-2.1.0 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 15, 2012, 05:51 |
any idea about forces with interFoam in OF-2.1.0
|
#1 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
Good morning everyone,
I got some problem with forces in solver interFoam, I added forces function in ControlDict file but I got a error said :keyword nu is undefined in dictionary. I did some search in this forum but got nothing about how to solve this problem. Any idea will be appreciate. Regards, T |
|
May 15, 2012, 06:19 |
|
#2 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Hey,
first of all, the information you provide is very little and it would be helpful if you could post the complete error message, so we know which dictionary is affected. Maybe the dictionary its self helps us also to track your error down! By heart I can remember just two places where nu is required: - constant/transportProperties - system/controlDict (in the forces section, not sure about that) So the error message tells you that this entity is not defined, which can have two possible reasons: - you didn't define them! solution: do so - typo before the entry (e.g. semicolon missing or something like that) solution: correct the typo If something else is wrong, maybe your extended error message will tell us. I hope I could contribute regards |
|
May 15, 2012, 06:30 |
|
#3 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
Hi colinB,
I am a newer so I started with tutorial Dambreak bundled in OF-2.1.0. Then, I would like to know the forces vs t on the Dam so I added the following into controlDict file: functions ( forces { type forces; functionObjectLibs ("libforces.so"); patches (wall); rhoName rho; rhoInf 1000; CofR (0 0 0); outputControl timeStep; outputInterval 1; } and error occured keyword nu is undefined in transportProperties dictionary, but it works well without the above information. Regards |
|
May 15, 2012, 06:50 |
|
#4 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
would you mind posting your transportProperties file here?
either set it in code quotes or store it as a: transportProperties.txt file and upload it There the parameter nu should be defined and for some reason he cannot find/read it Edit: I just had another quick look at my controlDict file: In your force section the line nuInf 10e-6; is missing after the line with rhoInf. Check that and post the result here! Last edited by colinB; May 15, 2012 at 06:53. Reason: update |
|
May 15, 2012, 06:52 |
|
#5 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
here is the transportProperties:
phase1 { transportModel Newtonian; nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; rho rho [ 1 -3 0 0 0 0 0 ] 1000; CrossPowerLawCoeffs { nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; m m [ 0 0 1 0 0 0 0 ] 1; n n [ 0 0 0 0 0 0 0 ] 0; } BirdCarreauCoeffs { nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515; nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; k k [ 0 0 1 0 0 0 0 ] 99.6; n n [ 0 0 0 0 0 0 0 ] 0.1003; } } 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; CrossPowerLawCoeffs { nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; m m [ 0 0 1 0 0 0 0 ] 1; n n [ 0 0 0 0 0 0 0 ] 0; } BirdCarreauCoeffs { nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515; nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; k k [ 0 0 1 0 0 0 0 ] 99.6; n n [ 0 0 0 0 0 0 0 ] 0.1003; } } sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07; |
|
May 15, 2012, 06:55 |
|
#6 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
looks good so far,
have you checked my edit on my comment? |
|
May 15, 2012, 07:01 |
|
#7 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
Is it possible that force function does not apply to multiphase situation? It can only read one nu?
|
|
May 15, 2012, 07:06 |
|
#8 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
well, in your specific case I'm not sure, but actually I don't think so.
For me it works perfectly fine, and the patches I usually calculate are also only partially submerged. So with one nu in the forces section it should be totally fine. Have you tried what I recommended you? |
|
May 15, 2012, 07:11 |
|
#9 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
Yes, I have tried the method you recommended me but it still have this problem
|
|
May 15, 2012, 07:23 |
|
#10 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
I just found something which might help you:
http://www.cfd-online.com/Forums/ope...interfoam.html they have the same issue but what I understood they also couldn't solve it. I'm still wondering y, for my files work completely fine. here is what I used: Code:
functions ( forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load outputControl timeStep; outputInterval 1; patches (solid); // change to your patch name rhoInf 1000; //Reference density for fluid nuInf 1e-6; //Reference kinetic viscosity for fluid CofR (0 0 0); //Origin for moment calculations } forceCoeffs { type forceCoeffs; functionObjectLibs ("libforces.so"); outputControl timeStep; outputInterval 1; patches (solid); //change to your patch name rhoInf 1000; nuInf 1e-6; CofR (0 0 0); liftDir (0 0 1); dragDir (-1 0 0); pitchAxis (0 1 0); magUInf -2.25; lRef 11.97; Aref 29.74341; } ); |
|
May 15, 2012, 08:31 |
|
#11 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
I tried your codes but the problem's still there.
I dont quite understand what does jordi.muela say " I made some test and i found that if you write a nu definition out of the phases definition, it works." Do you have any idea? And do you know any other way to plot forces on structure? Regards |
|
May 15, 2012, 09:04 |
|
#12 | |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
I guess he means in the transportProperties file:
(see red highlighted part) Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // transportModel Newtonian; nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; twoPhase { transportModel twoPhase; phase1 phase1; phase2 phase2; } phase1 { transportModel Newtonian; nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; rho rho [ 1 -3 0 0 0 0 0 ] 1000; } 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.07; // ************************************************************************* // Quote:
this is the only way to do it. However I'm not sure if somebody else made a tool to do it otherwise (maybe pyFoam has a feature like that) |
||
May 22, 2012, 06:23 |
|
#13 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
hi colinB,
I made a new compiling with the suggestion of andrea and it works now, I would like to ask you how to you define your forceCoeffs, how to you set these values: magUInf -2.25; lRef 11.97; Aref 29.74341; |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Forces in OF15 | richard | OpenFOAM Running, Solving & CFD | 180 | July 9, 2018 11:54 |
Wall forces in interFoam | Terp | OpenFOAM Running, Solving & CFD | 14 | April 11, 2017 11:11 |
forces in interFoam | Svensson | OpenFOAM Post-Processing | 2 | May 9, 2012 14:31 |
FORCES don't run! | C12Carbon | OpenFOAM | 0 | September 10, 2011 08:34 |
Strange results from interFoam solution converges but sum of all forces not equal to zero | nicasch | OpenFOAM Running, Solving & CFD | 0 | April 15, 2008 03:01 |