|
[Sponsors] |
Question about finding force in OF 1.7.1 using interFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 29, 2010, 18:00 |
Question about finding force in OF 1.7.1 using interFoam
|
#1 |
New Member
|
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; } ); |
|
October 29, 2010, 18:02 |
|
#2 |
New Member
|
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 http://www.cfd-online.com/Forums/ope...es-of15-8.html #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?? |
|
October 29, 2010, 18:05 |
|
#3 |
New Member
|
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 |
|
October 30, 2010, 08:28 |
|
#4 |
New Member
Alton Luder III
Join Date: Oct 2009
Location: Michigan
Posts: 22
Rep Power: 17 |
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.
|
|
November 2, 2010, 03:49 |
|
#5 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
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; 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; } ); regards Colin |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Saffman Lift Force: confused | CFD_MAN | FLUENT | 5 | September 9, 2010 05:51 |
Question on turbulent dispersion force in momentum | Emmery | FLUENT | 0 | December 12, 2007 11:31 |
Simple rotational force question | Mike | Main CFD Forum | 1 | September 12, 2007 13:08 |
Saffman Lift Force | CFD MAN | Main CFD Forum | 0 | November 26, 2002 19:26 |
Gas pressure question | Dan Moskal | Main CFD Forum | 0 | October 24, 2002 23:02 |