CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Problem with Surface Interpolation (http://www.cfd-online.com/Forums/openfoam-programming-development/96573-problem-surface-interpolation.html)

glaspina January 26, 2012 05:42

Problem with Surface Interpolation
 
Hello,

I'm a new user of OpenFOAM (2.0.1) and I started writing a new solver for two phase compressible model. The numerical scheme that I used is the one proposed by Kurganov and Tadmor, that is implemented in rhoCentralFoam but for a single phase.

The problem that I found is related to the surface interpolation of the pressure. When I run the solver and it reaches the instruction

Code:

surfaceScalarField p1_pos
(
    fvc::interpolate(p1, pos, "reconstruct(p)")
);

it gives the following error:

Code:

#0  Foam::error::printStack(Foam::Ostream&) in "/home/giuseppe/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/home/giuseppe/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::LimitedScheme<double, Foam::MinmodLimiter<Foam::NVDTVD>, Foam::limitFuncs::magSqr>::limiter(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/home/giuseppe/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#4  Foam::limitedSurfaceInterpolationScheme<double>::weights(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/home/giuseppe/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#5  Foam::surfaceInterpolationScheme<double>::interpolate(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/home/giuseppe/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#6 
 at rhoCentralFoam2.C:0
#7 
 in "/home/giuseppe/OpenFOAM/giuseppe-2.0.1/platforms/linux64GccDPOpt/bin/rhoCentralFoam2"
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9 
 in "/home/giuseppe/OpenFOAM/giuseppe-2.0.1/platforms/linux64GccDPOpt/bin/rhoCentralFoam2"
Floating point exception

The limiter that I used is Minmod and p1 is a volScalarField defined with a single discontinuity at the center of domain. In the left section p1 is 10^9 Pa, while in the right section p1 is 10^6 Pa.

So I tried to use different values of pressure, like 10^8 in the left section and 10^6 in the right section. With this choice of pressures I don't get any error...

Thus I tried another way to compute the interpolation, using the following code

Code:

surfaceScalarField p1_pos
(
    fvc::interpolate(0.001*p1, pos, "reconstruct(p)")
);
surfaceScalarField p1_neg
(
    fvc::interpolate(0.001*p1, neg, "reconstruct(p)")
);
p1_pos = p1_pos / 0.001;
p1_neg = p1_neg / 0.001;

In this way, even using in the left section 10^9 Pa and in the right section 10^6 Pa, I don't get any error.

Is it normal that I get this kind of errors when I use high values of pressure?
Does exist a different way to avoid them?

Thank you very much.
Giuseppe


All times are GMT -4. The time now is 00:54.