|
[Sponsors] |
Post Processing pressure difference with fieldValueDelta gives error |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 15, 2022, 04:15 |
Post Processing pressure difference with fieldValueDelta gives error
|
#1 |
Member
Daniel
Join Date: May 2018
Posts: 43
Rep Power: 8 |
Hello everyone,
I want to calculate the pressure difference between the inlet and outlet of my domain with the following code: Code:
Druckdifferenz { type fieldValueDelta; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; writeControl timeStep; writeInterval 1; log true; writeFields false; operation subtract; region1 { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); log false; writeControl timeStep; writeFields false; regionType patch; name inlet; operation areaAverage; fields ( total(p) ); writeArea true; } region2 { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); log false; writeControl timeStep; writeFields false; regionType patch; name outlet; operation areaAverage; fields ( total(p) ); writeArea true; } } I didn't put it in the controlDict file, more precisely I have a seperate file in the system directory with some other functions I am postprocessing. I call this file with the following code: simpleFoam -postProcess -dict "system/PostProcess_Werte" -latestTime For older versions the code works without problems but now it gives me the following error: --> FOAM IOWarning : Found [v1612] 'functionObjectLibs' entry instead of 'libs' in dictionary "functions.Druckdifferenz" This keyword is 60 months old. --> FOAM Warning : Unknown function type fieldValueDelta Is someone aware of this problem and knows what I have to change? Many thanks for your help and best regards, Daniel Last edited by CFDanielGER; July 15, 2022 at 06:45. |
|
July 18, 2022, 07:08 |
|
#2 |
Senior Member
|
Hi Daniel,
They changed the name to multiFieldValue for version 2112. The warning just means you can use libs instead of functionObjectLibs in the controlDict. Best Regards, Tom |
|
July 18, 2022, 08:26 |
|
#3 |
Member
Daniel
Join Date: May 2018
Posts: 43
Rep Power: 8 |
Many thanks for your answer Tom. My complete code looks now like this:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2112 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object functionObject; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // functions { pressureDropInletOutlet { type multiFieldValue; libs (fieldFunctionObjects); operation subtract; region1 { type surfaceFieldValue; libs (fieldFunctionObjects); log false; writeControl timeStep; writeFields false; regionType patch; name inlet; operation areaAverage; fields (total(p)); } region2 { type surfaceFieldValue; libs (fieldFunctionObjects); log false; writeControl timeStep; writeFields false; regionType patch; name outlet; operation areaAverage; fields (total(p)); } } } Code:
--> FOAM FATAL IO ERROR: (openfoam-2112) Entry 'type' not found in dictionary "functions.pressureDrop" file: functions.pressureDrop at line 21 to 48. From bool Foam::dictionary::readEntry(const Foam::word&, T&, Foam::keyType::option, bool) const [with T = Foam::word] in file lnInclude/dictionaryTemplates.C at line 322. FOAM exiting |
|
July 18, 2022, 08:36 |
|
#4 |
Senior Member
|
Hi,
It is a bit weird that is says functions.pressureDrop instead of functions.pressureDropInletOutlet, so maybe the issue is in the controlDict, or the naming of the file when you issue the command? Or it is because you have the call to the functions in there? I can only guess based on the information you share. I Hope that some of these questions help you find your issue, I do not see any obvious syntax error in the example you provide. Cheers, Tom |
|
March 16, 2023, 13:20 |
|
#5 | |
Member
Join Date: Aug 2017
Location: Algeria
Posts: 98
Rep Power: 9 |
Quote:
This is the syntax according to the documentation: Code:
multiFieldValue1 { // Mandatory entries type multiFieldValue; libs (fieldFunctionObjects); operation average; // List of fieldValue function objects as dictionaries functions { region1 { ... // Optional resultFields (field1 field2); } region2 { ... // Optional resultFields (field1 field2); } ... regionN { ... // Optional resultFields (field1 field2); } } }
__________________
"When in doubt, use brute force." -- Ken Thompson |
||
March 17, 2023, 02:49 |
|
#6 |
Member
Daniel
Join Date: May 2018
Posts: 43
Rep Power: 8 |
Sorry for not updating this post. I got it working. I created a file called pressureDrop in the system directory and the code looks now like this:
Code:
type multiFieldValue; //fieldValueDelta; multiFieldValue; libs (fieldFunctionObjects); operation subtract; functions { region1 { type surfaceFieldValue; libs (fieldFunctionObjects); log false; writeControl timeStep; writeFields false; regionType patch; name inlet; operation areaAverage; fields (total(p)); } region2 { type surfaceFieldValue; libs (fieldFunctionObjects); log false; writeControl timeStep; writeFields false; regionType patch; name outlet; operation areaAverage; fields (total(p)); } } Code:
#includeFunc pressureDrop |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building OpenFOAM1.7.0 from source | ata | OpenFOAM Installation | 46 | March 6, 2022 14:21 |
error compiling modified applications | yvyan | OpenFOAM Programming & Development | 21 | March 1, 2016 05:53 |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 10:31 |
CGNS lib and Fortran compiler | manaliac | Main CFD Forum | 2 | November 29, 2010 07:25 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |