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/)
-   -   Error in pipleCyclic tutorial (https://www.cfd-online.com/Forums/openfoam-solving/121574-error-piplecyclic-tutorial.html)

elglanto July 31, 2013 16:25

Error in pipleCyclic tutorial
 
Hello,

I'm new with OpenFOAM so I'm running the different tutorials to have an understanding of it before using it for my own purpose.

I want to try the pipeCyclic exemple from the incompressibles simpleFoam cases.

After doing a blockMesh, a do a checkMesh to be sure everything is ok. But then, i get a:
Quote:

FOAM FATAL ERROR:
No times selected
Or course, if after i still try to run the case with the simpleFoam commande, i get an other error

As this is a exemple already in OpenFOAM, I assume there is no error in it so I'm doing something wrong there. An idea of what it ?

Lieven July 31, 2013 17:30

Hi Elglanto,

You should have at least a '0'-folder in your case. I guess (don't have the tutorial on my pc here) that it has a 0.orig-folder instead. Simply run
Code:

cp -r 0.org 0
To solve the problem.

Cheers,

L

P.S.: If there is a Allrun script given in the case folder, it's best to use this to run the tutorial not to miss any essential steps.

elglanto July 31, 2013 18:58

Hello Lieven, thanks for your answer.

From what I understood, you mean that i should rename the 0.org folder to 0. Is that correct?

If it is, I already done that although I did it via the interface and not the terminal.

About the Allrun script, there is one which I tried after your message. From the clean case (keeping the 0.org) the Allrun script create the 0 file and a buch of others with similar names (log.blockMesh, log.simpleFoam, log.blabla etc.) but no directory at others times. Is that normal ? Because from what I understood, the Allrun script should run the entire case.

Lieven August 1, 2013 06:32

Hi Elglanto,

It all depends on the settings in the controlDict. OF does not store every time step. The fact that it creates all the log-files proves that it is doing something. So open the log-files and try to understand what is happening. It can be two things:
1. The case runs perfectly but the settings in the controlDict do not ask to write the solution
2. An error occurred somewhere and then you will find a description of it in one of the log-files.

Could you maybe post the error you get when you run the simpleFoam command?

Cheers,

Lieven

elglanto August 2, 2013 16:38

Hello Lieven, here are the results of the tests I made. Between each tests, I delete the pipeCyclic folder case and copy a new one to start from fresh.

1st attempt

When i run a blockMesh command, I get the following error which I had previously:

Quote:

--> FOAM FATAL IO ERROR:
Loading a shared library using case-supplied code is not enabled by default
because of security issues. If you trust the code you can enable this
facility be adding to the InfoSwitches setting in the system controlDict:

allowSystemOperations 1

The system controlDict is either

~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict

or

$WM_PROJECT_DIR/etc/controlDict



file: /home/xuv/OpenFOAM/xuv-2.2.1/run/pipeCyclic/constant/polyMesh/blockMeshDict from line 17 to line 23.

From function functionEntries::calcEntry::execute(..)
in file db/dynamicLibrary/dynamicCode/dynamicCode.C at line 81.

FOAM exiting
Thus, I change allowSystemOperations for 0 to 1 in the controlDict file located in /opt/openfoam221/etc

2nd attempt

Now, i don't see any errors when running the blockMesh command but if i run checkMesh, I get the following error:

Quote:

--> FOAM FATAL ERROR:
No times selected

From function checkMesh
in file db/Time/timeSelector.C at line 263.

FOAM exiting
And if I run the simpleFoam command, then it is the following error:

Quote:

--> FOAM FATAL IO ERROR:
cannot find file

file: /home/xuv/OpenFOAM/xuv-2.2.1/run/pipeCyclic/0/p at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting
Thus, my guess is that this is normal since the time 0 folder is called 0.org, so i rename it 0

3rd attempt

With a clean case and 0.org renamed, I run the blockMesh command with no error, I check with checkMesh, no error so I run simpleFoam command and... it worked fine. Which means that on my very first attempt, before I opened the topic, I did something wrong. Now, i have three new time folders (100, 200, 229). But i still don't understand why the Allrun script didn't work.

But thanks a lot for your help.

nimasam August 3, 2013 08:00

well, you miss this command:
Quote:

cp -r 0.org 0

elglanto August 3, 2013 14:41

Hello,

actually, I did it by hand. I'm still not fully used to linux terminal.

Z.Q. Niu May 23, 2014 00:27

Dear elglanto
Dear elglanto,
I want to test the pipeCyclic case, but when I run blockMesh, the error occurs:
Code:

Creating block mesh from
    "/home/zq/desktop/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/blockMeshDict"
Using #calcEntry at line 26 in file "/home/zq/desktop/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/blockMeshDict"


--> FOAM FATAL IO ERROR:
This code should not be executed by someone with administrator rights due to security reasons.
(it writes a shared library which then gets loaded using dlopen)

file: /home/zq/desktop/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/blockMeshDict from line 17 to line 23.

Did you have this problem?

wyldckat May 24, 2014 03:44

Greetings Niu,

At first I was going to state that the problem was due to a missing flag, but then I re-read the error message and it clearly states that you're running with admin powers, i.e. running as root.
In other words, you probably used sudo or su to switch to root mode and this way you're taking the risk of accidentally damaging your system installation and loosing all of your work :(. You should use your normal user account to run the OpenFOAM cases.

I don't know why you're running as root, but this tutorial should work just fine if you run the script Allrun that should be present in that tutorial, which has all of the necessary steps for running that tutorial case. For more on the topic of "Allrun", please read this thread: http://www.cfd-online.com/Forums/ope...allrun-do.html

Best regards,
Bruno

Z.Q. Niu May 24, 2014 09:29

Dear Bruno,
I can't execute any command of OF, because my OF2.2.0 was installed in root, so the "All run " didn't work, do you has any experience of running OF using normal account?

Best regards!

Z.Q. Niu

wyldckat May 24, 2014 13:07

Hi Z.Q. Niu,

It's easier to help you if you can tell me which installation instructions you followed. Because this issue should be easily solved as soon as I know how you installed OpenFOAM.

Best regards,
Bruno

Z.Q. Niu May 24, 2014 13:10

Dear Brunoi,
Thank you very much!I installed OF2.2.0 via a Deb package.

wyldckat May 24, 2014 13:27

Quote:

Originally Posted by Z.Q. Niu (Post 493954)
Thank you very much!I installed OF2.2.0 via a Deb package.

Try these steps:
  1. Start a new terminal as normal user.
  2. Run the following command:
    Code:

    source /opt/openfoam220/etc/bashrc
  3. If it didn't give an error, then run:
    Code:

    icoFoam -help
    which icoFoam

    It should give the help message for the icoFoam solver and also indicate where it was installed.
  4. If there was no error above, then run:
    Code:

    echo source /opt/openfoam220/etc/bashrc > ~/.bashrc
  5. Start a new terminal and run the commands in #3 again.
If at any point it gives you an error, let me know.




If there is no error, then you can restore the correct user permissions to the files located on your desktop folder, by following these steps:
  1. Switch to root mode:
    Code:

    sudo -s
  2. Change the ownership of the files and folders at "/home/zq/desktop" by running:
    Code:

    chown -R zq:zq /home/zq/desktop
    The first "zq" refers to your normal user name; the second "zq" refers to the group name. I believe that Ubuntu usually sets the group name to the same as the user name.
  3. Exit root mode:
    Code:

    exit

Z.Q. Niu May 25, 2014 07:35

Dear Bruno,
I followed your steps and finally got it! Thank you very much!

Best regards!

Z.Q. Niu


All times are GMT -4. The time now is 22:05.