|
[Sponsors] |
October 12, 2022, 16:44 |
Error with flowRatePatch in controlDict
|
#1 |
New Member
Andy Somogyi
Join Date: Jul 2017
Posts: 5
Rep Power: 9 |
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 |
|
October 13, 2022, 01:04 |
|
#2 |
Member
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 14 |
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/ |
|
October 13, 2022, 01:40 |
|
#3 | |
New Member
Andy Somogyi
Join Date: Jul 2017
Posts: 5
Rep Power: 9 |
Quote:
"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. |
||
October 13, 2022, 02:23 |
|
#4 |
Member
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 14 |
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/ |
|
October 15, 2024, 00:56 |
|
#5 |
New Member
Join Date: Nov 2023
Posts: 18
Rep Power: 3 |
What is the difference between using just postProcess -func functionObjectDict as opposed to the longer solverName -postProcess -func functionObjectDict ? For some reason I'm having some processes work with one or the other, and I'm not sure why
|
|
October 15, 2024, 04:40 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
With solverName -postProcess, the solver starts, loads the required model, and does the post processing operations.
postProcess is an standalone application which will basically read the variables and do the post processing operations. Some function objects are just doing operations on variables, others require access to data related to models used by the solvers. For the latter, postProcess will fail because the required models are not loaded by postProcess. For instance, you cannot use the yPlus function object with postProcess because it requires to access to the turbulence model. AFAIK, everything you can do with postProcess should also work with solverName -postProcess. Or at least I don't really see why it would not. |
|
|
|
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 13:57 |
sampleDict and controlDict | musahossein | OpenFOAM Post-Processing | 39 | July 17, 2016 11:00 |
controlDict and sampleDict giving different results | Shenan | OpenFOAM Post-Processing | 2 | November 15, 2014 11:15 |
Forces not calculated when including a library in controlDict | fusij | OpenFOAM | 2 | May 13, 2011 08:25 |
writing controlDict as otherfields | ubaid | OpenFOAM | 5 | September 29, 2010 08:28 |