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

Problem with blockMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2022, 18:00
Default Problem with blockMesh
  #1
New Member
 
Yoshi Yagi
Join Date: Oct 2022
Posts: 4
Rep Power: 3
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."
yoshiyagi is offline   Reply With Quote

Old   October 27, 2022, 18:20
Default Update: I got blockMesh to run, but I am not sure if what I did was okay.
  #2
New Member
 
Yoshi Yagi
Join Date: Oct 2022
Posts: 4
Rep Power: 3
yoshiyagi is on a distinguished road
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 7, 2022, 05:49
Default
  #3
New Member
 
Kasper
Join Date: Sep 2017
Posts: 9
Rep Power: 8
KasperWayne is on a distinguished road
That is correct. Your case needs to have three folder: 0, constant and system. If these are not present, an error is produced. Within the different folders, you place your dictionaries.

It seems you're quite new to this, so I'd recommend you to watch some videos on youtube, e.g. https://www.youtube.com/watch?v=KznljrgWSvo&t=1569s
KasperWayne 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
[snappyHexMesh] Problem and doubts with blockMesh, snappyHexMesh and multiple geometry luca1992 OpenFOAM Meshing & Mesh Conversion 0 August 23, 2017 11:40
[blockMesh] BlockMesh problem ari92 OpenFOAM Meshing & Mesh Conversion 2 May 27, 2017 10:23
[blockMesh] blockMesh problem with wedge blocks gned OpenFOAM Meshing & Mesh Conversion 0 September 14, 2016 05:49
[blockMesh] Problem with blockMesh and my shape TneurolF OpenFOAM Meshing & Mesh Conversion 4 June 25, 2013 13:52
Blockmesh problem with more than one block sven82 OpenFOAM Pre-Processing 1 June 4, 2013 17:08


All times are GMT -4. The time now is 14:58.