CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Problem with Surface Interpolation (

glaspina January 26, 2012 05:42

Problem with Surface Interpolation

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


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

it gives the following error:


#0  Foam::error::printStack(Foam::Ostream&) in "/home/giuseppe/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/"
#1  Foam::sigFpe::sigHandler(int) in "/home/giuseppe/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/"
#2  in "/lib/x86_64-linux-gnu/"
#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/"
#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/"
#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/"
 at rhoCentralFoam2.C:0
 in "/home/giuseppe/OpenFOAM/giuseppe-2.0.1/platforms/linux64GccDPOpt/bin/rhoCentralFoam2"
#8  __libc_start_main in "/lib/x86_64-linux-gnu/"
 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


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.

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