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

[mesh manipulation] objectRegistry error with Postprocessing Function Objects

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 4 Post By iuginio

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2014, 05:47
Default objectRegistry error with Postprocessing Function Objects
  #1
New Member
 
eugenio l
Join Date: Feb 2014
Posts: 3
Rep Power: 12
iuginio is on a distinguished road
Hello,

I am a new OpenFoam user and I am simulating a valve with icoFoam solver.
The cylindrical housing is modelled with blockMesh followed by a double call to MirrorMesh, then the plate geometry is imported through .stl file and SnappyHexMesh.
The meshing process and the simulation worked fine.

Since I need to calculate the forces on the plate, I used the PostProcessing function Objects "forces", adding the corresponding entries in controlDict. With the introduction of these mirrorMesh reports an error:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : mirrorMesh
Date   : Mar 03 2014
Time   : 11:10:47
Host   : "eugenio-desktop"
PID    : 7743
Case   : /home/eugenio/OpenFOAM/eugenio-2.3.0/run/tutorials/incompressible/icoFoam/checkValve_cylinderSnappy
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time



--> FOAM FATAL ERROR: 

    request for objectRegistry region0 from objectRegistry checkValve_cylinderSnappy failed
    available objects of type objectRegistry are
0()

    From function objectRegistry::lookupObject<Type>(const word&) const
    in file db/objectRegistry/objectRegistryTemplates.C at line 198.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::objectRegistry const& Foam::objectRegistry::lookupObject<Foam::objectRegistry>(Foam::word const&) const at ??:?
#3  Foam::OutputFilterFunctionObject<Foam::forces>::allocateFilter() at ??:?
#4  Foam::OutputFilterFunctionObject<Foam::forces>::start() at ??:?
#5  Foam::functionObjectList::read() at ??:?
#6  Foam::functionObjectList::timeSet() at ??:?
#7  Foam::Time::operator++() at Time.C:?
#8  Foam::Time::operator++(int) at ??:?
#9  
 at ??:?
#10  __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#11  
 at ??:?
Aborted (core dumped)
It seems to complain about "regions", but I haven't done any partitioning in my mesh domain. When excluding the entry "functions {..}" from controlDict and reintroducing it after the meshing process, the problem arises with the icoFoam solver.

Does anyone experienced a similar problem?

Thank you!
iuginio is offline   Reply With Quote

Old   March 4, 2014, 11:43
Smile
  #2
New Member
 
eugenio l
Join Date: Feb 2014
Posts: 3
Rep Power: 12
iuginio is on a distinguished road
solved!

Code:
mirrorMesh -noFunctionObjects
iuginio is offline   Reply With Quote

Old   December 16, 2015, 06:21
Default
  #3
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
Has anyone managed to get this working properly? I see the same error when I try to use this function object to calculate field averages in cellZones in a parallel case with a single region:
Quote:
functions
{
bufferVolume
{
type cellSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
outputInterval 1;
log true; // log to screen?
valueOutput true; // Write values at run-time output times?
source cellZone; // cellZone or all
sourceName bufferVolume;
operation volAverage;
fields
(
p
);
}
}
I get the same error except for the case name. Does the solver need any special code to support function objects?
Quote:
request for objectRegistry region0 from objectRegistry checkValve_cylinderSnappy failed available objects of type objectRegistry are 0()
Edit: If I add this to controlDict when the solver is already running it works for me.
chriss85 is offline   Reply With Quote

Old   June 28, 2021, 10:46
Default [volIntegrate] Unable to integrate over cellZone
  #4
New Member
 
Victor Baconnet
Join Date: Apr 2021
Location: Cannes, France
Posts: 9
Rep Power: 5
victor13165 is on a distinguished road
Hello everyone,

I stumbled upon the exact same problem, just wanted to ask again, maybe someone will be able to help in 2021

I am using interFoam to simulate wave breaking on coastal structures. To measure how much water has crossed a particular structure, I would like to calculate \int \alpha dV "downstream" of the structure, using the volFieldValue and the volIntegrate operation.

Because I only want to measure the volume of water in a type of sink downstream of the structure, I followed the documentation and added a new cellZone using topoSetDict :

Code:
    {
         name    bacCellSet;
        type    cellSet;
        action  new;
        source  boxToCell;
        box     (21.6 -2 -2) (22.0 2 2); // Overall domain bounding box (-4 -0.01 0) (22 0.99 2)
    }

    {
        name    bac;   //This is the cellZone I will be using
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        set     bacCellSet;
    }
I then specified that cellZone into the volFieldValue function objet in system/controlDict:


Code:
     waterVolume
     {
        type            volFieldValue;
        libs            ("libfieldFunctionObjects.so");
        log             true;

        enabled         true;

        writeControl    timeStep;
        writeInterval   1;

        writeFields     true;

        regionType      cellZone;
        region          bac;

        operation       volIntegrate;
        fields
        (
            alpha.water
        );
    }
However, when running the simulation, I get the following warning:
Code:
--> FOAM Warning :

    request for objectRegistry bac from objectRegistry isoADVECTOR_irreguliere_Tp9.5s_Hs2.8m_gamma1.0_N70_RAFFINE1processor0 failed
    available objects of type objectRegistry are
1(region0)
The highlighted part of the error message is my case directory name, but I found it weird that "processor0" was added right after it, instead of "/processor0", which would make it look more like a path.

I get the same error message when running in sequential (not in parallel).

I have no idea where this could come from, as I have never encountered the "objectRegistry" word before.


Cheers,


Victor
victor13165 is offline   Reply With Quote

Old   June 29, 2021, 17:03
Default
  #5
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
I think, you problem is this line
Code:
region          bac;
Regions are used in the chtMultiRegionFoam solver. I think you want "name" or something else.

See e.g. https://github.com/OpenFOAM/OpenFOAM...oneAverage#L21
jherb is offline   Reply With Quote

Old   June 30, 2021, 03:45
Default
  #6
New Member
 
Victor Baconnet
Join Date: Apr 2021
Location: Cannes, France
Posts: 9
Rep Power: 5
victor13165 is on a distinguished road
Thanks Joachim, using "name" worked perfectly.



I just checked the documentation (https://www.openfoam.com/documentati...ieldValue.html), it turns out "name" was the correct entry to use. I don't know how I came up with "region"...


Would not have been mad if I had received a RTFM...
victor13165 is offline   Reply With Quote

Reply

Tags
functionobject, mirrormesh, objectregistry, openfoam 2.2.x

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How to use the data generated by function objects at run-time? bigfeather OpenFOAM 1 November 1, 2016 05:55
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 04:06
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 06:27


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