|
[Sponsors] |
problem with sampling Utility in openFOAM 1.6 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 1, 2009, 10:16 |
problem with sampling Utility in openFOAM 1.6
|
#1 |
New Member
Cárdenas
Join Date: Sep 2009
Posts: 5
Rep Power: 17 |
Hello to All,
I'm trying to use the sampling utility within the openFOAM version 1.6 in order to extract data for later post-processing in Matlab. I want to extract the cell values of the solution variables (x-velocity) along the y-coordinate for different x-locations. My problem is that after running the utility, none sample data is stored / created. Below is a copy of the dictionary entries I am using: -----------------------------sampleDict---------------------------------- FoamFile { version 2.0; format ascii; class dictionary; location "system"; object sampleDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // interpolationScheme cellPoint; setFormat raw; sets ( location1 { type midPoint; axis y; start (0.02 0.00 0.0); end (0.02 0.120 0.0); } ); surfaces (); fields ( U.component(0) ); ----------------------------------------------------------------------- If I understood the instructions in the User-Guide well, the utility is supposed to create a folder for each solution-time and each set (location) with the ASCII files inside. Here is the output I get when executing the sample Utility: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Time = 0 Time = 0.2 Time = 0.4 Time = 0.6 Time = 0.8 Time = 1 End ------------------------------------------------------------------------- First I tough that my entries in the dictionary were wrong (for example that my coordinates were outside of the domain), but I checked them several times and started using other options like "uniform", "cell", "pointAndCell", ...) as well. But the result was always the same. I would appreciate any kind of help or suggestions. Thank you very much |
|
September 3, 2009, 07:07 |
entry in sampleDict was not recognized
|
#2 |
New Member
Cárdenas
Join Date: Sep 2009
Posts: 5
Rep Power: 17 |
Hello again,
after several trials, I think I found the problem. In the user guide, on chapter 6.5 three options are listed for the sampling of tensor/vector fields: the whole tensor (e.g. U), only one component (e.g. U.component(0)) or the magnitude (e.g. mag(U)). These fields keywords should be used in the sampleDict file. However, only the sampling of the whole tensor seem to work. In my case, after changing the entry in the sampleDict from: fields ( U.component(0) ); to fields ( U ); the utility worked properly, and the ASCII files were created in the sets directory. So the problem concerns now only to the sampling of specific tensor terms. I will take a look at the source files of the utility, perhaps has someone any suggestion were to start, since I'm a newbie in openFOAM. Thanks |
|
August 31, 2010, 14:52 |
|
#3 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34 |
I realise this thread is old,
but for anyone else who has a similar problem, you can use "foamCalc" to calculate the components of a tensor/vector and then you can you sample to sample these components. For example: If I have the stress tensor sigma, then I type: foamCalc components sigma This will create the volScalarFields sigmaxx,sigmayy,sigmazz,sigmaxy,sigmaxz and sigmayz. Then you can sample these fields. Philip |
|
September 5, 2010, 23:32 |
|
#4 | |
Member
edison
Join Date: May 2009
Location: Australia
Posts: 35
Rep Power: 17 |
Quote:
Thanks for the tips. Do you also have some idea about calculate particle values? say I want the velocity components of my all my particles located under case/time/lagruangian, how can I get them? |
||
September 6, 2010, 05:37 |
|
#5 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34 |
Edison_Ge,
Unfortunately I have no experience with particles so I cannot help. You could try: foamCalc components lagrangian/U but that is a total guess, so I really don't know. Sorry I couldn't be of more help, Philip |
|
November 21, 2011, 11:03 |
|
#6 |
New Member
Paolo
Join Date: Nov 2011
Posts: 7
Rep Power: 15 |
Hi,
I have a problem with sample, it doesn't work at all... I want only to sample the pressure field in the x direction, and my sampleDict file so reads: interpolationScheme cell; setFormat xmgr; sets ( line { type uniform; axis x; start ( 0 1.5 0.05 ); end ( 3 1.5 0.05 ); nPoints 100; } ); fields ( p ); but running it, it says: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading set description: line Time = 0 Time = .... End and no outputs are created in my directory. What's wrong in what I'm doing? Thanks for help |
|
December 6, 2011, 17:31 |
sampleDict - keyword patch rejected for some reason
|
#7 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
Dear all:
I have the following sampleDict file: setFormat raw; surfaceFormat raw; interpolationScheme cellPoint; fields ( alpha1 p ); sets ( left { type uniform; axis xyz; start ( 0 -15.0 5.0); end ( 0 -15.0 -5.0); nPoints 10; } middle { type uniform; axis xyz; start ( 0 0 5.0); end ( 0 0 -5.0); nPoints 10; } right { type uniform; axis xyz; start ( 0 15 5.0); end ( 0 15 -5.0); nPoints 10; } ); surfaces ( test01 { type patch; patchName leftWall; interpolate false; triangulate true; } ); however, when I run it I get the following error: musa@musa-Satellite-M35X:~/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D$ sample /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.0.1-51f1de99a4bc Exec : sample Date : Dec 06 2011 Time : 16:08:04 Host : musa-Satellite-M35X PID : 7903 Case : /home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading set description: left middle right --> FOAM FATAL IO ERROR: keyword patches is undefined in dictionary "/home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/sampleDict::surfaces" file: /home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/sampleDict::surfaces from line 69 to line 72. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 400. FOAM exiting if I dont use the "patch" keyword, then how am I supposed to define where the pressure is to be evaluated? Any suggestions / advice? Thanks in advance |
|
December 6, 2011, 19:47 |
|
#8 | |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
Quote:
|
||
February 25, 2014, 07:43 |
|
#9 |
Senior Member
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13 |
Hi all,
This is a very old thread, but I would like to ask if there is a way to sample velocity magnitude in the r-direction? I'm using a circular geometry where I'd like to see variation along r. Can there be an alternate definition for axis instead of x,y,z or xyz?
__________________
Regards, Srivaths |
|
February 25, 2014, 12:06 |
|
#10 | |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
Quote:
|
||
February 26, 2014, 03:00 |
|
#11 |
Senior Member
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13 |
Thank you. I will have a look at the paper to see if i can get hints. Also, how should the 'distance' option in axis be specified?
__________________
Regards, Srivaths |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with cyclic boundaries in Openfoam 1.5 | fs82 | OpenFOAM | 36 | January 7, 2015 01:31 |
CAD -> gMsh -> enGrid -> OpenFOAM Problem | AlGates | OpenFOAM | 7 | August 6, 2010 13:46 |
Problem running paraFoam on OpenFOAM 1.5 | sonny | OpenFOAM | 3 | June 6, 2009 21:24 |
OpenFOAM Install problem | masb | OpenFOAM | 3 | May 25, 2009 12:32 |
[Commercial meshers] Problem importing mesh in openfoam from fluent | alessandr0 | OpenFOAM Meshing & Mesh Conversion | 3 | September 4, 2008 14:41 |