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 Community New Posts Updated Threads Search

Like Tree5Likes
  • 3 Post By francisco.angel
  • 2 Post By Krapf

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: 13
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: 13
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.
reza2031, hogsonik and locoiam1991 like this.
francisco.angel is offline   Reply With Quote

Old   October 26, 2020, 08:11
Default
  #3
Member
 
UOCFD
Join Date: Oct 2020
Posts: 40
Rep Power: 5
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, 15:34
Default
  #4
Senior Member
 
Join Date: Oct 2017
Posts: 121
Rep Power: 8
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);
    }
}
hogsonik and uosilos like this.
Krapf is offline   Reply With Quote

Reply

Tags
forcesincompressible, openfoam, postprocess


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
Problem using AMI vinz OpenFOAM Running, Solving & CFD 298 November 13, 2023 08:19
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
[snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." lethu OpenFOAM Meshing & Mesh Conversion 1 June 3, 2020 07:49
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 12:39.