CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   sigFpe from autoPtr (http://www.cfd-online.com/Forums/openfoam/121255-sigfpe-autoptr.html)

otq July 24, 2013 14:51

sigFpe from autoPtr
 
1 Attachment(s)
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::printStack(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.

gschaider August 3, 2013 14:18

Quote:

Originally Posted by otq (Post 441770)
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::printStack(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

otq August 3, 2013 14:28

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.


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