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

Problem with cavity tutorial

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2018, 22:35
Default Problem with cavity tutorial
  #1
New Member
 
John Smith
Join Date: Mar 2018
Posts: 3
Rep Power: 8
Heisenflower is on a distinguished road
Hello everyone, I'm having some trouble with the cavity tutorial. duh

I'm following this guide right here: http://web.student.chalmers.se/group...psAndCases.pdf

I started having problems with the instructions at slide 23. The first step is to copy the icoFoam cavity tutorial to the run directory. It follows this two commands:

cp -r $FOAM_TUTORIALS/icoFoam/cavity $FOAM_RUN
cd $FOAM_RUN/cavity

However, when I try the cp command, I get this response:

cannot create directory '/home/user/OpenFOAM/user-dev-18.02-cfdsupport/run': No such file or directory

Indeed, when i run 'ls' there is no such file or directory. There is no OpenFOAM directory in my home, only OpenFOAM-in-Box-18.02. I suppose that it would work if I could swap

/home/user/OpenFOAM/user-dev-18.02-cfdsupport/run

for

/home/user/OpenFOAM-in-Box.18.02/user-dev-18.02-cfdsupport/run

Does anyone know a way to do it?

Thank you for your time, and I'm sorry if this is a dumb question, please bare with me lol.
Heisenflower is offline   Reply With Quote

Old   March 17, 2018, 03:05
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
It seems your $FOAM_RUN is not set correctly. You are free to note the real path instead.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   March 17, 2018, 23:11
Default
  #3
New Member
 
John Smith
Join Date: Mar 2018
Posts: 3
Rep Power: 8
Heisenflower is on a distinguished road
Quote:
Originally Posted by piu58 View Post
It seems your $FOAM_RUN is not set correctly. You are free to note the real path instead.
Did that. Now when I try to run blockMesh, it returns me --> FOAM FATAL ERROR:
cannot find file "/home/user/OpenFOAM-in-Box-18.02/user-dev-18.02-cfdsupport/run/system/controlDict

I went looking for a 'system' directory in my OpenFOAM-in-Box.18.02 and found a whole bunch of results. Which one should I paste there?

Edit: It worked by placing my cavity system directory in ' /home/user/OpenFOAM-in-Box-18.02/user-dev-18.02-cfdsupport/run/ '. Then, the new error was ' cannot find file "/home/samyr/system/controlDict" ' . It was solved by following the same procedure. The blockMesh finally worked.

But I still dont understand why bash is searching for the system directory in those places. Specially at my home directory.

Thanks for the help so far
Heisenflower is offline   Reply With Quote

Old   March 18, 2018, 02:31
Default
  #4
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
blockMesh looks in ./system for blockMeshDict.

Normally a case is establisehd as

Code:
run - <myFolder> - 0
                 - system 
                 - constant
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   March 26, 2018, 11:13
Default
  #5
Member
 
Joaquín Neira
Join Date: Oct 2017
Posts: 38
Rep Power: 8
cojua8 is on a distinguished road
In file etc/bashrc, line 132 you may set WM_PROJECT_USER_DIR:

Code:
export WM_PROJECT_USER_DIR=your/custom/dir
here you may use any environment variables such as $HOME, $WM_PROJECT, $WM_PROJECT_VERSION, etc.

Then, in file etc/config.sh/settings, line 182 you may delete the /run part or just leave it there.

Make sure your directory exists or just create it in terminal:

Code:
mkdir -p $FOAM_RUN

This way, $FOAM_RUN is set to your custom run dir.



Hope this helps
cojua8 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Convergence problem in 2D cavity problem dreamz Main CFD Forum 0 December 9, 2013 17:55
Viscositymodel tutorial, problems when changing test case to cavity sur4j OpenFOAM Programming & Development 1 December 8, 2013 09:53
Vessel tutorial problem hosseinhgf CFX 1 March 17, 2013 11:39
[OpenFOAM] display panal dosn't refresh in tutorial 2.1 Cavity kEpsilon ParaView 0 February 27, 2012 10:43
radiation problem for square cavity using fluent john Main CFD Forum 0 September 30, 2005 07:40


All times are GMT -4. The time now is 20:39.