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

I cannot apply Openfoam file's

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

Like Tree3Likes
  • 1 Post By wyldckat
  • 1 Post By wyldckat
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   May 13, 2013, 05:01
Default I cannot apply Openfoam file's
  #1
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 4
Mirage12 is on a distinguished road
Hello World

I try to run my first simulation using the tutorial cavity and unfortunately i can see only the mesh and i cannot apply the file cavity in paraview.

After writing the command paraFoam i became an Error( 7 lines ) at the end of terminal :

QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action

I use Ubuntu 12.04, paraview 3.14.1 64-bit and Openfoam 2.2.0

How can i solve the problem?

Thanks .
Attached Images
File Type: jpg Error-screenshot.jpg (62.5 KB, 25 views)

Last edited by Mirage12; May 14, 2013 at 02:26.
Mirage12 is offline   Reply With Quote

Old   May 14, 2013, 06:46
Exclamation
  #2
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 4
Mirage12 is on a distinguished road
Hi everyone,

i have the same problem and i cannot apply the openfoam file's in paraview, i installed paraview from the openfoam website http://www.openfoam.org/download/ubuntu.php and i added an alias command to my "~/.bashrc" file the code
alias paraFoam='paraFoam -builtin' but i couldn't solve the problem...

I use Ubuntu 12.04, paraview 3.14.1 64-bit and Openfoam 2.2.0

Thanks for your help!
Attached Images
File Type: jpg Error-screenshot.jpg (62.5 KB, 10 views)
Mirage12 is offline   Reply With Quote

Old   May 14, 2013, 15:56
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Amin and welcome to the forum!

I moved the second post from the thread Ubuntu 12.10 + openfoam2.2.0 ==> paraview error message, because this first one you created on this current thread has got some additional information that comes in handy.

OK, according to your description, you have 2 ParaView versions installed:
  • The one that Ubuntu provides, which is ParaView 3.14.
  • The one that OpenFOAM provides, which is ParaView 3.12.
Given your current set-up, I advise you to choose one to keep and remove the other one:
  • If you want to keep Ubuntu's ParaView version, run:
    Code:
    sudo apt-get remove paraviewopenfoam3120
  • But if you want to keep OpenFOAM's ParaView version, run:
    Code:
    sudo apt-get remove paraview
I say this because they might be getting into conflict between them, where one is using the other one's libraries.

Best regards,
Bruno
Mirage12 likes this.
wyldckat is offline   Reply With Quote

Old   May 15, 2013, 06:59
Default
  #4
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 4
Mirage12 is on a distinguished road
Thanks a lot !
i removed paraview and i tried to installed from the website of Openfoam, but i couldn't. that is why i dowloaded it from the paraview website..and iT is working !
Thanks a lot ! Thanks a lot ! Thanks a lot ! Thanks a lot ! Thanks a lot ! Thanks a lot !
Mirage12 is offline   Reply With Quote

Old   May 15, 2013, 08:03
Exclamation
  #5
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 4
Mirage12 is on a distinguished road
i can launch paraview by typing "paraFoam" in your terminal,but i cannot see the mesh or the file to apply why

i tried to execute the tutorial cavity... after building the Mesh with blockMesh and typing icoFoam... the file cavity.foam was not created.
will the file cavity.foam be created after typing paraFoam or after typing icoFoam and blockMesh ?
Thanks
Attached Images
File Type: jpg Screenshot from 2013-05-15 17:30:44.jpg (33.9 KB, 7 views)
File Type: jpg Screenshot from 2013-05-15 18:51:11.jpg (24.0 KB, 5 views)

Last edited by wyldckat; May 15, 2013 at 19:12. Reason: merged 2 posts that were only 1h apart from each other
Mirage12 is offline   Reply With Quote

Old   May 15, 2013, 19:10
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Amin,

Quoting from the official instructions for the Ubuntu deb packages - http://www.openfoam.org/download/ubuntu.php - the steps are:
Code:
cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity 
blockMesh 
icoFoam 
paraFoam
It's paraFoam that creates the "cavity.foam" file. If you want to keep the file for later using it again, you can run:
Code:
paraFoam -touch
For more information:
Code:
paraFoam -help
Best regards,
Bruno
Mirage12 likes this.
wyldckat is offline   Reply With Quote

Old   May 16, 2013, 05:50
Exclamation
  #7
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 4
Mirage12 is on a distinguished road
hello Bruno

when i type paraFoam, paraview is opened but i cannot see the file cavity.foam
in paraview.

I think, in my case....the paraFoam command can only open paraView, without creating the file .Foam

the two commands are not working. The output of paraview for paraFoam -help is

Cannot open data file " -help "

I followed also the same instructions to run Openfoam and paraview, but it seams to, that i have a problem on the liaison between paraview and openfoem. maybe..i have to change something in the parafoam file in the Folder bin of openfoam....
here is my parafoam file in Openfoam.

Code:
#!/bin/sh
#------------------------------------------------------------------------------
# =========                 |
# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
#  \\    /   O peration     |
#   \\  /    A nd           | Copyright (C) 2011-2012 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/>.
#
# Script
#     paraFoam
#
# Description
#     start paraview with the OpenFOAM libraries
#
# Note
#     combining -block or -builtin options with the -region option yields
#     undefined behaviour
#------------------------------------------------------------------------------
usage() {
    exec 1>&2
    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
    cat<<USAGE

Usage: ${0##*/} [OPTION] [PARAVIEW_OPTION]
options:
  -block            use blockMesh reader  (uses .blockMesh extension)
  -builtin          use VTK builtin OpenFOAM reader  (uses .foam extension)
  -case <dir>       specify alternative case directory, default is the cwd
  -region <name>    specify alternative mesh region
  -touch            only create the file  (eg, .blockMesh, .OpenFOAM, etc)
  -touchAll         create .blockMesh, .OpenFOAM files (and for all regions)
  -help             print the usage


paraview options start with a double dashes

* start paraview $ParaView_VERSION with the OpenFOAM libraries

USAGE
    exit 1
}

# We want to do nice exit when running paraview to give paraview opportunity
# to clean up
unset FOAM_ABORT

unset regionName optTouch

# Hack: change all locale to 'C' i.e. using '.' for decimal point. This is
# only needed temporarily until paraview is locale aware. (git version is
# already 2010-07)
export LC_ALL=C

# reader extension
extension=OpenFOAM

requirePV=1

# parse options
while [ "$#" -gt 0 ]
do
    case "$1" in
    -h | -help)
        usage
        ;;
    -block | -blockMesh)
        extension=blockMesh
        shift
        ;;
    -builtin)
        extension=foam
        requirePV=0
        shift
        ;;
    -case)
        [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
        cd "$2" 2>/dev/null || usage "directory does not exist:  '$2'"
        shift 2
        ;;
    -region)
        [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
        regionName=$2
        shift 2
        ;;
    -touch)
        optTouch=true
        requirePV=0
        shift
        ;;
    -touchAll)
        optTouch=all
        requirePV=0
        shift
        ;;
    --)
        shift
        break    # stop here, treat balance as paraview options
        ;;
    --*)
        break    # stop here, treat this and balance as paraview options
        ;;
    *)
        usage "unknown option/argument: '$*'"
        ;;
    esac
done


#
# check that reader module has been built
#
if [ $requirePV -eq 1 -a ! -f $PV_PLUGIN_PATH/libPV3FoamReader_SM.so ]
then
    cat<< BUILDREADER

FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd \$FOAM_UTILITIES/postProcessing/graphics/PV3Readers
./Allwclean
./Allwmake

BUILDREADER
    exit 1
fi

#
# check for --data=... argument
#
hasDataArg()
{
    hasData=false
    while [ "$#" -gt 0 ]
    do
        case "$1" in
        (--data=*)
            hasData=true
            break
            ;;
        esac
        shift
    done
}

hasDataArg $@


# get a sensible caseName from the directory name
caseName=${PWD##*/}
caseFile="$caseName.$extension"
fvControls="system"

if [ -n "$regionName" ]
then
    if [ ! -d constant/$regionName ]
    then
        echo "FATAL ERROR: Region $regionName does not exist"
        exit 1
    else
        caseFile="$caseName{$regionName}.$extension"
        fvControls="$fvControls/$regionName"
    fi
fi

case "${optTouch:-false}" in
all)
    extension=OpenFOAM
    if [ -f constant/polyMesh/blockMeshDict ]
    then
        touch "$caseName.blockMesh"
        echo "created '$caseName.blockMesh'"
    fi
    touch "$caseName.$extension"
    echo "created '$caseName.$extension'"
    # discover probable regions
    for region in constant/*
    do
        if [ -d $region -a -d $region/polyMesh ]
        then
            regionName=${region##*/}
            touch "$caseName{$regionName}.$extension"
            echo "created '$caseName{$regionName}.$extension'"
        fi
    done
    exit 0
    ;;
true)
    touch "$caseFile"
    echo "created '$caseFile'"
    exit 0
    ;;
esac


# parent directory for normal or parallel results
case "$caseName" in
    processor*) parentDir=".." ;;
    *)          parentDir="."  ;;
esac


if [ "${hasData:-false}" = true ]
then

    # has --data=.., send directly to paraview
    exec paraview "$@"

else

    # check existence of essential files
    warn="WARN file does not exist:"
    case $extension in
    blockMesh)
        for check in \
            system/controlDict \
            constant/polyMesh/blockMeshDict \
            ;
        do
            [ -s "$parentDir/$check" ] || {
                [ -n "$warn" ] && echo "$warn" 1>&2
                echo "    $parentDir/$check" 1>&2
                unset warn
            }
        done
        ;;

    builtin | OpenFOAM)
        for check in \
            system/controlDict \
            $fvControls/fvSchemes \
            $fvControls/fvSolution \
            ;
        do
            [ -s "$parentDir/$check" ] || {
                [ -n "$warn" ] && echo "$warn" 1>&2
                echo "    $parentDir/$check" 1>&2
                unset warn
            }
        done
        ;;
    esac

    # only create/remove caseFile if it didn't already exist
    [ -e $caseFile ] || {
        trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
        touch "$caseFile"
        echo "created temporary '$caseFile'"
    }

    # For now filter out any ld.so errors. Caused by non-system compiler?
    paraview --data="$caseFile" "$@" 2>&1 | fgrep -v 'Inconsistency detected by ld.so'
fi


#------------------------------------------------------------------------------
the file of paraview is saved in home ..maybe i have to move it in the file system...
the file name of paraview in home is not "Paraview" but "ParaView-3.12.0-Linux-x86_64", maybe i have to change the name of the file...



Last edited by wyldckat; May 16, 2013 at 16:56. Reason: moved the content of the paraFoam script into [CODE][/CODE]
Mirage12 is offline   Reply With Quote

Old   May 16, 2013, 17:02
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Amin,

From your description, it looks like you also have a ParaView version that you got from www.paraview.org.
Please tell me what does the following command show you:
Code:
alias paraFoam
If it says something like:
Code:
alias paraFoam='~/Desktop/ParaView-3.12.0-Linux-x86_64/bin/paraview'
then edit the file "~/.bashrc" and change the respective line to:
Code:
alias paraFoam='paraFoam -builtin'
Start a new terminal and try again to run paraFoam inside the cavity folder.


If it still doesn't work, edit the file "~/.bashrc" once again and go to the line that has the alias for paraFoam, and change it to this:
Code:
alias paraFoam='touch case.foam; ~/Desktop/ParaView-3.12.0-Linux-x86_64/bin/paraview --data=case.foam'
Keep in mind to adapt the path to the "ParaView-3.12.0-Linux-x86_64" folder accordingly to what you have got.

Best regards,
Bruno

PS: sorry I edited your post, but it was only to move the code you had placed with paraFoam's script, into the "[CODE]" markers.
Mirage12 likes this.
wyldckat is offline   Reply With Quote

Old   May 17, 2013, 00:54
Default
  #9
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 4
Mirage12 is on a distinguished road
Thanks ! Thanks !Thanks ! Thanks !Thanks ! Thanks !Thanks ! Thanks !Thanks ! Thanks !Thanks ! Thanks !Thanks ! Thanks !Thanks ! Thanks !Thanks ! Thanks !
Mirage12 is offline   Reply With Quote

Reply

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
2D Mesh Generation Tutorial for GMSH aeroslacker Open Source Meshers: Gmsh, Netgen, CGNS, ... 12 January 19, 2012 04:52
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25
How to Install OpenFOAM on 64 Ubuntu 9.04 hansel OpenFOAM Installation 62 March 19, 2010 15:43
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 22:07
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 20:51


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