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

[OpenFOAM.org] blockMesh issue on openfoam6 startup - ubuntu 16.04

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

Like Tree3Likes
  • 1 Post By wyldckat
  • 2 Post By bjdarrer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2019, 05:04
Default blockMesh issue on openfoam6 startup - ubuntu 16.04
  #1
New Member
 
London
Join Date: Feb 2019
Posts: 5
Rep Power: 3
bjdarrer is on a distinguished road
I have installed openfoam6 and
attempted the "getting started" code (from that site):

Code:
cd $FOAM_RUN
cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .
cd pitzDaily
blockMesh
simpleFoam
paraFoam
However, I receive the following error on entering
Code:
blockMesh
Code:
:~/OpenFOAM/bjd-6/run/pitzDaily$ blockMesh
blockMesh: error while loading shared libraries: libblockMesh.so: cannot open shared object file: No such file or directory
Can anyone help solve this error message?

Additional information. I tried
Code:
which blockMesh
that gave:

Code:
bjd@brendan:~/OpenFOAM/bjd-6/run/pitzDaily$ which blockMesh
/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/blockMesh
and
Code:
ls -l /opt/openfoam6
Code:
bjd@brendan:~/OpenFOAM/bjd-6/run/pitzDaily$ ls -l /opt/openfoam6
total 104
-rwxr-xr-x  1 root root  1109 Dec 24 12:37 Allwmake
drwxr-xr-x  5 root root  4096 Feb 22 16:00 applications
drwxr-xr-x  3 root root  4096 Feb 22 16:00 bin
-rw-r--r--  1 root root     0 Dec 24 13:03 build-stamp
-rw-r--r--  1 root root 35646 Dec 24 12:37 COPYING
drwxr-xr-x  5 root root  4096 Feb 22 16:00 doc
drwxr-xr-x  8 root root  4096 Feb 22 16:00 etc
drwxr-xr-x  3 root root  4096 Feb 22 15:59 platforms
-rw-r--r--  1 root root  1626 Dec 24 12:37 README.org
-rw-r--r--  1 root root 22389 Dec 24 12:38 README_scotch
drwxr-xr-x 41 root root  4096 Feb 22 16:00 src
drwxr-xr-x  3 root root  4096 Feb 22 16:00 test
drwxr-xr-x 17 root root  4096 Feb 22 16:00 tutorials
drwxr-xr-x  7 root root  4096 Feb 22 16:00 wmake
Brendan
bjdarrer is offline   Reply With Quote

Old   February 25, 2019, 19:32
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,956
Blog Entries: 45
Rep Power: 122
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick questions:
  1. With the OpenFOAM 6 shell environment active, what does the following command give you:
    Code:
    echo $LD_LIBRARY_PATH
  2. And what do the following commands give you?
    Code:
    echo $FOAM_LIBBIN
    ls -ld $FOAM_LIBBIN
    ls -l $FOAM_LIBBIN
    • The first one checks what is the default path for OpenFOAM libraries; the second one checks if it exists; the third lists the contents of that folder.
    • If the first one gives an empty line, then something went awfully wrong.
    • If the first one does not point to somewhere within "/opt/openfoam6", then it might be using the path for another version/fork/variant of OpenFOAM.
My best guesses are that:
  • The "LD_LIBRARY_PATH" shell environment variable is damaged somehow;
  • Or another version/fork/variant of OpenFOAM was loaded in before or after the one for OpenFOAM 6.
bjdarrer likes this.
__________________
wyldckat is offline   Reply With Quote

Old   February 26, 2019, 05:26
Default
  #3
New Member
 
London
Join Date: Feb 2019
Posts: 5
Rep Power: 3
bjdarrer is on a distinguished road
@wyldckat, I entered the commands you gave with the result of:

Code:
bjd@brendan:~$ echo $LD_LIBRARY_PATH
/opt/netgen/lib
bjd@brendan:~$ echo $FOAM_LIBBIN
/opt/openfoam6/platforms/linux64GccDPInt32Opt/lib
bjd@brendan:~$ ls -ld $FOAM_LIBBIN
drwxr-xr-x 5 root root 12288 Feb 22 16:00 /opt/openfoam6/platforms/linux64GccDPInt32Opt/lib
bjd@brendan:~$ ls -l $FOAM_LIBBIN
total 226808
drwxr-xr-x 2 root root     4096 Feb 22 16:00 dummy
-rw-r--r-- 1 root root  1645816 Dec 24 12:57 libatmosphericModels.so
-rw-r--r-- 1 root root   343728 Dec 24 12:49 libbarotropicCompressibilityModel.so
-rw-r--r-- 1 root root   581352 Dec 24 12:54 libblockMesh.so
-rw-r--r-- 1 root root 18749528 Dec 24 12:49 libchemistryModel.so
-rw-r--r-- 1 root root  1078448 Dec 24 12:54 libcoalCombustion.so
-rw-r--r-- 1 root root  2213432 Dec 24 12:51 libcombustionModels.so
-rw-r--r-- 1 root root  2251296 Dec 24 12:59 libcompressibleEulerianInterfacialModels.so
-rw-r--r-- 1 root root   582648 Dec 24 12:58 libcompressibleMultiphaseEulerianInterfacialModels.so
-rw-r--r-- 1 root root    20264 Dec 24 12:45 libcompressibleTransportModels.so
-rw-r--r-- 1 root root  3596576 Dec 24 12:51 libcompressibleTurbulenceModels.so
-rw-r--r-- 1 root root  1544608 Dec 24 12:58 libcompressibleTwoPhaseSystem.so
-rw-r--r-- 1 root root  3534744 Dec 24 13:03 libconformalVoronoiMesh.so
-rw-r--r-- 1 root root   626488 Dec 24 12:43 libconversion.so
-rw-r--r-- 1 root root    32216 Dec 24 13:03 libcv2DMesh.so
-rw-r--r-- 1 root root    69368 Dec 24 12:44 libdecompose.so
-rw-r--r-- 1 root root   649664 Dec 24 12:44 libdecompositionMethods.so
-rw-r--r-- 1 root root   459752 Dec 24 12:44 libdistributed.so
-rw-r--r-- 1 root root   176632 Dec 24 12:42 libdistributionModels.so
-rw-r--r-- 1 root root  1454896 Dec 24 12:57 libDPMTurbulenceModels.so
-rw-r--r-- 1 root root   646424 Dec 24 12:58 libdriftFluxRelativeVelocityModels.so
-rw-r--r-- 1 root root   600592 Dec 24 12:57 libdriftFluxTransportModels.so
-rw-r--r-- 1 root root   234000 Dec 24 12:53 libDSMC.so
-rw-r--r-- 1 root root   709344 Dec 24 12:44 libdynamicFvMesh.so
-rw-r--r-- 1 root root  6333864 Dec 24 12:43 libdynamicMesh.so
-rw-r--r-- 1 root root   547920 Dec 24 12:55 libengine.so
-rw-r--r-- 1 root root   111464 Dec 24 13:02 libextrude2DMesh.so
-rw-r--r-- 1 root root   165984 Dec 24 12:43 libextrudeModel.so
-rw-r--r-- 1 root root  6113632 Dec 24 12:55 libfieldFunctionObjects.so
-rw-r--r-- 1 root root   711224 Dec 24 12:40 libfileFormats.so
-rw-r--r-- 1 root root 36675080 Dec 24 12:42 libfiniteVolume.so
-rw-r--r-- 1 root root  4636232 Dec 24 12:46 libfluidThermophysicalModels.so
-rw-r--r-- 1 root root   283736 Dec 24 13:02 libfoamToVTK.so
-rw-r--r-- 1 root root   673856 Dec 24 12:56 libforces.so
-rw-r--r-- 1 root root  3396808 Dec 24 12:55 libfvMotionSolvers.so
-rw-r--r-- 1 root root  2965776 Dec 24 12:55 libfvOptions.so
-rw-r--r-- 1 root root  1074160 Dec 24 12:43 libgenericPatchFields.so
-rw-r--r-- 1 root root   159264 Dec 24 12:45 libimmiscibleIncompressibleTwoPhaseMixture.so
-rw-r--r-- 1 root root   945448 Dec 24 12:45 libincompressibleTransportModels.so
-rw-r--r-- 1 root root  3760112 Dec 24 12:50 libincompressibleTurbulenceModels.so
-rw-r--r-- 1 root root   714696 Dec 24 12:45 libinterfaceProperties.so
-rw-r--r-- 1 root root   970544 Dec 24 12:56 liblagrangianFunctionObjects.so
-rw-r--r-- 1 root root  9667520 Dec 24 12:53 liblagrangianIntermediate.so
-rw-r--r-- 1 root root   225200 Dec 24 12:42 liblagrangian.so
-rw-r--r-- 1 root root  2546592 Dec 24 12:53 liblagrangianSpray.so
-rw-r--r-- 1 root root   755192 Dec 24 12:53 liblagrangianTurbulence.so
-rw-r--r-- 1 root root   381048 Dec 24 12:47 liblaminarFlameSpeedModels.so
-rw-r--r-- 1 root root  5973960 Dec 24 12:40 libmeshTools.so
-rw-r--r-- 1 root root    44656 Dec 24 12:54 libmolecularMeasurements.so
-rw-r--r-- 1 root root   533584 Dec 24 12:54 libmolecule.so
-rw-r--r-- 1 root root   852216 Dec 24 12:58 libmultiphaseInterFoam.so
-rw-r--r-- 1 root root   876400 Dec 24 12:57 libmultiphaseMixtureThermo.so
-rw-r--r-- 1 root root  1622384 Dec 24 13:01 libmultiphaseReactingTurbulenceModels.so
-rw-r--r-- 1 root root  1064304 Dec 24 12:58 libmultiphaseSystem.so
-rw-r--r-- 1 root root   283848 Dec 24 12:44 libODE.so
-rw-r--r-- 1 root root 12245176 Dec 24 12:40 libOpenFOAM.so
-rw-r--r-- 1 root root   260000 Dec 24 12:40 libOSspecific.o
-rw-r--r-- 1 root root   132112 Dec 24 12:54 libpairPatchAgglomeration.so
-rw-r--r-- 1 root root   419856 Dec 24 12:58 libphaseChangeTwoPhaseMixtures.so
-rw-r--r-- 1 root root  3078296 Dec 24 12:59 libphaseCompressibleTurbulenceModels.so
-rw-r--r-- 1 root root   419648 Dec 24 12:54 libpotential.so
-rw-r--r-- 1 root root   602864 Dec 24 12:52 libpyrolysisModels.so
-rw-r--r-- 1 root root  1798896 Dec 24 12:49 libradiationModels.so
-rw-r--r-- 1 root root   137440 Dec 24 12:44 librandomProcesses.so
-rw-r--r-- 1 root root   592992 Dec 24 13:02 libreactingEulerFoamFunctionObjects.so
-rw-r--r-- 1 root root   707744 Dec 24 12:59 libreactingEulerianFvPatchFields.so
-rw-r--r-- 1 root root  2405544 Dec 24 12:59 libreactingEulerianInterfacialCompositionModels.so
-rw-r--r-- 1 root root  2751904 Dec 24 12:59 libreactingEulerianInterfacialModels.so
-rw-r--r-- 1 root root  1810456 Dec 24 13:01 libreactingMultiphaseSystem.so
-rw-r--r-- 1 root root  3754336 Dec 24 12:58 libreactingPhaseSystem.so
-rw-r--r-- 1 root root  2065576 Dec 24 13:00 libreactingTwoPhaseSystem.so
-rw-r--r-- 1 root root 14302088 Dec 24 12:47 libreactionThermophysicalModels.so
-rw-r--r-- 1 root root   135272 Dec 24 12:44 libreconstruct.so
-rw-r--r-- 1 root root   234064 Dec 24 12:55 libregionCoupled.so
-rw-r--r-- 1 root root   496280 Dec 24 12:52 libregionCoupling.so
-rw-r--r-- 1 root root   749632 Dec 24 12:51 libregionModels.so
-rw-r--r-- 1 root root   275112 Dec 24 12:54 librenumberMethods.so
-rw-r--r-- 1 root root   969664 Dec 24 12:57 librhoCentralFoam.so
-rw-r--r-- 1 root root   715000 Dec 24 12:56 librigidBodyDynamics.so
-rw-r--r-- 1 root root   340688 Dec 24 12:56 librigidBodyMeshMotion.so
-rw-r--r-- 1 root root  5294056 Dec 24 12:44 libsampling.so
-rw-r--r-- 1 root root    98728 Dec 24 12:44 libscotchDecomp.so
-rw-r--r-- 1 root root     8752 Dec 24 12:38 libscotcherrexit.so
-rw-r--r-- 1 root root     8696 Dec 24 12:38 libscotcherr.so
-rw-r--r-- 1 root root    18600 Dec 24 12:38 libscotchmetis.so
-rw-r--r-- 1 root root   636936 Dec 24 12:38 libscotch.so
-rw-r--r-- 1 root root   340784 Dec 24 12:56 libsemiPermeableBaffle.so
-rw-r--r-- 1 root root   657248 Dec 24 12:56 libsixDoFRigidBodyMotion.so
-rw-r--r-- 1 root root    48480 Dec 24 12:56 libsixDoFRigidBodyState.so
-rw-r--r-- 1 root root    45928 Dec 24 12:49 libSLGThermo.so
-rw-r--r-- 1 root root  3443432 Dec 24 12:54 libsnappyHexMesh.so
-rw-r--r-- 1 root root   775456 Dec 24 12:49 libsolidChemistryModel.so
-rw-r--r-- 1 root root   460208 Dec 24 12:52 libsolidParticle.so
-rw-r--r-- 1 root root   262872 Dec 24 12:46 libsolidSpecie.so
-rw-r--r-- 1 root root  1312992 Dec 24 12:49 libsolidThermo.so
-rw-r--r-- 1 root root   452064 Dec 24 12:56 libsolverFunctionObjects.so
-rw-r--r-- 1 root root  8599248 Dec 24 12:46 libspecie.so
-rw-r--r-- 1 root root   274928 Dec 24 12:52 libsurfaceFilmDerivedFvPatchFields.so
-rw-r--r-- 1 root root  3298472 Dec 24 12:52 libsurfaceFilmModels.so
-rw-r--r-- 1 root root  1330472 Dec 24 12:40 libsurfMesh.so
-rw-r--r-- 1 root root   142704 Dec 24 13:02 libtabulatedWallFunctions.so
-rw-r--r-- 1 root root   652336 Dec 24 12:52 libthermalBaffleModels.so
-rw-r--r-- 1 root root  1302192 Dec 24 12:46 libthermophysicalProperties.so
-rw-r--r-- 1 root root  1017344 Dec 24 12:44 libtopoChangerFvMesh.so
-rw-r--r-- 1 root root   758760 Dec 24 12:40 libtriSurface.so
-rw-r--r-- 1 root root  2823208 Dec 24 12:50 libturbulenceModels.so
-rw-r--r-- 1 root root   200576 Dec 24 12:45 libtwoPhaseMixture.so
-rw-r--r-- 1 root root   275904 Dec 24 12:57 libtwoPhaseMixtureThermo.so
-rw-r--r-- 1 root root   394808 Dec 24 12:45 libtwoPhaseProperties.so
-rw-r--r-- 1 root root  3101248 Dec 24 13:00 libtwoPhaseReactingTurbulenceModels.so
-rw-r--r-- 1 root root   213016 Dec 24 12:57 libtwoPhaseSurfaceTension.so
-rw-r--r-- 1 root root   538352 Dec 24 13:02 libuserd-foam.so
-rw-r--r-- 1 root root   474448 Dec 24 12:56 libutilityFunctionObjects.so
-rw-r--r-- 1 root root  1959848 Dec 24 12:58 libVoFphaseCompressibleTurbulenceModels.so
-rw-r--r-- 1 root root   116704 Dec 24 13:02 libvtkPVblockMesh.so
-rw-r--r-- 1 root root  1596000 Dec 24 13:02 libvtkPVFoam.so
-rw-r--r-- 1 root root   783720 Dec 24 12:56 libwaves.so
drwxr-xr-x 2 root root     4096 Feb 22 16:00 openmpi-system
drwxr-xr-x 2 root root     4096 Feb 22 16:00 paraview-5.4
bjd@brendan:~$
I did have a previous openfoam that I deleted:

Code:
OpenFOAM-v1812 
ThirdParty-v1812
bjdarrer is offline   Reply With Quote

Old   February 26, 2019, 18:23
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,956
Blog Entries: 45
Rep Power: 122
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Mmm... if "LD_LIBRARY_PATH" only mentions Netgen's path, then there are two possibilities:
  1. You have a line similar to the following one in your "~/.bashrc" file near the end:
    Code:
    export LD_LIBRARY_PATH=/opt/netgen/lib
    So if that line appears after this one:
    Code:
    source /opt/openfoam6/etc/bashrc
    then that is why you are having those problems.
  2. The other possibility is that this line:
    Code:
    source /opt/openfoam6/etc/bashrc
    is not present in your "~/.bashrc" file. See this section for more details: https://openfoam.org/download/6-ubun...-configuration
wyldckat is offline   Reply With Quote

Old   February 27, 2019, 06:17
Default
  #5
New Member
 
London
Join Date: Feb 2019
Posts: 5
Rep Power: 3
bjdarrer is on a distinguished road
Hi wyldckat,

my ~/.bashrc looks ok see below:

Code:
# ~/.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
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# 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

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# 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|*-256color) 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

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# 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 ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

export CPPFLAGS="-I/usr/lib/openmpi/include/"

# added by Anaconda3 installer
export PATH="/home/bjd/anaconda3/bin:$PATH"

# below foam bashrc added by BJD 19.2.2019

# source ~/OpenFOAM/OpenFOAM-v1812/etc/bashrc 

#. /opt/openfoam6/etc/bashrc
source /opt/openfoam6/etc/bashrc
And the bashrc @
Code:
/opt/openfoam6/etc/bashrc
is as follows:

Code:
#----------------------------------*-sh-*--------------------------------------
# =========                 |
# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
#  \\    /   O peration     | Website:  https://openfoam.org
#   \\  /    A nd           | Copyright (C) 2011-2018 OpenFOAM Foundation
#    \\/     M anipulation  |
#------------------------------------------------------------------------------
# License
#     This file is part of OpenFOAM.
#
#     OpenFOAM is free software: you can redistribute it and/or modify it
#     under the terms of the GNU General Public License as published by
#     the Free Software Foundation, either version 3 of the License, or
#     (at your option) any later version.
#
#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
#     for more details.
#
#     You should have received a copy of the GNU General Public License
#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
#
# File
#     etc/bashrc
#
# Description
#     Startup file for OpenFOAM
#     Sourced from ~/.profile or ~/.bashrc
#     Should be usable by any POSIX-compliant shell (eg, ksh)
#
#------------------------------------------------------------------------------

export WM_PROJECT=OpenFOAM
export WM_PROJECT_VERSION=6

################################################################################
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
#
# FOAM_INST_DIR is the location of the OpenFOAM installation which defaults to
# the directory containing this file if sourced by a bash shell.
#
# Please set to the appropriate path if the default is not correct.
#
[ "$BASH" -o "$ZSH_NAME" ] && \
#export FOAM_INST_DIR=$(cd $(dirname ${BASH_SOURCE:-$0})/../.. && pwd -P) || \
export FOAM_INST_DIR=/opt
# export FOAM_INST_DIR=~$WM_PROJECT
# export FOAM_INST_DIR=/opt/$WM_PROJECT
# export FOAM_INST_DIR=/usr/local/$WM_PROJECT
#
# END OF (NORMAL) USER EDITABLE PART
################################################################################

# The default environment variables below can be overridden in a prefs.sh file
# located in ~/.OpenFOAM/$WM_PROJECT_VERSION, ~/.OpenFOAM,
# $FOAM_INST_DIR/site/$WM_PROJECT_VERSION or $FOAM_INST_DIR/site

#- Compiler location:
#    WM_COMPILER_TYPE= system | ThirdParty (OpenFOAM)
export WM_COMPILER_TYPE=system

#- Compiler:
#    WM_COMPILER = Gcc | Gcc48 ... Gcc62 | Clang | Icc
export WM_COMPILER=Gcc
unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH

#- Memory addressing:
#    On a 64bit OS this can be 32bit or 64bit
#    On a 32bit OS addressing is 32bit and this option is not used
#    WM_ARCH_OPTION = 32 | 64
export WM_ARCH_OPTION=64

#- Precision:
#    WM_PRECISION_OPTION = SP | DP | LP
export WM_PRECISION_OPTION=DP

#- Label size:
#    WM_LABEL_SIZE = 32 | 64
export WM_LABEL_SIZE=32

#- Optimised, debug, profiling:
#    WM_COMPILE_OPTION = Opt | Debug | Prof
export WM_COMPILE_OPTION=Opt

#- MPI implementation:
#    WM_MPLIB = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPICH | MPICH-GM | HPMPI
#               | MPI | FJMPI | QSMPI | SGIMPI | INTELMPI
export WM_MPLIB=SYSTEMOPENMPI

#- Operating System:
#    WM_OSTYPE = POSIX | ???
export WM_OSTYPE=POSIX

#- Floating-point signal handling:
#    set or unset
export FOAM_SIGFPE=

#- memory initialisation:
#    set or unset
#export FOAM_SETNAN=


################################################################################

# The old dirs to be cleaned from the environment variables
foamOldDirs="$WM_PROJECT_DIR $WM_THIRD_PARTY_DIR \
    $HOME/$WM_PROJECT/$USER $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \
    $WM_PROJECT_SITE $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN"

# Location of installation
# ~~~~~~~~~~~~~~~~~~~~~~~~
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/openfoam6

# Location of third-party software
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION

# Location of site-specific templates etc
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# unset is equivalent to $WM_PROJECT_INST_DIR/site
if [ -d "$WM_PROJECT_SITE" ]
then
    export WM_PROJECT_SITE
else
    unset WM_PROJECT_SITE
fi

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

# Source initialization functions
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. $WM_PROJECT_DIR/etc/config.sh/functions

# Add in preset user or site preferences:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`

# Evaluate command-line parameters and record settings for later
# these can be used to set/unset values, or specify alternative pref files
export FOAM_SETTINGS="$@"
_foamEval $@

# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foamClean=$WM_PROJECT_DIR/bin/foamCleanPath

#- Clean PATH
cleaned=`$foamClean "$PATH" "$foamOldDirs"` && PATH="$cleaned"

#- Clean LD_LIBRARY_PATH
cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` \
    && LD_LIBRARY_PATH="$cleaned"

#- Clean MANPATH
cleaned=`$foamClean "$MANPATH" "$foamOldDirs"` && MANPATH="$cleaned"

export PATH LD_LIBRARY_PATH MANPATH


# Source project setup files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource $WM_PROJECT_DIR/etc/config.sh/settings
_foamSource $WM_PROJECT_DIR/etc/config.sh/aliases


# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/mpi`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/ensight`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools`

if [ ! -z "$FOAMY_HEX_MESH" ]
then
    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL`
fi


# Clean environment paths again. Only remove duplicates
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#- Clean PATH
cleaned=`$foamClean "$PATH"` && PATH="$cleaned"

#- Clean LD_LIBRARY_PATH
cleaned=`$foamClean "$LD_LIBRARY_PATH"` && LD_LIBRARY_PATH="$cleaned"

#- Clean MANPATH (trailing ':' to find system pages)
cleaned=`$foamClean "$MANPATH"`: && MANPATH="$cleaned"

export PATH LD_LIBRARY_PATH MANPATH

#- Clean LD_PRELOAD
if [ -n "$LD_PRELOAD" ]
then
    cleaned=`$foamClean "$LD_PRELOAD"` && LD_PRELOAD="$cleaned"
    export LD_PRELOAD
fi


# Cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
unset cleaned foamClean foamOldDirs


# Unload initialization functions:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. $WM_PROJECT_DIR/etc/config.sh/functions

# Source the bash completion file:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ "$BASH" ] && . $WM_PROJECT_DIR/etc/config.sh/bash_completion

#------------------------------------------------------------------------------
Thank you for your help so far, any idea on how to proceed from here?

Best regards,
Brendan
bjdarrer is offline   Reply With Quote

Old   February 27, 2019, 18:36
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,956
Blog Entries: 45
Rep Power: 122
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Then this is very odd... it should have worked just fine.

OK, please try the following steps:
  1. Start a new terminal window or tab, to get a new shell/command line.
  2. Run this command:
    Code:
    echo $LD_LIBRARY_PATH
  3. If it only gives out the mention about Netgen, then run:
    Code:
    source /opt/openfoam6/etc/bashrc
  4. Then run again:
    Code:
    echo $LD_LIBRARY_PATH
  5. So either the command in step #2 or the one in #4 will give you a full list of paths that refer to OpenFOAM 6. If it does, then run:
    Code:
    blockMesh -help
    and it should give you some instructions on how to use blockMesh.
  6. If things are not working as intended, then the previous command will simply complain that it cannot find libblockMesh.so... in which case, I ask you to run the following command:
    Code:
    uname -a
    which will tell us the complete kernel version and respective architecture being used... just in the off chance that you are using an unsupported architecture...
wyldckat is offline   Reply With Quote

Old   February 28, 2019, 07:07
Default
  #7
New Member
 
London
Join Date: Feb 2019
Posts: 5
Rep Power: 3
bjdarrer is on a distinguished road
Hi wyldckat,

It worked! I needed to enter:

Code:
source /opt/openfoam6/etc/bashrc
in the terminal I was using. The output is as follows:

Code:
bjd@brendan:~$ echo $LD_LIBRARY_PATH
/opt/netgen/lib
bjd@brendan:~$ source /opt/openfoam6/etc/bashrc
bjd@brendan:~$ echo $LD_LIBRARY_PATH
/opt/ThirdParty-6/platforms/linux64Gcc/gperftools-svn/lib:/opt/paraviewopenfoam54/lib/paraview-5.4:/opt/openfoam6/platforms/linux64GccDPInt32Opt/lib/openmpi-system:/opt/ThirdParty-6/platforms/linux64GccDPInt32/lib/openmpi-system:/usr/lib/openmpi/lib:/home/bjd/OpenFOAM/bjd-6/platforms/linux64GccDPInt32Opt/lib:/opt/site/6/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam6/platforms/linux64GccDPInt32Opt/lib:/opt/ThirdParty-6/platforms/linux64GccDPInt32/lib:/opt/openfoam6/platforms/linux64GccDPInt32Opt/lib/dummy:/opt/netgen/lib
bjd@brendan:~$ blockMesh -help

Usage: blockMesh [OPTIONS]
options:
  -blockTopology    write block edges and centres as .obj files
  -case <dir>       specify alternate case directory, default is the cwd
  -dict <file>      specify alternative dictionary for the blockMesh description
  -fileHandler <handler>
                    override the fileHandler
  -noClean          keep the existing files in the polyMesh
  -noFunctionObjects
                    do not execute functionObjects
  -region <name>    specify alternative mesh region
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

Block description

  For a given block, the correspondence between the ordering of
  vertex labels and face labels is shown below.
  For vertex numbering in the sequence 0 to 7 (block, centre):
    faces 0 (f0) and 1 are left and right, respectively;
    faces 2 and 3 are front and back; 
    and faces 4 and 5 are bottom and top::

                 7 ---- 6
            f5   |\     |\   f3
            |    | 4 ---- 5   \
            |    3 |--- 2 |    \
            |     \|     \|    f2
            f4     0 ---- 1

       Z         f0 ----- f1
       |  Y
       | /
       O --- X


Using: OpenFOAM-6 (see www.OpenFOAM.org)
Build: 6-f934eabb0d52

bjd@brendan:~$ cd $FOAM_RUN
bjd@brendan:~/OpenFOAM/bjd-6/run$ cd pitzDaily
bjd@brendan:~/OpenFOAM/bjd-6/run/pitzDaily$ blockMesh
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 6-f934eabb0d52
Exec   : blockMesh
Date   : Feb 28 2019
Time   : 12:00:24
Host   : "brendan"
PID    : 5926
I/O    : uncollated
Case   : /home/bjd/OpenFOAM/bjd-6/run/pitzDaily
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Creating block mesh from
    "/home/bjd/OpenFOAM/bjd-6/run/pitzDaily/system/blockMeshDict"
Creating block edges
No non-planar block faces defined
Creating topology blocks
Creating topology patches

Creating block mesh topology

Check topology

	Basic statistics
		Number of internal faces : 5
		Number of boundary faces : 20
		Number of defined boundary faces : 20
		Number of undefined boundary faces : 0
	Checking patch -> block consistency

Creating block offsets
Creating merge list .

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 0.001
    Block 0 cell size :
        i : 0.00158284 .. 0.000791418
        j : 0.000318841 .. 0.000420268
        k : 0.001 .. 0.001

    Block 1 cell size :
        i : 0.000528387 .. 0.00211355
        j : 0.00112889 .. 0.000360188
        k : 0.001 .. 0.001

    Block 2 cell size :
        i : 0.000528387 .. 0.00211355
        j : 0.000318841 .. 0.000420268
        k : 0.001 .. 0.001

    Block 3 cell size :
        i : 0.0020578 .. 0.00514451
        j : 0.000940741 .. 0.000940741
        k : 0.001 .. 0.001

    Block 4 cell size :
        i : 0.0020466 .. 0.00511651
        j : 0.00112889 .. 0.000257962
        k : 0.001 .. 0.001


There are no merge patch pairs edges

Writing polyMesh
----------------
Mesh Information
----------------
  boundingBox: (-0.0206 -0.0254 -0.0005) (0.29 0.0254 0.0005)
  nPoints: 25012
  nCells: 12225
  nFaces: 49180
  nInternalFaces: 24170
----------------
Patches
----------------
  patch 0 (start: 24170 size: 30) name: inlet
  patch 1 (start: 24200 size: 57) name: outlet
  patch 2 (start: 24257 size: 223) name: upperWall
  patch 3 (start: 24480 size: 250) name: lowerWall
  patch 4 (start: 24730 size: 24450) name: frontAndBack

End
wyldckat and Danya like this.
bjdarrer is offline   Reply With Quote

Old   August 25, 2020, 19:15
Default blockMesh - FOAM FATAL ERROR
  #8
New Member
 
Edwards
Join Date: Aug 2020
Location: Brazil
Posts: 1
Rep Power: 0
Edwards is on a distinguished road
I copied a $: / opt / openfoam7 / tutorial / stressAnalysis / solidDisplacmentFoam / plateHole $ cp -r plateHole / ~ / foam / edu-4.0 / run

In the new (working) file you have:

: ~ foam / edu-4.0 / run / plateHole $

When I type "blockMesh" there is an error:

: ~ foam / edu-4.0 / run / plateHole $ blockMesh

----> FOAM FATAL ERROR:
Could not find mandatory etc entry (mode = ugo)
'controlDict'

I tried to open other files like cavity and follow the same procedure above and it gives the same error.

How to solve this problem? I've been at it for a week.

Thank you.
Edwards is offline   Reply With Quote

Reply

Tags
blockmesh, openfoam6, ubuntu 16.04

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
[OpenFOAM.org] I have trouble installing openfoam 5.0 on ubuntu 16.04 haydii OpenFOAM Installation 5 December 27, 2018 10:56
[foam-extend.org] foam-extend 1.6: ScotchDecomp error while compiling on Ubuntu 16.04 Katt OpenFOAM Installation 8 December 20, 2018 00:39
ANSYS CFX 14 on UBUNTU 12.04 64bit: PARALLEL ISSUE david.pasquale CFX 6 August 9, 2018 15:05
[ANSYS Meshing] Can start ANSYS meshing only one time on ubuntu 16.04 Touré ANSYS Meshing & Geometry 2 September 26, 2017 05:41
Ubuntu: Allrun script issue fletc900 OpenFOAM Bugs 2 July 2, 2010 16:58


All times are GMT -4. The time now is 11:13.