CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[SOWFA] SOWFA installation OpenFOAM 2.4.x OpenFAST

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes
  • 4 Post By CallumG
  • 1 Post By vahid.f24

LinkBack Thread Tools Search this Thread Display Modes
Old   March 5, 2019, 08:18
Default SOWFA installation OpenFOAM 2.4.x OpenFAST
New Member
Join Date: Mar 2019
Posts: 11
Rep Power: 7
mörli is on a distinguished road
Hi everyone,

I am completly new to SOWFA, OpenFOAM and also linux and thus sticking to installation guides provided.

I tried to install SOWFA with OpenFOAM 2.4.x and OpenFAST as stated in

In the readme the link to the OpenFOAM installation is brocken for download and installation information.
Therefore I installed OpenFOAM according to for Ubunutu 14.04. and OpenFAST according to the readme on github.

Both OpenFOAM and OpenFAST are working just fine. Nevertheless trying to install/compile SOWFA I get different errors.

On step 2 in the SOWFA readme it was said to adapt the .bash_profile file. I did this recognizing the originaly set path were given for installation of OpenFOAM in ~/OpenFOAM/$USER-$OpenFOAM_VERSION path, while the installation according to the link above ended in the path ~/OpenFOAM/OpenFOAM-$OpenFOAM_VERSIO. I thought I adapted it right and tried a lot of different things (too much to list all of them) but none of them seem to work.

I do not have to stick to any Versions except of using OpenFAST (not FAST8.16 or similar). Right now I treid following settings:
Ubuntu 14.04
OpenFOAM 2.4.x
SOWFA as given in the link above

Is there anyone using the same settings or can you post your versions and a corresponding link (I found other version suggestions in older posts, but the referring links were brocken and it was not possible to find them elsewhere)?

Thanks a lot in advance

mörli is offline   Reply With Quote

Old   January 28, 2020, 06:07
Default SOWFA Installation Instructions
Callum Guy
Join Date: Dec 2019
Location: Scotland
Posts: 44
Rep Power: 6
CallumG is on a distinguished road
Hi Morli,

I know the thread is old but I have suffered a similar plight so I thought I should put something together to help others who have struggled with this, especially those new to OF and Linux like myself. So just a disclaimer this if for people new to the software looking to install on local machine. The following are based on a Ubuntu 18.04 operating system.


Setting up SOWFA.

1) Install OpenFOAM-2.4.0 (or 2.4.x)

file structure $HOME/OpenFOAM
cd ~/OpenFOAM
mkdir $USER-2.4.0 && cd $USER-2.4.0
new file structure $HOME/OpenFOAM
4) 5)
mv NREL-SOWFA-<2fd1c71> SOWFA-2.4.0 && cd SOWFA-2.4.0
note the <version> of SOWFA could be different if NREL has updated it

6) edit file .bash_profile to:


		# .bash_profile

		# Get the aliases and functions
		if [ -f ~/.bashrc ]; then
			. ~/.bashrc

		# SOWFA-2.4.0
		  export inst_loc=$HOME/OpenFOAM
		  #export spack_loc=$HOME

		  #echo "Purging and loading modules..."
		  #module purge
		  #module use $spack_loc/spack/share/spack/modules/linux-centos7-x86_64
		  #module load gcc-4.8.5-gcc-4.8.5-nkqvx2b
		  #module load openmpi-1.10.7-gcc-4.8.5-qu7mrny
		  #module load cgal-4.12-gcc-4.8.5-vd4qb7j
		  #module load boost-1.69.0-gcc-4.8.5-52cfbc4
		  #module load mpfr-3.1.6-gcc-4.8.5-kflyoj7
		  #module load readline-7.0-gcc-4.8.5-b4z2xcj
		  #module load scotch-6.0.6-gcc-4.8.5-3xkg4i7
		  #module load flex-2.6.4-gcc-4.8.5-htapbeu
		  #module load gmp-6.1.2-gcc-4.8.5-6bsovvk
		  #module list

		   # Unset OpenFOAM environment variables.
		   if [ -z "$FOAM_INST_DIR" ]; then
		      echo "Nothing to unset..."
		      echo "     *Unsetting OpenFOAM environment variables..."
		      . $FOAM_INST_DIR/OpenFOAM-$OPENFOAM_VERSION/etc/config/

		   # Set the OpenFOAM version and installation directory
		   export OPENFOAM_VERSION=2.4.0
		   export FOAM_INST_DIR=$inst_loc

		   if [ -f $foamDotFile ] ; then
		      echo "Sourcing $foamDotFile..."
		      source $foamDotFile

		   export WM_NCOMPPROCS=8 # change this to your number of cores
		   export WM_COLOURS="white blue green cyan red magenta yellow"

		   alias tut='cd /home/$USER/OpenFOAM/$OPENFOAM_NAME/tutorials'

		   export OPENFAST_DIR=~/OpenFAST/openfast/install # if you want to couple OpenFAST with SOWFA this needs changing to where your openfast install is
		   export HDF5_DIR=${where HDF5 is}					                               
		   export PATH=$SOWFA_DIR/applications/bin/$WM_OPTIONS:$PATH

7) Source editted bash_profile
 . ~/OpenFOAM/$USER-2.4.0/SOWFA-2.4.0/.bash_profile; SOWFA-2.4.0
12) add line to bashrc (or similar) so the command SOWFA will load SOWFA
echo "alias SOWFA='source $HOME/OpenFOAM/$USER-2.4.0/SOWFA-2.4.0/.bash_profile; SOWFA-2.4.0'" >> ~/.bashrc

Check it has compiled correctly by testing the ABL Solver

cp -r example.ABL.flatTerrain.neutral/ TEST_ABLSolver && cd TEST_ABLSolver
16) edit file runscript.preprocessor
comment out lines 13, 79, 80 (Just the OF version variable and the sourcing lines)

17) edit file runscript.solve.1
comment out lines 8, 9, 10, 12 (Sourcing lines and PBS variable for running on a cluster)
change variable "cores" to how many cores you have (line 14)

18) edit setUp file
change variables "nx", "ny" & "nz" to 30, 30 & 10 respectively (lines 16-18)
# note the above will give poor results this is just to check the solver runs
change variable "nCores" to your number of cores (line 24)
change the variable "decompOrder" to what is suitable for your hardware (line 26)
# for example if nCores is 8 decompOrder could be (2 2 2) 2*2*2=8

Hope this is useful to folks.
kkpal, AqeelAhmed168, rua and 1 others like this.

Last edited by CallumG; January 28, 2020 at 09:39. Reason: correction
CallumG is offline   Reply With Quote

Old   May 29, 2020, 01:38
Default SOWFA installation
New Member
Join Date: May 2020
Posts: 3
Rep Power: 6
vahid.f24 is on a distinguished road
I'm trying to install the SOWFA, but I don't have these two folders (.bash_profile, .gitignore) in my SOWFA Folder.
I used ubuntu 14.04
How can i add this two folder in my SOWFA folder?

Best Regards
vahid.f24 is offline   Reply With Quote

Old   May 29, 2020, 02:07
Callum Guy
Join Date: Dec 2019
Location: Scotland
Posts: 44
Rep Power: 6
CallumG is on a distinguished road
Hi vahid

just to ckeck that the two files you mentioned are hidden files so first ensure you are viewing hidden files too in your explorer.

With regards to the .gitignore that is a github file and not really important, however both are available here:

All the best,
CallumG is offline   Reply With Quote

Old   May 29, 2020, 02:42
New Member
Join Date: May 2020
Posts: 3
Rep Power: 6
vahid.f24 is on a distinguished road
Hi Callum,
Thanks a lot
I solved it with your help,

Best Regards,
CallumG likes this.
vahid.f24 is offline   Reply With Quote

Old   June 24, 2020, 16:09
Default SOWFA Output
New Member
Join Date: May 2020
Posts: 3
Rep Power: 6
vahid.f24 is on a distinguished road
I installed Openfoam and SOWFA in my Ubuntu 16.04, and run them completely, but Tecplot isn't install in my Ubuntu, can anyone help me?

Best Regards

Last edited by vahid.f24; July 8, 2020 at 07:09.
vahid.f24 is offline   Reply With Quote

Old   July 29, 2020, 12:48
New Member
Join Date: Oct 2016
Posts: 6
Rep Power: 9
hrishikeshsivanandan is on a distinguished road
If I have installed OpenFOAM-6 from, and it is present in /opt/openfoam6, can I not change the files in .bash_profile file?

Also, I have cloned the git of SOWFA within /opt/openfoam6 and am trying to change the .bashrc files. However I am getting an error meshPlanes.H could not be found. Is this because I have the wrong files for Openfoam or SOWFA?
hrishikeshsivanandan is offline   Reply With Quote


installation problem, openfast, openfoam 2.4.x, sowfa, ubuntu

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[] Install OpenFOAM 2.4.x using system Scotch cbcoutinho OpenFOAM Installation 7 October 16, 2019 19:12
[Discussion] Restructuring the Installation page at wyldckat OpenFOAM Installation 16 November 2, 2013 11:43
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
OpenFOAM 1.7.1 installation problem on Fedora 14 armonica OpenFOAM Installation 16 March 31, 2011 13:16
Installation of OpenFOAM 1.7.1 to OprnSUSE 11.2 superfxfund OpenFOAM Installation 3 November 11, 2010 02:15

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