CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

cylinder case

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By monty86
  • 3 Post By Artur.Ant
  • 1 Post By B_R_Khan
  • 1 Post By moonv

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2014, 06:01
Default cylinder case
  #1
Member
 
Join Date: Jul 2013
Posts: 34
Rep Power: 13
monty86 is on a distinguished road
Dear all,
I am facing problem while going through the tutorials. i am new user of OpenFoam. in cylinder case when i put Allrun command to run the problem i am getting following error in paraFoam window.

p, li { white-space: pre-wrap; } RROR: In /home/opencfd/OpenFOAM/OpenFOAM-2.3.0/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.cxx, line 216
vtkPV4FoamReader (0xb07cb78): could not find valid OpenFOAM mesh




ERROR: In /home/opencfd/OpenFOAM/ParaView-4.1.0/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 754
vtkPVCompositeDataPipeline (0xb075dc8): Algorithm vtkPV4FoamReader(0xb07cb78) returned failure for request: vtkInformation (0xb088870)
Debug: Off
Modified Time: 91093
Reference Count: 1
Registered Events: (none)
Request: REQUEST_INFORMATION
ALGORITHM_AFTER_FORWARD: 1
FORWARD_DIRECTION: 0








ERROR: In /home/opencfd/OpenFOAM/OpenFOAM-2.3.0/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.cxx, line 216
vtkPV4FoamReader (0xb07cb78): could not find valid OpenFOAM mesh




ERROR: In /home/opencfd/OpenFOAM/ParaView-4.1.0/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 754
vtkPVCompositeDataPipeline (0xb075dc8): Algorithm vtkPV4FoamReader(0xb07cb78) returned failure for request: vtkInformation (0xb088870)
Debug: Off
Modified Time: 91093
Reference Count: 1
Registered Events: (none)
Request: REQUEST_INFORMATION
ALGORITHM_AFTER_FORWARD: 1
FORWARD_DIRECTION: 0




& when i am adding command of blockMesh i am getting following error message
--> 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: /root/OpenFOAM/tutorials/basic/potentialFoam/cylinder/constant/polyMesh/blockMeshDict from line 17 to line 17.

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

FOAM exiting





Please help me out to understand what is the problem
ghastbug likes this.
monty86 is offline   Reply With Quote

Old   April 19, 2014, 09:53
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
well;
Quote:
could not find valid OpenFOAM mesh
means there is no mesh created

Quote:
& when i am adding command of blockMesh i am getting following error message
--> 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: /root/OpenFOAM/tutorials/basic/potentialFoam/cylinder/constant/polyMesh/blockMeshDict from line 17 to line 17.

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

FOAM exiting
this tutorials uses a dynamic code (codeStream), means a part of blockMesh will be compiled and created in runTime, so to use code stream you should enable allow System Operations. read this thread.
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   April 21, 2014, 07:40
Default
  #3
Member
 
Join Date: Jul 2013
Posts: 34
Rep Power: 13
monty86 is on a distinguished road
Dear Nima,
As per your suggestion i activate the allow system operation by replacing 0 with 1 but still getting the same error. am i missing something in this or have to replace with other number?
monty86 is offline   Reply With Quote

Old   April 21, 2014, 08:44
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

the error is self-explanatory

Code:
--> 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: /root/OpenFOAM/tutorials/basic/potentialFoam/cylinder/constant/polyMesh/blockMeshDict from line 17 to line 17.
And it says that you should not run simulation using root account. Make OpenFOAM accessible to users and run the case from user account.
alexeym is offline   Reply With Quote

Old   April 22, 2014, 07:50
Default
  #5
Member
 
Join Date: Jul 2013
Posts: 34
Rep Power: 13
monty86 is on a distinguished road
Dear alexey,
Now i got it, I installed OpenFoam as a sole root login. without root login i am not able to run any case. Is there any way how i can add another user account & run OpenFoam without root login? I dont want to do again Open foam installation procedure. This may be silly question but i am stuck on it.
monty86 is offline   Reply With Quote

Old   April 22, 2014, 08:13
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

as I don't know what Linux distribution you're using, my hits will be rather generic. In general it's simpler to install OpenFOAM system-wide using package manager (this way all permissions will be set correct and OF will be usable by all users of the system) but since you've decided to build it, here is the way to transfer it from root account to use account (by convention # will be shell prompt of root account, $ will be shell prompt of user):

1. Create ordinary user

Code:
# useradd -m ofuser
# passwd ofuser
these two commands will create ordinary user account and set its password. -m switch will instruct useradd utility to create home folder, usually it is /home/ofuser.

2. Copy (or move, in this case use mv instead of cp -r) OpenFOAM folder from root home to new user home

Code:
# cp -r /root/OpenFOAM /home/ofuser/
3. Fix ownership of the installation

Code:
# cd /home/ofuser
# chown -R ofuser OpenFOAM
Now you can login as ofuser and try running tutorials

Code:
$ cd
$ source OpenFOAM/etc/bashrc
$ tut
$ cd basic/potentialFoam/cylinder
$ ./Allrun
Though your way of naming OpenFOAM folder seems rather strange to me, as usually it is installed into $HOME/OpenFOAM/OpenFOAM-<OF version>.
alexeym is offline   Reply With Quote

Old   June 21, 2015, 18:07
Default
  #7
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 11
vitocorleone is on a distinguished road
Hello Alexym,
I have the same error as mentioned above

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)

I am using openFOam on windows, I made the programme accessible to guest and tried using the blockMesh command in the guest account for the cylinder case but I get the same error. Kindly Help.
vitocorleone is offline   Reply With Quote

Old   August 23, 2018, 05:58
Default
  #8
Member
 
Arthur
Join Date: Aug 2014
Location: Italy
Posts: 47
Rep Power: 12
Artur.Ant is on a distinguished road
Hello
I also had this problem installing openFoam on Windows.
I solved it doing these steps:
1)go to ... src/OpenFOAM/db/dynamicLibrary/dynamiCode folder
2)open dynamicCode.C file
3)comment the part of the error like this:

/* if (isAdministrator())
{
FatalIOErrorInFunction(dict)
<< "This code should not be executed by someone with administrator"
<< " rights due to security reasons." << nl
<< "(it writes a shared library which then gets loaded "
<< "using dlopen)"
<< exit(FatalIOError);
}
*/

4)go back to ...src/OpenFOAM folder
5)compile openFOAM with command:
wclean libso && wmake libso 2>&1 | tee log.wmake
6)if you don't have 'make' install it
for more information visit this link: https://www.computerhope.com/unix/umake.htm
7)if you don't have 'zlib1g-dev' library install it.
Hope this will help someone.
Artur
Danubi, allanZHONG and AnzarMark1 like this.
Artur.Ant is offline   Reply With Quote

Old   July 31, 2019, 15:57
Default
  #9
New Member
 
OOS
Join Date: Jul 2019
Posts: 3
Rep Power: 7
oobiols is on a distinguished road
I just wanted to let you know that this just saved my life, thank you so much!
This worked for me in a RHEL centOS 7.6 system, using the v6 openfoam image for docker.
oobiols is offline   Reply With Quote

Old   March 5, 2020, 09:37
Default
  #10
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

as I don't know what Linux distribution you're using, my hits will be rather generic. In general it's simpler to install OpenFOAM system-wide using package manager (this way all permissions will be set correct and OF will be usable by all users of the system) but since you've decided to build it, here is the way to transfer it from root account to use account (by convention # will be shell prompt of root account, $ will be shell prompt of user):

1. Create ordinary user

Code:
# useradd -m ofuser
# passwd ofuser
these two commands will create ordinary user account and set its password. -m switch will instruct useradd utility to create home folder, usually it is /home/ofuser.

2. Copy (or move, in this case use mv instead of cp -r) OpenFOAM folder from root home to new user home

Code:
# cp -r /root/OpenFOAM /home/ofuser/
3. Fix ownership of the installation

Code:
# cd /home/ofuser
# chown -R ofuser OpenFOAM
Now you can login as ofuser and try running tutorials

Code:
$ cd
$ source OpenFOAM/etc/bashrc
$ tut
$ cd basic/potentialFoam/cylinder
$ ./Allrun
Though your way of naming OpenFOAM folder seems rather strange to me, as usually it is installed into $HOME/OpenFOAM/OpenFOAM-<OF version>.

Dear alexeym,

I wanted to do what you mentioned, but I faced with these problems:

1- When I wanted to create a new user, it gave me "permission denied" error! So, I log in with admin using "sudo -s". (Did I do right? or I didn't have to log in with admin?)

2- I did not have "OpenFOAM" folder as you did, so I copied openFOAM-7 folder. (Did I do right? or I had to find the same folder?)

3- The openFoam folder is copied in /opt/home/ofuser address, not in main home! What did I have to go?

4- Again, the "# chown -R ofuser OpenFOAM" command did not work, as I have no OenFOAM.

At last, I couldn't use the openFoam on my home folder!

Regards,
Ali
alimea is offline   Reply With Quote

Old   July 1, 2020, 13:50
Default Needs to be a way to do this without creating a user
  #11
Member
 
Join Date: Feb 2016
Posts: 41
Rep Power: 10
LeeRuns is on a distinguished road
Quote:
Originally Posted by alimea View Post
Dear alexeym,

I wanted to do what you mentioned, but I faced with these problems:

1- When I wanted to create a new user, it gave me "permission denied" error! So, I log in with admin using "sudo -s". (Did I do right? or I didn't have to log in with admin?)

2- I did not have "OpenFOAM" folder as you did, so I copied openFOAM-7 folder. (Did I do right? or I had to find the same folder?)

3- The openFoam folder is copied in /opt/home/ofuser address, not in main home! What did I have to go?

4- Again, the "# chown -R ofuser OpenFOAM" command did not work, as I have no OenFOAM.

At last, I couldn't use the openFoam on my home folder!

Regards,
Ali



For anyone running docker containers with automated applications we skip the whole user permissions, meaning you have permissions to do all of this if you have permissions to run the app. It make4s everything clearer. So is there a way to do the dynamic calculation without having to create a user?
LeeRuns is offline   Reply With Quote

Old   February 2, 2021, 13:54
Default
  #12
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Quote:
Originally Posted by Artur.Ant View Post
Hello
I also had this problem installing openFoam on Windows.
I solved it doing these steps:
1)go to ... src/OpenFOAM/db/dynamicLibrary/dynamiCode folder
2)open dynamicCode.C file
3)comment the part of the error like this:

/* if (isAdministrator())
{
FatalIOErrorInFunction(dict)
<< "This code should not be executed by someone with administrator"
<< " rights due to security reasons." << nl
<< "(it writes a shared library which then gets loaded "
<< "using dlopen)"
<< exit(FatalIOError);
}
*/

4)go back to ...src/OpenFOAM folder
5)compile openFOAM with command:
wclean libso && wmake libso 2>&1 | tee log.wmake
6)if you don't have 'make' install it
for more information visit this link: https://www.computerhope.com/unix/umake.htm
7)if you don't have 'zlib1g-dev' library install it.
Hope this will help someone.
Artur
Followed your steps but stuck at 5th step. How do I compile in OpenFOAM folder?
Thanks
NiruBhai likes this.
B_R_Khan is offline   Reply With Quote

Old   June 12, 2021, 08:29
Default overinterdymfoam two rotor error in openfoam.com msys2 windows v1906
  #13
New Member
 
Saurabh
Join Date: Jul 2019
Posts: 4
Rep Power: 7
Saurabh__ is on a distinguished road
overinterdymfoam two rotor error in openfoam.com msys2 windows v1906
after giving command ./Allrun

Pstream initialized with:
floatTransfer : 0
nProcsSimpleSum : 0
commsType : nonBlocking
polling iterations : 0
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Overriding DebugSwitches according to controlDict
overset 0;

dynamicOversetFvMesh 0;

cellVolumeWeight 0;

Create mesh for time = 0

Selecting dynamicFvMesh dynamicOversetFvMesh
Selecting motion solver: multiSolidBodyMotionSolver
Selecting solid-body motion function rotatingMotion
Applying solid body motion rotatingMotion to 2512 points of cellZone movingZone1
Selecting solid-body motion function rotatingMotion
Applying solid body motion rotatingMotion to 2516 points of cellZone movingZone2

PIMPLE: no residual control data found. Calculations will employ 2 corrector loops

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Creating cellMask field to block out hole cells

Creating interpolatedCells field

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
Cmu 0.09;
C1 1.44;
C2 1.92;
C3 0;
sigmak 1;
sigmaEps 1.3;
}


Reading g

Reading hRef
Calculating field g.h

No MRF models present

No finite volume options present
DICPCG: Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
Reading/calculating face velocity Uf

Courant Number mean: 0 max: 0

Starting time loop


--> FOAM FATAL IO ERROR:
This code should not be executed by someone with administrator rights for security reasons.
It generates a shared library which is loaded using dlopen



file: J:/CFD/openem/msys64/home/ofuser/twoSimpleRotors/system/controlDict.functions.alphaVol

From function static void Foam::dynamicCode::checkSecurity(const char*, const Foam::dictionary&)
in file db/dynamicLibrary/dynamicCode/dynamicCode.C at line 78.

If v2020 used then an error is no make found then I have used a later version then above error is pop-up.

please help why this error is persists
Saurabh__ is offline   Reply With Quote

Old   October 31, 2021, 23:56
Default
  #14
New Member
 
Join Date: Oct 2021
Posts: 1
Rep Power: 0
NiruBhai is on a distinguished road
Quote:
Originally Posted by vitocorleone View Post
Hello Alexym,
I have the same error as mentioned above

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)

I am using openFOam on windows, I made the programme accessible to guest and tried using the blockMesh command in the guest account for the cylinder case but I get the same error. Kindly Help.
Right-clicking on the main OpenFOAM folder, going to properties, changing the security settings and allowing full control to all users should work as it did for me

NiruBhai is offline   Reply With Quote

Old   February 14, 2022, 09:46
Default wmake
  #15
Member
 
Join Date: Mar 2018
Posts: 33
Rep Power: 8
ghastbug is on a distinguished road
Khan,
As far as I understand, you have to run the make files in OpenFOAM\v2106\msys64\home\ofuser\OpenFOAM\OpenFOA M-v2106\src\OpenFOAM. So first you tell shell to go there (you use cd), and then you input the command (wclean libso && wmake libso 2>&1 | tee log.wmake).


I did that, and I got this error though:
Code:
alessandro.sarti@28APO4951 MSYS ~/OpenFOAM/OpenFOAM-v2106/src/OpenFOAM
$ wclean libso && wmake libso 2>&1 | tee log.wmake
wclean libso
wmake libso (OpenFOAM)
/home/ofuser/OpenFOAM/OpenFOAM-v2106/wmake/rules/General/general:34: /home/ofuser/OpenFOAM/OpenFOAM-v2106/wmake/rules/win64Mingw/general: No such file or directory
make: *** No hay ninguna regla para construir el objetivo '/home/ofuser/OpenFOAM/OpenFOAM-v2106/wmake/rules/win64Mingw/general'.  Alto.
/home/ofuser/OpenFOAM/OpenFOAM-v2106/build/win64MingwDPInt32Opt/src/OpenFOAM/options:6: *** falta un separador.  Alto.
wmake error: file '/home/ofuser/OpenFOAM/OpenFOAM-v2106/build/win64MingwDPInt32Opt/src/OpenFOAM/sourceFiles' could not be created in /home/ofuser/OpenFOAM/OpenFOAM-v2106/src/OpenFOAM
Looks like openFOAM's wmake folder does not have rules for win64Mingw. Sooo, maybe we have to switch to Linux.

Actually, I don't even know C, but it looks like shell first opens rules/General/general, and then, it sees there that it has to switch to win64mingw/general, which does not exist. So maybe there is a way to edit general/general so it doesn't refer to the win64mingw rules that don't exist, or we can make a rule file in win64mingw
ghastbug is offline   Reply With Quote

Old   February 16, 2023, 06:20
Default user with similar error
  #16
New Member
 
simon
Join Date: Feb 2023
Location: sweden
Posts: 1
Rep Power: 0
moonv is on a distinguished road
Hey!
I am just starting out with openfoam (on windows) and I have the same issue. I wanted to edited the dynamicCode.C like mentioned above, but when I search for the directory "dynamicCode" I just find a folder under etc/codeTemplates and it doesnt have a dynamicCode.C file.

Running the blockMesh command throws the admin error, and also says -->
From static void Foam::dynamicCode::checkSecurity(const char*, const Foam::dictionary&)
in file db/dynamicLibrary/dynamicCode/dynamicCode.C at line 72.
<--

Based on this it seems the file dynamicCode.C should be found when searching the folders but no...

I tried a cd $FOAM_SRC command but it also just says No such file or directory.

Help a lost soul out pls.
MKdoubleB likes this.
moonv is offline   Reply With Quote

Old   July 29, 2023, 14:43
Default
  #17
New Member
 
Markus Bähner
Join Date: May 2023
Posts: 4
Rep Power: 7
MKdoubleB will become famous soon enough
Quote:
Originally Posted by moonv View Post
Hey!
I am just starting out with openfoam (on windows) and I have the same issue. I wanted to edited the dynamicCode.C like mentioned above, but when I search for the directory "dynamicCode" I just find a folder under etc/codeTemplates and it doesnt have a dynamicCode.C file.

Running the blockMesh command throws the admin error, and also says -->
From static void Foam::dynamicCode::checkSecurity(const char*, const Foam::dictionary&)
in file db/dynamicLibrary/dynamicCode/dynamicCode.C at line 72.
<--

Based on this it seems the file dynamicCode.C should be found when searching the folders but no...

I tried a cd $FOAM_SRC command but it also just says No such file or directory.

Help a lost soul out pls.

i have the exact same problem. Is this due to a newer version of OpenFOAM?
MKdoubleB is offline   Reply With Quote

Old   December 20, 2023, 08:01
Default
  #18
New Member
 
JC
Join Date: Dec 2023
Posts: 1
Rep Power: 0
CMP23 is on a distinguished road
Hello,
I had the same issue is referred here:
"--> FOAM FATAL IO ERROR: (openfoam-2306)
This code should not be executed by someone with administrator rights for security reasons.
It generates a shared library which is loaded using dlopen."
I'm using OpenFoam 2306 with ubuntu WSL. I tried coment some of the code like is sugested on this forum, however, then i wasn't able to use the libraries due to :"error while loading shared libraries: libOpenFOAM.so: cannot open shared object file: No such file or directory" erro.
I have also tried to implement a new user like its suggested, however the command "chown -R ofuser OpenFOAM" shown the follow error message:"chown: cannot access 'OpenFOAM': No such file or directory".

Can you give me some tips.
Best regards.
CMP23 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2D flow around a circular cylinder case with interFoam solver shuoxue OpenFOAM Running, Solving & CFD 2 January 14, 2020 14:23
MRFSimpleFoam wind turbine case diverges ysh1227 OpenFOAM Running, Solving & CFD 2 May 7, 2015 11:13
flow around a circular cylinder with velocity inlet and outflow outlet shuoxue OpenFOAM 1 March 3, 2014 11:42
Error for an oscillating cylinder case (oscillatingFixedValue) aut_iut OpenFOAM Bugs 0 April 30, 2010 07:19
Turbulent steady flow around a circular cylinder Mirek Kabacinski FLUENT 0 July 23, 2003 19:40


All times are GMT -4. The time now is 01:10.