CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] objectRegistry error with Postprocessing Function Objects (https://www.cfd-online.com/Forums/openfoam-meshing/130703-objectregistry-error-postprocessing-function-objects.html)

iuginio March 3, 2014 05:47

objectRegistry error with Postprocessing Function Objects
 
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 March 4, 2014 11:43

solved!

Code:

mirrorMesh -noFunctionObjects

chriss85 December 16, 2015 06:21

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.

victor13165 June 28, 2021 10:46

[volIntegrate] Unable to integrate over cellZone
 
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

jherb June 29, 2021 17:03

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

victor13165 June 30, 2021 03:45

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... :)


All times are GMT -4. The time now is 18:14.