CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Problem in Running OF!!!! please Help me (https://www.cfd-online.com/Forums/openfoam-solving/106128-problem-running-please-help-me.html)

adambarfi August 20, 2012 06:38

Problem in Running OF!!!! please Help me
 
hi everybody,

before, I had CAELinux 2011 and it have a OpenFOAM Terminal, I start it and running my models in OF.
Now, I install Ubuntu 11.04 and OpenFOAM-2.1.0, the first time it worked correctly, but I closed the Terminal and when I run it again and write blockMesh it says command not found. I don't know how run it?!?!? I'm pretty a new user of Linux.

Engineers, can you explain me how can I run the OF with details?!?!?!?

Thanks a lot,
Mostafa Mahmoudi

wyldckat August 20, 2012 08:33

Hi Mostafa,

Since you asked with details, here you go: Advanced tips for working with the OpenFOAM shell environment

But you can simply run:
Code:

echo "source $HOME/OpenFOAM/OpenFOAM-2.1.0/etc/bashrc" >> $HOME/.bashrc
Then start a new terminal and you're ready to use OpenFOAM.

Best regards,
Bruno

adambarfi August 20, 2012 11:37

Quote:

Originally Posted by wyldckat (Post 377788)
Hi Mostafa,

Since you asked with details, here you go: Advanced tips for working with the OpenFOAM shell environment

But you can simply run:
Code:

echo "source $HOME/OpenFOAM/OpenFOAM-2.1.0/etc/bashrc" >> $HOME/.bashrc
Then start a new terminal and you're ready to use OpenFOAM.

Best regards,
Bruno

Thank you Bruno,
the link was so useful. I ran the code you suggest, but after it whenever I open the Terminal it is just an OpenFOAM Terminal!!!!!!! :eek:
how can I back to the original Terminal?

wyldckat August 20, 2012 16:10

I just feel like you simply don't learn anything from my blog post :(

Here's a quick fix:
Code:

sed -i -e 's-^\(source '$HOME'.*\)-alias of210="\1"-' $HOME/.bashrc
Then start a new terminal.

Now, for each new terminal where you want to run OpenFOAM 2.1.0, run once the following command:
Code:

of210

adambarfi August 21, 2012 04:26

Quote:

Originally Posted by wyldckat (Post 377848)
I just feel like you simply don't learn anything from my blog post :(

Here's a quick fix:
Code:

sed -i -e 's-^\(source '$HOME'.*\)-alias of210="\1"-' $HOME/.bashrc
Then start a new terminal.

Now, for each new terminal where you want to run OpenFOAM 2.1.0, run once the following command:
Code:

of210

thanks so much Bruno,
It works.
before I made this thread, I had searched the forum and found your link, I applied what that said but it didn't work.
a new problem: when I run the code you presented in the last post, there is no result, just the pointer twinkles and the terminal seems to calculating something. when I press Ctrl+C it stops and I can use OpenFOAM.
did I make a mistake in installing OF?!?!?!?

Thank you

wyldckat August 21, 2012 08:04

What do the last lines of the file "$HOME/.bashrc" contain?


All times are GMT -4. The time now is 00:26.