|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Join Date: Feb 2017
Posts: 3
Rep Power: 10 ![]() |
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;
}
}
// ************************************************************************* //
|
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 16 ![]() |
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) |
|
|
|
|
|
|
|
|
#3 |
|
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 11 ![]() |
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 |
|
|
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Feb 2017
Posts: 3
Rep Power: 10 ![]() |
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? |
|
|
|
|
|
|
|
|
#5 |
|
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 16 ![]() |
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) |
|
|
|
|
|
|
|
|
#6 |
|
New Member
Join Date: Feb 2017
Posts: 3
Rep Power: 10 ![]() |
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! |
|
|
|
|
|
|
|
|
#7 |
|
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 16 ![]() |
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) |
|
|
|
|
|
![]() |
| Tags |
| simplefoam, simplefoam convergence, snappyhexmesh, volscalarfield |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |