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

Error with flowRatePatch in controlDict

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 12, 2022, 15:44
Default Error with flowRatePatch in controlDict
  #1
New Member
 
Andy Somogyi
Join Date: Jul 2017
Posts: 5
Rep Power: 8
Andy Somogyi is on a distinguished road
Hey all, trying to output the flow rate though a patch. It works fine from the command line like:

postProcess -func 'flowRatePatch(name=ex)'

However if I put it in the controlDict in functions block like:


functions
{
#includeFunc flowRatePatch(name=ex)
}



I get the error that it can't find the 'phi' field when using the 'postProcess' command:

Reading fields:

Executing functionObjects
surfaceFieldValue flowRatePatch(name=ex) write:
total faces = 806
total area = 0.0008833

--> FOAM Warning :
From Foam::label Foam::functionObjects::fieldValues::surfaceFieldVa lue::writeAll(const vectorField&, const Foam::Field<Type>&, const pointField&, const faceList&) [with WeightType = double; Foam::label = int; Foam::vectorField = Foam::Field<Foam::Vector<double> >; Foam:ointField = Foam::Field<Foam::Vector<double> >; Foam::faceList = Foam::List<Foam::face>]
in file fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C at line 381
Requested field phi not found in database and not processed



How do I fix the controlDict so that postProcess works right?

thanks
Andy Somogyi is offline   Reply With Quote

Old   October 13, 2022, 00:04
Default
  #2
Member
 
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 13
LongGe is on a distinguished road
Hi

How about doing the following?

$ <using solver name> -postprocess -func 'flowRatePatch(name=ex)'

For example using simpleFoam
$ simpleFoam -postprocess -func 'flowRatePatch(name=ex)'
__________________
Our Work: https://www.idaj.co.jp/product/ennovacfd/openfoam_gui/
Powered by Ennova : https://ennova-cfd.com/
Ennova's Channel Partners : http://www.wolfdynamics.com/
LongGe is offline   Reply With Quote

Old   October 13, 2022, 00:40
Default
  #3
New Member
 
Andy Somogyi
Join Date: Jul 2017
Posts: 5
Rep Power: 8
Andy Somogyi is on a distinguished road
Quote:
Originally Posted by LongGe View Post
Hi

How about doing the following?

$ <using solver name> -postprocess -func 'flowRatePatch(name=ex)'

For example using simpleFoam
$ simpleFoam -postprocess -func 'flowRatePatch(name=ex)'
That does work, along with just

"postprocess -func 'flowRatePatch(name=ex)"

But I'd like to add more functions to the controlDict, and I'm trying to figure out why the 'phi' field doesn't seem to be available for controlDict post process functions, when run with the "postProcess" command.
Andy Somogyi is offline   Reply With Quote

Old   October 13, 2022, 01:23
Default
  #4
Member
 
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 13
LongGe is on a distinguished road
Hi



The answer can be found here. "6.2.4 Solver post-processing" as https://doc.cfd.direct/openfoam/user...processing-cli
__________________
Our Work: https://www.idaj.co.jp/product/ennovacfd/openfoam_gui/
Powered by Ennova : https://ennova-cfd.com/
Ennova's Channel Partners : http://www.wolfdynamics.com/
LongGe is offline   Reply With Quote

Reply


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
InterFoam (PimpleFoam) not obeying DeltaT in ControlDict walakaka OpenFOAM Running, Solving & CFD 2 March 1, 2018 12:57
sampleDict and controlDict musahossein OpenFOAM Post-Processing 39 July 17, 2016 10:00
controlDict and sampleDict giving different results Shenan OpenFOAM Post-Processing 2 November 15, 2014 10:15
Forces not calculated when including a library in controlDict fusij OpenFOAM 2 May 13, 2011 07:25
writing controlDict as otherfields ubaid OpenFOAM 5 September 29, 2010 07:28


All times are GMT -4. The time now is 16:35.