sample utility problem
Hello to the OpenFOAM community.
I'm experiencing a problem when using the sample utility distributed in OpenFOAM 1.6.x. I would like to draw the streamwise component Ux along the y direction for the pitzDaily3D tutorial in non reacting conditions. The sampleDict has the following entries: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // interpolationScheme cell; setFormat raw; sets ( internalField { type uniform; axis y; start ( 0.01 -0.025 0 ); end ( 0.01 0.025 0 ); nPoints 100; } ); surfaces (); fields ( U ); // ************************************************** *********************** // The sample utility seems to work properly when it is invoked: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Time = 0 Time = 0.05 Time = 0.1 Time = 0.15 Time = 0.2 Time = 0.25 Time = 0.3 Time = 0.35 Time = 0.4 Time = 0.45 anyway the files internalField.xy created in the "/sets/[0-0.45]" folders are empty I tried also to compute the single velocity component by selecting in the keyword fields: fields ( U.component(0) ) but the result is the same. Does anyone can help me to fix this problem ? Regards Andrea |
Andrea, I couldn't find it, but there is a post saying that sample utility is not working properly for U and U.component() at least for 1.5. Maybe this thread can be useful for you:
http://www.cfd-online.com/Forums/ope...oam-1-6-a.html Regards. |
Quote:
Regards |
Hi,
you could try: foamCalc components U This will print out the components of U in each time directory - Ux, Uy and Uz. Then try sample after that, with Ux in the fields section of sampleDict. Philip |
Quote:
thanks for your reply. But unfortunately after having executed foamCalc components U and then sample with Ux in the fields section of sampleDict, it creates the file in the directory time 0.04 but remains still empty. |
Hmmnn I am not sure then what's the problem,
Hopefully someone else might be able to help. Philip |
I've got strange results with the sample utility (OF 1.7-1):
For example when I try to plot the wall shear stress on a line on the inner wall of a pipe the sample utility and paraFoam give me a different distribution. It's the exact same line. The line is z oriented and in my sampleDict file I have: interpolationScheme cellPoint; fields ( U wallShearStress ); sets ( x=-0.025 { type face; axis z; start (-0.025 0 0); end (-0.025 0 1.495); } I also encountered empty sample output file. Any one has also seen these kind of problems ? |
Hi all,
to my experience the sample utility gives empty files when it cannot found node values near enough to interpolate from them. I don't know if this is the case, but I can suggest you to put the sample line "inside" the domain, and not on the border (I mean, if your 2D domain in OpenFOAM has a thickness of 0.1 m in the z direction and is comprised between z=0 and z=0.1, set the z coordinate in the sampleDict as 0.05). Regards V. |
sample utility
Hi Vesselin
I followed your suggestions and I put the sample line inside the domain without including the boundaries and it worked. The files created inside the sets directories were not empty. Thanks for your help, Regards Andrea Aprovitola |
Thanks guys for the suggestions.
So if I understand you correctly you said that the sample utility is unable to give values at wall boundaries of your computational domain nor inlet or outlet. So how do you obtain you wall shear stress or y+ values at the wall ? Regards François |
Quote:
actually what I have experienced in using the sample utility is that it has some difficulties to interpolate correctly the required data field if the sampling pattern is set exactly on the boundary of the domain: this doesn't mean that it doesn't work in any case, but simply that with such kind of setting you cannot be shure that It will work properly. Anyway, you have also to keep in mind that the sample utility gives the opportunity to choose between different sampling options and interpolating algorithms, and I haven't tried to use all of them yet, so maybe there can be a more effective global setting which can avoid such kind of problems. But, however, if you want to sample some quantities at the boundary of your domain (e. g. at a solid wall or at a generic boundary patch) my personal suggestion is to set the sampling pattern very close to the boundary (e. g. at 10^-05 m or lower) but not exactly on it. Finally, if we talk about y+ and the wall shear stress I think that OpenFOAM has some "ad hoc" utilities to calculate them, so maybe you can have a look on the user's Guide about this matter. Regards V. |
Hi Vesselin,
Thank you very much for your kind and helpful answers. I will try what you suggest. Regarding the y+ and the wall shear stress, indeed OF has already some utilities to compute those values: yPlusLES, yPlusRAS and wallShearStress but the values computed are on the wall patches of the computational domain so it doesn't solve the problem. I've tried to use the cellPointFace interpolation scheme but it doesn't work at all. Anyway will try to build my line "near" the wall to see what happen. If someone has other suggestions ... Regards François |
Quote:
|
set curve
Hi all,
how can i extract data (for example pressure) with sampling utility for cylinder wall? if it may be done with curve set point or other advice, i am very glad that tell me a bout it, thanks. |
Quote:
|
yep, i find it, just enough that be used sampleDict utility and set the pach name cylinder in the "surfaces" and and then set "p" in the fields, after that execute "sample"
if it is not clear for u, tell me to explain more _____ Rasoul |
Quote:
surfaces ( inlet { type patch; patchName INLET; } ); but there's nothing exact in the dictionary .../case/surfaces/1000/. My case is a 2d calculation, and the inlet is a surface just for test. In fact I want to output data on a cylinder line . |
you should modify your sampleDict as this follow:
surfaces ( inlet //-> the name of your cylinder patch { type patch; patchName inlet;// ->the name of your cylinder patch } ); fields ( p ); _____ Rasoul |
So I've been trying to use the info from this post to sample the wallShearStress at a cylinder wall.
My pipe_flow was defined using the wedge method. Using previous answers from this thread, here is what my sampleDict file looks like: fields (wallShearStress); sets(); surfaces ( fixedWall //-> the name of my pipe wall { type patch; patchName fixedWall; } ); But I get an error: "keyword patches is undefined in dictionary "/home/caro/OpenFOAM/caro-2.1.0/run/pipe_flow/system/sampleDict::surfaces" " So it seems I'm not defining the keyword patches, but I've looked at other sampleDict files from the tutorials, and couldn't find any with this keyword, could someone help me please? Also, 2nd question, I'm not sure which interpolation scheme I should use? Thanks! |
Caro, FOAM is asking you for the keyword "patches" which is a part of the sets section where you set the points sampling. Maybe you can add a simple sampling point in order not to leave the sets section empty.
Regards. |
But doesn't the error message means that the keyword patches should be defined in the surfaces section?
"keyword patches is undefined in dictionary "/home/caro/OpenFOAM/caro-2.1.0/run/pipe_flow/system/sampleDict::surfaces" " |
It couldn't find the keyword "patches" and checking the dict given with the source code, this keyword is present only in the sets section. The idea is to try adding something in this section to see what happens.
Regards |
so using the tutorial LadenburgJet60psi as a guide (because they also want to sample for a wall property), here is what I wrote
sets ( face { name cyl_Wall; axis x; start (0 0.05 0); end (10 0.05 0); nPoints 100; } ); But now I get this error: keyword type is undefined in dictionary "/home/caro/OpenFOAM/caro-2.1.0/run/pipe_flow/system/sampleDict::sets" I must be missing something obvious, I just don't see it... |
Yes,
type uniform; at the beginning of the definition. |
And now I get my "keyword patches undefined ..." error again...
|
What FOAM version are you using?
|
OpenFOAM 2.1.0
|
Please check:
/opt/openfoam<your_version>/applications/utilities/postProcessing/sampling/sample/sampleDict in order to see the correct wording of the dictionary, the keywords have changed in the last versions. Now the keyword patches is required in surfaces too. Regards. |
Thanks so much for your help Santiago!!!
It seems you do not need to specify anything in sets, as long as everything is defined correctly in surfaces. |
You welcome. Yes, sets is not more needed. It was used only for testing purposes.
Bye. |
sampleDict surfaces with moving mesh
Hello,
I was wondering if anyone has used the sampleDict to determine variable values along a moving mesh. Particularly, I'm interested in the displacement of a solid in an FSI case (Turek and Hron benchmark). It would be very similar to determining the displacement of the tip of the console in the flappingConsole FSI case that is packaged with the extend versions of 1.5 and 1.6. I've tried using the surfaces functionality of the sampleDict and like many other folks end up with empty file folders. This leads me to believe there are issues with trying to use the boundaries/interfaces between solid and fluid as my surface patch like others have experienced. This also brings me to the issue of trying to define a line or surface based on xyz coordinates as I'm interested in the variation of x,y,z over time as the solid is deflected. Any help would be appreciated and I'm curious if anybody else has experienced this as I couldn't find anything in the forums. Regards, Andrew |
About installation of swak4Foam
Hi everyone,
I am fresher to openFoam. I came to know the uses of swak4Foam utility for writing boundary conditions. In my application also i need to apply zero flux boundary condition. So i wish to install swak4Foam. Now i am working on OF 2.1.1 version. I followed every step as mentioned in the tutorials but i am not able to get it. The error message as follows Error message:- malli_reddy@ubuntu:~/OpenFOAM/malli_reddy-2.1.1$ svn checkout https://openfoam-extend.svn.sourcefo...ies/swak4Foam/ svn: OPTIONS of 'https://openfoam-extend.svn.sourcefo...ries/swak4Foam': Could not resolve hostname `openfoam-extend.svn.sourceforge.net': No address associated with hostname (https://openfoam-extend.svn.sourceforge.net) Could you please suggest me how to overcome this problem. And suggest me some good tutorial for the swak4Foam. Thanks Regardshttps://mail.google.com/mail/images/cleardot.gif |
Quote:
I am using FSI for my work. I find Sample with OF-1.6 have some problems and I always have failed to get displacement with sample. Could you please suggest me how to overcome this problem? Thanks Regards Legenoy |
set file missing when using sample
Hello Everybody!
I am quite new with Open Foam and I try to use the sample utility. I read the very interesting questions and answers and I saw that sometimes the files in the set file are empty. My problem is that the set file is not even created in my case directory. When I apply the sample utility I get this: Create time Create mesh for time = 0 Time = 0 Time = 0.1 Time = 0.2 Time = 0.3 Time = 0.4 Time = 0.5 Time = 0.6 Time = 0.7 Time = 0.8 Time = 0.9 Time = 1 End So I think the utility works but I did not find how to create the set file. Somebody can help me please? |
If the sample utility does not find the specified field in the time step then it skips the time step.
Can you post you sampleDict here? Philip |
Hi,
Quote:
|
Hi!
Before all, thank you for your answers! Here you can find my sampleDict file: setFormat raw; surfaceFormat raw; formatOptions { ensight { format ascii; } } interpolationScheme cell; fields ( p_rgh U alpha1 ); sets ( lineX1 { type uniform; axis xyz; start (0. 0.0 0.1); end (0.2 0. 0.18); nPoints 10; } lineX2 { type face; axis xyz; start (0. 0.1 0.1); end (0. 0.2 0.1); } somePoints { type cloud; axis xyz; points ((0.0 0.0 0.15)(0.2 0.2 0.15)); } ); I think I had a problem of OpenFoam version. I have written "sampleSets" instead of "sets" but now it works! and the "sets" file is indeed created in the "postProcessing" file. :) |
All times are GMT -4. The time now is 04:01. |