|
[Sponsors] |
July 20, 2008, 23:51 |
Hi all,
I'm confused - the
|
#1 |
New Member
Richard Jones
Join Date: Mar 2009
Location: Adelaide, South Australia, Australia
Posts: 22
Rep Power: 17 |
Hi all,
I'm confused - the 1.5 release notes mention forces and forceCoeffs utilities, but they're not recognized as commands and I can't find anything in the users or programmers guides..? Cheers, Richard |
|
July 21, 2008, 04:15 |
I've tried added the following
|
#2 |
New Member
Richard Jones
Join Date: Mar 2009
Location: Adelaide, South Australia, Australia
Posts: 22
Rep Power: 17 |
I've tried added the following to my controlDict file (I haven't used functionObjects much before so I just changed the oodles example to suit - it could be wrong)...
functionObjects ( forces { type forces; functionObjectLibs ("libforces.so"); patches (airfoil); factor 1.0; } ) but nothing new happens. Also tried execFlowFunctionObjects after running the case and it spat out garbage about the memory map?? Is there any info on how to use forces and forceCoeffs..? |
|
July 21, 2008, 08:33 |
Good morning,
I was able to
|
#3 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Good morning,
I was able to use the force object using this in my controlDict : forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load -> dylib on Mac and so on Linux patches (Bridge); //Name of patche to integrate forces rhoInf 1.0; //Reference density for fluid - can be changed later ... CofR (2.1267 0 0); //Origin for moment calculations } A "forces" directory is created and results for each time step are written in a .dat file. I compared the results with the tool available in 1.4.1-dev and everything looks good. The only thing is that I don't know (without modifications in the source code) is how to extract each force component with foamLog or the new tool foamCalc in order to make 2d plots? Any idea ? Regards, PO |
|
July 21, 2008, 09:17 |
Hi Pierre
So you say that i
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37 |
Hi Pierre
So you say that in each and every time directory a file called 'forces.dat' is placed? Could you please post one such forces.dat file, and I might be able to help you on making something which you can put into foamLog (still using 1.4.1, thus cannot access the functionObject). Best regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 21, 2008, 10:01 |
Hi PO
Okay, just a little b
|
#5 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37 |
Hi PO
Okay, just a little bit of clarification. 1: So assume you have two patches (ora ny finite number), you would like to have the force/moment data written to two different (or any finite number of) files? (Please, because that would make everything significantly easier.) 2: You would like the files to be placed where? 3: I have made some small preliminary stuff, but will not make it more generic before we have agreed on some overall features. The preliminary output looks like: #Time FpX FpY FpZ FvX FvY FvZ MpX MpY MpZ MvX MvY MvZ 1 41.9563 38.5186 1.23717e-06 -0.126958 -0.0442683 -0.00278829 -0.13884 0.0776653 -2.13127 -0.000449653 0.00121981 -0.000584387 2 41.9562 38.5193 1.23748e-06 -0.126959 -0.044268 -0.00278827 -0.139218 0.07758 -2.13122 -0.000449613 0.00122021 -0.000584434 3 41.9559 38.5201 1.23745e-06 -0.126961 -0.0442673 -0.00278824 -0.139608 0.0775009 -2.13116 -0.00044978 0.00122059 -0.000584453 4 41.9555 38.5209 1.23734e-06 -0.126962 -0.0442663 -0.00278812 -0.14007 0.0774062 -2.1311 -0.000450026 0.0012211 -0.000584461 5 41.9551 38.5221 1.23731e-06 -0.126964 -0.0442651 -0.00278792 -0.140901 0.0773055 -2.13104 -0.000450371 0.0012217 -0.000584472 6 41.955 38.5237 1.23846e-06 -0.126964 -0.044264 -0.0027877 -0.142047 0.0771426 -2.13097 -0.000450925 0.0012224 -0.000584534 7 41.955 38.5248 1.23847e-06 -0.126965 -0.0442625 -0.00278749 -0.142744 0.0771074 -2.13094 -0.000451635 0.00122299 -0.000584546 Which is simply done using the command: echo "#Time FpX FpY FpZ FvX FvY FvZ MpX MpY MpZ MvX MvY MvZ" > forceData;awk '/[0-9]/ {print}' <testforces>> forceData Where the data you delivered is placed in testForces. Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 21, 2008, 10:10 |
Hi Niels,
1) Yes, different
|
#6 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Hi Niels,
1) Yes, different files are fine 2) I would say in "logs" directory if possible (created by foamLog) 3) That is exactly what I need - I will try. Is there a way to introduce this command in foamLog.db ? If not, I will just copy it in my run script. Thanks ! PO |
|
July 21, 2008, 10:18 |
Hi PO
I can see that the po
|
#7 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37 |
Hi PO
I can see that the poster has truncated my post or at least removed some of the internal part of the command. I'll try to wrap thing up and put it in foamLog, but so far, please use the following attached file: extractForces /Niels / Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 21, 2008, 10:23 |
Niels,
thanks a lot, really
|
#8 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Niels,
thanks a lot, really appreciated ! PO |
|
July 21, 2008, 12:01 |
Hi PO
No problem, I like a
|
#9 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37 |
Hi PO
No problem, I like a small shell-scripting brush-up from time to time I have made this small script, which I believe should work as 'ordered' if you add it to the very bottom of the foamLog script. I have commented it quite extensively, hope that can enlighten you. addToFoamLog There is a small detail, namely in line 2. My experience from Fedora and Mac tells me that 'find' works a little bit different with respect to the -maxdepth command, thus if you run into problems with that just 'man find'. I am on a Fedora machine right now, thus cannot verify my suspicion. Have fun, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 21, 2008, 12:44 |
Nice, thanks again !
I will
|
#10 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Nice, thanks again !
I will verify the maxdepth command but it should be fine. Best regards, PO |
|
July 21, 2008, 19:51 |
Thanks for you help fellas! Fo
|
#11 |
New Member
Richard Jones
Join Date: Mar 2009
Location: Adelaide, South Australia, Australia
Posts: 22
Rep Power: 17 |
Thanks for you help fellas! For others trying to get it to work, put Pierre's forces object (post 3) in
functions ( //pierre's code ); at the end of the controlDict file. |
|
July 21, 2008, 20:08 |
Also, if you're adding Neils c
|
#12 |
New Member
Richard Jones
Join Date: Mar 2009
Location: Adelaide, South Australia, Australia
Posts: 22
Rep Power: 17 |
Also, if you're adding Neils code (cheers Neils, top work!) to foamLog change the $ROOT/$CASE to $CASEDIR since the . . has been left out of the arguments in 1.5
|
|
July 21, 2008, 20:47 |
Hi !
Yes,$ROOT and $CASE ar
|
#13 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Hi !
Yes,$ROOT and $CASE are not used in 1.5 but I don't think that $CASEDIR is an argument with FoamLog - I "tweaked" Neils's code to use the current directory instead. Thanks ! PO |
|
July 21, 2008, 23:53 |
As far as I can tell this is w
|
#14 |
New Member
Richard Jones
Join Date: Mar 2009
Location: Adelaide, South Australia, Australia
Posts: 22
Rep Power: 17 |
As far as I can tell this is what you need for the forceCoeffs version... the variables are reasonably self explanatory
forceCoeffs { type forceCoeffs; functionObjectLibs ("libforces.so"); patches (airfoil); rhoInf 1.0; CofR (0.25 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0.25 0 0); magUInf 10.0; lRef 1.0; Aref 1.0; } foamLog can be modified as above, changing the forces reference to forceCoeffs where appropriate. |
|
July 22, 2008, 04:19 |
Hi
Well, here you go. Can s
|
#15 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37 |
Hi
Well, here you go. Can someone please make foamLog v. OF1.5 available to me. Thanks, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 22, 2008, 07:17 |
How do we attach files ???
|
#16 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
How do we attach files ???
Thanks PO |
|
July 22, 2008, 07:29 |
Hi Niels
Please excuse me f
|
#17 |
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 18 |
Hi Niels
Please excuse me for interrupting the thread but I tried to send you an email and it returned me an negative Delivery Status Notification. Could you please mail me your email address. I have some doubts and need you help Thanks alot Jaswi |
|
July 22, 2008, 07:47 |
Hi PO
Look in the Documenta
|
#18 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37 |
Hi PO
Look in the Documentation->Formatting section to the left. - Niels BTW. Richard have mailed it to me directly.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 22, 2008, 08:02 |
Here it is ...
http://www
|
#19 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Here it is ...
addToFoamLogV2.txt It assumes that foamLog is executed from the case directory where the folder "forces" can be found and where the output folder "logs" will be created. Thanks PO |
|
July 22, 2008, 17:42 |
Thank you guys for all the pos
|
#20 |
New Member
Sylvia Smullin
Join Date: Mar 2009
Posts: 10
Rep Power: 17 |
Thank you guys for all the posts --- I was just trying to sort through this on my own. unfortunately, copying the code for the controlDict doesn't seem to work for me (I used snappyHexMesh and then ran icoFoam). I don't see any forces directory. Where is this directory supposed to be created?
Also, what are the units of the output? Are they Newtons for force and N*m for moment and dimensionless for the output of force coeff? (just want to make sure it isn't somehow N/m^2) Thank you. Sylvia |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CoupledFvScalarMatrix in OF15 | fisher | OpenFOAM Running, Solving & CFD | 9 | May 27, 2020 09:40 |
Fan type BC in OF15 | hsieh | OpenFOAM Running, Solving & CFD | 31 | July 30, 2015 12:22 |
Bug in patchIntegrateC OF15 | anger | OpenFOAM Bugs | 8 | May 29, 2009 04:36 |
OpenFOAMdev migration to OF15 | fisher | OpenFOAM Installation | 1 | November 25, 2008 14:39 |
Bug or a feature of OF15 | rafal | OpenFOAM Bugs | 5 | July 25, 2008 05:25 |