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

[blockMesh] Problem with running blockMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By al.csc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2022, 01:35
Default Problem with running blockMesh
  #1
New Member
 
Yoshi Yagi
Join Date: Oct 2022
Posts: 4
Rep Power: 4
yoshiyagi is on a distinguished road
Hi All,


I am totally new to the world of openFoam and I have been trying to follow along with this tutorial: https://eddylicious.readthedocs.io/e...nnel_lund.html


In particular, I am stuck on step 4 in which the tutorial asks me to run "blockMesh." My problem is that I am running into fatal errors when I run "blockMesh" in the terminal. I am using Ubuntu 22 and OpenFOAM 10.


I have tried running blockMesh from different directories within the precursor folder, but always end up with some Fatal Error.



These are the errors I am getting:



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

Not deleting polyMesh directory
"/home/yoshiyagi/eddylicious/tutorials/channel_flow_lund_rescaling/precursor/constant/polyMesh"
because it contains blockMeshDict
Reading "blockMeshDict"



--> FOAM FATAL ERROR:
Cannot find file "system/blockMeshDict"


From function int main(int, char**)
in file blockMesh.C at line 159.

FOAM exiting
************************************************** ***********************************


Upon looking at the "/home/yoshiyagi/eddylicious/tutorials/channel_flow_lund_rescaling/precursor/system" folder, I indeed cannot find the file "blockMeshDict"



However, I do see a file named "blockMeshDict" in /home/yoshiyagi/eddylicious/tutorials/channel_flow_lund_rescaling/precursor/constant/polyMesh.

These are the files in the polyMesh folder:

blockMeshDict blockMeshDict.template channelMesh.py


I tried running "blockMesh" wtihin the above directory, but got another error:




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



--> FOAM FATAL ERROR:
cannot find file "/home/yoshiyagi/eddylicious/tutorials/channel_flow_lund_rescaling/precursor/constant/polyMesh/system/controlDict"

From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::rea dStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 539.

FOAM exiting
************************************************** ***************


I am at a loss in this tutorial as I think I have tried running blockMesh in other directories, but always get an error. Perhaps this issue is due to my inexperience with openFOAM and that I do not have the right environment or I am not calling blockMesh properly?



Any help would be greatly appreciated. I also wanted to add that I also tried running the above commands using "sudo."

***************UPDATE***************************** *
I got blockMesh to run, but I am not sure if what I did was the right thing to do. I noticed that my errors were related to the directory "system/blockMeshDict".


So, what I did was copy the "system" folder to within the "/home/yoshiyagi/eddylicious/tutorial/channel_flow_lund_rescaling/precursor/constant/polyMesh". I did this because the "controlDict" file was within the "system" folder, but the "system" folder was not located in the same directory as "blockMeshDict".



I also had to copy "blockMeshDict" into the copied "system" folder. This is what my directory and its contents looks like now:



************************************************** ***********
/home/yoshiyagi/eddylicious/tutorials/channel_flow_lund_rescaling/precursor/constant/polyMesh


This is where I ran blockMesh and it worked.






This is where I added the files blockMeshDict
/home/yoshiyagi/eddylicious/tutorials/channel_flow_lund_rescaling/precursor/constant/polyMesh/system

the contents are:

blockMeshDict decomposeParDict fvOptions fvSolution
controlDict decomposeParDict~ fvSchemes sampleDict



************************************************** *********************************


blockMesh now works, but could someone confirm if this was the right method to getting blockMesh to work?
yoshiyagi is offline   Reply With Quote

Old   November 2, 2022, 15:43
Default
  #2
Member
 
Al Csc
Join Date: Jul 2018
Posts: 31
Rep Power: 8
al.csc is on a distinguished road
Yes, blockMeshDict used to be in constant/polyMesh (probably still in extend version). Now it is in system forlder
yoshiyagi likes this.
al.csc is offline   Reply With Quote

Old   November 2, 2022, 19:11
Default
  #3
New Member
 
Yoshi Yagi
Join Date: Oct 2022
Posts: 4
Rep Power: 4
yoshiyagi is on a distinguished road
Hi! Thanks for replying! I see, so the newer version of OpenFOAM is organized differently than older versions? The problem is that the tutorial was made with an older version of OpenFOAM then?
yoshiyagi is offline   Reply With Quote

Old   November 3, 2022, 00:49
Default
  #4
Member
 
Al Csc
Join Date: Jul 2018
Posts: 31
Rep Power: 8
al.csc is on a distinguished road
Older or different the link you posted is broken, so i have no detail. If it runs and you can validate the results, I won't bother if I were you.

Cheers!
al.csc 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
SU2-7.0.1 on ubuntu 18.04 hyunko SU2 Installation 7 March 16, 2020 05:37
[swak4Foam] swak4foam openfoam 7 installation problem Andrea23 OpenFOAM Community Contributions 1 February 17, 2020 19:11
problem running blockMesh in ubuntu terminal (openfoam) subhsngh OpenFOAM Running, Solving & CFD 6 June 26, 2013 09:02
[blockMesh] Problem with blockMesh and my shape TneurolF OpenFOAM Meshing & Mesh Conversion 4 June 25, 2013 14:52
Blockmesh problem with more than one block sven82 OpenFOAM Pre-Processing 1 June 4, 2013 18:08


All times are GMT -4. The time now is 00:53.