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

Question about finding force in OF 1.7.1 using interFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 29, 2010, 17:00
Question Question about finding force in OF 1.7.1 using interFoam
  #1
New Member
 
Angela Wang
Join Date: Mar 2009
Location: Fairfax, VA, USA
Posts: 15
Rep Power: 7
Angela Wang is on a distinguished road
Send a message via MSN to Angela Wang
I added the following to the controlDict file.
functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches (hydrofoil);
pName p_rgh;
UName U;
log true;
rhoName rhoInf;
rhoInf 1000;
CofR (0.249048674523 -1.034 0);

forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches (hydrofoil);
pName p_rgh;
UName U;
log true;
rhoName rhoInf;
rhoInf 1000;
CofR (0.249048674523 -1.034 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0.249048674523 -1.034 0);
magUInf 1.77653;
lRef 1;
Aref 1;
}
);
Angela Wang is offline   Reply With Quote

Old   October 29, 2010, 17:02
Default
  #2
New Member
 
Angela Wang
Join Date: Mar 2009
Location: Fairfax, VA, USA
Posts: 15
Rep Power: 7
Angela Wang is on a distinguished road
Send a message via MSN to Angela Wang
And the code responded as:
--> FOAM FATAL IO ERROR:
keyword nu is undefined in dictionary "/handel3/lwangk/OpenFOAM/lwangk-1.7.1/run/selfcase/naca0012_oct28_nodamping/constant/transportProperties"

file: /handel3/lwangk/OpenFOAM/lwangk-1.7.1/run/selfcase/naca0012_oct28_nodamping/constant/transportProperties from line 20 to line 62.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 395.

FOAM exiting


I googled for the solution and recompiled the libforces.so according to

Forces in OF15

#111

I copied /OpenFOAM/OpenFOAM-1.7.1/src/postProcessing/functionObjects/forces to a
"forcesInter" folder under
/OpenFOAM/OpenFOAM-1.7.1/src/postProcessing/functionObjects/.
And I modified
everything (filename and contents in all files) from "forces" to
"forcesInter" and modified in the file "forcesInter.C"

line 106 to nu(transportProperties.lookupEntry("phase1",false, false).dict().lookup("nu"));
//modified for finding the main nu

But the compilation failed. Any one can help??
Angela Wang is offline   Reply With Quote

Old   October 29, 2010, 17:05
Default
  #3
New Member
 
Angela Wang
Join Date: Mar 2009
Location: Fairfax, VA, USA
Posts: 15
Rep Power: 7
Angela Wang is on a distinguished road
Send a message via MSN to Angela Wang
My error is :
Make/linux64GccDPOpt/forces.o: In function `Foam::tmp < Foam::GeometricField < Foam::SymmTensor < double >, Foam::fvPatchField, Foam::volMesh > > Foam::dev < Foam::fvPatchField, Foam::volMesh >(Foam::tmp < Foam::GeometricField < Foam::SymmTensor<double >, Foam::fvPatchField, Foam::volMesh > > const&)':
forces.C.text._ZN4Foam3devINS_12fvPatchFieldENS_ 7volMeshEEENS_3tmpINS_14GeometricFieldINS_10SymmTe nsorIdEET_T0_EEEERKSA_[Foam::tmp < Foam::GeometricField < Foam::SymmTensor<double >, Foam::fvPatchField, Foam::volMesh > > Foam::dev < Foam::fvPatchField, Foam::volMesh >(Foam::tmp < Foam::GeometricField < Foam::SymmTensor < double >, Foam::fvPatchField, Foam::volMesh > > const&)]+0x45a): undefined reference to `Foam::calculatedFvPatchField < Foam::SymmTensor < double > >::typeName'
Make/linux64GccDPOpt/forcesInter.o: In function `Foam::forcesInter::rho() const':
forcesInter.C: (.text+0xedd): undefined reference to `typeinfo for Foam::fvMesh'
forcesInter.C: (.text+0x101c): undefined reference to `Foam::calculatedFvPatchField<double>::typeName'
forcesInter.C: (.text+0x11c5): undefined reference to `Foam::fvMesh::typeName'
Make/linux64GccDPOpt/forcesInter.o: In function `Foam::forcesInter::devRhoReff() const':
forcesInter.C.text+0x1374): undefined reference to `typeinfo for Foam::compressible::RASModel'
forcesInter.C: (.text+0x14bc): undefined reference to `typeinfo for Foam::incompressible::RASModel'
forcesInter.C: (.text+0x1678): undefined reference to `typeinfo for Foam::compressible::LESModel'
forcesInter.C: (.text+0x17ac): undefined reference to `typeinfo for Foam::incompressible::LESModel'
forcesInter.C.text+0x191c): undefined reference to `typeinfo for Foam::basicThermo'
forcesInter.C: (.text+0x1afc): undefined reference to `typeinfo for Foam::singlePhaseTransportModel'
Make/linux64GccDPOpt/forcesInter.o: In function `Foam::forcesInter::calcForcesMoment() const':
forcesInter.C: (.text+0x2285): undefined reference to `Foam::fvMesh::Sf() const'
forcesInter.C: (.text+0x23ee): undefined reference to `Foam::fvMesh::C() const'
forcesInter.C: (.text+0x2c5f): undefined reference to `Foam::fvMesh::Sf() const'
forcesInter.C.text+0x2e26): undefined reference to `Foam::fvMesh::C() const'
Make/linux64GccDPOpt/forcesInter.o: In function `Foam::forcesInter::read(Foam::dictionary const&)':
forcesInter.C: (.text+0x453c): undefined reference to `typeinfo for Foam::fvMesh'
forcesInter.C: (.text+0x4fe1): undefined reference to `Foam::fvMesh::typeName'
Make/linux64GccDPOpt/forcesInter.o: In function `Foam::forcesInter::forcesInter(Foam::word const&, Foam:bjectRegistry const&, Foam::dictionary const&, bool)':
forcesInter.C: (.text+0x51f1): undefined reference to `typeinfo for Foam::fvMesh'
Make/linux64GccDPOpt/forcesInter.o: In function `Foam::forcesInter::forcesInter(Foam::word const&, Foam:bjectRegistry const&, Foam::dictionary const&, bool)':
forcesInter.C: (.text+0x5481): undefined reference to `typeinfo for Foam::fvMesh'
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Error 1
Angela Wang is offline   Reply With Quote

Old   October 30, 2010, 07:28
Default
  #4
New Member
 
Alton Luder III
Join Date: Oct 2009
Location: Michigan
Posts: 22
Rep Power: 6
sleepdeprivation is on a distinguished road
Yea I'm having the same problem. It seems forces library doesn't have a way to compensate for multiple fluids. I haven't, however, look deep enough into the functions to know if the RAS and LES formulations take into account multiple fluids.
sleepdeprivation is offline   Reply With Quote

Old   November 2, 2010, 03:49
Default
  #5
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 8
colinB is on a distinguished road
Hi
I have the same version of OF like you (171) and I get everything running
in interFoam with the ras turbulence model.
Actually the message stated quite clear that you however did not specify
nu in the transportProperties file.

so for example in one of my files after the header there are the following
lines:
Code:
transportModel      Newtonian;
nu                       nu [0 2 -1 0 0 0 0]  1e-06;
and now the same for each phase with some other specifications.
I guess this you checked already, as it was a hint from the error message.

Anyway, I compared my forces attachment in the controlDict File and could
indeed identify some differences. So here my attachment so you can
check:

Code:
functions
(
            forces
            {
                  type forces;
                  functionObjectLibs ("libforces.so");
                  outputControl        timestep;
                  outputInterval 1;
                  patches (here_could_be_your_patch);
                  rhoInf   1000;
                  nuInf 1e-06;
                  CofR (0 0 0);
             }
             forceCoeffs
             {
                  type forceCoeffs;
                  functionObjectLibs ("libforces.so");
                  outputControl timestep;
                  outputInterval 1;
                  patches (here_could_be_your_patch);
                  rhoInf 1000;
                  nuInf 1e-06;
                  CofR (0 0 0);
                  liftDir (0 0 1);
                  dragDir (-1 0 0);
                  pitchAxis (0 1 0);
                  magUInf -8.0;
                  lRef 1;
                  Aref 1;
              }
);
I hope that helps
regards
Colin
colinB 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
Saffman Lift Force: confused CFD_MAN FLUENT 5 September 9, 2010 04:51
Question on turbulent dispersion force in momentum Emmery FLUENT 0 December 12, 2007 10:31
Simple rotational force question Mike Main CFD Forum 1 September 12, 2007 12:08
Saffman Lift Force CFD MAN Main CFD Forum 0 November 26, 2002 18:26
Gas pressure question Dan Moskal Main CFD Forum 0 October 24, 2002 22:02


All times are GMT -4. The time now is 22:43.