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

sigFpe from autoPtr

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2013, 14:51
Default sigFpe from autoPtr
  #1
otq
New Member
 
Christopher Hughes
Join Date: Oct 2012
Posts: 27
Rep Power: 13
otq is on a distinguished road
I am currently working on modifying chtMultiReagionFoam to provide a much more detailed equation of state. The goal is to have all major aspects of the working fluid, in this case water, to be dependent on temperature and pressure. The 7 I want to focus on are: enthalpy(h), density(rho), specific heat constant pressure (Cp), dynamic viscosity(mu), compressibility(psi), volumetric expansion coefficient(beta), thermal conductivity(kappa).

The hRhoThermo model (the sample model used in the tutorial chtMultiRegionFoam) doesnt even have beta, but also requires that everything except rho and psi be entered in as some simple polynomial, or constant. It also retrieves and calculates properties related to chemical reactions, which I have no need for.

As such, I went about designing a brand new thermomodel, starting all the way at basicThermo.H and working my way down into a model that only requires an equation of state file to be provided. This new thermophysicalmodel library compiles, all the related libraries (turbulence, thermalbaffles, radiation, the equation of state library) also compile. The new chtMultiRegionFoam based upon these new libraries also compiles; however, when I try to run a small test model, I am getting a sigFpe error.

Selecting thermodynamics package myThermo<eSCW>
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::myThermo<Foam::eSCW>::calculate() at ~/OpenFOAM/chris-2.1.1/run/Supercritical/SCWR/thermophysicalModels/basic/rhoThermo/hRhoThermo/myThermo.C:50
#4 Foam::myThermo<Foam::eSCW>::myThermo(Foam::fvMesh const&) at ~/OpenFOAM/chris-2.1.1/run/Supercritical/SCWR/thermophysicalModels/basic/rhoThermo/hRhoThermo/myThermo.C:119
#5 Foam::myRhoThermo::addfvMeshConstructorToTable<Foa m::myThermo<Foam::eSCW> >::New(Foam::fvMesh const&) at ~/OpenFOAM/chris-2.1.1/run/Supercritical/SCWR/thermophysicalModels/basic/lnInclude/myRhoThermo.H:85
#6 Foam::myRhoThermo::New(Foam::fvMesh const&) at ~/OpenFOAM/chris-2.1.1/run/Supercritical/SCWR/thermophysicalModels/basic/rhoThermo/basicRhoThermo/myRhoThermoNew.C:68
#7
in "/home/chris/OpenFOAM/chris-2.1.1/platforms/linuxGccDPOpt/bin/chtMultiRegionSimplegFoam"
#8 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#9
in "/home/chris/OpenFOAM/chris-2.1.1/platforms/linuxGccDPOpt/bin/chtMultiRegionSimplegFoam"

the specific line that is causing the error (#6) is:

return autoPtr<myRhoThermo>(cstrIter()(mesh));

myRhoThermo is my version of basicRhoThermo, myThermo is hRhoThermo, myBasic is basicThermo, eSCW is my equation of state file.

I have included all the related files with the exception of eSCWI.H because I'd rather not post the equations I am using since this is ongoing research. Any help on this would be greatly appreciated.
Attached Files
File Type: zip Thermomodel.zip (13.8 KB, 4 views)
otq is offline   Reply With Quote

Old   August 3, 2013, 14:18
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 otq View Post
I am currently working on modifying chtMultiReagionFoam to provide a much more detailed equation of state. The goal is to have all major aspects of the working fluid, in this case water, to be dependent on temperature and pressure. The 7 I want to focus on are: enthalpy(h), density(rho), specific heat constant pressure (Cp), dynamic viscosity(mu), compressibility(psi), volumetric expansion coefficient(beta), thermal conductivity(kappa).

The hRhoThermo model (the sample model used in the tutorial chtMultiRegionFoam) doesnt even have beta, but also requires that everything except rho and psi be entered in as some simple polynomial, or constant. It also retrieves and calculates properties related to chemical reactions, which I have no need for.

As such, I went about designing a brand new thermomodel, starting all the way at basicThermo.H and working my way down into a model that only requires an equation of state file to be provided. This new thermophysicalmodel library compiles, all the related libraries (turbulence, thermalbaffles, radiation, the equation of state library) also compile. The new chtMultiRegionFoam based upon these new libraries also compiles; however, when I try to run a small test model, I am getting a sigFpe error.

Selecting thermodynamics package myThermo<eSCW>
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::myThermo<Foam::eSCW>::calculate() at ~/OpenFOAM/chris-2.1.1/run/Supercritical/SCWR/thermophysicalModels/basic/rhoThermo/hRhoThermo/myThermo.C:50
#4 Foam::myThermo<Foam::eSCW>::myThermo(Foam::fvMesh const&) at ~/OpenFOAM/chris-2.1.1/run/Supercritical/SCWR/thermophysicalModels/basic/rhoThermo/hRhoThermo/myThermo.C:119
#5 Foam::myRhoThermo::addfvMeshConstructorToTable<Foa m::myThermo<Foam::eSCW> >::New(Foam::fvMesh const&) at ~/OpenFOAM/chris-2.1.1/run/Supercritical/SCWR/thermophysicalModels/basic/lnInclude/myRhoThermo.H:85
#6 Foam::myRhoThermo::New(Foam::fvMesh const&) at ~/OpenFOAM/chris-2.1.1/run/Supercritical/SCWR/thermophysicalModels/basic/rhoThermo/basicRhoThermo/myRhoThermoNew.C:68
#7
in "/home/chris/OpenFOAM/chris-2.1.1/platforms/linuxGccDPOpt/bin/chtMultiRegionSimplegFoam"
#8 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#9
in "/home/chris/OpenFOAM/chris-2.1.1/platforms/linuxGccDPOpt/bin/chtMultiRegionSimplegFoam"

the specific line that is causing the error (#6) is:

return autoPtr<myRhoThermo>(cstrIter()(mesh));

myRhoThermo is my version of basicRhoThermo, myThermo is hRhoThermo, myBasic is basicThermo, eSCW is my equation of state file.

I have included all the related files with the exception of eSCWI.H because I'd rather not post the equations I am using since this is ongoing research. Any help on this would be greatly appreciated.
The problem is not the autoPtr but the calculate method. On line 50 as your stack-trace says
__________________
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   August 3, 2013, 14:28
Default
  #3
otq
New Member
 
Christopher Hughes
Join Date: Oct 2012
Posts: 27
Rep Power: 13
otq is on a distinguished road
I thought that originally, but couldn't immediately see where in calculate the error was. I looked at it again. I had ill-defined my read in of pressure and temperature so the calculate method was accessing arrays with zero values, then when I went to find psi I got a divide by zero.

Thank you for your help. I just wasn't confident enough in my ability to read the error message to be firm in identifying the problem area.
otq is offline   Reply With Quote

Reply


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
understanding autoPtr anishtain4 OpenFOAM Programming & Development 5 July 12, 2012 03:43
Error Message sigFpe AlpAc OpenFOAM Running, Solving & CFD 1 April 12, 2011 03:41
Lookup autoPtr from fvMesh Misha OpenFOAM 2 January 24, 2011 06:20
ICC compiler and sigFpe for sample utility cfdmarkus OpenFOAM Installation 3 June 25, 2010 14:31
chtMultiFoam sigFpe HendrikR OpenFOAM 6 April 2, 2010 10:40


All times are GMT -4. The time now is 05:56.