CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   paraView was working, now not working (https://www.cfd-online.com/Forums/openfoam-installation/115102-paraview-working-now-not-working.html)

goldbeard March 23, 2013 23:28

paraView was working, now not working
 
1 Attachment(s)
Hello,

I thought I had paraView working right. I was even able to get most of the way throught the cavity tutorial. But now when I give the command paraFoam, it opens paraView, but doesn't seem to run right. When I run the icoFoam command, it doesn't do anything, then the terminal acts like it is dead. I have included a screen shot of what my terminal says

goldbeard March 23, 2013 23:59

cavity tutorial problem
 
1 Attachment(s)
When trying to run the cavity tutorial and entering the command "paraFoam" paraview opens but then the terminal doesn't accept the icoFoam command, or any other command. I have included a picture of the message my terminal gives me.

What is going on?! I had it running for little while and was halfway through the tutorial, but now I am dead in the water.
please help me

wyldckat March 24, 2013 13:27

Hi goldbeard,

I've moved your other thread to this one, so that I wouldn't have to ask/answer twice ;)...

I saw from your other thread on GLX issues - http://www.cfd-online.com/Forums/ope...g-display.html - that you have installed Ubuntu 12.10 and OpenFOAM 2.2.0. You didn't mention which exact instructions you followed, so I'll have to assume you've followed the ones on this page: http://www.openfoam.org/download/ubuntu.php

So, let's see if I can help you isolate the problem. Questions for diagnosing:
  • When did it stop working? Was it after you started a new terminal window?
  • When you see those messages in the image you've attached, does ParaView appear? Or are you stuck on that terminal window?
    • Did you check the button list on the left of the screen and find the ParaView logo? Because sometimes the new windows go behind the back of the current window you're looking at.
  • When exactly did you try running icoFoam? Was it while you were seeing those messages or before running paraFoam?
    • If this was the case, hit the key combination Ctrl+C for stopping ParaView and returning control to the shell command line.
  • After you start a new terminal window, what happens if you run icoFoam? Does it tell you it can't find the command "icoFoam" or does it given an error message indicating it can't find the "system/controlDict" file or something similar?
Best regards,
Bruno

goldbeard March 25, 2013 11:20

Quote:

Originally Posted by wyldckat (Post 416054)
Hi goldbeard,



So, let's see if I can help you isolate the problem. Questions for diagnosing:
  • When did it stop working? Was it after you started a new terminal window?
  • When you see those messages in the image you've attached, does ParaView appear? Or are you stuck on that terminal window?
    • Did you check the button list on the left of the screen and find the ParaView logo? Because sometimes the new windows go behind the back of the current window you're looking at.
  • When exactly did you try running icoFoam? Was it while you were seeing those messages or before running paraFoam?
    • If this was the case, hit the key combination Ctrl+C for stopping ParaView and returning control to the shell command line.
  • After you start a new terminal window, what happens if you run icoFoam? Does it tell you it can't find the command "icoFoam" or does it given an error message indicating it can't find the "system/controlDict" file or something similar?
Best regards,
Bruno


I am using the cavity lid tutorial.

I copy and pasted the command:

cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity

then I enter the command:

blockMesh

then the command:

paraFoam


It stopped working after I ran the command paraFoam. It opened paraView but then I could not enter any more commands.

I tried what you said and pressed Control + C and it removed the paraview window from the screen. I was then able to enter the command:

icoFoam

It worked, then I entered the command:

paraFoam


and I was up and running again.


Is this normal? I unfortunately have no basis for normal. I don't understand why this doesn't follow the tutorial....

goldbeard March 25, 2013 11:41

Bruno,

Thank you so much. I was able to go farther with the openfoam tutorial, however after entering paraFoam into the terminal, it won't let me enter another command. I am able to use paraview, but when I want to run another case, the command line in my terminal wont accept commands.

Am I not understanding how to use the program, or is something wrong?

Thank you very much for you time!

Andrew

wyldckat March 25, 2013 15:32

Hi Andrew,

I was hoping you would get to the section "2.1.5.5 Running the code as a background process" on the user guide: http://www.openfoam.org/docs/user/ca...5-220002.1.5.5
Quote:

icoFoam > log &
This command basically specifies that:
  1. The output will go into the file "log";
  2. The ampersand "&" will launch the command into the background, giving you control to the foreground command line.
Therefore, if you want to keep paraFoam running in the background, run:
Code:

paraFoam &
For learning more about the shell (the application that takes care of running your commands), check this (very incomplete) tutorial: http://openfoamwiki.net/index.php/In...with_the_Shell
Or if you prefer, the direct link to a more complete tutorial: http://linuxcommand.org/learning_the_shell.php


Best regards,
Bruno

dkxls March 25, 2013 15:33

I'm sorry to say this, but from your posts it is quite apparent that you have very little experience with Linux or a command-line shell like "bash", right?

So at first, I would recommend you to do some little tutorial on how to use a command-line interface (CLI) in linux or maybe even better in Ubuntu as I'm not sure which shell Ubuntu uses.
OpenFOAM is very much centered around editing text files and using the command-line. So learning how to use it is the price you have to pay for a first class open-source CFD code. :)

Now to give you some immediate help on how to go on and what you are dealing with:
paraFoam: This is just a wrapper script to use ParaView with OpenFOAM
paraview: This is a open-source post-processing software that can handle OpenFOAM data, but is not part of OpenFOAM

When you run commands in the command-line and the programs are still active they "block" the command-line, like you experienced it with paraFoam. If you are in such a situation, you have 3 options:
1) Quit the program that blocks the command-line
2) Start a new shell ;)
3) move the active program to the background like this:
  • control+Z (this stops the active program and gives you the shell back)
  • type "bg" to move the stopped program to the background so you can use it again
To avoid this situation altogether just run your program like this: "paraFoam &"
This starts the program in the background, but be careful, you cannot kill this program anymore with control+C. However, this shouldn't be a problem with paraFoam as you can always quit it just in the GUI (Graphical User Interface).

Hope this helps!

Armin

dkxls March 25, 2013 15:34

Seams I wasn't fast enough. :)

goldbeard March 28, 2013 22:02

Thanks guys.

I am starting to figure this stuff out. You got me, I am a newb. I love the GUI, so I am out of place here in terminalland.

Thank you for the posts and the guides, I am picking my way through them.


All times are GMT -4. The time now is 19:35.