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

solver stops with error when using swakRadiationModelFunctionPlugin

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2013, 06:24
Default solver stops with error when using swakRadiationModelFunctionPlugin
  #1
Member
 
hannes
Join Date: Mar 2013
Posts: 47
Rep Power: 13
hanness is on a distinguished road
Hi,

I have a small problem with the swakRadiationModelFunctionPlugin. I'm using OF 2.2.1 running a simulation with the buoyantSimpleFoam solver and the fvDOM radiation model. I wanted to have a look at Ru, Rp and Sh in order to check the energy balance and so added the following to my controlDict:
Code:
libs (
      "libsimpleSwakFunctionObjects.so"
      "libswakFunctionObjects.so"
      "libswakRadiationModelFunctionPlugin.so"
     );
...
functions
{
    radiation_Rp
    {
        type            expressionField;
        fieldName       radiationRp;
        expression      "radiation_Rp()";
        autowrite       true;
    }
    radiation_Ru
    {
        type            expressionField;
        fieldName       radiationRu;
        expression      "radiation_Ru()";
        autowrite       true;
    }
    radiation_radSource
    {
        type            expressionField;
        fieldName       radiationSource;
        expression      "radiation_radSource()";
        autowrite       true;
    }
}
But unfortunately it only works if I delete the part referring to Ru, when this second block is included I get the following error message:
Code:
Starting time loop
Creating expression field radiationRp ...swak4Foam: Allocating new repository for sampledMeshes
swak4Foam: Allocating new repository for sampledGlobalVariables
"Loaded plugin functions for 'FieldValueExpressionDriver':"
  radiation_Rp:
    "volScalarField radiation_Rp()"
  radiation_Ru:
    "volScalarField radiation_Ru()"
  radiation_radSource:
    "volScalarField radiation_radSource()"
swak4Foam: Setting default mesh
 type:volScalarField
Creating expression field radiationRu ...
--> FOAM FATAL ERROR:
attempted assignment to self
    From function DimensionedField<Type, GeoMesh>::operator=(const DimensionedField<Type, GeoMesh>&)
    in file /opt/OpenFOAM-2.2.1/src/OpenFOAM/lnInclude/DimensionedField.C at line 425.
FOAM aborting
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  Foam::DimensionedField<double, Foam::volMesh>::operator=(Foam::DimensionedField<double, Foam::volMesh> const&) in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/bin/buoyantSimpleFoam"
#3  Foam::swakRadiationModelPluginFunction_Ru::doEvaluation() in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswakRadiationModelFunctionPlugin.so"
#4  Foam::CommonPluginFunction::evaluateInternal(Foam::string const&, int&) in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#5  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&) in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#6  parserField::FieldValueExpressionParser::parse() in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#7  Foam::FieldValueExpressionDriver::parseInternal(int) in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#8  Foam::CommonValueExpressionDriver::parse(std::string const&, Foam::word const&) in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#9  Foam::expressionField::write() in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#10  Foam::expressionField::expressionField(Foam::word const&, Foam::objectRegistry const&, Foam::dictionary const&, bool) in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#11  Foam::OutputFilterFunctionObject<Foam::expressionField>::allocateFilter() in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#12  Foam::OutputFilterFunctionObject<Foam::expressionField>::start() in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#13  Foam::functionObjectList::read() in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#14  Foam::Time::run() const in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#15  Foam::Time::loop() in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#16  Foam::simpleControl::loop() in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#17
 in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/bin/buoyantSimpleFoam"
#18  __libc_start_main in "/lib64/libc.so.6"
#19
 at /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:116
Am I doing something wrong or is there any other way to evaluate these source terms? I could probably still write an expression and recalculate Ru since Sh and Rp are available but to me that seems to be an unneccessary workaround.

Thanks a lot for any help
Hannes
hanness is offline   Reply With Quote

Old   August 7, 2013, 12:35
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by hanness View Post
Hi,

I have a small problem with the swakRadiationModelFunctionPlugin. I'm using OF 2.2.1 running a simulation with the buoyantSimpleFoam solver and the fvDOM radiation model. I wanted to have a look at Ru, Rp and Sh in order to check the energy balance and so added the following to my controlDict:
Code:
libs (
      "libsimpleSwakFunctionObjects.so"
      "libswakFunctionObjects.so"
      "libswakRadiationModelFunctionPlugin.so"
     );
...
functions
{
    radiation_Rp
    {
        type            expressionField;
        fieldName       radiationRp;
        expression      "radiation_Rp()";
        autowrite       true;
    }
    radiation_Ru
    {
        type            expressionField;
        fieldName       radiationRu;
        expression      "radiation_Ru()";
        autowrite       true;
    }
    radiation_radSource
    {
        type            expressionField;
        fieldName       radiationSource;
        expression      "radiation_radSource()";
        autowrite       true;
    }
}
But unfortunately it only works if I delete the part referring to Ru, when this second block is included I get the following error message:
Code:
Starting time loop
Creating expression field radiationRp ...swak4Foam: Allocating new repository for sampledMeshes
swak4Foam: Allocating new repository for sampledGlobalVariables
"Loaded plugin functions for 'FieldValueExpressionDriver':"
  radiation_Rp:
    "volScalarField radiation_Rp()"
  radiation_Ru:
    "volScalarField radiation_Ru()"
  radiation_radSource:
    "volScalarField radiation_radSource()"
swak4Foam: Setting default mesh
 type:volScalarField
Creating expression field radiationRu ...
--> FOAM FATAL ERROR:
attempted assignment to self
    From function DimensionedField<Type, GeoMesh>::operator=(const DimensionedField<Type, GeoMesh>&)
    in file /opt/OpenFOAM-2.2.1/src/OpenFOAM/lnInclude/DimensionedField.C at line 425.
FOAM aborting
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  Foam::DimensionedField<double, Foam::volMesh>::operator=(Foam::DimensionedField<double, Foam::volMesh> const&) in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/bin/buoyantSimpleFoam"
#3  Foam::swakRadiationModelPluginFunction_Ru::doEvaluation() in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswakRadiationModelFunctionPlugin.so"
#4  Foam::CommonPluginFunction::evaluateInternal(Foam::string const&, int&) in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#5  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&) in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#6  parserField::FieldValueExpressionParser::parse() in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#7  Foam::FieldValueExpressionDriver::parseInternal(int) in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#8  Foam::CommonValueExpressionDriver::parse(std::string const&, Foam::word const&) in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#9  Foam::expressionField::write() in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#10  Foam::expressionField::expressionField(Foam::word const&, Foam::objectRegistry const&, Foam::dictionary const&, bool) in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#11  Foam::OutputFilterFunctionObject<Foam::expressionField>::allocateFilter() in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#12  Foam::OutputFilterFunctionObject<Foam::expressionField>::start() in "/home/hs/OpenFOAM/hs-2.2.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#13  Foam::functionObjectList::read() in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#14  Foam::Time::run() const in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#15  Foam::Time::loop() in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#16  Foam::simpleControl::loop() in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#17
 in "/opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/bin/buoyantSimpleFoam"
#18  __libc_start_main in "/lib64/libc.so.6"
#19
 at /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:116
Am I doing something wrong or is there any other way to evaluate these source terms? I could probably still write an expression and recalculate Ru since Sh and Rp are available but to me that seems to be an unneccessary workaround.

Thanks a lot for any help
Hannes
Should work and I'm a bit amazed about the failure. If you could a provide a small case to reproduce the problem on http://sourceforge.net/apps/mantisbt...?page_number=1 I'll look into it
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   November 11, 2014, 10:32
Default
  #3
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Hello Bernhard and Hannes!

I was looking for some info about the fvDOM method when I unintendedly got to this thread. I didn't know this functionality of swak4foam, since I don't usually use it although I have it installed. Can you, please, explain me a little how it works and what are the outputs? I have copypasted the piece of code Hannes posted and I have the same problem with the Ru part. Where can I find the documentation about this functionality (and all the other ones)?

Thanks in advance.

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   November 11, 2014, 11:48
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by zfaraday View Post
Hello Bernhard and Hannes!

I was looking for some info about the fvDOM method when I unintendedly got to this thread. I didn't know this functionality of swak4foam, since I don't usually use it although I have it installed. Can you, please, explain me a little how it works and what are the outputs? I have copypasted the piece of code Hannes posted and I have the same problem with the Ru part. Where can I find the documentation about this functionality (and all the other ones)?

Thanks in advance.

Alex
The functions in that plugin call the functions of the radiation model. That's all. Names are similar to those of the C++-API so the best documentation is the Doxygen of the radiationModel. Documentation about the plugin-functions is going to happen if I have nothing else to do (very unlikely) or I find some funding to do it (also unlikely)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply

Tags
buoyantsimplefoam, radiation, swak4foam error

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 12:34
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
HELP PLS: Simplefoam manipulated to add diffusive mass transport...but solver stops!! 1gn0rant OpenFOAM Running, Solving & CFD 1 August 13, 2010 12:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 15:08
Solver stops abruptly without errors prabhu CFX 1 December 20, 2007 02:35


All times are GMT -4. The time now is 01:57.