|
[Sponsors] |
How to sample velocity magnitudes at each time-step |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 14, 2013, 14:11 |
How to sample velocity magnitudes at each time-step
|
#1 |
Senior Member
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13 |
Hi,
Could anyone please tell me how I can sample magnitudes of a velocity flow field which passes through a specified region of cells (rather than the patches) (e.g. an arbitrary cylinder shaped plane in the middle of the computational domain) during run-time and to write those at each time-step? Many thanks for any reply in advance. |
|
February 15, 2013, 03:00 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
there are several options:
1- using post processing such as paraview: -create a mag (U) with calculator -extract the surface -integrateVariables for specified Time or all time steps 2-using sampleDict, i guess you can create your sample point 3- using swak4Foam there are lots of Options in that, which youy can extract plane, use a faceSet and so to derive what you want!
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
February 15, 2013, 05:36 |
|
#3 |
Senior Member
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13 |
Thanks very much.
When I tried to use the swak4Foam with faceSet, I receive the error below: Could you please tell me what it really means Code:
libs ( "libOpenFOAM.so" "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" "libgroovyBC.so" ); functions ( averageVel { type swakExpression; valueType faceSet; setName f0; accumulations ( average ); expression "U"; verbose true; } ); Code:
--> FOAM FATAL ERROR: Could not find a field name "U" of type vector (neither surfaceVectorField nor volVectorField) autoInterpolate: 0 (try setting 'autoInterpolate' to 'true') From function SubsetValueExpressionDriver::getFieldInternalAndInterpolate(const string &name,const Subset &sub) in file SubsetValueExpressionDriverI.H at line 275. Last edited by HakikiCanakkaleli; February 15, 2013 at 05:57. |
|
February 15, 2013, 07:00 |
|
#4 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
use phi which is U & mesh.Sf
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
February 15, 2013, 08:00 |
|
#5 |
Senior Member
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13 |
Thanks very much!
Could you please tell me whether I can average the magnitudes of the velocity vector components (e.g. Ux) or not as well? |
|
February 15, 2013, 08:14 |
|
#6 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
Code:
surfacePlane { type swakExpression; valueType surface; surfaceName testPlane; surface { type plane; basePoint (0 0 0); normalVector (1 0 0); interpolate true; //false } verbose true; expression "U"; accumulations ( min max average ); }
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
February 15, 2013, 08:15 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
swak offers for these parsers the possibility to automatically interpolate fields that are defined on cells to the faces ... but you've got to ask it to: I don't believe in forcing extra work on the machine without the user asking for it. Anyway: simply add a line Code:
autoInterpolate true;
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
February 15, 2013, 08:16 |
|
#8 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Together with the autoInterpolate described in the other post this should be easy ("mag(U.x)" or so)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
February 17, 2013, 16:05 |
|
#9 | ||
Senior Member
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13 |
Thanks very much for this information to both of you.
Quote:
Quote:
Instead, if you would like to change the error message, my unpretencious suggestion would only be, by citing your words: Code:
simply add a line: autoInterpolate true; |
|||
April 5, 2013, 15:48 |
|
#10 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
what a nice thread!
I have a question now.whats difference between faceSet and faceZone? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Floating point exception error | Alan | OpenFOAM Running, Solving & CFD | 11 | July 1, 2021 21:51 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 13:40 |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 11:08 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 05:24 |
Extract velocity field in certain time step to MATLAB | spatialtime | CFX | 3 | September 9, 2009 18:30 |