CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   RanzMarshall dieselfoam (http://www.cfd-online.com/Forums/openfoam/82789-ranzmarshall-dieselfoam.html)

Rickard.Solsjo December 6, 2010 03:59

RanzMarshall dieselfoam
 
I get this error message, anyone recognize it ?
Dividing by zero in RanzMarshall

[28] #0 Foam::error::printStack(Foam::Ostream&) in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/lib/linux64IccDPOpt/libOpenFOAM.so"
[28] #1 Foam::sigFpe::sigFpeHandler(int) in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/lib/linux64IccDPOpt/libOpenFOAM.so"
[28] #2 __restore_rt at sigaction.c:0
[28] #3 pow.L in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64IccDPOpt/dieselFoam"
[28] #4 Foam::RanzMarshall::Nu(double, double) const in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/lib/linux64IccDPOpt/libdieselSpray.so"
[28] #5 Foam::RanzMarshall::relaxationTime(double, double, double, double, double, double) const in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/lib/linux64IccDPOpt/libdieselSpray.so"
[28] #6 Foam::parcel::setRelaxationTimes(int, double&, Foam::Field<double>&, double&, Foam::Field<double>&, Foam::spray const&, double, Foam::Vector<double> const&, double, double, Foam::Field<double> const&, Foam::Field<double> const&, double) in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/lib/linux64IccDPOpt/libdieselSpray.so"
[28] #7 Foam::parcel::move(Foam::spray&) in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/lib/linux64IccDPOpt/libdieselSpray.so"
[28] #8 Foam::spray::inject() in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/lib/linux64IccDPOpt/libdieselSpray.so"
[28] #9 Foam::spray::evolve() in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/lib/linux64IccDPOpt/libdieselSpray.so"
[28] #10 main in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64IccDPOpt/dieselFoam"
[28] #11 __libc_start_main in "/lib64/libc.so.6"
[28] #12 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/disk/global/szrobi/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64IccDPOpt/dieselFoam"

nakul December 6, 2010 10:21

Hi

This might be happening due to wrong initialisation of the fields in 0 directory. For knowing any other reasons you need to provide additional details about your case.

Rickard.Solsjo December 7, 2010 03:41

It happens after i while actually, and I have been checking the doxygen,
I mean my initial field has non-zero values in the zero-directory. On row 95, its like im dividing by zero but it shouldnt be possible (zero mass)
scalar RanzMarshall::Nu
00077 (
00078 const scalar ReynoldsNumber,
00079 const scalar PrandtlNumber
00080 ) const
00081 {
00082 return 2.0 + preRePrFactor_ * pow(ReynoldsNumber, ReExponent_) * pow(PrandtlNumber, PrExponent_);
00083 }
00084
00085 scalar RanzMarshall::relaxationTime
00086 (
00087 const scalar liquidDensity,
00088 const scalar diameter,
00089 const scalar liquidcL,
00090 const scalar kappa,
00091 const scalar ReynoldsNumber,
00092 const scalar PrandtlNumber
00093 ) const
00094 {
00095 scalar time = liquidDensity*pow(diameter, 2.0)*liquidcL/(6.0*kappa*Nu(ReynoldsNumber, PrandtlNumber));
00096
00097 time = max(SMALL, time);
00098
00099 return time;
00100 }
00101
00102 scalar RanzMarshall::fCorrection(const scalar z) const
00103 {
00104 scalar correct;
00105 if (z > 0.01)
00106 {
00107 if (z < 1.0e+5)
00108 {
00109 correct = z/(exp(z) - 1.0);
00110 }
00111 else
00112 {
00113 correct = SMALL;
00114 }
00115
00116 }
00117 else
00118 {
00119 // taylor-expansion of exp(z)...
00120 correct = 1.0/(1+0.5*z);
00121 }
00122
00123 return correct;

nakul December 7, 2010 04:59

Hi
You should provide a little bit more details about your case. What exactly are you doing?

This error occurs mainly due to wrong setup of the test case. There are many reasons for that. You may provide some more information.


All times are GMT -4. The time now is 13:14.