CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   atmBoundaryLayerInletVelocity profiles (

Ivo July 14, 2010 09:51

atmBoundaryLayerInletVelocity profiles
1 Attachment(s)

I recently started using OpenFoam for modeling atmospheric processes. Since I am new to the program and OpenFoam version 1.7 includes a tutorial case, turbineSiting, which uses a simulated atmospheric boundary layer I decided to start by stuying this tutorial. The first problem I encountered was the fact that the Allrun script references the non-existing solver simpleWindFoam. However, since the case seems to run just fine using simpleFoam I used this instead.

Having run the case successfully I started to play with the input parameters and found out that the atmBoundaryLayerInletVelocity boundary condition displays some very strange behaviour. Defining the ABL by setting the velocity Uref to 15 m/s at a height Href of 300 meters and not changing any of the other parameters I get a velocity profile as shown in the attachment. The profile clearly doesn't reach a velocity of 15 m/s at the specified height of 300 meters, but around the 300 meter mark it does quickly increase to that value, after which it stays constant.

The formulas in the boundary condition source code seem valid enough to me, so perhaps there is a problem with one of the parameters which get passed to/from the routine? Or maybe simpleFoam is an improper solver for this problem after all?

Thank you very much in advance!

henry July 15, 2010 03:47

the simpleWindFoam demonstration solver is in the


directory. In the


directory type


which will compile simpleWindFoam and run it.


Ivo July 15, 2010 12:28

Hi Henry,

Thank you very much for your reply. I'm sorry I didn't know about the way to compile the simpleWindFoam solver. It tried your suggestion and I can now indeed compile and use it. However, the resulting velocity profile I get is unchanged from my original post, so it seems the problem is not with the solver. Do you perhaps have another suggestion what I could try?

Best wishes,


SergioF July 16, 2010 05:35

There was an error in the expression for the inlet velocity in the file

It was updated in our git repository for 1.7.x



Ivo July 16, 2010 10:32

It now works fine, many thanks!!!


snippsnuske July 30, 2010 11:05

I’m also working with the turbineSiting tutorial. It runs fine and I will now change the terrain file to a terrain file of my interest. I manage to use snappyHexMesh and a checkMesh gives me good result. But when I try to run simpleWndFoam I continuing to get this error massage. The only thing I change was the terrain. It looks like it reding the field p fine but it stops when rading U. I’m not used at reading different error massages and I would be very grateful if anyone can tell me what this message is indicating;
#13 __libc_start_main in "/lib/"#14 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/user/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linuxGccDPOpt/simpleWindFoam"

gregjunqua September 27, 2012 04:54

I am actualy trying to compile atmBoundaryLayerInletVelocity
the things is i get that error :

m::incompressible::atmBoundaryLayerInletVelocityFv PatchVectorField const&, Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&)'
Make/linuxGccDPOpt/simpleFoam.o:simpleFoam.C:(.text+0x3090): first defined here
Make/linuxGccDPOpt/atmBoundaryLayerInletVelocityFvPatchVectorField.o: (.bss+0x4): multiple definition of `Foam::incompressible::atmBoundaryLayerInletVeloci tyFvPatchVectorField::debug'
Make/linuxGccDPOpt/simpleFoam.o:(.bss+0x4): first defined here
Make/linuxGccDPOpt/atmBoundaryLayerInletVelocityFvPatchVectorField.o: (.bss+0x2): multiple definition of `Foam::incompressible::addatmBoundaryLayerInletVel ocityFvPatchVectorFieldpatchConstructorTofvPatchVe ctorFieldTable_'
Make/linuxGccDPOpt/simpleFoam.o:(.bss+0x2): first defined here
Make/linuxGccDPOpt/atmBoundaryLayerInletVelocityFvPatchVectorField.o: (.bss+0x1): multiple definition of `Foam::incompressible::addatmBoundaryLayerInletVel ocityFvPatchVectorFieldpatchMapperConstructorTofvP atchVectorFieldTable_'
Make/linuxGccDPOpt/simpleFoam.o:(.bss+0x1): first defined here
Make/linuxGccDPOpt/atmBoundaryLayerInletVelocityFvPatchVectorField.o: (.bss+0x0): multiple definition of `Foam::incompressible::addatmBoundaryLayerInletVel ocityFvPatchVectorFielddictionaryConstructorTofvPa tchVectorFieldTable_'
Make/linuxGccDPOpt/simpleFoam.o:(.bss+0x0): first defined here
collect2: ld a retourné 1 code d'état d'exécution
make: *** [/home/gregoire/OpenFOAM/OpenFOAM-2.1.1/platforms/linuxGccDPOpt/bin/bounSimpleFoam] Erreur 1

for come to here i had do :

• Add .atmBoundaryLayerInletVelocityFvPatchVectorField.C to the second line of Make/files, and
modify the final line to EXE = $(FOAM_USER_APPBIN)/
• Add #include "parabolicVelocityFvPatchVectorField.H" in the header of your
simpleFoam.C file, so that the solver knows the new boundary condition.
• wclean
rm -r Make/linux*

somebody can help me ?
or at least give me a good website for compile atmBoundaryLayerInlet

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