CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   SimpleWindFoam TurbineSiting atmBoundaryLayerInletVelocity (https://www.cfd-online.com/Forums/openfoam/88767-simplewindfoam-turbinesiting-atmboundarylayerinletvelocity.html)

Jochem May 25, 2011 11:06

SimpleWindFoam TurbineSiting atmBoundaryLayerInletVelocity
 
Hello,

I am trying to use the turbineSiting tutorial to simulate wind flows in city's. I've been reading a lot on this forum about this tutorial and the atmoshericBoundaryLayerInletVelocity. However I don't seem to succeed in adjusting the tutorial to my case.

I've been changing all parameters to my case and the meshing is not a problem. I am getting quite well results with the snappyHexMesh. If I then use SimpleFoam (I've read on the forum that you don't have to use simpleWindFoam if you don't have any turbines in your case), I get an error :

Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
C3 -0.33;
sigmak 1;
sigmaEps 1.11;
Prt 1;
}


Starting time loop

Time = 1

smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.048921619129, No Iterations 3
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0379697123169, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 0.999999999978, Final residual = 0.0301590067167, No Iterations 2
smoothSolver: Solving for p, Initial residual = 1, Final residual = 0.973538950195, No Iterations 300
smoothSolver: Solving for p, Initial residual = 0.369644226296, Final residual = 0.365816840222, No Iterations 300
time step continuity errors : sum local = 0.0402944057061, global = -1.52332950846e-06, cumulative = -1.52332950846e-06
smoothSolver: Solving for epsilon, Initial residual = 0.999999999779, Final residual = 0.0605020173719, No Iterations 4
smoothSolver: Solving for k, Initial residual = 0.999999998267, Final residual = 0.0636421123157, No Iterations 4
bounding k, min: 0 max: 10.2206631121 average: 6.03698473658
ExecutionTime = 150.11 s ClockTime = 150 s

Time = 2

smoothSolver: Solving for Ux, Initial residual = 0.523922716702, Final residual = 0.0348655168634, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 0.539626088908, Final residual = 0.0362048666305, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 0.479550397895, Final residual = 0.0306379571382, No Iterations 4
smoothSolver: Solving for p, Initial residual = 0.760211753981, Final residual = 0.637002209255, No Iterations 300
smoothSolver: Solving for p, Initial residual = 0.608690091219, Final residual = 0.597137654786, No Iterations 300
time step continuity errors : sum local = 0.0386763087088, global = -2.25283245784e-05, cumulative = -2.40516540868e-05
#0 Foam::error::printStack(Foam::Ostream&) in "/home/xx/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/xx/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/xx/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/xx/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/xx/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#6 Foam::incompressible::RASModels::kEpsilon::correct () in "/home/jvermeir/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#7
in "/home/xx/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/simpleFoam"
#8 __libc_start_main in "/lib/libc.so.6"
#9
in "/home/xx/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/simpleFoam"
Floating point exception


Does anyone know what this error means?

If I don't use an atm boundary layer and a different RAS-model (komegaSST based on the motorBike case) everything does work (but this is not what I want). So I guess my problem would be regarding the k-epsilon model or the atmBoundaryLayer?

Also I've seen on the forum a lot of people are also having problems adjusting this tutorials to their case. Does anyone actually succeeded in making this tutorial to work for their case?

Regards,

Jochem

Jochem July 6, 2011 03:56

Hello,

I found out changing the value for epsilon in the initial condition can help. True some research I found out that the value for epsilon in the initial condition can be found be equation :

epsilon = Ustar^3/(kappa*(H+Z_0)

Does someone now what height you have to use? If i use the H_ref from ABLcondition, the code crashes. By manipulating this H I'm able to run the code, but for sure this can not be the way to do this.

Regards,

Jochem

scotth2o July 7, 2011 17:51

I actually haven't used this solver a great deal or the atmBoundaryLayerInletVelocity BC but if I had to guess I bet you have something unphysical in your pressure BCs.

This is based on your error :

Code:

smoothSolver: Solving for p, Initial residual = 0.760211753981, Final residual = 0.637002209255, No Iterations 300
smoothSolver: Solving for p, Initial residual = 0.608690091219, Final residual = 0.597137654786, No Iterations 300

300 iterations is way too many. When I see #'s over ~40 running a buoyant solver, that to me is an indication somethings not right. There's no reason this shouldn't be the case for simpleWindFoam either.

Good Luck

Scott

inginer August 2, 2011 12:06

hello,

Im using simpleWindFoam for a applications. I'm building the box, but when I'm trying to extract the surface with snappyhexmesh i receive this error:

openfoam@linux-bkii:~/OpenFOAM/openfoam-1.7.0/run/projects/TRAINS/Cordoba> snappyHexMesh -overwrite
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.0 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.0-21131bcbd876
Exec : snappyHexMesh -overwrite
Date : Aug 02 2011
Time : 17:36:20
Host : linux-bkii
PID : 7974
Case : /home/openfoam/OpenFOAM/openfoam-1.7.0/run/projects/TRAINS/Cordoba
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create mesh for time = 0

Read mesh in = 0.26 s

Overall mesh bounding box : (299348.525 4158905.764 0) (342171.227 4189109.863 2000)
Relative tolerance : 1e-06
Absolute matching distance : 0.0524411232048

Reading refinement surfaces.
Read refinement surfaces in = 37.63 s

Reading refinement shells.
Read refinement shells in = 0 s

Setting refinement level of surface to be consistent with shells.
Checked shell refinement in = 0 s


Determining initial surface intersections
-----------------------------------------



--> FOAM FATAL ERROR:
Number of cells in mesh:18000 does not equal size of cellLevel:18969
This might be because of a restart with inconsistent cellLevel.

From function hexRef8::getLevel0EdgeLength() const
in file polyTopoChange/polyTopoChange/hexRef8.C at line 357.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.7.0/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/openfoam/OpenFOAM/OpenFOAM-1.7.0/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::hexRef8::getLevel0EdgeLength() const in "/home/openfoam/OpenFOAM/OpenFOAM-1.7.0/lib/linuxGccDPOpt/libdynamicMesh.so"
#3 Foam::hexRef8::hexRef8(Foam::polyMesh const&, Foam::List<int> const&, Foam::List<int> const&, Foam::refinementHistory const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.7.0/lib/linuxGccDPOpt/libdynamicMesh.so"
#4 Foam::meshRefinement::meshRefinement(Foam::fvMesh& , double, bool, Foam::refinementSurfaces const&, Foam::shellSurfaces const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.7.0/lib/linuxGccDPOpt/libautoMesh.so"
#5 main in "/home/openfoam/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linuxGccDPOpt/snappyHexMesh"
#6 __libc_start_main in "/lib/libc.so.6"
#7 _start at /usr/src/packages/BUILD/glibc-2.10.1/csu/../sysdeps/i386/elf/start.S:122
Aborted
openfoam@linux-bkii:~/OpenFOAM/openfoam-1.7.0/run/projects/TRAINS/Cordoba>

Any suggestions, ....:confused:

Thank you,
Best Regards

Jochem August 3, 2011 03:36

Hello,

I don't immediately recognize the error but some suggestions are :

- Have you tried snappyhexmesh before in the same case? If there are some files left in your constant/polyMesh from the snappyhexmesh, you can't start a new mesh.

- Make sure your stl file is bigger than the domain of you blockMesh. So your stl file has a larger width and length than your blockMesh

I hope this helps.

Regards

inginer August 3, 2011 07:20

Hi Jochem,

the answer of the 1st question is yes; but i was building just a small case from the tutorial where i had all the coordinate, box and also the *.stl file. Now I have a different surface.
Your right, i didn't remove the history of the previous *.stl which I used. Thats why i was having that error. Now is starting the snappyhexmesh process, but seems that i have to decrease the dimensions of the box to allow the substraction of the *.stl surface.

Thank you,
Regards

samiam1000 September 23, 2011 13:25

Pardon the stupid question, but where can I find the turbineSiting tutorial?

I am looking for it, but it seems that I do not have it.

Thanks a lot,

Samuele

inginer September 23, 2011 17:06

Hello Samuel,

The turboSiting tutorial is located in incompressible/windSimpleFoam/turboSiting directory. This location is valid for OF version 2.0.1. For version OF 1.7.1 the location is in incompressible/simpeWindFoam directory. Also here you have the *.C code for this tutorial. you need to compilate the code before using (OF v.1.7.1) it.

Have a nice weekend!!!!

samiam1000 September 24, 2011 07:04

Thanks a lot Ovidiu,

I have found the tutorial.

I am gonna read some reports (if available!), but I still have a problem.

Could you help?

The point is that I am running OF-2.0.1. Hence, I change directory and I enter in the case directory.

Then I give the command
Code:

./Allrun
It works and when it finishes I write in the commandline
Code:

paraFoam
I can see the mesh, but all the values (u, p, k and epsilon) are constant.

So I try to give the command
Code:

windSimpleFoam
,

but I get this error message:

Code:

sammy@nash:~/OpenFOAM/sammy-2.0.1/run/tutorials/incompressible/windSimpleFoam/turbineSiting$ windSimpleFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.0.1-cce6c678443c
Exec  : windSimpleFoam
Date  : Sep 24 2011
Time  : 13:03:38
Host  : nash
PID    : 21325
Case  : /home/sammy/OpenFOAM/sammy-2.0.1/run/tutorials/incompressible/windSimpleFoam/turbineSiting
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 = 75

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu            0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.11;
    Prt            1;
}

Selecting model type actuationDiskSource
    Source: disk1
    - selecting cells using cellSet actuationDisk1


--> FOAM FATAL ERROR:
Cannot find file "" in directory "polyMesh/sets" in times 75 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 140.

FOAM exiting

Any idea?
Could you help?

Thanks,

Samuele

Jochem September 27, 2011 09:24

Hi Samuele,

Are you still strugling with the error you posted in my tread? If you do, the problem is in your snappyHexmeshdict file (in the system directory). The tutorial makes a mesh around 2 imaginery wind turbines (actuator disk) to calculate the energy output on these points in the .stl file. The place of these actuator disk is defined in the constant/source directory. If you don't wont to use imaginery wind turbines (like me) you have to delete them in your snappyHexmeshdict file. If you want to use them make sure you put them on the right place by adjusting the source file, so the disks are for example not placed outside your domain. This should solve your error.

Regards,

Jochem

McCarra September 20, 2012 03:29

In my case the problem cannot find file " " in directory polymesh/sets occurred because I ran topoSet with file compression activated in the controlDict and it just didn't recognize the file because of the format. When running topoSet with file compression off this error desappears.

Mc

alirezaj October 25, 2012 06:01

Hi all,

I use OF 2.1.1 , and there is no directory with the name of "windSimpleFoam" or "simpleWindFoam". It seems such solver does not exist anymore. In addition, turbineSiting tutorial is located in "simpleFoam" directory.

Does it mean that simpleWindFoam has been removed in OF 2.1.1 ?
If so, can I use simpleFoam for my case in which I have to study a wind turbine (actuator disk) in a wind park?

Regards,

Alireza

nimasam October 27, 2012 05:40

yep
it has been removed :)
it was in OpenFOAM-2.0.1 if you are interested in, but in latest version it has been removed!
look for MRFSimple cases, i think it would help you.

alirezaj October 30, 2012 04:01

MRFSimleFoam can be applied for non-newtonian folws which does not match my case (wind flow) unfortunately.
Do you know if in simpleFoam we can put a rotating mesh field like a wind turbine?

nimasam October 30, 2012 12:17

whats your mean?
MRFSimple can be applied both on newtonian and non-newtonian flow!

also you can use pimpleDyMFoam, if you want moving Mesh

alirezaj November 1, 2012 09:31

Hi Nima,

I would see that. Thanks for your advise.

jianggb May 8, 2017 22:42

keyword flowDir is undefined in dictionary
 
Hi all,

I am trying to use atmBoundaryLayerInletVelocity for a very simple application however I am receiving this error i cant figure out. Thanks for any helps however small


--> FOAM FATAL IO ERROR:
keyword flowDir is undefined in dictionary "/home/jgbfoam/OpenFOAM/jgbfoam-3.0.1/run/ptofc/additional_tutorials/tuts4/building/potential/0/U.boundaryField.inflow"
file: /home/jgbfoam/OpenFOAM/jgbfoam-3.0.1/run/ptofc/additional_tutorials/tuts4/building/potential/0/U.boundaryField.inflow from line 94 to line 102.
From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 442.
FOAM exiting

Antimony May 9, 2017 05:54

Hi,

As the error says, on the patch that you are applying the atmBoundaryLayerInletVelocity, you have not defined the direction of the flow, denoted by the parameter flowDir and given as a vector.

For example, if the flow is coming into the domain through a plane with normal along the positive Y-axis, then you would use:

Code:

type atmBoundaryLayerInletVelocity;
flowDir (0 -1 0);

Hope this clarifies.

Cheers,
Antimony


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