CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[SOWFA] SOWFA installation OpenFOAM 2.4.x OpenFAST

Register Blogs Community New Posts Updated Threads Search

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 5, 2019, 08:18
Default SOWFA installation OpenFOAM 2.4.x OpenFAST
  #1
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 https://github.com/NREL/SOWFA/blob/master/README.SOWFA


In the readme the link to the OpenFOAM installation https://github.com/OpenFOAM/OpenFOAM-2.4.x is brocken for download and installation information.
Therefore I installed OpenFOAM according to https://openfoamwiki.net/index.php/I...M-2.4.x/Ubuntu 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:
VirtualBox
Ubuntu 14.04
OpenFOAM 2.4.x
SOWFA as given in the link above
OpenFAST


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
mörli is offline   Reply With Quote

Old   January 28, 2020, 06:07
Default SOWFA Installation Instructions
  #2
Member
 
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
/OpenFOAM-2.4.0
/ThirdParty-2.4.0
2)
Code:
cd ~/OpenFOAM
3)
Code:
mkdir $USER-2.4.0 && cd $USER-2.4.0
new file structure $HOME/OpenFOAM
/OpenFOAM-2.4.0
/ThirdParty-2.4.0
/$USER-2.4.0
4) 5)
Code:
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:

Code:
#--------------------------

		# .bash_profile

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

		# SOWFA-2.4.0
		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..."
		   else
		      echo "     *Unsetting OpenFOAM environment variables..."
		      . $FOAM_INST_DIR/OpenFOAM-$OPENFOAM_VERSION/etc/config/unset.sh
		   fi

		   # Set the OpenFOAM version and installation directory
		   export OPENFOAM_VERSION=2.4.0
		   export OPENFOAM_NAME=OpenFOAM-$OPENFOAM_VERSION
		   export FOAM_INST_DIR=$inst_loc
		   export WM_PROJECT_USER_DIR=$HOME/OpenFOAM/$USER-$OPENFOAM_VERSION/SOWFA-$OPENFOAM_VERSION

		   foamDotFile=$FOAM_INST_DIR/$OPENFOAM_NAME/etc/bashrc
		   if [ -f $foamDotFile ] ; then
		      echo "Sourcing $foamDotFile..."
		      source $foamDotFile
		   fi

		   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 SOWFA_DIR=$FOAM_INST_DIR/$USER-$OPENFOAM_VERSION/SOWFA-$OPENFOAM_VERSION
		   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 LD_LIBRARY_PATH=$SOWFA_DIR/lib/$WM_OPTIONS:$OPENFAST_DIR/lib:$LD_LIBRARY_PATH
		   export PATH=$SOWFA_DIR/applications/bin/$WM_OPTIONS:$PATH
		}

#--------------------------
7) Source editted bash_profile
Code:
 . ~/OpenFOAM/$USER-2.4.0/SOWFA-2.4.0/.bash_profile; SOWFA-2.4.0
8)
Code:
./Allwclean
9)
Code:
./Allwmake
10)
Code:
cd
12) add line to bashrc (or similar) so the command SOWFA will load SOWFA
Code:
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

13)
Code:
SOWFA
14)
Code:
cd ~/OpenFOAM/$USER-$OPENFOAM_VERSION/SOWFA-$OPENFOAM_VERSION/exampleCases
15)
Code:
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
19)
Code:
 ./runscript.preprocess
20)
Code:
 ./runscript.solve.1
#------------------------------------------------------------------------------------------------------------------#




Hope this is useful to folks.
Callum
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
  #3
New Member
 
Vahid
Join Date: May 2020
Posts: 3
Rep Power: 5
vahid.f24 is on a distinguished road
Hi,
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
Default
  #4
Member
 
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:

https://github.com/NREL/SOWFA

All the best,
Callum
CallumG is offline   Reply With Quote

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

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

Old   June 24, 2020, 16:09
Default SOWFA Output
  #6
New Member
 
Vahid
Join Date: May 2020
Posts: 3
Rep Power: 5
vahid.f24 is on a distinguished road
Hi,
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
Default
  #7
New Member
 
Hrishikesh
Join Date: Oct 2016
Posts: 6
Rep Power: 9
hrishikeshsivanandan is on a distinguished road
If I have installed OpenFOAM-6 from Openfoam.org, 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

Reply

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


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
[OpenFOAM.org] Install OpenFOAM 2.4.x using system Scotch cbcoutinho OpenFOAM Installation 7 October 16, 2019 19:12
[Discussion] Restructuring the Installation page at openfoamwiki.net 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 05:53.