|
[Sponsors] |
November 13, 2021, 23:33 |
Errors when using pimpleFoam with a New BC
|
#1 |
New Member
Zhang Qibo
Join Date: Oct 2021
Posts: 7
Rep Power: 4 |
Hello,
I am newbie to OpenFOAM. I am using OpenFOAM v8. I would like to code a new BC which couples `timeVaryingMappedFixedValue` BC and `inletOutlet` BC. After interpolating the values from a set of supplied points in space and time, the typs of BC ('into of domain' or 'out of domain' ) would be determined by the sign of the flus across patch faces. - Positive flux (out of domain): apply zero-gradient condition - Negative flux (into of domain): apply the interpolation values as fixed-value The new BC, named 'timeVaryingInletOutlet' can be well compiled. But I get the error message as belows when I run "decomposePar" on a test case based on pimpleFoam: Code:
--> FOAM FATAL ERROR: request for surfaceScalarField phi from objectRegistry region0 failed available objects of type surfaceScalarField are 0() From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>] in file /home/gareth/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 211. I have searched for relevant problems on this forum, but I have not found a solution to my case. Here is the `updateCoeffs` function of myCode, which is related to flux: Code:
template<class Type> void Foam::timeVaryingInletOutletFvPatchField<Type>::updateCoeffs() { if (this->updated()) { return; } this->operator==(fieldMapper_.map()); // copied from the source file of 'inletOutlet' boundary const Field<scalar>& phip = this->patch().template lookupPatchField<surfaceScalarField, scalar> ( phiName_ ); this->valueFraction() = 1.0 - pos0(phip); // fixedValueFvPatchField<Type>::updateCoeffs(); } Code:
FatalErrorInFunction << nl << " request for " << Type::typeName << " " << name << " from objectRegistry " << this->name() << " failed\n available objects of type " << Type::typeName << " are" << nl << names<Type>(); if (cacheTemporaryObject(name)) { FatalErrorInFunction << nl << " request for " << name << " from objectRegistry " << this->name() << " to be cached failed" << nl << " available temporary objects are" << nl << temporaryObjects_; } FatalErrorInFunction // line 211 << abort(FatalError); // line 212 } return NullObjectRef<Type>(); All regards! Gareth |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building OpenFOAM1.7.0 from source | ata | OpenFOAM Installation | 46 | March 6, 2022 13:21 |
pimpleDyMFoam computation randomly stops | babapeti | OpenFOAM Running, Solving & CFD | 5 | January 24, 2018 05:28 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 04:03 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 02:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |