|
[Sponsors] |
Dictionary Error for binaryAbsorptionEmission |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 30, 2023, 17:53 |
Dictionary Error for binaryAbsorptionEmission
|
#1 |
New Member
Peter Bevington
Join Date: May 2023
Posts: 10
Rep Power: 3 |
Hi all, I'm getting an error while trying to use the binaryAbsorptionEmission model for radiation modeling:
Code:
... Selecting radiationModel fvDOM Selecting absorptionEmissionModel binaryAbsorptionEmission --> FOAM FATAL IO ERROR: (openfoam-2012) Entry 'model1' not found in dictionary "/scratch1/09374/pbevingt/OpenFOAM2012/run/coalJet/constant/radiationProperties" file: /scratch1/09374/pbevingt/OpenFOAM2012/run/coalJet/constant/radiationProperties at line 18 to 97. From Foam::dictionary &Foam::dictionary::subDict(const Foam::word &, Foam::keyType::option) in file db/dictionary/dictionary.C at line 557. FOAM exiting Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object radiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // radiation on; radiationModel fvDOM; P1Coeffs { C C [0 0 0 0 0 0 0] 0; } fvDOMCoeffs { nPhi 4; // azimuthal angles in PI/2 on X-Y.(from Y to X) nTheta 2; // polar angles in PI (from Z to X-Y plane) tolerance 0.05; // convergence tolerance for radiation iteration maxIter 1; // maximum number of iterations } // Number of flow iterations per radiation iteration solverFreq 10; absorptionEmissionModel binaryAbsorptionEmission; binaryAbsorptionEmissionCoeffs { model1 { absorptionEmissionModel wsggAbsorptionEmission; constantAbsorptionEmissionCoeffs { absorptivity absorptivity [0 -1 0 0 0 0 0] 0.5; emissivity emissivity [0 -1 0 0 0 0 0] 0.5; E E [1 -1 -3 0 0 0 0] 0; } greyMeanAbsorptionEmissionCoeffs { lookUpTableFileName none; EhrrCoeff 0.2; } wsggAbsorptionEmissionCoeffs { meanBeamPathAutoCalcMode true; sector sector [ 0 0 0 0 0 0 0] 360.0; //Degrees pathLength pathLength [ 0 1 0 0 0 0 0] 0.1; //m emissivityCoeffs 3( 0.4201 6.516 131.9 ); fittingFactors 3 ( 4(6.508e-1 -5.551e-4 3.029e-7 -5.353e-11) 4(-0.2504e-1 6.112e-4 -3.882e-7 6.528e-11) 4(2.718e-1 -3.118e-4 1.221e-7 -1.612e-11) ); } } model2 { absorptionEmissionModel cloudAbsorptionEmission; cloudAbsorptionEmissionCoeffs { cloudNames ( coalCloud1 ); } } } scatterModel none; cloudScatterCoeffs { cloudNames ( coalCloud1 ); } transmissivityModel none; // ************************************************************************* // Code:
Foam::radiation::binaryAbsorptionEmission::binaryAbsorptionEmission ( const dictionary& dict, const fvMesh& mesh ) : absorptionEmissionModel(dict, mesh), coeffsDict_(dict.optionalSubDict(typeName + "Coeffs")), model1_ ( absorptionEmissionModel::New(coeffsDict_.subDict("model1"), mesh) ), model2_ ( absorptionEmissionModel::New(coeffsDict_.subDict("model2"), mesh) ) {} |
|
May 31, 2023, 06:32 |
|
#2 |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 6 |
Hey
I am not familiar with this model, but did you try to define model1 and model2 outside of binaryAbsorptionEmissionCoeffs? The way the error is written lets me think that it might just be a matter of indentation. Maybe try this: Code:
radiation on; radiationModel fvDOM; P1Coeffs { C C [0 0 0 0 0 0 0] 0; } fvDOMCoeffs { nPhi 4; // azimuthal angles in PI/2 on X-Y.(from Y to X) nTheta 2; // polar angles in PI (from Z to X-Y plane) tolerance 0.05; // convergence tolerance for radiation iteration maxIter 1; // maximum number of iterations } // Number of flow iterations per radiation iteration solverFreq 10; absorptionEmissionModel binaryAbsorptionEmission; model1 { absorptionEmissionModel wsggAbsorptionEmission; constantAbsorptionEmissionCoeffs { absorptivity absorptivity [0 -1 0 0 0 0 0] 0.5; emissivity emissivity [0 -1 0 0 0 0 0] 0.5; E E [1 -1 -3 0 0 0 0] 0; } greyMeanAbsorptionEmissionCoeffs { lookUpTableFileName none; EhrrCoeff 0.2; } wsggAbsorptionEmissionCoeffs { meanBeamPathAutoCalcMode true; sector sector [ 0 0 0 0 0 0 0] 360.0; //Degrees pathLength pathLength [ 0 1 0 0 0 0 0] 0.1; //m emissivityCoeffs 3( 0.4201 6.516 131.9 ); fittingFactors 3 ( 4(6.508e-1 -5.551e-4 3.029e-7 -5.353e-11) 4(-0.2504e-1 6.112e-4 -3.882e-7 6.528e-11) 4(2.718e-1 -3.118e-4 1.221e-7 -1.612e-11) ); } } model2 { absorptionEmissionModel cloudAbsorptionEmission; cloudAbsorptionEmissionCoeffs { cloudNames ( coalCloud1 ); } } I can't see any other reason right now sorry |
|
May 31, 2023, 18:58 |
|
#3 |
New Member
Peter Bevington
Join Date: May 2023
Posts: 10
Rep Power: 3 |
I tried that playing around with the dictionary format, though I don't think that is it, as I found a tutorial for coalChemistryFoam that uses the above format and works just fine. This is from tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2212 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object radiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solverFreq 1; radiationModel P1; P1Coeffs { C C [0 0 0 0 0 0 0] 0; } absorptionEmissionModel binaryAbsorptionEmission; binaryAbsorptionEmissionCoeffs { model1 { absorptionEmissionModel constantAbsorptionEmission; constantAbsorptionEmissionCoeffs { absorptivity absorptivity [0 -1 0 0 0 0 0] 0.5; emissivity emissivity [0 -1 0 0 0 0 0] 0.5; E E [1 -1 -3 0 0 0 0] 0; } } model2 { absorptionEmissionModel cloudAbsorptionEmission; cloudAbsorptionEmissionCoeffs { cloudNames ( coalCloud1 limestoneCloud1 ); } } } scatterModel cloudScatter; cloudScatterCoeffs { cloudNames ( coalCloud1 limestoneCloud1 ); } transmissivityModel none; // ************************************************************************* // For reference the error is occuring when we are trying to unpack the subDicts model1 and model2 of the CoeffsDict: (src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/binaryAbsorptionEmissionModel/binaryAbsorptionEmission.C): Code:
Foam::radiation::binaryAbsorptionEmission::binaryAbsorptionEmission ( const dictionary& dict, const fvMesh& mesh ) : absorptionEmissionModel(dict, mesh), coeffsDict_(dict.optionalSubDict(typeName + "Coeffs")), model1_ ( absorptionEmissionModel::New(coeffsDict_.subDict("model1") <-Error is occuring when calling subDict("model1") on the CoeffsDict, mesh) ), model2_ ( absorptionEmissionModel::New(coeffsDict_.subDict("model2"), mesh) ) {} |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dictionary in turbulence model | NewKid | OpenFOAM Programming & Development | 4 | February 18, 2019 22:16 |
driftFluxFoam viscosity model modification problem | dleduc | OpenFOAM Programming & Development | 15 | October 1, 2018 10:37 |
ill defined primitiveEntry starting at keyword 'value' on line 197 ChangeDictionary | Struggle_Achieve | OpenFOAM Pre-Processing | 2 | December 20, 2017 04:58 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |
FoamX error aachenBomb case | Ervin Adorean (Adorean) | OpenFOAM Pre-Processing | 13 | March 7, 2005 04:50 |