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

Like Tree1Likes
  • 1 Post By Krapf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2020, 18:23
Default How to specify patches on forcesIncompressible postprocessing
  #1
New Member
 
Francisco Angel
Join Date: Dec 2012
Posts: 26
Rep Power: 10
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, 15:13
Default
  #2
New Member
 
Francisco Angel
Join Date: Dec 2012
Posts: 26
Rep Power: 10
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

Old   October 26, 2020, 09:11
Default
  #3
New Member
 
RgzCFD
Join Date: Oct 2020
Posts: 6
Rep Power: 2
uosilos is on a distinguished road
how can be done runtime??? (i.e. by including in control dict)
uosilos is offline   Reply With Quote

Old   October 27, 2020, 16:34
Default
  #4
Member
 
Join Date: Oct 2017
Posts: 72
Rep Power: 5
Krapf is on a distinguished road
Copy the content of the file which you get after executing
Code:
foamGet forcesIncompressible
into the functions sub-dictionary in controlDict:
Code:
...
functions
{
    forces
    {
        #includeEtc "caseDicts/postProcessing/forces/forcesIncompressible.cfg"

        rhoInf      1.225;    // Fluid density
        patches   (patch1 patch2);

        CofR        (0 0 0);
        pitchAxis  (0 1 0);
    }
}
uosilos likes this.
Krapf 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
[snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." lethu OpenFOAM Meshing & Mesh Conversion 1 June 3, 2020 08:49
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 90 October 3, 2019 08:01
Problem using AMI vinz OpenFOAM Running, Solving & CFD 277 April 22, 2018 11:18
Possible bug with stitchMesh and cyclics in OpenFoam Jack001 OpenFOAM Pre-Processing 0 May 21, 2016 09:00
Cyclic patches and parallel postprocessing problems askjak OpenFOAM Bugs 18 October 27, 2010 04:35


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