|
[Sponsors] |
request for a field in object registry failed |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 4 ![]() |
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"); Code:
volScalarField cellVolu ( IOobject ( "cellVolu", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedScalar("zero", dimVolume, 0.0) ); cellVolu.ref() = mesh.V(); 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) Thanks in advance ![]() |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 4 ![]() |
problem solved.
For guys who had similar problem add cellVolu subroutine before start of construction of mixture model. |
|
![]() |
![]() |
![]() |
Tags |
compressibleinterfoam, interfoam, openfoam, openfoam 8 |
|
|
![]() |
||||
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 |