CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   simpleFoam error (http://www.cfd-online.com/Forums/openfoam/116542-simplefoam-error.html)

nikkuoa April 22, 2013 03:57

simpleFoam error
 
Hi all,
I am beginner in OpenFoam and have been through some tutorials. I have been also looking at the user guide but I am unable to understand the error OpenFoam has been throwing at me. Few details of my problem setup:

Openfoam 2.0.v4 and 2.1.0
Solver simpleFoam
using in serial mode

its a flow around a block case. I believe it is something like
"My guess is that this is (again) the old "I set k/epsilon/omega to 0 in the initial conditions (or on a boundary) and the turbulence model divides by it"-problem" linked at http://www.cfd-online.com/Forums/ope...-parallel.html
I have added the error below:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-bd7367f93311
Exec : simpleFoam
Date : Apr 22 2013
Time : 15:53:37
Host : "hpclogin1"
PID : 9930
Case : /gpfs/home/ngarg/ngarg/OpenFOAM/buildings/building_simple
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

#0 Foam::error::printStack(Foam::Ostream&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 __ieee754_log at interp.c:0
#4 log in "/lib64/libm.so.6"
#5 Foam::incompressible::atmBoundaryLayerInletVelocit yFvPatchVectorField::updateCoeffs() in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#6 Foam::incompressible::atmBoundaryLayerInletVelocit yFvPatchVectorField::atmBoundaryLayerInletVelocity FvPatchVectorField(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#7 Foam::fvPatchField<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::incompres sible::atmBoundaryLayerInletVelocityFvPatchVectorF ield>::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#8 Foam::fvPatchField<Foam::Vector<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/simpleFoam"
#9 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricB oundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/simpleFoam"
#10 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readField(Foam::dictionary const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/simpleFoam"
#11 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readField(Foam::Istream&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/simpleFoam"
#12 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/simpleFoam"
#13 main in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/simpleFoam"
#14 __libc_start_main in "/lib64/libc.so.6"
#15 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/simpleFoam"
Floating point exception

I would appreciate if someone can help me with this. It seems to me that my boundary conditions are not correctly set.

Cheers
Nikhil

Lieven April 22, 2013 13:21

Hi Nikhil,

The problem is due to a division by 0 in the atmBoundaryLayerInletVelocity boundary condition. Can you post the content of the 0/U file? Then we can check your settings.

Cheers,

L

nikkuoa April 22, 2013 23:16

Hi L,

Thanks for your reply. I have posted the contents of 0/U here:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include "include/ABLConditions"

dimensions [0 1 -1 0 0 0 0];

internalField uniform (5 0 0);

boundaryField
{
inlet
{
type atmBoundaryLayerInletVelocity;
Uref $Uref;
Href $Href;
n $windDirection;
z $zDirection;
z0 $z0;
value $internalField;
zGround $zGround;
}

outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;
}
"buildings"
{
type fixedValue;
value uniform (0 0 0);
}
bottom
{
type fixedValue;
value uniform (0 0 0);
}

#include "include/sideAndTopPatches"
}


// ************************************************** *********************** //

Also, I have encountered some interesting things. I managed to run the same case with uniform input velocity but when i try to run with atmBoundaryLayerVelocity i ran into some different error.


/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-bd7367f93311
Exec : potentialFoam -noFunctionObjects -writep
Date : Apr 23 2013
Time : 10:59:13
Host : "hpclogin1"
PID : 24801
Case : /gpfs/home/ngarg/ngarg/OpenFOAM/buildings/building_simple
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U



--> FOAM FATAL IO ERROR:
Unknown patchField type atmBoundaryLayerInletVelocity for patch type patch

Valid patchField types are :

59
(
SRFFreestreamVelocity
SRFVelocity
activeBaffleVelocity
activePressureForceBaffleVelocity
advective
calculated
codedFixedValue
codedMixed
cyclic
cyclicAMI
cyclicSlip
cylindricalInletVelocity
directionMixed
empty
fixedGradient
fixedInternalValue
fixedNormalSlip
fixedValue
flowRateInletVelocity
fluxCorrectedVelocity
freestream
inletOutlet
mapped
mappedField
mappedFixedInternalValue
mappedFixedPushedInternalValue
mappedFlowRate
mappedVelocityFlux
mixed
movingWallVelocity
nonuniformTransformCyclic
oscillatingFixedValue
outletInlet
outletMappedUniformInlet
partialSlip
pressureDirectedInletOutletVelocity
pressureDirectedInletVelocity
pressureInletOutletParSlipVelocity
pressureInletOutletVelocity
pressureInletUniformVelocity
pressureInletVelocity
pressureNormalInletOutletVelocity
processor
processorCyclic
rotatingPressureInletOutletVelocity
rotatingWallVelocity
sliced
slip
supersonicFreestream
surfaceNormalFixedValue
swirlFlowRateInletVelocity
symmetryPlane
timeVaryingMappedFixedValue
translatingWallVelocity
turbulentInlet
uniformFixedValue
waveTransmissive
wedge
zeroGradient
)


file: /gpfs/home/ngarg/ngarg/OpenFOAM/buildings/building_simple/0/U::boundaryField::inlet from line 28 to line 16.

From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /usr/local/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 135.

FOAM exiting

nikkuoa April 22, 2013 23:37

problem with atmBoundaryLayerVelocity conditions in inlet
 
Hi everyone,

As posted previously, I removed the atmBoundaryLayerVelocity from inlet and then the simulation worked, so I am thinking that this conditions is stopping the simulation from working. I am still trying to figure out how to sort this matter. If anyone has experience, i would really appreciate help

Cheers
nikhil

Lieven April 23, 2013 03:02

Ok, can you also post the "include/ABLConditions" file?

The second error is easy to explain, potentialFoam does not know turbulence models and the atmBoundaryLayerInletVelocity is provided by the RAS models. So in short, potentialFoam will complain that he doesn't know the condition (and then he prints out what he prints out the ones he does know).

Cheers,

L

nikkuoa April 23, 2013 03:07

ABLConditions file
 
I have provided the ABLconditions file

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

Ustar 0.82;
Uref 10.0;
Href 20;
z0 0.1;
turbulentKE 1.3;
windDirection (1 0 0);
zDirection (0 0 1);
zGround uniform 935.0;
// ************************************************** *********************** //

Thanks
Nikhil

Lieven April 23, 2013 04:06

Why do you set zGround to 935 m? Is the z-coordinate of you bottom plane (the wall) really about 935 m?

If not, set it to 0.0 and try again...

Cheers,

L

nikkuoa April 23, 2013 12:56

Thanks for your help. The solution worked, i feel so stupid as kept on thinking it to be geostrophic height.

Cheers
Nikhil

izna August 14, 2013 04:12

hello Nik

Have you been able to run the case with the atmBoundaryLayerInletVelocity?

I have exact error as you.


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