CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] p is not a valid volScalarField

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By umbideluca

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 5, 2017, 13:48
Exclamation p is not a valid volScalarField
  #1
New Member
 
Join Date: Feb 2017
Posts: 3
Rep Power: 9
umbideluca is on a distinguished road
Hi,

I am running a simple case of the flow around a cylinder using the simpleFoam solver. I have created the mesh with snappyHexMesh and it looks fine when I open it in Paraview.

However, when I open the .foam file with paraview a error window pops up with one error message saying: "/Users/umberto/openfoam/cylinder/0/p is not a valid volScalarField".

If I ignore the message and run simpleFoam, I get a floating point exception after 14 iterations and the simulation stops.

I suppose the floating point error is linked to the volScalarField issue but I really can't figure out what's wrong with my p file:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  plus                                  |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 -2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
        type            fixedValue;
        value           0;
    }
    cylinder
    {
        type            zeroGradient;
    }
    upperWall
    {
        type            slip;
    }
    lowerWall
    {
        type            slip;
    }
    frontAndBack
    {
        type            slip;
    }
}

// ************************************************************************* //
umbideluca is offline   Reply With Quote

Old   April 5, 2017, 15:39
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
The p field is necessary in the 0 folder: It contains the initial condition. It seems that this file is not correct.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   April 5, 2017, 16:22
Default
  #3
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9
Joshua14 is on a distinguished road
Your dimensions for pressure are as follows:

dimensions [0 -2 -2 0 0 0 0];

I think the dimensions of pressure for an incompressible case should be:

dimensions [0 2 -2 0 0 0 0];

Hope this helps,
Joshua
Joshua14 is offline   Reply With Quote

Old   April 5, 2017, 18:19
Default
  #4
New Member
 
Join Date: Feb 2017
Posts: 3
Rep Power: 9
umbideluca is on a distinguished road
Well spotted. I am note sure why I had the wrong units there. However, changing the units did not solve my problem.

To me it looks like there is something substantial that is wrong with my p file but I really can't figure out what that is. It is also strange that I could not find anyone with the same issue.

Where else could the problem be?
umbideluca is offline   Reply With Quote

Old   April 6, 2017, 02:04
Default
  #5
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
If you calculate in 2D frontAndBack should be empty.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   April 6, 2017, 06:02
Default
  #6
New Member
 
Join Date: Feb 2017
Posts: 3
Rep Power: 9
umbideluca is on a distinguished road
Nope that's not the issue. I am running 3D.

Just for the record, the issue was that I set the outlet value to 0 and not to uniform 0!
vs11 likes this.
umbideluca is offline   Reply With Quote

Old   January 21, 2018, 02:10
Default
  #7
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
This is a bit late for a useful answer, but I want to add an observation (just for the record):

I had the same message with an p_rgh file. I used the fixedFluxPressure b.c.
If I changed that to fixedValue, the error disappeared. But the solution is not useful anymore
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Reply

Tags
simplefoam, simplefoam convergence, snappyhexmesh, volscalarfield


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
Error message Bruno_Jorge Main CFD Forum 1 February 5, 2019 12:12
namespace Foam Argen OpenFOAM 4 February 5, 2019 09:55
[snappyHexMesh] How to define to right point for locationInMesh Mirage12 OpenFOAM Meshing & Mesh Conversion 7 March 13, 2016 15:07
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 10:53
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 07:16


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