Troubleshooting Linux OpenFOAM Issue - Help Needed

In summary, the user is trying to run OpenFOAM on Linux by following a tutorial, but encounters an error when using the 4th command. They are advised to use the correct syntax for the cp command and to check their current directory using the pwd command.
  • #1
member 428835
Hi PF!

I'm unsure if I'm in the right area, but I'm trying to run OpenFOAM on Linux. I'm following the tutorial here:

https://cfd.direct/openfoam/user-guide/v6-tutorials/
but when I type the 4th command: cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily
I receive the error: cp: missing destination file operand after '/opt/openfoam6/tutorials/incompressible.simpleFoam/pitzDaily'

Any help is very appreciated!
 
Technology news on Phys.org
  • #2
joshmccraney said:
but when I type the 4th command: cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily
I receive the error: cp: missing destination file operand after '/opt/openfoam6/tutorials/incompressible.simpleFoam/pitzDaily'
Yes - you tell the system to copy a file from (the source you have given) to [nothing]. No wonder the copy function is confused!
 
  • #3
Linux/UNIX cp syntax:
Code:
cp [option]  [path/]source destination
two arguments are required.
 
  • #4
Notice that there is a dot after the cp command on the website you mentioned, which means 'here, at this location'. You are copying the directory 'pitzDaily' into the location where you currently are, which is the directory $FOAM_RUN, or actually the directory to which this alias refers to.
 
  • Like
Likes member 428835 and jim mcnamara
  • #5
The pwd command shows what directory the "Dot" represents, if there is any confusion.
e.g.,
Code:
$> pwd
/home/jim
$>  echo .
.
$>
Using echo will not work for this.
 
  • Like
Likes member 428835

What is OpenFOAM?

OpenFOAM is an open-source computational fluid dynamics software package that allows users to simulate and analyze fluid flow and other related phenomena.

Why am I having issues with OpenFOAM on Linux?

There can be a variety of reasons for issues with OpenFOAM on Linux, including compatibility issues, incorrect installation, or missing dependencies. It is important to carefully follow installation instructions and check for any known compatibility issues.

How can I troubleshoot my OpenFOAM issue on Linux?

Some general troubleshooting steps for OpenFOAM on Linux include checking for any error messages, ensuring proper installation, and verifying all necessary dependencies are installed. It may also be helpful to consult online forums or documentation for specific solutions to common issues.

Can I get help with my OpenFOAM issue?

Yes, there are many online resources, such as forums and user groups, where you can seek help with your OpenFOAM issue. It is also recommended to thoroughly research and understand the issue before seeking help, as this may help you find a solution more quickly.

What should I do if I cannot resolve my OpenFOAM issue on Linux?

If you are unable to resolve your OpenFOAM issue on Linux, you may consider seeking assistance from an experienced OpenFOAM user or consulting the official documentation. It may also be helpful to provide detailed information about your issue, such as error messages and steps to reproduce it, when seeking help.

Similar threads

  • Programming and Computer Science
Replies
8
Views
2K
  • Programming and Computer Science
Replies
34
Views
4K
Replies
4
Views
2K
  • Programming and Computer Science
Replies
7
Views
1K
  • Programming and Computer Science
Replies
4
Views
2K
Replies
18
Views
7K
  • Programming and Computer Science
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
Replies
1
Views
3K
Back
Top