CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] ./Allrun: 24: ./Allrun: cannot create /opt/openfoam220/etc/controlDict: (https://www.cfd-online.com/Forums/paraview/118162-allrun-24-allrun-cannot-create-opt-openfoam220-etc-controldict.html)

wyldckat June 9, 2013 08:20

Hi Amin,

About the post #19:
Quote:

Originally Posted by Mirage12 (Post 430993)
OpenFoam did not generate other file's time...

why ?

potentialFoam writes the field(s) in the same folder. It's designed this way because it's one of the simplest solvers there are... it simply solves the perfect potential flow. It even barely iterates... therefore, the developers probably thought that it wasn't necessary to save the results in a new time/instance snapshot.

About post #20:
Quote:

Originally Posted by Mirage12 (Post 431179)
Hey Bruno :)

i tried to run the Tutorial
Code:

heatTransfer/buoyantSimpleFoam/circuitBoardCooling
but i become the same error, when i start ParaView.

I think the problem is that you didn't run the script Allrun:
Code:

./Allrun
Best regards,
Bruno

psk July 23, 2013 12:18

Good Day Romant,

As per your instructions, I made folder name called david, Again I am trying to run cylinder in OF 2.1. but I got the same error, kindly help me and also I set Enabling allowSystemOperations 0 to 1 and I also I changed U

Code:

left
    {
        type            uniformFixedValue;
        uniformValue    uniform (1 0 0);
    }

I follow these steps from Allrun script
Code:

cp -r 0.org 0

runApplication blockMesh----------->checkMesh also works fine

runApplication streamFunction

I got error like this,

toshiba@ubuntu:~/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/david/cylinder$ streamFunction
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : streamFunction
Date  : Aug 08 2013
Time  : 21:02:50
Host  : "ubuntu"
PID    : 6794
Case  : /home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/david/cylinder
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


Time: 0
--> FOAM Warning :
    From function streamFunction
    in file streamFunction.C at line 457
    Flux field does not exist. Stream function not calculated

End
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

After blockMesh, Instead of streamFunction, I run potentialFoam, I got error like this,

Code:

toshiba@ubuntu:~/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/david/cylinder$ potentialFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : potentialFoam
Date  : Aug 08 2013
Time  : 21:03:14
Host  : "ubuntu"
PID    : 6796
Case  : /home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/david/cylinder
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U


--> FOAM FATAL ERROR:
Unknown DataEntry type uniform for DataEntry uniformValue

Valid DataEntry types are:

4
(
constant
csvFile
table
tableFile
)

    From function DataEntry<Type>::New(Istream&)
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/DataEntryNew.C at line 48.

FOAM exiting

toshiba@ubuntu:~/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/david/cylinder$


wyldckat August 18, 2013 08:55

Hi David,

I'll address one topic at a time:
  1. The way to a successful execution of the tutorial "basic/potentialFoam/cylinder" is as follows:
    1. Make sure you have a personal copy of the OpenFOAM tutorials, as explained in the OpenFOAM User Guide: http://www.openfoam.org/docs/user/tu...s.php#x4-30002
      Quote:

      Code:

      mkdir -p $FOAM_RUN
      cp -r $FOAM_TUTORIALS $FOAM_RUN


    2. Then go into the respective tutorial case, by running:
      Code:

      cd $FOAM_RUN
      cd tutorials/basic/potentialFoam/cylinder

    3. There are a few ways to ensure that the flag "allowSystemOperations" is set to 1, as explained here: http://openfoamwiki.net/index.php/Ho...in_debug_flags
      But to keep thing simple, run the following commands:
      Code:

      mkdir -p ~/.OpenFOAM/$WM_PROJECT_VERSION
      cp $WM_PROJECT_DIR/etc/controlDict ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict

    4. Now, to run this tutorial case, you simply need to run:
      Code:

      ./Allrun
    5. To reset the tutorial case to the point before Allrun was executed, run:
      Code:

      ./Allclean
  2. Now, once the Allrun has finished executing, it will have created 3 log files:
    Code:

    log.blockMesh
    log.potentialFoam
    log.streamFunction

    Each one is respective to the output of each major application that was executed.
  3. If you want to executed these commands manually, instead of running Allrun, then these should do the trick:
    Code:

    #For enabling the allowSystemOperations variable
    sed -i -e s/"\(allowSystemOperations[ \t]*\)\([0-9]\);"/"\1 1;"/g ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict

    #copy the initial files, in case you don't have them yet
    cp -r 0.org 0

    #generate the mesh
    blockMesh

    #run the solver
    potentialFoam

    #calculate the stream function
    streamFunction

  4. As for results:
    1. The "0/U" file should now have the internal potential flow in m/s
    2. The "0/p" file is not modified, unless you run potentialFoam with the option "-writep":
      Code:

      potentialFoam -writep
    3. The "0/streamFunction" file is the result from the streamFunction utility.
    4. The files "0/UA" and "0/error" are respectively: the analytical flow result and "error=(U-UA)/mag(UA)". These are calculated by the function object "difference" that is inside the file "system/controlDict".
    5. There is no other time folder, because potentialFoam is an extremely basic folder that loads and saves the results to the same time folder.
Now, regarding the change you said you made to the "0/U" file: the code you posted is identical to the original code that is in the file "0.org/U" and I've used OpenFOAM 2.1.0 installed from the Deb package and it ran without any problems.
So, I'm not able to reproduce the same error, but the error seems familiar to me, so perhaps I have modified my OpenFOAM 2.1.0 installation...
Either way, I advise you to upgrade to either OpenFOAM 2.1.1 ( http://www.openfoam.org/archive/2.1....oad/ubuntu.php ) or even to 2.2.1 ( http://www.openfoam.org/download/ubuntu.php ). As you can see from these links, I'm assuming you are using Ubuntu.


edit: Also study in the Programmers Guide - http://foam.sourceforge.net/docs/Gui...mmersGuide.pdf - start reading from the section 3.1 "low around a cylinder"

Best regards,
Bruno

psk August 19, 2013 07:49

Million Thanks Bruno, I check blockMesh it works fine. I can understand up to step 4.4 , the results are below

Code:

toshiba@ubuntu:~/OpenFOAM/toshiba-2.1.0/run/tutorials/basic/potentialFoam/cylinder$ ./Allrun
Modifying /home/toshiba/.OpenFOAM/2.1.0/controlDict to enable allowSystemOperations
Enabling allowSystemOperations in /home/toshiba/.OpenFOAM/2.1.0/controlDict.
Running blockMesh on /home/toshiba/OpenFOAM/toshiba-2.1.0/run/tutorials/basic/potentialFoam/cylinder
Running potentialFoam on /home/toshiba/OpenFOAM/toshiba-2.1.0/run/tutorials/basic/potentialFoam/cylinder
Running streamFunction on /home/toshiba/OpenFOAM/toshiba-2.1.0/run/tutorials/basic/potentialFoam/cylinder
toshiba@ubuntu:~/OpenFOAM/toshiba-2.1.0/run/tutorials/basic/potentialFoam/cylinder$ potentialFoam -writep
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : potentialFoam -writep
Date  : Aug 19 2013
Time  : 17:04:41
Host  : "ubuntu"
PID    : 3157
Case  : /home/toshiba/OpenFOAM/toshiba-2.1.0/run/tutorials/basic/potentialFoam/cylinder
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U


Calculating potential flow
Using dynamicCode for functionObject difference at line 53 in "/home/toshiba/OpenFOAM/toshiba-2.1.0/run/tutorials/basic/potentialFoam/cylinder/system/controlDict::functions::difference"
DICPCG:  Solving for p, Initial residual = 1, Final residual = 7.87068e-07, No Iterations 76
DICPCG:  Solving for p, Initial residual = 0.0126096, Final residual = 7.71198e-07, No Iterations 64
DICPCG:  Solving for p, Initial residual = 0.0025829, Final residual = 9.49278e-07, No Iterations 59
DICPCG:  Solving for p, Initial residual = 0.000902306, Final residual = 8.48077e-07, No Iterations 57
continuity error = 3.37204e-05
Interpolated U error = 1.1896e-05
Looking up field U

Reading inlet velocity  uInfX

U at inlet = 1 m/s
Cylinder radius = 0.499614 m

Evaluating analytical solution
Writing relative error in U to "/home/toshiba/OpenFOAM/toshiba-2.1.0/run/tutorials/basic/potentialFoam/cylinder/0/error"
ExecutionTime = 0.08 s  ClockTime = 0 s

End

toshiba@ubuntu:~/OpenFOAM/toshiba-2.1.0/run/tutorials/basic/potentialFoam/cylinder$

4.5
Code:

There is no other time folder, because potentialFoam is an extremely basic folder that loads and saves the results to the same time folder.
What it mean(there is no time folder) how I can see the results in paraview. whether I have to type foamToVTK?

wyldckat August 19, 2013 10:18

Hi David,

Quote:

Originally Posted by psk (Post 446613)
What it mean(there is no time folder) how I can see the results in paraview. whether I have to type foamToVTK?

I'm guessing that you haven't studied the first tutorial in the User Guide: http://www.openfoam.org/docs/user/cavity.php#x5-40002.1
There you'll find instructions on how to use ParaView with OpenFOAM.

What I meant by "no other time folders" is that other solvers usually create more time snapshots, while potentialFoam does not. For example, the first run of icoFoam in the cavity tutorial (on that link above), will create 5 new time folders:
Code:

0.1
0.2
0.3
0.4
0.5

Best regards,
Bruno

psk August 20, 2013 02:05

Many Apologize Bruno I get confused, I thought Potential Foam create more snapshots,thanks for response and information.

Kindly see my another post in this link [ http://www.cfd-online.com/Forums/ope...tml#post446556 ] I edit blockMeshDict, kindly give your suggestion.


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