CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Problem switching from terminal to paraView (https://www.cfd-online.com/Forums/paraview/104859-problem-switching-terminal-paraview.html)

Maxime Thomas July 17, 2012 08:34

Problem switching from terminal to paraView
 
Hi everybody,

I'm new in this forum, I've registered today because I've been looking for different thread linked to my problem but I didn't find anything yet.

I'm working on Ubuntu 11.04 Natty, OpenFoam 1.7.1 and paraView 3.8.0.
I'm a begginer in CFD and in OpenFoam so I've tried to do the first tutorial called "Cavity" and I immediatly noticed that after doing "blockMesh" and paraFoam, an error message appeared:

"Application asked to unregister timer 0x6d00000d which is not registered in this thread. Fix application."
or other similar messages with the number after timer that changes.

This message appears each time I type paraFoam or I click on apply to display my block in the pipeline browser. Then I can use paraView normally, but the problem is that the terminal is blocked and I can't type icoFoam to run the program with new parameters. I am forced to close paraView, run icoFoam and open paraView again (which is quite annoying).

If somebody has any idea to help me it would be great. Please be tolerant with me I'm a poor French Windows user but I'll do my best to fix this!

Maxime

wyldckat July 17, 2012 09:38

Greetings Maxime and welcome to the forum!

If you kept reading, you would find this section: 2.1.5.5 Running the code as a background process

In other words, you can launch paraFoam as a background application by running with an ampersand in front:
Code:

paraFoam &
For a bit more information on this: http://hacktux.com/bash/ampersand


As for the warning given in ParaView... I think that one can be fixed if you upgrade or additionally install the latest OpenFOAM version: http://www.openfoam.org/download/ubuntu.php

Best regards,
Bruno

Maxime Thomas July 18, 2012 06:16

Thanks and other question about Khamsin
 
Hello,

Thank you Wyldckat, I approximately figured out my problems. You were right for the background application, now it works well with "paraFoam &", there's still something I don't get: is there a difference once I launched paraview if I type "paraFoam &" or "icoFoam &" because apparently it does the same thing but I'm not sure about the reason why.

Also it took me hours to install the latest version of OpenFoam but I finally completed it, even if I didn't manage to remove the former version 1.7.1 that was already installed. It's not a big deal, I just have the two versions installed.
The error message is still here, but it doesn't seem to prevent me from using ParaView correctly, it just appears sometimes, I close it and that's it.

I'm going to have several simulations to do for a design of a ventilation system with different geometries. Does anybody know if the Sketchup plugin called Khamsin is worth using? Because it seems to be quite complicated to be installed from Ubuntu as G Sketchup doesn't run under Linux...

Thanks again Wyldckat for this quick answer!

Maxime

alientxtmsgs January 16, 2014 23:51

Hi everyone,

Sorry for digging up this old thread, but I am having a similar issue as the original poster.

I've been going through the lid-driven cavity tutorial and noticed ever since the cavityFine portion where you run the icoFoam as a background process everything runs as a foreground process. i.e.,

icoFoam > log &
cat log

For example, before I could run "kate blockMeshDict", keep it open, and run other commands like "paraFoam". While paraFoam is open I could run other commands. Now it seems I have to close everything in order to get the command prompt to pop back up. Does anyone have a clue what has changed, or how to change it back?

Thanks in advance!

wyldckat January 26, 2014 14:19

Greetings Steven,

Didn't you read my post #2? ;)

The ampersand "&"! It's the ampersand that gives the ability to launch commands and make them run as background jobs.

Best regards,
Bruno

alientxtmsgs January 26, 2014 16:28

Hi Bruno,

I did read your post but I was more curious about what I had changed that requires me to now use the ampersand. I'm still not to sure what I did but I've learned to just work with it.

Thank you for your reply,
Steven

wyldckat January 30, 2014 17:32

Hi Steven,

I forgot to be clear on one detail, regarding these two commands you mentioned in the other post:
Code:

icoFoam > log &
cat log

The first one does launch icoFoam as a background job, since it's using the ampersand. The second one is quick to finish, because it's only outputting the contents of the file "log" onto the screen. That is why you get command line control soon after you ran the two commands ;)

By the way, if you're curious on learning more about the shell (command line), have a look here: http://linuxcommand.org/learning_the_shell.php

Best regards,
Bruno

alientxtmsgs January 30, 2014 21:08

Hi Bruno,

Thank you for the clarification, I am slowly learning these things ;). I am most definitely interested in learning more about the shell (fairly new to the whole Linux thing, but I enjoy it so much now I've completely wiped Windows off my computer), I will take a look, thank you!

Regards,
Steven

martad October 2, 2014 12:22

Quote:

Originally Posted by wyldckat (Post 371900)
In other words, you can launch paraFoam as a background application by running with an ampersand in front:
Code:

paraFoam &
For a bit more information on this: http://hacktux.com/bash/ampersand

I wonder, is there a way to send a process to run in the background when it's already running in the foreground, or do I need to quit ParaView and restart it in the background?

Thanks,
Marta

alexeym October 3, 2014 01:34

Hi,

Quote:

Originally Posted by martad (Post 512720)
I wonder, is there a way to send a process to run in the background when it's already running in the foreground, or do I need to quit ParaView and restart it in the background?

Thanks,
Marta

1. Press "Ctrl-Z" (this will suspend paraview)
2. Issue "bg" command (this will send paraview to background)

wyldckat October 4, 2014 10:59

Greetings to all!

@Marta:
Quote:

Originally Posted by martad (Post 512720)
I wonder, is there a way to send a process to run in the background when it's already running in the foreground, or do I need to quit ParaView and restart it in the background?

To complement Alexey's answer, I have to say that this is explained here: http://linuxcommand.org/lts0080.php#in_the_background - along with several more neat tricks!
And how did I find this? Remember reading the following in post #7?
Quote:

Originally Posted by wyldckat (Post 472665)
By the way, if you're curious on learning more about the shell (command line), have a look here: http://linuxcommand.org/learning_the_shell.php

Remember: asking a question might take longer to get an answer than looking for the answer yourself ;)

Best regards,
Bruno


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