|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Jun 2023
Location: Brest
Posts: 21
Rep Power: 3 ![]() |
Hello everyone,
I am trying to run reactingFoam with two non-reacting gases (Air &CH4), the combustion is turned to off, and the idea is to study the dispersion of CH4 in Air, CH4 coming into the domain through a pipe. I get this error message and I really don't know where the problem comes from, I am waiting for your suggestions. Code:
From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>] [13] in file /home/mbaron/OpenFOAM/OpenFOAM-10/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 211. [13] FOAM parallel run aborting [13] [1] --> FOAM FATAL ERROR: [1] request for volScalarField none from objectRegistry region0 failed available objects of type volScalarField are 20 ( Air thermo:kappa thermo:mu thermo:psi nut K pPrevIter h Cv rho rAU k Cp dpdt CH4 alphat p T thermo:rho epsilon ) There are some elements of code : Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 10 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { format ascii; class dictionary; location "constant"; object physicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "thermo.compressibleGas" thermoType { type heRhoThermo; mixture multiComponentMixture; transport const; thermo hConst; energy sensibleEnthalpy; equationOfState perfectGas; specie specie; } defaultSpecie Air; Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 10 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { format ascii; class dictionary; location "constant"; object thermo.compressibleGas; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // species ( CH4 Air ); CH4 { specie { molWeight 16.0428; } thermodynamics { Cp 1004.4; Hf 0; } transport { mu 1.831e-05; Pr 0.705; } } Air { specie { molWeight 28.965; } thermodynamics { Cp 2232; Hf 0; } transport { mu 1,0245E-4 ; Pr 1.7; } } |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Jun 2023
Location: Brest
Posts: 21
Rep Power: 3 ![]() |
If that helps, there is the initializing of the computation log :
Code:
Selecting thermodynamics package { type heRhoThermo; mixture multiComponentMixture; transport const; thermo hConst; energy sensibleEnthalpy; equationOfState perfectGas; specie specie; } Reading field U Reading/calculating face flux field phi Creating turbulence model. Selecting turbulence model type RAS Selecting RAS turbulence model kEpsilon RAS { model kEpsilon; turbulence on; printCoeffs on; Cmu 0.09; C1 1.44; C2 1.92; C3 0; sigmak 1; sigmaEps 1.3; } Creating thermophysical transport model Selecting thermophysical transport type RAS Selecting default RAS thermophysical transport model unityLewisEddyDiffusivity Creating reaction model Selecting combustion model none Creating field dpdt Creating field kinetic energy K No MRF models present No fvModels present Creating fvConstraints from "system/fvConstraints" No fvConstraints present Courant Number mean: 0.000219089 max: 0.769249 Starting time loop Courant Number mean: 0.000219089 max: 0.769249 Time = 0.0001s DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 0.0379833, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 1, Final residual = 0.0406668, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 1, Final residual = 0.0326282, No Iterations 1 DILUPBiCGStab: Solving for CH4, Initial residual = 1, Final residual = 8.5174e-07, No Iterations 80 DILUPBiCGStab: Solving for h, Initial residual = 1, Final residual = 0.0799472, No Iterations 25 min/max(T) = -5942.7, 605.559 |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
M
Join Date: Dec 2017
Posts: 692
Rep Power: 12 ![]() |
What does the controlDict and its includes look like?
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Join Date: Jun 2023
Location: Brest
Posts: 21
Rep Power: 3 ![]() |
This is what I have in my control Dict, the time step was calculated to have CFL <1.
Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 10 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application reactingFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 5; deltaT 0.0001; writeControl timeStep; writeInterval 100; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 7; runTimeModifiable true; |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Join Date: Jun 2023
Location: Brest
Posts: 21
Rep Power: 3 ![]() |
I opened the objectRegistryTemplates.C directory, but I don't really understand how the error is appearing.
Code:
#include "objectRegistry.H" #include "stringListOps.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> Foam::wordList Foam::objectRegistry::names() const { wordList objectNames(size()); label count=0; forAllConstIter(HashTable<regIOobject*>, *this, iter) { if (isA<Type>(*iter())) { objectNames[count++] = iter()->name(); } } objectNames.setSize(count); return objectNames; } template<class Type> Foam::wordList Foam::objectRegistry::names(const wordRe& name) const { wordList objectNames(size()); label count = 0; forAllConstIter(HashTable<regIOobject*>, *this, iter) { if (isA<Type>(*iter())) { const word& objectName = iter()->name(); if (name.match(objectName)) { objectNames[count++] = objectName; } } } objectNames.setSize(count); return objectNames; } template<class Type> Foam::wordList Foam::objectRegistry::names(const wordReList& patterns) const { wordList names(this->names<Type>()); return wordList(names, findStrings(patterns, names)); } template<class Type> Foam::HashTable<const Type*> Foam::objectRegistry::lookupClass ( const bool strict ) const { HashTable<const Type*> objectsOfClass(size()); forAllConstIter(HashTable<regIOobject*>, *this, iter) { if ( (strict && isType<Type>(*iter())) || (!strict && isA<Type>(*iter())) ) { objectsOfClass.insert ( iter()->name(), dynamic_cast<const Type*>(iter()) ); } } return objectsOfClass; } template<class Type> Foam::HashTable<Type*> Foam::objectRegistry::lookupClass ( const bool strict ) { HashTable<Type*> objectsOfClass(size()); forAllIter(HashTable<regIOobject*>, *this, iter) { if ( (strict && isType<Type>(*iter())) || (!strict && isA<Type>(*iter())) ) { objectsOfClass.insert ( iter()->name(), dynamic_cast<Type*>(iter()) ); } } return objectsOfClass; } template<class Type> bool Foam::objectRegistry::foundObject(const word& name) const { const_iterator iter = find(name); if (iter != end()) { const Type* vpsiPtr_ = dynamic_cast<const Type*>(iter()); if (vpsiPtr_) { return true; } } else if (this->parentNotTime()) { return parent_.foundObject<Type>(name); } return false; } template<class Type> const Type& Foam::objectRegistry::lookupObject(const word& name) const { const_iterator iter = find(name); if (iter != end()) { const Type* vpsiPtr_ = dynamic_cast<const Type*>(iter()); if (vpsiPtr_) { return *vpsiPtr_; } FatalErrorInFunction << nl << " lookup of " << name << " from objectRegistry " << this->name() << " successful\n but it is not a " << Type::typeName << ", it is a " << iter()->type() << abort(FatalError); } else { if (this->parentNotTime()) { return parent_.lookupObject<Type>(name); } 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 << abort(FatalError); } return NullObjectRef<Type>(); } template<class Type> Type& Foam::objectRegistry::lookupObjectRef(const word& name) const { return const_cast<Type&>(lookupObject<Type>(name)); } template<class Object> bool Foam::objectRegistry::cacheTemporaryObject(Object& ob) const { readCacheTemporaryObjects(); if (cacheTemporaryObjects_.size()) { temporaryObjects_.insert(ob.name()); HashTable<Pair<bool>>::iterator iter ( cacheTemporaryObjects_.find(ob.name()) ); // Cache object ob if is in the cacheTemporaryObjects list // and hasn't been cached yet if (iter != cacheTemporaryObjects_.end() && iter().first() == false) { iter().first() = true; iter().second() = true; if (ob.db().template foundObject<Object>(ob.name())) { Object& cachedOb = ob.db().template lookupObjectRef<Object>(ob.name()); // If the object is already cached in the database delete it if (&cachedOb != &ob && cachedOb.ownedByRegistry()) { deleteCachedObject(cachedOb); } } if (debug) { Info<< "Caching " << ob.name() << " of type " << ob.type() << endl; } ob.release(); ob.checkOut(); store(new Object(move(ob))); return true; } else { return false; } } else { return false; } } |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems with PyFoam and batch file! | alfogianco | OpenFOAM Running, Solving & CFD | 0 | January 5, 2022 08:57 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 04:18 |
customized reactingFoam: DecomposePar fatal error | yaqb | OpenFOAM Running, Solving & CFD | 8 | April 18, 2017 04:46 |
[snappyHexMesh] sHM: FATAL ERROR: More than six unsigned transforms detected | Djub | OpenFOAM Meshing & Mesh Conversion | 0 | July 15, 2014 04:43 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 15:16 |