CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Post-Processing

Problems with surface sampling

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By mcarpe

Reply
 
LinkBack Thread Tools Display Modes
Old   September 14, 2012, 12:05
Default Problems with surface sampling
  #1
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 8
mcarpe is on a distinguished road
Hi all,

I'm trying to sample the pressure values on a wall surface. I can easily see the values in paraView, but when I execute the sample utility I don't get any output files. The folder "surface/10000/" is created but it's empty.

I'm using OpenFOAM 2.1.x and this is my sampleDict file:

Code:
surfaceFormat raw;

interpolationScheme cellPoint;

fields
(
    p
);

surfaces
(
    wallPressure
    {
        type            patch;
        patches         (buildingWall);
	interpolate 	true;
	triangulate	false;
    }
);
I've tried with different options and different patches. The results are the same. No output files are created.

Using the sample utility with sets, instead of surface, on a set of sample points, works well.

Can anyone help me?
I'm sure I'm doing a very silly mistake, but I can't see it...

Thank you
james.conger likes this.
mcarpe is offline   Reply With Quote

Old   September 17, 2012, 02:52
Default
  #2
Member
 
Jan
Join Date: Dec 2009
Location: Berlin
Posts: 50
Rep Power: 9
SirWombat is on a distinguished road
Send a message via Skype™ to SirWombat
Quote:
Originally Posted by mcarpe View Post
...
Using the sample utility with sets, instead of surface, on a set of sample points, works well.
...

Then surface is probably called something different. You can check by using "patchSummary". This will list all boundary conditions including the full names of all patches/walls. Could be something like "buildingWall_patch0" perhaps ...
__________________
~~~_/)~~~
SirWombat is offline   Reply With Quote

Old   September 17, 2012, 06:53
Default
  #3
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 8
mcarpe is on a distinguished road
Quote:
Originally Posted by SirWombat View Post
Then surface is probably called something different. You can check by using "patchSummary". This will list all boundary conditions including the full names of all patches/walls. Could be something like "buildingWall_patch0" perhaps ...
Thank you SirWombat for your help.

However this is not the case. I've tried several different patches and always got the same result. This is the output from patchSummary, for example:
Code:
[...]
wall: buildingWall
    scalar		nut		generic
    scalar		k		generic
    scalar		p		zeroGradient
    scalar		epsilon		generic
    vector		U		fixedValue
    symmTensor		R		generic
[...]
mcarpe is offline   Reply With Quote

Old   September 17, 2012, 16:46
Default
  #4
Member
 
Jan
Join Date: Dec 2009
Location: Berlin
Posts: 50
Rep Power: 9
SirWombat is on a distinguished road
Send a message via Skype™ to SirWombat
hmm ... maybe try this:

Code:
setFormat raw;
surfaceFormat vtk;
interpolationScheme cellPoint;

fields
(
    p
);

surfaces
(
    wallPressure
    {
        type            patch;
        patches         (buildingWall);
	interpolate 	true;
	triangulate	false;
    }
);
so use 'vtk' as output surface and 'raw' as output format.
__________________
~~~_/)~~~
SirWombat is offline   Reply With Quote

Old   September 18, 2012, 05:56
Default
  #5
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 8
mcarpe is on a distinguished road
Thanks again SirWombat.

Tried that, and several other combinations, but unfortunately no results at all...
mcarpe is offline   Reply With Quote

Old   September 18, 2012, 07:08
Default
  #6
Member
 
Jan
Join Date: Dec 2009
Location: Berlin
Posts: 50
Rep Power: 9
SirWombat is on a distinguished road
Send a message via Skype™ to SirWombat
Hi Matteo, just too bad!

You may wanna try a different approach: use a basePoint and normalVector instead, i.e. like this:

Code:
setFormat raw;
surfaceFormat vtk;
interpolationScheme cellPoint;
fields
(
    p
);

surfaces ( 
	wallplane{
		type 				plane;
		basePoint 		(0 0.5 0);
		normalVector 	(0 1 0);
		interpolate 	true;
	}
);

Hope this gets you somewhere!

Greetings,
Jan
__________________
~~~_/)~~~
SirWombat is offline   Reply With Quote

Old   September 19, 2012, 04:18
Default
  #7
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 8
mcarpe is on a distinguished road
Quote:
Originally Posted by SirWombat View Post
Hi Matteo, just too bad!

You may wanna try a different approach: use a basePoint and normalVector instead, i.e. like this:

Code:
setFormat raw;
surfaceFormat vtk;
interpolationScheme cellPoint;
fields
(
    p
);

surfaces ( 
	wallplane{
		type 				plane;
		basePoint 		(0 0.5 0);
		normalVector 	(0 1 0);
		interpolate 	true;
	}
);

Hope this gets you somewhere!

Greetings,
Jan
Hi Jan,

no luck. It seems that surface sampling is not working at all, regardless the surface chosen... I'm going to try with runtime function objects, but, of course, I have to re-run the simulation. Could it this be a bug? Is anyone else having problems with surface sampling?

Thanks again
Matteo
mcarpe is offline   Reply With Quote

Old   September 19, 2012, 04:27
Default
  #8
Member
 
Jan
Join Date: Dec 2009
Location: Berlin
Posts: 50
Rep Power: 9
SirWombat is on a distinguished road
Send a message via Skype™ to SirWombat
Hi Matteo, could you post the output of the sample-utility? Have you tried other fields (i.e. U)? What solver did you use?

As you said you can see the data in paraview, i guess your setup and output should be ok. the sample utility really should work then. I never had problems using 'sample', but i have only used it with simpleFoam (1 phase, steady), LTSInterFoam (2 phase, steady), interFoam (2phase, transient).

Hope someone else has an idea here.

G Jan
__________________
~~~_/)~~~
SirWombat is offline   Reply With Quote

Old   September 19, 2012, 05:00
Default
  #9
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 8
mcarpe is on a distinguished road
Here is the output of the sample command:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.1.x-c1ffc2074f88
Exec   : sample -latestTime
Date   : Sep 19 2012
Time   : 09:56:17
Host   : "EnFlo-MC01"
PID    : 11479
Case   : /home/mcarpentieri/OpenFOAM/mcarpentieri-2.1.x/run/HRModUrb/simpleC_0
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 = 1811

Reading surface description:
    wallPressure

Time = 1811

End
I've also tried other fields, U for example, same result. I'm using simpleFoam with kEpsilon RAS turbulence model. And I can confirm that I see the results in paraView just fine.

Thanks
Matteo
mcarpe is offline   Reply With Quote

Old   September 19, 2012, 05:05
Default
  #10
Member
 
Jan
Join Date: Dec 2009
Location: Berlin
Posts: 50
Rep Power: 9
SirWombat is on a distinguished road
Send a message via Skype™ to SirWombat
hmmm ... if its not the surface description i am really lost on this one ... no idea whats going wrong. sorry! G jan
__________________
~~~_/)~~~
SirWombat is offline   Reply With Quote

Old   September 19, 2012, 08:13
Default
  #11
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 8
mcarpe is on a distinguished road
Quote:
Originally Posted by SirWombat View Post
hmmm ... if its not the surface description i am really lost on this one ... no idea whats going wrong. sorry! G jan
Thanks a lot for your help anyway, Jan.

By the way, the function object sampledPatch is working perfectly. I just have to re-run all the simulations, now.
mcarpe is offline   Reply With Quote

Old   November 9, 2012, 12:00
Default
  #12
Member
 
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 74
Blog Entries: 1
Rep Power: 6
tfuwa is on a distinguished road
Hi Matteo,What's sampledPatch look like? Can you please give an example? I searched on-line and the tutorials of 0F2.1.1 but cannot find. Thanks.


Quote:
Originally Posted by mcarpe View Post
Thanks a lot for your help anyway, Jan.

By the way, the function object sampledPatch is working perfectly. I just have to re-run all the simulations, now.
__________________
Kind regards,

Albert
tfuwa is offline   Reply With Quote

Reply

Tags
patch, sample surface, sampledict

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
snappyHexMesh aborting Tobi OpenFOAM Native Meshers: snappyHexMesh and Others 0 November 10, 2010 04:23
Boundary layer generation problems ivan_cozza OpenFOAM Native Meshers: snappyHexMesh and Others 0 October 6, 2010 13:47
time step in free surface problems KtoTo CD-adapco 4 June 26, 2007 07:03
icem surface problems joe Main CFD Forum 0 February 11, 2004 18:20
free convection heat transfer from a heated horizontal surface through a liquid to a thin cooled fin Kaushik FLUENT 1 May 8, 2000 06:47


All times are GMT -4. The time now is 17:51.