View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004215 | OpenFOAM | Bug | public | 2025-02-20 22:22 | 2025-02-20 23:26 |
Reporter | hosseinheydari2013 | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | darwin | OS | mac os | OS Version | Monterey 12.2 |
Product Version | 11 | ||||
Summary | 0004215: codedFunctionObject not working with CHT / foamMultiRun | ||||
Description | One is unable to use coded function object with conjugate heat transfer solvers. The case I tried is simply one of the default tutorial cases at OpenFOAM-11/tutorials/multiRegion/CHT/heatedDuct. If you add the simplest coded function object like the one below : type coded; libs ("libutilityFunctionObjects.so"); codeExecute #{ Info << "Hello" << endl; #}; foamMultiRun will crash with the following error : request for objectRegistry region0 from objectRegistry heatedDuct failed available objects of type objectRegistry are 3 ( metal fluid heater ) It seems like the name which should be used at OpenFOAM/db/objectRegistry/objectRegistryTemplates.C line # 165 is by default as region0 while in CHT objects of type objectRegistry are metal, fluid and heater. | ||||
Steps To Reproduce | 1. use this tutorial : OpenFOAM-11/tutorials/multiRegion/CHT/heatedDuct 2. add the following codedFunctionObject to controlDict->functions : test { type coded; libs ("libutilityFunctionObjects.so"); codeExecute #{ Info << "Hello" << endl; #}; } 3. run the case | ||||
Tags | No tags attached. | ||||
|
log (7,335 bytes)
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 11 \\/ M anipulation | \*---------------------------------------------------------------------------*/ Build : 11-007fffef3499 Exec : foamMultiRun Date : Feb 20 2025 Time : 23:20:51 Host : "" PID : 34095 I/O : uncollated Case : /Users/einstein/OpenFOAM/einstein-11/run/heatedDuct nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1260 dlOpen: using fallback library name "libfluid.dylib" Selecting solver fluid --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1260 dlOpen: using fallback library name "libfluid.dylib" Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } Selecting turbulence model type laminar Selecting laminar stress model Stokes No MRF models present Courant Number mean: 0.000494161 max: 0.00103803 Selecting thermophysical transport type laminar Selecting default laminar thermophysical transport model unityLewisFourier --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1260 dlOpen: using fallback library name "libsolid.dylib" Selecting solver solid --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1260 dlOpen: using fallback library name "libsolid.dylib" Selecting thermodynamics package { type heSolidThermo; mixture pureMixture; transport constIsoSolid; thermo eConst; equationOfState rhoConst; specie specie; energy sensibleInternalEnergy; } Selecting default solid thermophysical transport model isotropic Diffusion Number mean: 0.346574 max: 0.529572 --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1260 dlOpen: using fallback library name "libsolid.dylib" Selecting solver solid --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1260 dlOpen: using fallback library name "libsolid.dylib" Selecting thermodynamics package { type heSolidThermo; mixture pureMixture; transport constIsoSolid; thermo eConst; equationOfState rhoConst; specie specie; energy sensibleInternalEnergy; } Selecting default solid thermophysical transport model isotropic Diffusion Number mean: 0.0885803 max: 0.142947 Creating fvModels from "constant/fvModels" Selecting finite volume model type heatSource Name: energySource - selecting all cells - selected 16800 cell(s) with volume 5.25e-05 PIMPLE: Region fluid PIMPLE: No convergence criteria found PIMPLE: Region metal PIMPLE: No convergence criteria found PIMPLE: Region heater PIMPLE: No convergence criteria found PIMPLE: Operating solver in transient mode with 1 outer corrector PIMPLE: Operating solver in PISO mode Starting time loop --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1260 dlOpen: using fallback library name "libutilityFunctionObjects.dylib" Using dynamicCode for coded test at line 65 in "/Users/einstein/OpenFOAM/einstein-11/run/heatedDuct/system/controlDict/functions/test" --> FOAM FATAL ERROR: request for objectRegistry region0 from objectRegistry heatedDuct failed available objects of type objectRegistry are 3 ( metal fluid heater ) From function const Type &Foam::objectRegistry::lookupObject(const Foam::word &) const [Type = Foam::objectRegistry] in file db/objectRegistry/objectRegistryTemplates.C at line 211. FOAM aborting #0 "Foam::error::printStack(Foam::Ostream&)" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libOpenFOAM.dylib" #1 "Foam::error::abort() (.cold.1)" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libOpenFOAM.dylib" #2 "Foam::error::abort()" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libOpenFOAM.dylib" #3 "Foam::objectRegistry const& Foam::objectRegistry::lookupObject<Foam::objectRegistry>(Foam::word const&) const" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libOpenFOAM.dylib" #4 "Foam::functionObjects::regionFunctionObject::regionFunctionObject(Foam::word const&, Foam::Time const&, Foam::dictionary const&)" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libOpenFOAM.dylib" #5 "Foam::functionObject::addRemovabledictionaryConstructorToTable<Foam::testFunctionObject>::New(Foam::word const&, Foam::Time const&, Foam::dictionary const&)" in "/Users/einstein/OpenFOAM/einstein-11/run/heatedDuct/dynamicCode/platforms/darwin64ClangDPInt32Opt/lib/libtest_ef762ed56d78c088817cfe787be73cba205efdd4.dylib" #6 "Foam::functionObject::New(Foam::word const&, Foam::Time const&, Foam::dictionary const&)" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libOpenFOAM.dylib" #7 "Foam::codedFunctionObject::redirectFunctionObject() const" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libutilityFunctionObjects.dylib" #8 "Foam::codedFunctionObject::codedFunctionObject(Foam::word const&, Foam::Time const&, Foam::dictionary const&)" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libutilityFunctionObjects.dylib" #9 "Foam::functionObject::adddictionaryConstructorToTable<Foam::codedFunctionObject>::New(Foam::word const&, Foam::Time const&, Foam::dictionary const&)" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libutilityFunctionObjects.dylib" #10 "Foam::functionObject::New(Foam::word const&, Foam::Time const&, Foam::dictionary const&)" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libOpenFOAM.dylib" #11 "Foam::functionObjectList::read()" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libOpenFOAM.dylib" #12 "Foam::functionObjectList::start()" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libOpenFOAM.dylib" #13 "Foam::Time::run() const" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/lib/libOpenFOAM.dylib" #14 "main" in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/bin/foamMultiRun" #15 ? in "/Users/einstein/OpenFOAM/OpenFOAM-11/platforms/darwin64ClangDPInt32Opt/bin/foamMultiRun" |
|
User error. You haven't specified the region the functionObject applies to. |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-02-20 22:22 | hosseinheydari2013 | New Issue | |
2025-02-20 22:22 | hosseinheydari2013 | File Added: log | |
2025-02-20 23:26 | henry | Assigned To | => henry |
2025-02-20 23:26 | henry | Status | new => closed |
2025-02-20 23:26 | henry | Resolution | open => no change required |
2025-02-20 23:26 | henry | Note Added: 0013531 |