|
[Sponsors] |
Cannot run yPlus function object via controlDict |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 8, 2021, 14:38 |
Cannot run yPlus function object via controlDict
|
#1 |
Member
Bram Kerkhofs1
Join Date: Oct 2016
Posts: 30
Rep Power: 9 |
Dear
So I've compiled OF v2106 but during a run of interFoam i cannot get the yPlus function object to work. the error says while running interFoam: Code:
Starting time loop --> FOAM Warning : Unknown function type yPlus Valid function types : 12 ( BilgerMixtureFraction forceCoeffs forces interfaceHeightAndAvgVelocity patchProbes probes psiReactionThermoMoleFractions psiSpecieReactionRates rhoReactionThermoMoleFractions rhoSpecieReactionRates sets surfaces ) Code:
functions { yPlus1 { type yPlus; libs (fieldFunctionObjects); writeControl timeStep; } } Code:
grep -r "<valid function object name>" | grep "linux64GccDPInt32Opt/lib" The yPlus function object isn't present in the libfieldFunctionObjects.so , while according to "/home/bram/OpenFOAM/OpenFOAM-v2106/src/functionObjects/field/Make/files" it should be added to "LIB = $(FOAM_LIBBIN)/libfieldFunctionObjects" yPlus is present in other libs, e.g. the libturbulenceModels.so. So I tried to use Code:
libs (turbulenceModels); For the record: I didn't change anything to any files, so I don't understand why it doesn't work. Last edited by brammekeuh987; October 9, 2021 at 02:12. |
|
October 9, 2021, 17:28 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 727
Rep Power: 14 |
Your syntax is wrong. Try:
Code:
functions { yPlus1 { type yPlus; libs ("fieldFunctionObjects.so"); writeControl timeStep; } } |
|
October 11, 2021, 04:40 |
|
#3 |
Member
Bram Kerkhofs1
Join Date: Oct 2016
Posts: 30
Rep Power: 9 |
Hi
Thanks for the effort! But the suggested syntax doesn't solve the problem. The syntax that I use comes from the User Guide and is also used in some tutorials (which also don't work) user guide: https://www.openfoam.com/documentati...eld-yPlus.html |
|
October 11, 2021, 04:44 |
|
#4 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 727
Rep Power: 14 |
Aaah - apologies, I was talking about the foundation version, where the syntax is different.
What do you get if you type: Code:
postProcess -list |
|
October 11, 2021, 05:00 |
|
#5 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,172
Rep Power: 27 |
Hi,
Bram, how did you install OpenFOAM? Did you compile it yourself? Using OpenFOAM-v2106, I just ran the weirOverflow tutorial with the yPlus function using this syntax: Code:
functions { yPlus1 { type yPlus; libs (fieldFunctionObjects); } } For the record, here is the output of the command postProcess -list suggested by Tobermory : Code:
Available configured functionObjects: 64 ( AMIWeights CourantNo LambVector Lambda2 MachNo ObukhovLength PecletNo Q R XiReactionRate add boundaryCloud cellMax cellMin components ddt div dsmcFields energySpectrum enstrophy faceMax faceMin fieldMinMax flowRateFaceZone flowRatePatch flowType forceCoeffsCompressible forceCoeffsIncompressible forcesCompressible forcesIncompressible grad heatTransferCoeff internalCloud log mag magSqr minMaxComponents minMaxMagnitude patchAverage patchIntegrate pressureDifferencePatch pressureDifferenceSurface probes processorField randomise scalarTransport singleGraph solverInfo staticPressure streamFunction streamlines subtract surfaces totalPressureCompressible totalPressureIncompressible turbulenceFields volFlowRateSurface vorticity wallHeatFlux wallShearStress writeCellCentres writeCellVolumes writeObjects yPlus ) |
|
October 11, 2021, 05:36 |
|
#6 |
Member
Bram Kerkhofs1
Join Date: Oct 2016
Posts: 30
Rep Power: 9 |
Hi
When I run the postProcess -list, I also get the 64 options and yPlus is among them. But when I run it in the controldict, it only shows 12 options (the ones in the earlier post) I was also guessing that something went wrong during compilation, and Yann's answer also makes it clear that it should work (so it isn't a general bug or so). But I can't figure out what . Even my custom function objects are available when i run it in the controlDict ( interfaceHeightAndAvgVelocity ); the custom function is not available when i run the "postProcess -list", but that's not an issue. When I execute the Allwmake file in the /OpenFOAM-v2106/src/functionObjects folder i get this: Code:
wmake field wmake forces wmake initialisation wmake lagrangian wmake utilities wmake solvers wmake libso (randomProcesses) |
|
October 12, 2021, 09:38 |
|
#7 |
Member
Bram Kerkhofs1
Join Date: Oct 2016
Posts: 30
Rep Power: 9 |
So I ran the Allwmake script again in the general OpenFOAM-v2106 directory, by:
Code:
./Allwmake -j 6 -s -q -l Now when I run interfoam, I only have 10 options left: Code:
Valid function types : 10(BilgerMixtureFraction interfaceHeightAndAvgVelocity patchProbes probes psiReactionThermoMoleFractions psiSpecieReactionRates rhoReactionThermoMoleFractions rhoSpecieReactionRates sets surfaces) When I have my libs like this: Code:
libs (fieldFunctionObjects, forces); Code:
--> FOAM Warning : From void* Foam::dlLibraryTable::openLibrary(const Foam::fileName&, bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 188 Could not load "fieldFunctionObjects," libfieldFunctionObjects,.so: cannot open shared object file: No such file or directory --> FOAM Warning : Unknown function type yPlus Valid function types : 8(forceCoeffs forces patchProbes probes psiReactionThermoMoleFractions rhoReactionThermoMoleFractions sets surfaces) Code:
libs (fieldFunctionObjects forces); So the hunt is now on for why only my BilgerMixtureFraction is loaded.... @Yann: any idea why your installation doesn't have the BilgerMixtureFraction available? I've never used it and have no idea what it does.... |
|
October 12, 2021, 10:33 |
|
#8 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,172
Rep Power: 27 |
Hi Bram,
The BilgerMixtureFraction function object seems to be related to combustion applications. (I never used it, I'm only referring to the documentation) It doesn't appear in the output of postProcess -list because this function is not available in the postProcess utility (this is stated in the link above) I tried running the weirOverflow tutorial using the banana trick: Code:
functions { yPlus1 { // Mandatory entries (unmodifiable) type banana; libs (fieldFunctionObjects); } } Code:
--> FOAM Warning : Unknown function type banana Valid function types : 83 ( AMIWeights BilgerMixtureFraction CourantNo Curle DESModelRegions DMD LambVector Lambda2 MachNo PecletNo Q XiReactionRate add blendingFactor columnAverage components continuityError ddt ddt2 derivedFields div enstrophy externalCoupled extractEulerianParticles fieldAverage fieldCoordinateSystemTransform fieldExtents fieldMinMax flowType flux fluxSummary grad heatTransferCoeff histogram interfaceHeight limitFields log mag magSqr mapFields momentum momentumError multiFieldValue multiply nearWallFields particleDistribution patchProbes pow pressure probes processorField proudmanAcousticPower psiReactionThermoMoleFractions psiReactionsSensitivityAnalysis psiSpecieReactionRates randomise readFields reference regionSizeDistribution rhoReactionThermoMoleFractions rhoReactionsSensitivityAnalysis rhoSpecieReactionRates setFlow sets stabilityBlendingFactor streamFunction streamLine subtract surfaceDistance surfaceFieldValue surfaceInterpolate surfaces turbulenceFields valueAverage volFieldValue vorticity wallBoundedStreamLine wallHeatFlux wallShearStress writeCellCentres writeCellVolumes yPlus zeroGradient ) From static Foam::autoPtr<Foam::functionObject> Foam::functionObject::New(const Foam::word&, const Foam::Time&, const Foam::dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 117. --> loading function object 'yPlus1' Are you loading other libraries in your controlDict or somewhere else in your case? You mentioned a custom function object. Your problem might be related to your custom code compilation messing up existing libraries. You may want to download and compile a fresh source code without including any custom code. It could help to find out if there is an issue with the way you compile your custom code. I hope this helps, Yann |
|
October 12, 2021, 10:59 |
|
#9 |
Member
Bram Kerkhofs1
Join Date: Oct 2016
Posts: 30
Rep Power: 9 |
Hi Yann
I found the issue. My custom function object is indeed messing up the installation. My main mistake was that in the Make/files - file I still had the Code:
LIB = $(FOAM_LIBBIN)/libfieldFunctionObject Code:
wclean wmake The 'Allwmake.sh" file doesn't preform a 'wclean', so it found the libfieldFunctionObject.so and skipped compiling it I guess. so my fix was actually preforming a wclean and wmake in the /OpenFOAM/OpenFOAM-v2106/src/functionObjects/field directory To Yann and Tobermory: Thanks a lot for your help!! |
|
October 14, 2021, 09:55 |
|
#10 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 727
Rep Power: 14 |
Well found Bram - and thanks for coming back with the solution at the end; that may help a future reader with the same issue.
|
|
Tags |
compilation, functionobjects |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to access force values calculated by the function object. | gigili206 | OpenFOAM Programming & Development | 1 | June 27, 2023 11:15 |
interFoam and scalarTransport function object with fvOptions sources | fusij | OpenFOAM Running, Solving & CFD | 4 | April 18, 2022 07:12 |
error in fireFoam, when running the case wallFireSpread2D | zhoubiao1088 | OpenFOAM Running, Solving & CFD | 9 | February 1, 2018 18:45 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 04:37 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 10:23 |