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

How to specify patches on forcesIncompressible postprocessing

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2020, 17:23
Default How to specify patches on forcesIncompressible postprocessing
  #1
New Member
 
Francisco Angel
Join Date: Dec 2012
Posts: 26
Rep Power: 9
francisco.angel is on a distinguished road
Hi, I ran a simulation using simpleFoam of flow over a cylinder. Now I want to obtain force values on the cylinder surface.


So I tried to use the following command:


Code:
simpleFoam -postProcess -noZero -func forcesIncompressible
As I read here postProcess functionality in openFOAM 4


Starting with the solver name gives to postProcess utility the field names and stress model. The code fails with the following warning:


Code:
--> FOAM Warning : 
    From function Foam::labelHashSet Foam::polyBoundaryMesh::patchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
    in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
    Cannot find any patch or group names matching patch1
--> FOAM Warning : 
    From function Foam::labelHashSet Foam::polyBoundaryMesh::patchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
    in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
    Cannot find any patch or group names matching patch2
I'm unable to find the syntax to specify the patches were I want the force computation to be carried on. Also I don't know why it seems to require 2 patches???


Can someone share any experience with this postProcess function.
Many thanks!
francisco.angel is offline   Reply With Quote

Old   March 1, 2020, 14:13
Default
  #2
New Member
 
Francisco Angel
Join Date: Dec 2012
Posts: 26
Rep Power: 9
francisco.angel is on a distinguished road
Well, I found the solution after re-reading the manual. So here it is for anyone interested.


For a function like this to work is better to copy the required function file to the system directory, using foamGet


Code:
foamGet forcesIncompressible
Then you edit the file on a text editor, in this case changing


Code:
patches (patch1 patch2)
to



Code:
patches (yourPatch)
And run:


Code:
simpleFoam -postProcess -func forcesIncompressible
This will execute without problems.
francisco.angel is offline   Reply With Quote

Reply

Tags
forcesincompressible, openfoam, postprocess

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 90 October 3, 2019 07:01
Problem using AMI vinz OpenFOAM Running, Solving & CFD 277 April 22, 2018 10:18
[snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." lethu OpenFOAM Meshing & Mesh Conversion 0 July 10, 2017 04:15
Possible bug with stitchMesh and cyclics in OpenFoam Jack001 OpenFOAM Pre-Processing 0 May 21, 2016 08:00
Cyclic patches and parallel postprocessing problems askjak OpenFOAM Bugs 18 October 27, 2010 03:35


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