CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

request for a field in object registry failed

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

Like Tree1Likes
  • 1 Post By saicharan662000@gmail.com

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2022, 05:50
Smile request for a field in object registry failed
  #1
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
Hello Foamers,
I am trying to acess the cell volumes in a sub routine I wrote in twoPhaseMixtureThermo.C in compressibleInterfoam


I declared the variable for storing volume of cell as shown below
Code:
const volScalarField& cellVolume = alpha1().db().lookupObject<volScalarField>("cellVolu");
And In createFields.H I coded cellVolu as shown below.
Code:
volScalarField cellVolu
    (
    IOobject
       (
        "cellVolu",
        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::NO_WRITE
       ),
        mesh,
    dimensionedScalar("zero", dimVolume, 0.0)
    );
    cellVolu.ref() = mesh.V();
I compiled solver but I got an error . I am attaching it below.
Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 8-1c9b5879390b
Exec   : myCompressibleInterFoam_1
Date   : Feb 04 2022
Time   : 16:09:02
Host   : "hari"
PID    : 22278
I/O    : uncollated
Case   : /home/hari/OpenFOAM/hari-8/run/damBreakcomp_3
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

Create mesh for time = 0


PIMPLE: No convergence criteria found


PIMPLE: Operating solver in transient mode with 1 outer corrector
PIMPLE: Operating solver in PISO mode


Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Constructing twoPhaseMixtureThermo

Reading field interfaceArea



--> FOAM FATAL ERROR: 

    request for volScalarField cellVolu from objectRegistry region0 failed
    available objects of type volScalarField are

9
(
thermo:mu
interfaceProperties:K
thermo:psi
alpha.water
p_rgh
p
T
alpha.air
thermo:alpha
)


    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]
    in file /opt/openfoam8/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 211.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/home/hari/OpenFOAM/hari-8/platforms/linux64GccDPInt32Opt/bin/myCompressibleInterFoam_1"
#3  Foam::twoPhaseMixtureThermo::interfaceArea() const at ??:?
#4  Foam::twoPhaseMixtureThermo::mDotAlphal() const at ??:?
#5  Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
#6  ? in "/home/hari/OpenFOAM/hari-8/platforms/linux64GccDPInt32Opt/bin/myCompressibleInterFoam_1"
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  ? in "/home/hari/OpenFOAM/hari-8/platforms/linux64GccDPInt32Opt/bin/myCompressibleInterFoam_1"
Aborted (core dumped)
Can anyone tell me How to resolve it??
Thanks in advance
saicharan662000@gmail.com is offline   Reply With Quote

Old   February 9, 2022, 23:45
Default
  #2
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
problem solved.
For guys who had similar problem add cellVolu subroutine before start of construction of mixture model.
heba_alaaeldin likes this.
saicharan662000@gmail.com is offline   Reply With Quote

Reply

Tags
compressibleinterfoam, interfoam, openfoam, openfoam 8

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
GAMG crash fxzf OpenFOAM Running, Solving & CFD 6 June 5, 2018 05:09
Transient boundary conditions Jarrod Sinclair (Sinclair) OpenFOAM Running, Solving & CFD 133 May 6, 2015 06:21
[OpenFOAM] could not open file .vtk in paraview ali_atrian ParaView 8 August 27, 2014 10:31
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51


All times are GMT -4. The time now is 07:13.