CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

running NREL sample turbine

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 11, 2014, 06:01
Default running NREL sample turbine
  #1
New Member
 
ruben p.
Join Date: Dec 2013
Location: Copenhagen, Denmark
Posts: 7
Rep Power: 3
ollebapur is on a distinguished road
Hi CFD experts!

I am trying to run the NREL wind turbine code found in their website ( http://wind.nrel.gov/designcodes/simulators/sowfa/ ), by following the instructions on their pdf file ( http://wind.nrel.gov/designcodes/sim...05-03-2012.pdf , slide 88).

So far, I managed to decompress the downloaded folder, but I am not able to run "./Allwclean" nor "./Allwmake" . The errors I get are:
ruben@ruben-VirtualBox:/opt/openfoam211$ ./Allwclean
bash: ./Allwclean: No such file or directory
and a quite extensive list of errors of the kind
ruben@ruben-VirtualBox:/opt/openfoam211$ ./Allwmake
make: Nothing to be done for `all'.
no ThirdParty sources found - skipping
+ wmakePrintBuild -check
no git description found
+ /bin/rm -f OpenFOAM/Make/*/global.?
+ wmakeLnInclude OpenFOAM
+ wmakeLnInclude OSspecific/POSIX
+ Pstream/Allwmake
+ wmake libso dummy
mkdir: cannot create directory `linux64GccDPOpt': Permission denied
/bin/sh: cannot create linux64GccDPOpt/options: Directory nonexistent
make: *** [linux64GccDPOpt/options] Error 2
/opt/openfoam211/wmake/MakefileFiles:40: linux64GccDPOpt/options: No such file or directory
make: *** No rule to make target `linux64GccDPOpt/options'. Stop.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created in /opt/openfoam211/src/Pstream/dummy
...
mkdir: cannot create directory `linux64GccDPOpt': Permission denied
/bin/sh: cannot create linux64GccDPOpt/options: Directory nonexistent
make[2]: *** [linux64GccDPOpt/options] Error 2
/opt/openfoam211/wmake/MakefileFiles:40: linux64GccDPOpt/options: No such file or directory
make[2]: *** No rule to make target `linux64GccDPOpt/options'. Stop.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created in /opt/openfoam211/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam
make[1]: *** [solidEquilibriumDisplacementFoam] Error 1
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/opt/openfoam211/applications/solvers/stressAnalysis'
make: *** [stressAnalysis] Error 2
make: Target `application' not remade because of errors.
ruben@ruben-VirtualBox:/opt/openfoam211$
I believe it has to do with the permissions I have for my openfoam directory, but I am the one who installed it and the only one using it. Any idea of how I could make this code run?

The OpenFOAM version I am running is 2.1.1, on an Ubuntu 11.10 virtual machine.

Thanks!
Ruben
ollebapur is offline   Reply With Quote

Old   February 14, 2014, 11:09
Default
  #2
Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 89
Rep Power: 5
pbachant is on a distinguished road
I was recently trying to compile SOWFA, but ran into different issues.

Regarding yours, you are trying to compile in a system directory without root privileges. Reread the SOWFA installation instructions in the README. They instruct you to put the code in your OpenFOAM user directory (not opt), then run Allwmake. Be careful using Allwclean. When I ran it, it couldn't find various folders, then ended up in my home directory, deleting all files (not directories, thankfully).
pbachant is offline   Reply With Quote

Old   February 17, 2014, 06:53
Default
  #3
New Member
 
ruben p.
Join Date: Dec 2013
Location: Copenhagen, Denmark
Posts: 7
Rep Power: 3
ollebapur is on a distinguished road
Thanks Pete!

I was checking the instructions on the pdf from the website, not the readme file.

On step two, it states:
2. When you installed OpenFOAM, you modified your login script
(.bash_profile or similar). Make sure that the environment variable
WM_PROJECT_USER_DIR points to where you put the renamed "user-2.0.x"
directory.
As per http://www.openfoam.org/archive/2.1....oad/ubuntu.php , I had to modify the file ~/.bashrc . So I tried to check there if there is anything pointing to my correspondig directory. However, I look at bashrc and I cant really tell where is WM_PROJECT_USER_DIR pointing to it :/

Maybe, that was not the right file to work with? In which one did you check that WM_PROJECT_USER_DIR is pointing to the right directory?

Here is the content of my bashrc file:
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.


if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi

source /opt/openfoam211/etc/bashrc

Thanks!
Ruben
ollebapur is offline   Reply With Quote

Old   March 6, 2014, 13:52
Default
  #4
New Member
 
Zhong, Hong Min
Join Date: Oct 2012
Location: UESTC, Chengdu in China
Posts: 8
Rep Power: 4
iamacloud is on a distinguished road
I remember I compiled the code SOWFA about a year ago, several keys noted:
1. OPENFOAM should be installed correctly to ensure a good compiler C++ envorinments and read the README file in SOWFA before compiling.
2. WM_PROJECT_USER_DIR mentioned by you might point anywhere, but the HOME (linux) directory usually is good to avoid the permission right problems.
3. there are some FORTRAN code in SOWFA, have you a suitable FORTRAN compiler? if not, you can delete the FT files and remember to rewrite the MAKE file.
hope useful to you.
ZHM
iamacloud is offline   Reply With Quote

Old   March 6, 2014, 15:37
Default
  #5
Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 89
Rep Power: 5
pbachant is on a distinguished road
Ruben,

In a terminal, you can simply enter

Code:
echo $WM_PROJECT_USER_DIR
to find your user directory. It is most likely already set as /home/yourname/OpenFOAM/yourname-2.1.1 or similar.
pbachant is offline   Reply With Quote

Old   March 28, 2014, 08:10
Default
  #6
New Member
 
ruben p.
Join Date: Dec 2013
Location: Copenhagen, Denmark
Posts: 7
Rep Power: 3
ollebapur is on a distinguished road
Thanks Pete and Zhong

I did install a Fortran compiler, and kept moving on with the SOWFA set-up. I started to compile all the solvers one by one, and faced an error when trying with "fastPisoSolver" (see below)


rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver$ wmake
options:5:58: warning: backslash-newline at end of file [enabled by default]
Making dependency list for source file pisoFoam.C
SOURCE=pisoFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/turbulenceModels/incompressible/turbulenceModel -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/transportModels -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/transportModels/incompressible/ -IlnInclude -I. -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/pisoFoam.o
In file included from pisoFoam.C:61:0:
initContinuityErrs.H:33:29: warning: missing whitespace after the macro name [enabled by default]
pisoFoam.C:85:3: error: invalid preprocessing directive #turbines
In file included from pisoFoam.C:61:0:
initContinuityErrs.H: In function ‘int main(int, char**)’:
initContinuityErrs.H:37:1: error: expected ‘;’ before ‘scalar’
initContinuityErrs.H:37:29: warning: statement has no effect [-Wunused-value]
pisoFoam.C:67:33: error: ‘turbfast’ was not declared in this scope
In file included from pisoFoam.C:169:0:
continuityErrs.H:40:5: error: ‘cumulativeContErr’ was not declared in this scope
pisoFoam.C:184:5: error: ‘turbines’ was not declared in this scope
readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
make: *** [Make/linuxGccDPOpt/pisoFoam.o] Error 1
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver$ rmdepall
removing all .dep files ...
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver$ wclean
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver$ cd fast/bin
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver/fast/bin$ rm *
rm: cannot remove `*': No such file or directory
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver/fast/bin$ cd ../..
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver$ wmake
options:5:58: warning: backslash-newline at end of file [enabled by default]
Making dependency list for source file pisoFoam.C
SOURCE=pisoFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/turbulenceModels/incompressible/turbulenceModel -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/transportModels -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/transportModels/incompressible/ -IlnInclude -I. -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/pisoFoam.o
In file included from pisoFoam.C:61:0:
initContinuityErrs.H:33:29: warning: missing whitespace after the macro name [enabled by default]
initContinuityErrs.H: In function ‘int main(int, char**)’:
initContinuityErrs.H:37:1: error: expected ‘;’ before ‘scalar’
initContinuityErrs.H:37:29: warning: statement has no effect [-Wunused-value]
pisoFoam.C:67:33: error: ‘turbfast’ was not declared in this scope
In file included from pisoFoam.C:169:0:
continuityErrs.H:40:5: error: ‘cumulativeContErr’ was not declared in this scope
pisoFoam.C:184:5: error: ‘turbines’ was not declared in this scope
readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
make: *** [Make/linuxGccDPOpt/pisoFoam.o] Error 1


All the others can run now without problems, except this one.

In my bashrc file WM_PROJECT_USER_DIR is defined as:


# Location of user files
# ~~~~~~~~~~~~~~~~~~~~~~
export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION

However, when installing OpenFoam, I set it here:

# Location of the OpenFOAM installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foamInstall=/work/$USER/$WM_PROJECT


Could that be a reason of why I'm having such an error?

Thanks in advance!
Ruben
ollebapur is offline   Reply With Quote

Reply

Tags
nrel, of211, permission denied

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error when running sample "size 30 is not equal to the given value of 40" ArathoN OpenFOAM Running, Solving & CFD 1 February 20, 2014 16:02
Something weird encountered when running OpenFOAM in parallel on multiple nodes xpqiu OpenFOAM Running, Solving & CFD 2 May 2, 2013 04:59
BEM Analysis of NREL phase VI turbine er_ijaz Main CFD Forum 11 April 17, 2013 08:04
heat conducting in a solid domain Rogerio Fernandes Brito CFX 0 March 18, 2008 18:20
about my old post Rogerio Fernandes Brito CFX 1 February 8, 2008 20:19


All times are GMT -4. The time now is 17:45.