CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Error when accessing Cp with swakThermoTurbFunctionPlugin

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2015, 13:25
Default Error when accessing Cp with swakThermoTurbFunctionPlugin
  #1
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Dear foamers,

I have a little problem with the swakThermoTurbFunctionPlugin. I am using OF 2.3.x and chtMultiRegionFoam solver. My intention is to use the Cp value from the thermophysicalProperties file from a solid region for further calculations using swak4foam. So as to access its value I thought about using swakThermoTurbFunctionPlugin. This is my definition in controlDict:
Code:
functions
{
    thermo_Cp
    {
        type            expressionField;
        region          fasana;
        fieldName       Cp;
        expression      "thermo_Cp()";
        autowrite       true;
    }

...
}

libs (
    "libgroovyBC.so"
    "libsimpleFunctionObjects.so"
    "libsimpleSwakFunctionObjects.so"
    "libswakFunctionObjects.so"
    "libgroovyStandardBCs.so"
    "libswakThermoTurbFunctionPlugin.so"
);
I guess that this is the correct call to the Cp value from the solid region... However, when I run the solver I get this error message:
Code:
--> FOAM FATAL IO ERROR: 
Attempt to return dictionary entry as a primitive

file: /home/cfd/OpenFOAM/cfd-2.3.x/run/PFC/Alternativa/Proves/habitacle_senser/proves_field_creation/constant/fasana/thermophysicalProperties.thermoType from line 19 to line 25.

    From function ITstream& primitiveEntry::stream() const
    in file db/dictionary/dictionaryEntry/dictionaryEntry.C at line 83.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::IOerror::abort() at ??:?
#2  Foam::dictionaryEntry::stream() const at ??:?
#3  Foam::swakThermophysicalPluginFunction::thermoInternal(Foam::fvMesh const&) at ??:?
#4  Foam::swakThermophysicalPluginFunction_Cp::doEvaluation() at ??:?
#5  Foam::CommonPluginFunction::evaluateInternal(Foam::string const&, int&) at ??:?
#6  Foam::autoPtr<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::FieldValueExpressionDriver::evaluatePluginFunction<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&, parserField::location const&, int&) at ??:?
#7  parserField::FieldValueExpressionParser::parse() at ??:?
#8  Foam::FieldValueExpressionDriver::parseInternal(int) at ??:?
#9  Foam::CommonValueExpressionDriver::parse(Foam::exprString const&, Foam::word const&) at ??:?
#10  Foam::expressionField::write() at ??:?
#11  Foam::expressionField::expressionField(Foam::word const&, Foam::objectRegistry const&, Foam::dictionary const&, bool) at ??:?
#12  Foam::OutputFilterFunctionObject<Foam::expressionField>::allocateFilter() at ??:?
#13  Foam::OutputFilterFunctionObject<Foam::expressionField>::start() at ??:?
#14  Foam::functionObjectList::read() at ??:?
#15  Foam::Time::run() const at ??:?
#16  
 at ??:?
#17  __libc_start_main in "/lib64/libc.so.6"
#18  
 at /home/abuild/rpmbuild/BUILD/glibc-2.17/csu/../sysdeps/x86_64/start.S:126
I don't know what exactly means "Attempt to return dictionary entry as a primitive" so I don't know what to do next. The only think I did was to check the thermophysicalProperties file from the solid region to check lines 19-25 and these are the referredlines:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            heSolidThermo;
    mixture         pureMixture;
    transport       constIso;
    thermo          hConst;
    equationOfState rhoConst;
    specie          specie;
    energy          sensibleEnthalpy;
}

mixture
{
    specie
    {
        nMoles      1;
        molWeight   50;
    }

    transport
    {
        kappa   0.5;
    }

    thermodynamics
    {
        Hf      0;
        Cp      50;
    }

    equationOfState
    {
        rho     3000;
    }
}
What's the problem? Am I doing something wrong or is there another way to evaluate this term?

Many thanks for any help you can give me.

Regards,

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   February 10, 2015, 18:31
Default
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
No answers untill now for this little problem? Did anyone experience this before?

Thanks
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Reply

Tags
cht solid properties, chtmultiregion, swak4foam, swakexpression, thermoturbfunctionplugin


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
Help! Having problem in accessing volume fraction gradient Geng Fu Fluent UDF and Scheme Programming 13 April 29, 2020 11:29
Why does accessing a zeroGradient patch return (0 0 0) for a volVectorField l_r_mcglashan OpenFOAM 0 August 20, 2010 14:27
macro for accessing particle thermal conductivity yingying Fluent UDF and Scheme Programming 3 July 15, 2010 05:34
Accessing node values using a UDF Nico FLUENT 2 December 20, 2007 03:50
How to define a Macro accessing rad intensity Grey FLUENT 0 May 21, 2007 01:12


All times are GMT -4. The time now is 20:40.