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

any idea about forces with interFoam in OF-2.1.0

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2012, 04:51
Default any idea about forces with interFoam in OF-2.1.0
  #1
New Member
 
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 13
Teemo is on a distinguished road
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
Teemo is offline   Reply With Quote

Old   May 15, 2012, 05:19
Default
  #2
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18
colinB is on a distinguished road
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
colinB is offline   Reply With Quote

Old   May 15, 2012, 05:30
Default
  #3
New Member
 
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 13
Teemo is on a distinguished road
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
Teemo is offline   Reply With Quote

Old   May 15, 2012, 05:50
Default
  #4
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18
colinB is on a distinguished road
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 05:53. Reason: update
colinB is offline   Reply With Quote

Old   May 15, 2012, 05:52
Default
  #5
New Member
 
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 13
Teemo is on a distinguished road
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;
Teemo is offline   Reply With Quote

Old   May 15, 2012, 05:55
Default
  #6
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18
colinB is on a distinguished road
looks good so far,

have you checked my edit on my comment?
colinB is offline   Reply With Quote

Old   May 15, 2012, 06:01
Default
  #7
New Member
 
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 13
Teemo is on a distinguished road
Is it possible that force function does not apply to multiphase situation? It can only read one nu?
Teemo is offline   Reply With Quote

Old   May 15, 2012, 06:06
Default
  #8
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18
colinB is on a distinguished road
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?
colinB is offline   Reply With Quote

Old   May 15, 2012, 06:11
Default
  #9
New Member
 
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 13
Teemo is on a distinguished road
Yes, I have tried the method you recommended me but it still have this problem
Teemo is offline   Reply With Quote

Old   May 15, 2012, 06:23
Default
  #10
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18
colinB is on a distinguished road
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;
        }
);
colinB is offline   Reply With Quote

Old   May 15, 2012, 07:31
Default
  #11
New Member
 
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 13
Teemo is on a distinguished road
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
Teemo is offline   Reply With Quote

Old   May 15, 2012, 08:04
Default
  #12
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18
colinB is on a distinguished road
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:

And do you know any other way to plot forces on structure?
Well, to plot them you first need to calculate them and as far as I know,
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)
colinB is offline   Reply With Quote

Old   May 22, 2012, 05:23
Default
  #13
New Member
 
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 13
Teemo is on a distinguished road
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;
Teemo is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forces in OF15 richard OpenFOAM Running, Solving & CFD 180 July 9, 2018 10:54
Wall forces in interFoam Terp OpenFOAM Running, Solving & CFD 14 April 11, 2017 10:11
forces in interFoam Svensson OpenFOAM Post-Processing 2 May 9, 2012 13:31
FORCES don't run! C12Carbon OpenFOAM 0 September 10, 2011 07: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 02:01


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