|
[Sponsors] |
June 5, 2015, 00:56 |
wallGradU at runtime
|
#1 |
Senior Member
Join Date: Jan 2013
Posts: 135
Rep Power: 13 |
Dear all,
In order to calculate the instantaneous total force, which is composed of pressure force and shear force on the surface of the body, I need to obtain the pressure(p) and friction on the surface. The former could be easily done by including a surface probe function in the controlDict. However, there seems to be no such function for obtaining the friction distribution at runtime. Only some post-processing tools like wallShearStress, wallGradU are available. Could someone give me some hints about how to obtain the runtime wallGradU ? best, |
|
June 8, 2015, 10:48 |
|
#2 |
Senior Member
|
Hi,
Is there any particular reason you do not use the forces functionObject? It does calculate those forces instantaneously for you. Regards, Tom |
|
June 10, 2015, 12:55 |
|
#3 |
Senior Member
Join Date: Jan 2013
Posts: 135
Rep Power: 13 |
Hi, in order to use the functionObject, I need to write down all the files at time interval that is small enough and do the postProcessing with these written files. In the case of large mesh, it would be prohibitive because writing large amount of data to disk is time and disk space consuming. That's why I need to use a runtime utility of wallGradU.
With the extensibility of OpenFOAM I'm sure one could do some programming to achieve this... Could someone give me some hints on this? |
|
June 10, 2015, 13:02 |
|
#4 |
Senior Member
|
The functionObject is executed at runTime, that is the whole point of the functionObjects.
Just use it like this (in the functions part of your controlDict): Code:
forces_Total { type forces; functionObjectLibs ("libforces.so"); patches ( <yourPatchNames(s)> ); rhoName rho;//rhoInf; (rhoInf for incompressible) pName p; rhoInf 1.225; CofR (0 0 0); outputControl timeStep; //This says to execute every timeStep! outputInterval 1; log false; } Regards, Tom Last edited by tomf; June 10, 2015 at 13:03. Reason: clarification |
|
June 11, 2015, 03:49 |
|
#5 |
Senior Member
Join Date: Jan 2013
Posts: 135
Rep Power: 13 |
Hi, Tomf,
I made some mistakes in the previous post, I was a little dizzy when I was writing that yesterday I now realize that the functionObject is the thing I needed to output the total or averaged viscous force on the wall. Thank you. However, the problem I'm facing is one step further. I need to calculate the sectional viscous force on a circular cylinder, since this cylinder is 3 dimensional(waviness or taper in the span-wise direction). The available functionObject will only give the mean viscous force of the whole cylinder. This is the question that is haunting me. Sorry for the vague illustration in the previous posts. |
|
June 11, 2015, 04:17 |
|
#6 |
Senior Member
|
Well, there is actually the "bin" functionality, which gives "sectional" output, just add it to the functionObject description.
This was released in version 2.2: http://www.openfoam.org/version2.2.0...processing.php Code:
binData { nBin 20; direction (1 0 0); cumulative yes; } |
|
June 12, 2015, 20:56 |
|
#7 |
Senior Member
Join Date: Jan 2013
Posts: 135
Rep Power: 13 |
Wow, that's exciting! I will try that out!
thank you, Tom |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
runTime | deji | OpenFOAM | 2 | January 17, 2019 10:14 |
Problem in3D model processing | mebinitap | OpenFOAM | 2 | December 12, 2014 05:40 |
getting (0 0 0) wallGradU value when i m probing wallGradU at some points | suryawanshi_nitin | OpenFOAM | 1 | December 9, 2013 12:36 |
Runtime modification of a volScalarField | Scofield | OpenFOAM Programming & Development | 4 | October 1, 2013 09:31 |
runTime out of scope in functionObject | Sune | OpenFOAM Programming & Development | 2 | September 26, 2012 03:11 |