SOWFA Support

Please post your SOWFA questions here–especially if others might find the information useful.

If no one replies to your question, please send email to

Note that the reason for posting questions here is so that the SOWFA developers will see your question in their RSS feed. If you post SOWFA questions elsewhere on this forum, we will move them here.

hi Marshall and SOWFA enthusiasts,

I have been working off the version of SOWFA available on GitHub, and I have also encountered just about every compiling error that is mentioned on these forums. With the help of searching the NWTC forums, I was able to resolve many of these errors. Thanks to everybody who suggested solutions, and I have made a fork on GitHub that applied these modifications. I recently managed to get the “fastDuct” tutorial running, and hopefully it can run for others too. Here is the link:

I have a question related to the “fastDuct” tutorial. I received some compile errors that indicated several missing input parameters in the file “tutorials/fastDuct/system/fvSchemes”, so to resolve I added the input variables shown below. And my question: what is the meaning of these input variables, and can you suggest what are appropriate values?

// These inputs used by pisoFoamTurbine solver.  How to set these values?
xBlending1          0.00;
xBlending2          0.33;
xBlending3          0.66;
xBlending4          1.00;
blendingFactor1     0.25;
blendingFactor2     0.75;

Thanks for the help!


Danny Sale
University of Washington

Hi everyone,

I have tried to run the cases in SOWFA tutorial. I encountered three questions:

  1. Running the precursorABL/neutral, I got the following U_x distribution at the mid-section (y=1500 m) at time t=12000 s. As can be seen from the first figure below, U_x goes up with z and then drops down. How can I explain the decrease in U_x?
  2. Running the windPlant/neutral, I got the following pd distribution at z=100 m at time 12100 (the second figure below). Does it seem to be correct? While I have a wind turbine at the midpoint, nothing can be seen in pd distribution. This can change (and becomes reseaonable) using zeroGradient as pressure boundary condition at all boundaries instead of bouyantPressureMod; however, I am not sure it is correct.
  3. I want to check if the velocity profile matches the log-law. There is a figure on Brasseur and Wei’s paper. They have depicted U/u* vs z/l_v. When simulation is done, I have U and z. How can I find u* from my simulation? (or how can I find mean wall shear stress?)

Thank you for your help,

Behnam Moghadassian

Hello everyone,

I was wondering if there is a precursorABL tutorial avaliable using the ABLTerrainSolver instead of the ABLSolver?

I am trying to understand what might change compared to the ABLSolver. Do I just have to add the terrain on the
bottom of the domain? Do I have to run snappyHeyMesh afterwards? A short tutorial showing the usage of the terrain
solver would be great!

Thank you very much!

Best, Thomas

Hello everybody!

I am getting started with the new SOWFA version after having some experience with the old one.
The new ABL runs already succesfully, but for the windPlantSolverFAST, I see that there is no tutorial
and there are several changes since the last version.
Could you tell me what “hWindWidht” stands for ?
After looking at the source code,
I added this term to the ABL dictionnary with a value of 0 and it seems to work :slight_smile: ,
but I would have prefered to better understand.

Thank you in advance for your help!

Best regards,


I am trying to install SOWFA on the high-performance computing cluster of ETH Zurich (CentOS 6.5, 64 bit). We have several versions of OpenFOAM installed (2.0.1, 2.1.1, 2.2.1). I decided to install SOWFA for the 2.0.1 version of OpenFOAM, since in the README.SOWFA it is mentioned that it should run well with this version. I did the following steps to compile SOWFA with GCC 4.6.2 and OpenMPI 1.6.5:

1.) module load legacy python/2.7.2 gcc/4.6.2 open_mpi/1.6.5 openfoam/2.0.1
→ sets the LD_LIBRARY_PATH such that it includes the path’s to the compiler, OpenMPI and OpenFOAM
2.) foam-init
→ sources the OpenFOAM script that sets all the $WM_… variables
3.) mkdir -p $HOME/OpenFOAM/sfux-2.0.1
4.) cd $HOME
5.) git clone
6.) cd SOWFA
7.) mv * $HOME/OpenFOAM/sfux-2.0.1
8.) cd $HOME/OpenFOAM/sfux-2.0.1
9.) ./Allwclean
10.) ./Allwmake

During the compilation two problems showed up:

I.) Making dependency list for source file dynLagrangianCsBound/dynLagrangianCsBound.C
make: *** No rule to make target derivedFvPatchFields/surfaceStressModels/SchumannGrotzbach/SchumannGrotzbachFvPatchField.dep', needed by Make/linux64GccDPOpt/dependencies’. Stop.

II.) Making dependency list for source file windPlantSolverFAST.C
could not open file horizontalAxisWindTurbinesFAST.H for source file windPlantSolverFAST.C
SOURCE=windPlantSolverFAST.C ; mpiCC -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/finiteVolume/lnInclude -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/turbulenceModels -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/turbulenceModels/incompressible/turbulenceModel -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/transportModels -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/transportModels/incompressible/singlePhaseTransportModel -I/cluster/home/sdid/sfux/OpenFOAM/sfux-2.0.1/src/fastturb/lnInclude -IlnInclude -I. -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/OpenFOAM/lnInclude -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/windPlantSolverFAST.o
windPlantSolverFAST.C:55:44: fatal error: horizontalAxisWindTurbinesFAST.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/windPlantSolverFAST.o] Error 1

I have no idea about problem I.) but I tried to solve II.) by adding the following line to the EXE_INC variable in applications/solvers/incompressible/windEnergy/windPlantSolverFAST/Make/options:

[b] -I$(WM_PROJECT_USER_DIR)/src/fastturb/horizontalAxisWindTurbinesFAST [/b]

Then I tried again to run Allwclean and Allwmake. The error message II.) disappeared, but there is a new one:

mpiCC -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/finiteVolume/lnInclude -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/turbulenceModels -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/turbulenceModels/incompressible/turbulenceModel -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/transportModels -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/transportModels/incompressible/singlePhaseTransportModel -I/cluster/home/sdid/sfux/OpenFOAM/sfux-2.0.1/src/fastturb/horizontalAxisWindTurbinesFAST -I/cluster/home/sdid/sfux/OpenFOAM/sfux-2.0.1/src/fastturb/lnInclude -IlnInclude -I. -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/OpenFOAM/lnInclude -I/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linux64GccDPOpt/windPlantSolverFAST.o -L/cluster/apps/openfoam/2.0.1/DP/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib
-Lfast/bin -L/cluster/home/sdid/sfux/OpenFOAM/sfux-2.0.1/platforms/linux64GccDPOpt/lib -lfiniteVolume -lmeshTools -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lincompressibleTransportModels -luserfastturb -lgfortran -lfast -lOpenFOAM -ldl -lm -o /cluster/home/sdid/sfux/OpenFOAM/sfux-2.0.1/platforms/linux64GccDPOpt/bin/windPlantSolverFAST
/usr/bin/ld: cannot find -luserfastturb
collect2: ld returned 1 exit status
make: *** [/cluster/home/sdid/sfux/OpenFOAM/sfux-2.0.1/platforms/linux64GccDPOpt/bin/windPlantSolverFAST] Error 1

The compiler tries to link against, which does apparently not exist at this stage of the compilation process. I searched this forum and the internet for a solution but could not find anything related to this problem. Therefore I would like to ask if anybody experienced the same problem and found a solution for it.

Thank you very much in advance.

Best regards

Samuel Fux

Dear Samuel,

in the second post Danny states that he had cloned the original git archive and
solved most of the problems with compiling. I used his archive with OpenFOAM
version 2.2.2 and everything worked fine. I also started to port his archive to
OpenFOAM version 2.3.0 … which also works now except for the librarys … thats
above my c++ skills … :-/

For Dannys archive look into the post above for my archive look here …

deleted (original archive works just fine with 2.3.0 now …

Maybe you would like to work on the library port??



Dear all,

Good morning. Thank you very much for people who published the LES code for wind energy. I got the new version of SOWFA, which has been released about two days ago. I have downloaded the package and and installed into my desktop (Ubuntu 14.04 64 bit, OpenFOAM 2.2.2) without any compiling error.

There are a couple of warnings such as 'unused variable’s and a failure ‘ln: failed to create symbolic link ‘./none.H: File exists’. I guess it is nothing cirtical for the installation. However, when I tried to run the test simulation from the tutorial ‘/tutorials/precursorABL/neutral’ folder. I got the error when it was trying to make the initialization (setFieldsABL) of the simulation:

→ FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : cannot open shared object file: No such file or directory
→ FOAM Warning :
From function dlLibraryTable::open(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load “”

I guess although the library has been compiled to a binary file, something inside is not correct.

Secondly, I didn’t see (‘windPlantSolverFAST’) being compiled. I don’t know whether it needs to be transformed to an actual executable file or not, so I decided list the file I have in bin folder and lib folder, so that everyone can see if there is anything missing.


  1. ABLSolver
  2. ABLTerrainSolver
  3. pisoFoamTurbine
  4. setFieldABL
  5. turbineTestHarness
  6. windPlantSolver


  2. libuserincompressibleLESModels
  3. libuserTurbineModels

Apart from my work on my desktop, I also try to compile the SOWFA in the cluster. Unluckily, it didn’t go well, although I applied exactly way to install the package. Here is the error that I got.

windPlantSolver.C:54:43: fatal error: horizontalAxisWindTurbinesALM.H: No such file or directory
compilation terminated.
make: *** [Make/linux64Gcc47DPOpt/windPlantSolver.o] Error

Obviously, this ‘horizontalAxisWindTurbinesALM.H’ cannot be found during the compiling process.

I hope anyone can help me with those issues, I would be so appreciated for your help.

Best Regards,


Dear Jesse,

the solver suite still needs some tweaking (the recent update solved most of the compiling problems but there are still
some things you need to change).

I don’t know what your first issue is but the problem with the include file can be solved it you add the following line
in the “applications/ … /windPlantSolver/Make/options” file

-I$ something something something

The “windPlantSolverFAST” hasn’t been updated to include the changes that where incorporated in the 2.2.2 Version. I would
also recommend using the new OpenFOAM 2.3.0 version. If you need the FAST version of the solver you would have to change
the sources yourself. It’s not that hard … just use the windPlantSolver as pattern and change the lines that do the FAST trick.
I think you only need to change / add a few lines (maybe you should also read the tutorial on the main page … the changes to
incorporate FAST into any solver are explained very well there).

Best, Thomas

Dear Thomas,

Thank you very much for your reply. I have resolved most of the issues that I’ve posted. Then I tried to run the simualtion for tutorial - precursorABL - stable. There are two warning (I supposer they are critical for the simulation) existing in the log files for decompose, setFieldsABL and ABLSolver.

→ FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1175
dlopen error : /home/jesse/OpenFOAM/jesse-2.1.1/platforms/linuxGccDPOpt/lib/ undefined symbol: _ZTIN4Foam14incompressible9LESModels11GenEddyViscE
→ FOAM Warning :
From function dlLibraryTable::open(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
could not load “”
Create mesh for time = 0

Regarding the old version of SWOFA, the simulation can be completed even when the warning exists. However, the simulation cannot be proceeded.

Unknown patchField type velocityABLWallFunction for patch type wall
Valid patchField types are :


It clearly indicates that since the library cannot be loaded, the partchField type cannot be found. I consider it is an important issue for the developer. Could you take a look at that? Thank you very much.



Dear Jesse,

first … I am not a developer! I am just a user and my posts are based on my own experience and observation! :slight_smile:

Your issue is a linking error you need to add

-lincompressibleTurbulenceModel \
-lincompressibleLESModels \

in your “Make/options” file. Detailed information could be found here … … model.html



Dear Thomas,

I followed the instruction and the warning was removed successfully. But when I tried to run the test case from the tutorial. I got:


Cannot find 'value' entry on patch lower of field p_rgh in file "/home/jesse/OpenFOAM/jesse-2.3.0/tutorials/precursorABL/neutral/0/p_rgh"
which is required to set the values of the generic patch field.
(Actual type buoyantPressure)

Please add the 'value' entry to the write function of the user-defined boundary-condition

file: /home/jesse/OpenFOAM/jesse-2.3.0/tutorials/precursorABL/neutral/0/p_rgh.boundaryField.lower from line 28 to line 29.

From function genericFvPatchField<Type>::genericFvPatchField(const fvPatch&, const Field<Type>&, const dictionary&)
in file genericFvPatchField/genericFvPatchField.C at line 71.

which doesn’t exist in the old version of SOWFA. I don’t know if there is anything changed for the new SOWFA.

Best Regards,


Hello everyone,

yesterday I downloaded the updated version of SOWFA from github. After several small tweaks everything
compiles fine. I tried the precursorABL/neutral tutorial case and after some updates (fixedFluxPressure
instead of buoyantPressure) I started the case. I used blockMesh, setFieldsABL (which already failed
because there was the following error)

[code]Build : 2.3.0-f5222ca19ce6
Exec : setFieldsABL
Date : Dec 05 2014
Time : 14:08:06
Host : “cfd”
PID : 2650
Case : /home/cfd/OpenFOAM/cfd-2.3.0/run/SOWFA/tutorials/precursorABL/neutral
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 U
Reading field T
Reading field p_rgh
Creating/Calculating face flux field, phi…
Reading gravitational acceleration…
Selecting incompressible transport model Newtonian
Creating the kinematic density field, rhok…

u* = 0.35863751503 m/s

<U_1> = (6.92820323026 3.99999999999 0) <U_s> = (6.92820323026 3.99999999999 0) <dU/dn> = (-1.16193474595e-18 -3.25610680393e-18 0)

updateCoeffs(const scalarField& snGradp) MUST be called before updateCoeffs() or evaluate() to set the boundary gradient.

From function fixedFluxPressureFvPatchScalarField::updateCoeffs()
in file fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C at line 151.

FOAM exiting

I anyways tried to let the ABLSolver run but an error alike the above occured. I then commented out the line 325 in setFieldsABL.C
(p_rgh.correctBoundaryConditions():wink: and the setFieldABL utility ran afterwards. I also commented the line 92 in ABLSolver.C out
(see before) and the solver ran up to this point

| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 2.3.0 |
| \ / A nd | Web: |
| \/ M anipulation | |
Build : 2.3.0-f5222ca19ce6
Exec : ABLSolver
Date : Dec 05 2014
Time : 12:28:26
Host : “cfd”
PID : 10092
Case : /home/cfd/OpenFOAM/cfd-2.3.0/run/SOWFA/tutorials/precursorABL/neutral
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 the gravitational acceleration, g…
Reading planetary rotation rate…
Reading the latitude…
Creating and reading potential temperature field, T…
Creating and reading modified pressure field, p_rgh…
Creating and reading velocity field, U…
Creating and calculating velocity flux field, phi…
Reading/calculating face flux field phi

Reading transport properties…
Selecting incompressible transport model Newtonian
Reading the atmospheric boundary layer properties…
Specified wind at 80 m:
Time 0, wind from 240 degrees at 8 m/s
Time 50000, wind from 240 degrees at 8 m/s

 +x is east and +y is north

    W 270 --       --  90 E


Omega [0 0 -1 0 0 0 0] (0 5.40430167656e-05 4.86605508618e-05)
Creating turbulence model…
Selecting turbulence model type LESModel
Selecting LES turbulence model dynLagrangianCsBound
Selecting LES delta type smooth
Selecting LES delta type cubeRootVol
filter simple;
ce 1.048;
theta 1.5;

Creating the Coriolis force vector, fCoriolis…
Creating kinematic (Boussinesq) density field, rhok…
Creating the kinematic thermal conductivity field, kappat…
Reading and creating the wall shear stress field, Rwall…
Reading and creating the wall temperature flux field, qwall…
Creating and calculating the gravity potential field, gh and ghf…
Creating and calculating the static pressure field, p…
Setting up the pressure reference cell information…
Creating mean temperature field, Tmean…
Creating fluctuating temperature field, Tprime…
Creating mean velocity field, Umean…
Creating fluctuating velocity field, Uprime…
Creating mean SGS stress field, Rmean…
Creating mean SGS temperature flux field, qmean…
Creating mean SGS viscosity field, nuSGSmean…
Initializing with zero pressure gradient…

Courant Number mean: 0.373333333393 max: 0.373333333333

Total number of cell center height levels: 100
78400 90000000

78400 90000000
Local Flux Continuity Error: Min 0 Max 3.39686165615e-14 Weighted Mean 8.87516162301e-17
Total Boundary Flux: 3.92910790963e-24

PIMPLE: Operating solver in PISO mode

Starting time loop

<U_1> = (8 0 0) <U_s> = (8 0 0) <dU/dn> = (0 0 0)
DILUPBiCG: Solving for flm, Initial residual = 1, Final residual = 0.00180675762046, No Iterations 1
DILUPBiCG: Solving for fmm, Initial residual = 1, Final residual = 0.00180675761966, No Iterations 1
TRef = 290
uStarMean = 0.817991099632 LMean = 9.99999999996e+29 phiMMean = 1
UParallelMeanMag = 8 UParallelPMeanMag = 8
RwMagMean = 0.669109439077 RwMeanMag = 0.669109439077 sqrt(RwMagMean) = 0.817991099632 sqrt(RwMeanMag) = 0.817991099632 uStarMean = 0.817991099632
z1Mean = 4.99999999999
TRef = 290
TSurfaceMean = 300 TAdjacentMean = 300 deltaTMean = 0
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in “/lib/x86_64-linux-gnu/”
#3 Foam::fixedHeatingRateFvPatchField::qwEvaluate(double&, double&, double&, double&, double&, double, double, double, double, double, double, double, double, double, double, double, double, double, double, int) at ??:?
#4 Foam::fixedHeatingRateFvPatchField::evaluate(Foam::UPstream::commsTypes) at ??:?
#5 Foam::GeometricField<Foam::Vector, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() at ??:?
at ??:?
#7 __libc_start_main in “/lib/x86_64-linux-gnu/”
at ??:?
Gleitkomma-Ausnahme (Speicherabzug geschrieben)

Anyone out there who could help me resolve this issue? Is there a function that is used to replace the p_rgh.correctBoundaryConditions()???
Any help is greatly appreciated!

Thanks a lot!

Best, Thomas


I was able to delimit the second error mentioned above here


In line 309 of the above file there is a call to the “qwevaluate” function which seems to cause the error during the first
iteration (facei=0). As it produces an floatingpoint exception this might be a clue for someone more skilled than me to
help me solve the error?

Thanks a lot.

Best, Thomas

This is an UN-official tutorial case I put together for
the ABLTerrainSolver (github version dated January 2015).

I used OpenFOAM 2.2.2 on a Ubuntu 14.04 64-bit computer.
The tutorial might be adapted to OpenFOAM 2.3.0 but the
“buoyantPressure” boundary condition doesn’t exist in
2.3.0 anymore … one could use “fixedFluxPressure” but
I won’t do it … ;-)

Just run the “Allrun.pre” and “” scripts and
follow the instructions.

Hope to be able to help someone out there! :slight_smile:

Best, Thomas :stuck_out_tongue:

Thanks, Thomas. We always appreciate when the community helps each other. :slight_smile:

Hello everyone,

I was wondering something …

The logarithmic windprofile is implemented like this

scalar uStar0 = (kappa * U) / Foam::log(z1 / z0)

but this is only valid for low surface roughness as far as I know.
In cases with terrain it is rarely the case that the roughness
is as low as in offshore cases. With this in mind shouldn’t the windprofile
be implemented in a way that takes the roughness into account?

Maybe more like this

scalar uStart0 = (kappa * U) / Foam::log( (z1 -d) / z0)

where d = dislocation height, ranging from (0.4 to 0.8 depending on the
density of the vegetation).


Best, Thomas

Hi, Thomas.

Typically z0 represents the surface roughness, so I think the implemented equation is correct. (It’s also the same equation used in TurbSim with neutral stability.)

I am working SOWFA and I run precursorABL successfully. after running precursorABL Solver up to quasi equilibrium condition, I run that for extra 2000 sec to get inflow data needed for windPlant Solver. Now I want to take them to windPlant Solver. I read in this forum that in this step, I should run “” and “”, but I can’t find them in SOWFA tutorial. I would appreciate if anybody can give me a link to get that.
Another question is that which quantity should be taken from precursorABL to windPlant Solver. In “BoundaryDataPre” which I found in precursorABL tutorial, only U, T, flm and fmm was written to be exported. Is there any need to add extra quantity like pressure or … to this file or not.
Thank In Advance

Dear Morteza,

those scripts seems not to be included in the github archive anymore but I found them in the OffWind github

Take a look here …

Best, Thomas