Sample utility
Dear Foamers,
I'm trying to use the sample utility but this doesn't work... I'm using openfoam 1.6, simpleFoam. here is my sampleDict : Code:
/*---------------------------------------------------------------------------*\ here is the output : Code:
iter:55420 at startPoint:(-0.02 0.4 0) but this didn't work well either : it created a sets directory with 556 for the time, a field leftpatch_U.xy but with only four numbers... Please does anyone know how to solve this problem? Thanks for your help |
Hi there,
I'm not sure, but after comparing your sampleDict to the one in the source dir I noticed two things: Quote:
And now for something completely different: I tried to receive the field data on a cutting plane using the sample utility, so far without success. I get no output whatsoever only empty folders are being created. I don't even get an error. Well, at least almost no error. If I change the origin of the plane to (0 0 0) (and only then) I get the following warning: Quote:
Anyway, this is may sampleDict: Quote:
naval |
Hi thanks for the help. Now it's working :)
One important problem I had : don't forget to set the output format for SETS & SURFACE otherwise you will end up with no error but no files either and might continue wondering why it's not working ... :) |
hi foamers
I am using O.F. 1.6 and my sampleDict is: FoamFile { version 2.0; format ascii; class dictionary; location "system"; object sampleDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // interpolationScheme cellPoint; setFormat raw; sets ( leftPatch { type uniform; axis y; start ( 0 0.5 0.25 ); end ( 0 2 0.25 ); nPoints 100; } ); surfaces (); fields ( sigmaxx ); // ************************************************** *********************** // but I get no results we running the sample utility. whats the problem? |
Hi,
Do you have any error messages? Are you sure you have correct field : sigmaxx ? Are you sure your line is on your domain? Can you try "face" instead of uniform? (then you can comment numberofpoints cause it's not needed anymore). This will sample data on your nodes :) Tell me if it's working or not |
Problem seems to be sigmaxx
Dear Foamers,
I also had problems initially in using the sample utility in OpenFoam 1.6, and also in OpenFoam 1.5, official and development version. I checked the fields that are sampled, and I discover that sigma was a tensor. SigmaEq is a scalar field. When I changed the fields to be sample to sigmaEq, a scalar, it worked with no problem. Looks like sigmaxx does not work to get the xx component of the tensor. Tried other versions, such as: sigma.component(tensor::XX) - gives segmentation fault sigma(xx) - does not work sigma().xx - does not work How it is possible to sample components of vectorial and tensorial fields. Have I to define scalar fields for the components of the tensor that I want to sample? Or, how do I sample tensorial fields using sample? I try some solutions, none worked. Regards, António Martins |
Never tried with tensor but my guess would be like velocity :
U.component(1) So for tensor I would say Sigma.componenent(n) where n can go from 1 to 9 |
Results of some tests I have
GearB0x,
Thanks for your reply, but unfortunately it did not work. To better understand what is going on, I went to the description in the internet of solidDisplacementFoam, to check out in particular the variable definition. After some tests, I found out the following. - Only for variables defined for the mesh it was possible to sample. For example, for D is possible as it is defined as volVectorField D 00003 ( 00004 IOobject 00005 ( 00006 "D", 00007 runTime.timeName(), 00008 mesh, 00009 IOobject::MUST_READ, 00010 IOobject::AUTO_WRITE 00011 ), 00012 mesh 00013 ); but sigmaD no, being D defined as 00041 ( 00042 IOobject 00043 ( 00044 "sigmaD", 00045 runTime.timeName(), 00046 mesh, 00047 IOobject::NO_READ, 00048 IOobject::NO_WRITE 00049 ), 00050 mu*twoSymm(fvc::grad(D)) + lambda*(I*tr(fvc::grad(D))) 00051 ); Please note the differences, sigmaD involves a calculated field, D not. Also, I cannot extract single components, but, as I got all the components separately, there is not much of a problem, only more numbers.... How I can sample sigmaD? Is the sample utility not suitable for this? Should I use probes instead? Why there is an example of the usage of samples that does not work at all? I do not believe this is problem of the system I am using, Ubuntu 8.10. If you any other idea, please answer me and help me out. Regards, António Martins |
Quote:
I am doing the stress tutorial, and created a problem with a larger plate. When I ran sample, it says that it is processing time 100, 120, 140, ... , 200, but I can find the sampled data only for time 100. In other words, the sets directory only has the 100 subdirectory, but not the others. I can't figure out what I'm doing wrong. Mirko |
Hi
I would use option cloud in sampleDict dictionary like this: sets ( Inlet { type cloud; axis x; start (0 0 0); end (100 0 0); nPoints 3; ( (1 1 0) (2 3 0) (3 2 0) ); } ); Must I give the start and end of line? With this setting th utility sample give me choose field on point (1 1 0) (2 3 0) and (3 2 0)? I have a curve bottom and I would have for post processing the U field at bottom, the sampleDict that I use is correct? |
Never mind, I forgot to calculate the components via foamCalc components sigma.
Sorry for the noise. Mirko |
sample Utility = wrong results -- be aware!!
Hey There,
i figured that sample does some dangerous things! I chose a box of 1*1*1 m. I have 4 walls (parallel to x-axis) , an inlet and an outlet. Flow direction is x+ .. I assigned for U: Code:
internalField uniform (22 0 0) ; Code:
internalField uniform 2; Code:
start (0 0 0.5); ( cellPoint cellPointFace cellPointWallModified ) I get results like this :eek: --> for u: Code:
0 22 0 0 Code:
0 2 So be aware!! P.S.: can you reproduce the error? Is there any help to it/what did i do wrong? |
extracting curve data
Hi all, How can i extract data for curve line with sample utility? eny advice...
tanks, Rasoul |
Quote:
|
All times are GMT -4. The time now is 21:21. |