|
[Sponsors] |
March 28, 2010, 22:43 |
|
#41 |
Senior Member
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18 |
Sigh, I just want to solve my simulation problems and get a correct result. It is right or wrong, you think....
|
|
April 10, 2010, 23:50 |
|
#42 | |
Senior Member
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18 |
Quote:
Wat ?? Last edited by sandy; April 14, 2010 at 08:37. |
||
June 23, 2010, 02:29 |
|
#43 |
New Member
Adrien
Join Date: Apr 2010
Location: Australia
Posts: 1
Rep Power: 0 |
To remove barckets in bash for a file called crap:
cat crap | sed s/\(//g | sed s/\)//g > crap_nobracket For the Headers, I would just open remove and save (it is not elegant but easy...) In Octave, to give it the format you want: myFile = fopen('<FileName.txt>',"w"); fprintf(myFile,"(%f %f %f)\n",<Vector>); fclose(myFile); |
|
June 25, 2010, 09:20 |
|
#44 | |
New Member
Petter Andreas
Join Date: Aug 2009
Location: Norway
Posts: 1
Rep Power: 0 |
Quote:
Any comments are highly appreciated Thanx, Andreas |
||
July 26, 2010, 08:51 |
forces and monents in OF1.6
|
#45 |
Member
Hrushikesh Khadamkar
Join Date: Jul 2010
Location: Mumbai
Posts: 68
Rep Power: 16 |
I am trying to calculate torque generated by impellar using execFlowFunctionObjects.
Last edited by Hrushi; July 27, 2010 at 02:17. |
|
July 27, 2010, 02:09 |
|
#46 |
Member
Hrushikesh Khadamkar
Join Date: Jul 2010
Location: Mumbai
Posts: 68
Rep Power: 16 |
Hi Stephane,
I am also using MRFSimpleFoam OF1.6. I am trying to calculate moment about x.y and z axis. I get the following error: Create time Create mesh for time = 500 Time = 500 Reading phi Reading U Reading p Selecting incompressible transport model Newtonian Selecting RAS turbulence model kEpsilon kEpsilonCoeffs { Cmu 0.09; C1 1.44; C2 1.92; sigmaEps 1.3; } Unknown function type Forces Table of functionObjects is empty From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 74. FOAM exiting My controlDict is: application MRFSimpleFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 500; deltaT 1; writeControl timeStep; writeInterval 50; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; functions { forces { type Forces; functionObjectsLibs ("libforces.so"); outputControl outputTime; patches (Rushton_Turbine_5_To_WALL); rhoNmae rhoInf; rhoInf 1.0; pName p; Uname U; log true; CofR (0 0 0); } forceCoeffs { type forceCoeffs; functionObjectsLibs ("libforces.so"); patches (Rushton_Turbine_5_To_WALL); pName p; Uname U; rhoName rhoInf; rhoInf 1.225; CofR (0 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 0); magUInf 55.5; lRef 0.6; ARef 1; } }; What should I do to get the moments? Do I need to change anything else? Regrads, Hrushikesh |
|
July 27, 2010, 03:12 |
|
#47 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hello,
try this ! ----------------- functions ( forces { type forces; functionObjectsLibs ("libforces.so"); patches (Rushton_Turbine_5_To_WALL); rhoName rhoInf; pName p; Uname U; rhoInf 1.0; CofR (0 0 0); outputControl timeStep; outputInterval 1; log true; } forceCoeffs { type forceCoeffs; functionObjectsLibs ("libforces.so"); patches (Rushton_Turbine_5_To_WALL); pName p; Uname U; rhoName rhoInf; rhoInf 1.225; CofR (0 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 0); magUInf 55.5; lRef 0.6; ARef 1; } ); ----------------- Regards, Stephane. |
|
July 27, 2010, 03:25 |
|
#48 |
Member
Hrushikesh Khadamkar
Join Date: Jul 2010
Location: Mumbai
Posts: 68
Rep Power: 16 |
Hi Stephane,
I have tried this. But it gives me following error. Unknown function type Forces Table of functionObjects is empty From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 74. FOAM exiting |
|
July 27, 2010, 03:36 |
|
#49 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
My controlDict is :
--------------------------------- application MRFSimpleFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 5000; deltaT 1; writeControl timeStep; writeInterval 1000; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; functions ( forces_turbine { type forces; functionObjectLibs ("libforces.so"); //Lib to load patches (Rushton_Turbine_5_To_WALL); // change to your patch name pName p; Uname U; rhoName rhoInf; rhoInf 1; //Reference density for fluid CofR (0 0 0); //Origin for moment calculations outputControl timeStep; outputInterval 1; log true; } ); ------------------------------------------------- This controlDict (only calculate forces) works fine for me. Warning : 'type forces;' not 'type Forces;' Stephane. |
|
July 27, 2010, 03:56 |
|
#50 |
Member
Hrushikesh Khadamkar
Join Date: Jul 2010
Location: Mumbai
Posts: 68
Rep Power: 16 |
I have tried your 2nd reply also.
Do we have to modify anything alse in our case directory like changes in 0.. I am still getting the same error: Unknown function type forces Table of functionObjects is empty From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 74. FOAM exiting Hrushikesh |
|
July 27, 2010, 04:04 |
Forces in V1.6
|
#51 |
Senior Member
NAVEEN.K.M
Join Date: Mar 2009
Location: Bangalore, Karnataka, india
Posts: 114
Rep Power: 17 |
hi Hrushikes,
try this to get the forces in OpenFOAM 1.6.. functions ( forces { type forceCoeffs; functionObjectsLibs ("libforces.so"); outputControl timeStep; outputInterval 1; patches { Rushton_Turbine_5_To_WALL ); pName p; Uname U; log true; rhoInf 1.225; CofR (0 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 0); magUInf 55.5; lRef 0.6; ARef 1; } ); Regards Naveen NAL, Bangalore |
|
July 27, 2010, 05:12 |
|
#52 |
Member
Hrushikesh Khadamkar
Join Date: Jul 2010
Location: Mumbai
Posts: 68
Rep Power: 16 |
Hi Naveen,
I have tried the things you have mentioned. But the error still remains. Unknown function type force_coeffs Table of functionObjects is empty From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 74. FOAM exiting What do the 1st two lines of error mean? regards Hrushikesh |
|
September 22, 2010, 08:30 |
|
#53 |
Senior Member
Join Date: Mar 2009
Posts: 225
Rep Power: 18 |
Any update in that matter? I tried different approaches, I mainly followed the following post: http://www.cfd-online.com/Forums/ope...es-of15-8.html
I'm using OpenFOAM 1.7.1 and interFoam solver. Have a great day everyone! K |
|
September 22, 2010, 16:25 |
|
#54 |
Senior Member
Join Date: Mar 2009
Posts: 225
Rep Power: 18 |
I also tried to use icoFoam solver. In both cases I do not get any force output, neither in the screen output, nor in any file format.
|
|
September 23, 2010, 02:43 |
|
#55 | |
Member
Hrushikesh Khadamkar
Join Date: Jul 2010
Location: Mumbai
Posts: 68
Rep Power: 16 |
Quote:
I am attaching my controlDict file here. This version of controlDict is working for me (OF 1.6). application MRFSimpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 1500; deltaT 1; writeControl timeStep; writeInterval 10; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; functions { forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load patches (Rushton_Turbine_5_To_WALL); // change to your patch name pName p; Uname U; rhoName rhoInf; rhoInf 1000; CofR (0.16 0 0); //Origin for moment calculations outputControl timeStep; outputInterval 1; } } |
||
September 23, 2010, 06:40 |
|
#56 |
Senior Member
Join Date: Mar 2009
Posts: 225
Rep Power: 18 |
Hrushi,
Really, really appreciate your post. Your controlDict file worked perfectly fine. At the current moment I'm not sure what exactly made a trick, but it work. Best, K |
|
September 23, 2010, 06:56 |
|
#57 |
Senior Member
Join Date: Mar 2009
Posts: 225
Rep Power: 18 |
I know the tool is not fully suitable for two-phase flows, but assuming that I only care for water domain (not air) I assume the tool gives acceptable solution.
So trying to use interFoam solver, the solver quits saying it cannot find "nu" in constant/transportProperties. I tried to redefine the code in forces.C, but for now I gave up. I found some work around, to add additional line at the beginning of transportProperties such as: nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; Can any of OpenFOAM gurus comment on that? Is such work around acceptable? I think the other two nu-s in phase1 and phase2 are read correctly by the solver. Thanks, K |
|
January 14, 2011, 18:17 |
drag & force over a cylinder patch
|
#58 |
Member
|
Hi all of foamers I hope that you are well. I have one question: I want to calculate dragCoefficient over a cylinder with 0.025 diameter with viscoelasticFluidFoam solver. ( I use Kubuntu, OF 1-5 decv) . I add the code below in controlDict file application viscoelasticFluidFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 300; deltaT 1e-5; writeControl adjustableRunTime; writeInterval 1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; graphFormat raw; runTimeModifiable yes; adjustTimeStep on; maxCo 0.8; maxDeltaT 0.001; functions ( forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load outputControl runTime; outputInterval 1; patches (cylinder); // change to your patch name PName p; Uname U; rhoInf 803.87097; //Reference density for fluid CofR (0 0 0); //Origin for moment calculations } forceCoeffs { type forceCoeffs; functionObjectLibs ("libforces.so"); outputControl runTime; outputInterval 1; patches (cylinder); //change to your patch name PName p; Uname U; log true; rhoInf 803.87097; CofR (0 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 0); magUInf 0.036; lRef 0.025; Aref 0.025; } ); // ************************************************** *********************** // , but when run it,after one step, this error appear : Courant Number mean: 3.24445e-07 max: 5.10534e-06 velocity magnitude: 0.000421808 deltaT = 1.43997e-05 No valid model for viscous stress calculation. From function forces::devRhoReff() in file forces/forces.C at line 306. FOAM exiting *** glibc detected *** viscoelasticFluidFoam: double free or corruption (fasttop): 0x0902a378 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6(+0x6b591)[0x52c591] /lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0x52dde8] /lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x530ecd] /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x7b3741] /usr/lib/libstdc++.so.6(_ZNSs4_Rep10_M_destroyERKSaIcE+0x1d )[0x78fc2d] /usr/lib/libstdc++.so.6(_ZNSsD2Ev+0x4c)[0x79163c] /usr/lib/OpenFOAM-1.5-dev/lib/libfiniteVolume.so(_ZN4Foam4wordD1Ev+0x1d)[0xcf2efd] /lib/tls/i686/cmov/libc.so.6(+0x2f1bf)[0x4f01bf] /lib/tls/i686/cmov/libc.so.6(+0x2f22f)[0x4f022f] /usr/lib/OpenFOAM-1.5-dev/lib/libOpenFOAM.so(_ZN4Foam5error4exitEi+0x1f9)[0x3f5d2f9] /usr/lib/OpenFOAM-1.5-dev/lib/libforces.so(_ZNK4Foam6forces10devRhoReffEv+0xf54)[0x65315f4] /usr/lib/OpenFOAM-1.5-dev/lib/libforces.so(_ZNK4Foam6forces10calcForcesEv+0x32)[0x652c852] . . . ======= Memory map: ======== 00110000-0024a000 r-xp 00000000 00:10 16478 /usr/lib/OpenFOAM-1.5-dev/lib/libviscoelasticTransportModels.so 0024a000-0024b000 ---p 0013a000 00:10 16478 /usr/lib/OpenFOAM-1.5-dev/lib/libviscoelasticTransportModels.so 0024b000-0024d000 r--p 0013a000 00:10 16478 /usr/lib/OpenFOAM-1.5-dev/lib/libviscoelasticTransportModels.so 0024d000-0024e000 rw-p 0013c000 00:10 16478 /usr/lib/OpenFOAM-1.5-dev/lib/libviscoelasticTransportModels.so 0024e000-00410000 r-xp 00000000 00:10 16479 /usr/lib/OpenFOAM-1.5-dev/lib/libmeshTools.so 00410000-00413000 r--p 001c1000 00:10 16479 /usr/lib/OpenFOAM-1.5-dev/lib/libmeshTools.so 00413000-00415000 rw-p 001c4000 00:10 16479 /usr/lib/OpenFOAM-1.5-dev/lib/libmeshTools.so 00415000-00416000 rw-p 00000000 00:00 0 . . . 1) can u guide me What is the problem? 2) did I enter Aref number truly? how Lref ? ( my diameter cylinder is 0.025 & 2D) 3) If needed to complile forceCoeffs, can you tell me how complie it successfully? Thank a lot, Rasoul |
|
March 26, 2011, 10:43 |
Hi
|
#59 |
Member
|
can every one help me that how to solve this error when i want to calculate cd (drag coeff),
No valid model for viscous stress calculation. From fuction forces::devRhoReff() in file foeces/forces.C at line 306 i added the turbulence lib & related lib to the solver and compiled it but this error always appear the run is stoped Best, Rasoul |
|
June 10, 2011, 11:44 |
|
#60 |
Member
The True
Join Date: Dec 2010
Posts: 80
Rep Power: 15 |
mine BC conditions for pressure is zeroGradient, so I do not know what the pressure is at the farfield. at default pRef is set to 0.
How can I specify the pRef at the freestream pressure ? I have just added this line : pRef -1000; But this did not change anything , apparantly it did not use this value. I am calculating Cl Cd.. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
changes to forces in 1.6 | linnemann | OpenFOAM Running, Solving & CFD | 0 | July 30, 2009 09:49 |
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 |
2d foil pressure forces problem | mayor | FLUENT | 4 | December 1, 2003 04:57 |
viscous-pressure forces | nico | FLUENT | 0 | June 9, 2003 15:41 |
Valve Forces in CFdesign | Mike Clapp | Main CFD Forum | 3 | March 8, 2001 15:09 |