Great video! I am new to Linux and openFOAM so this may be a basic question, but I am still confused on where to save these files freshly from installation. Right now OpenFOAM is installed at the file location, \\wsl.localhost\Ubuntu-24.04\opt\openfoam12. When I begin a new simulation, where do I start saving and moving these files? Do I create new simulations within the "openfoam12" folder, or "\\wsl.localhost\Ubuntu-24.04\home\user\OpenFOAM", or can it just be under "My PC" like typical things? Essentially, where is your UA-cam folder and what other files needed to be stored there for OpenFoam to function?
Good question. I have answered this in detail in my OpenFOAM installation video. Although the video is about installing v2406, you can skip over to the additional tips and check it out. I hope it helps.
@@Codeynamics Today I followed the tutorial and succesfully did the meshing. I am also thinking to run the case considering a random velocity of fluid. I must again thank you for making everything as clear as possible. I was wondering if you can make a tutorial meshing the same file in "cfMesh" . Also, can you make any tutorial on meshing and case setting a wind turbine!
for some reason, maybe because I am running openfoam 12 but when I pull motorbike, it does not provide the same files, is there something I can do to get the same files you do? or do I have to downgrade my openfoam versions?
Yes. OpF 12 is totally different. It is a foundation or .org versions such as v10, v11, v12. I personally prefer to use ESI or .com versions such as v2306, v2312, v2406. So it will be entirely different for you.
@@ayushtokeria6965 I would recommend ESI Versions. v2406 is my fav. Next month I will also start using v2412 once it is released. For some reason I am not very comfortable with foundation versions.
Thankyou. I did not run the simulation. If you had to run for that case specifically, you should be using simpleFoam command. It depends on the solver. Please do subscribe and support for more useful videos.
@@Codeynamics hello again, i'm having a problem with the snappyhexmesh.When i run it i am usually having blocks meshed around the airplane instead of the geometry being meshed completly.So the resulting mesh is just a bunch of blocks surrounding the aircraft what can be causing this error?I just used the snappyhexmesh command without the mpirun because for some reason it told me that this command doesn't exist could this be the reason?
The reason is that in the snappyHexMeshDict, under snapControls function, see the 6th and the 7th parameters. set the implicitFeatureSnap to false and set explicitFeatureSnap to true. This should make your problem solved. The behavior with just snappyHexMesh will be exactly the same as doing it with decomposed case. It is only a matter of time that differs for both the process. mpirun case is faster due to parallel processing. I hope this is clear.
hello, i received the error "mpirun noticed that process rank 2 with PID 0 on node LAPTOP... exited on signal 11 (Segmentation fault)" when i ran mpirun np -4 snappyHexMesh -overwrite -parallel. i've tried changing the number of processors, adding more swap space, and changing the parameters in decomposepar, but nothing has worked. do you have any ideas as to what the cause of the error might be? thank you so much!
Small mistake in the vid about parallel processing. Using mpirun with the flag --use-hwthread-cpus , OpenFOAM executables can be run with as many logical cores as you have available, not just the number of physical cores. However, it's a bad idea to use all of them. Save 1 or 2 logical cores in case the system needs to do something else. For example, I have 8 physical cores and 12 logicial cores. I run most simulations on 10 logical cores with the flag above. One question: Are the boundary conditions handled by blockMesh? Other than that, very helpful, thanks very much!!
Thankyou for the comment. If the virtualization is enabled in a PC, then it will take threads as you rightly mentioned. Which is actually the case in most performance or gaming laptops. But many people watching this channel use very simple laptops that don't come with virtualization enabled. So in that case only the processor will be used. Regarding Saving a few logical cores for other tasks of the computer is absolutely true. I just didn't want to over complicate things about parallel processing in a video focused on snappyHexMesh. So didn't go much inside. I have already made a video on MPI parallel processing for OpenFOAM and I'm planning to make a dedicated video to explain the problems and it's possible solutions during parallel processing in OpenFOAM. I'll make sure to include this suggestion of yours too ☺️. Thankyou very much. The boundary patch names are handled by blockMesh. The boundary conditions as such as handled by files under 0/ folder.
Thanks for your video, I change all the motorbike name for the goodone and launch simplefoam but at the time=6 i have a error with #1 to #12 line, do you know what's the cause?
Hello, Thanks for this great video! I am having difficulty working with a 2D case using snappyHexMesh. Despite defining the front and back patches as empty in the blockMeshDict file, snappyHexMesh is still refining the blockMesh in the third direction, which should not happen for a 2D case. Could you please provide some suggestions on what changes I should make? Thank you!
Have you kept the third direction as a single cell length in blockMesh itself? I generally wouldn't recommend snappyHexMesh for 2D cases, it is good for 3D. You can try gmsh. That's much better.
@@Codeynamics Yes, I’ve kept the number of cells in the third direction to just a single cell. The blockMesh creates a good representation of a 2D mesh with only one cell in the third direction, as defined in the blockMeshDict file. The issue arises when I use snappyHexMesh to snap the mesh to the .stl geometry, which is a CD nozzle. I was trying out this particular geometry because I wanted hands-on experience with mesh generation, rather than just using the tutorial files. And also after running snappyHexMesh the boundary condition file in constant/boundary directory gets altered and shows absurd boundaries. I’ll definitely try Gmsh, but as I'm learning OpenFOAM, I’m curious: What do industries typically prefer for meshing-snappyHexMesh or Gmsh? Or does it depend on the specific problem? Thank you
@@swap_pat29 The way to do that is, you have to take a section of the 3D geometry and extract the 2D. Then extrude it to give a thickness. Now use snappyHexMesh to make the 3D mesh. Then, you can use the extrudeMesh tool to change the thickness of the mesh to 0 and then extrude it back to 1 cell thickness. This sure is cumbersome. Most people prefer using blockMesh for simple 2D meshes. For geometry driven meshes, gmsh is much better and convenient than the above mentioned process. This is the thing with Open source tools. You learn one, and one way or the other you will have to learn the associated opensource tools as well sooner or later (if you want to be efficient at what you do).
very good and well explained video. learn a lots of things. keep posting similar videos on OpenFOAM.
Means a lot. thankyou so much. Share and support
thank you very much, best tutorial I have seen about the topic
🤗. Thankyou for your comment. Keep supporting.
What a useful video! Thanks a lot!
Thanks for your comment. Keep supporting. 😃🤗
Great video! I am new to Linux and openFOAM so this may be a basic question, but I am still confused on where to save these files freshly from installation. Right now OpenFOAM is installed at the file location, \\wsl.localhost\Ubuntu-24.04\opt\openfoam12. When I begin a new simulation, where do I start saving and moving these files? Do I create new simulations within the "openfoam12" folder, or "\\wsl.localhost\Ubuntu-24.04\home\user\OpenFOAM", or can it just be under "My PC" like typical things? Essentially, where is your UA-cam folder and what other files needed to be stored there for OpenFoam to function?
Good question. I have answered this in detail in my OpenFOAM installation video.
Although the video is about installing v2406, you can skip over to the additional tips and check it out.
I hope it helps.
Thank you very much sir, well and enough explained video like always.
Thankyou soo much.
Do support by subscribing and sharing 😊
@@Codeynamics Today I followed the tutorial and succesfully did the meshing. I am also thinking to run the case considering a random velocity of fluid. I must again thank you for making everything as clear as possible.
I was wondering if you can make a tutorial meshing the same file in "cfMesh" .
Also, can you make any tutorial on meshing and case setting a wind turbine!
Sure will try to make them.
Thanks for the video..Sir.!
Welcome. please subscribe and support.
for some reason, maybe because I am running openfoam 12 but when I pull motorbike, it does not provide the same files, is there something I can do to get the same files you do? or do I have to downgrade my openfoam versions?
Yes. OpF 12 is totally different. It is a foundation or .org versions such as v10, v11, v12. I personally prefer to use ESI or .com versions such as v2306, v2312, v2406. So it will be entirely different for you.
@@Codeynamics Would you recommend those versions overall? whats the differences?
@@ayushtokeria6965 I would recommend ESI Versions. v2406 is my fav. Next month I will also start using v2412 once it is released. For some reason I am not very comfortable with foundation versions.
Thanks you so much sir
Most welcome. Thanks for your support
thanks really helpful.Just a quick question did you run the silulation and if so which command did you use?
Thankyou.
I did not run the simulation. If you had to run for that case specifically, you should be using simpleFoam command.
It depends on the solver.
Please do subscribe and support for more useful videos.
@@Codeynamics hello again, i'm having a problem with the snappyhexmesh.When i run it i am usually having blocks meshed around the airplane instead of the geometry being meshed completly.So the resulting mesh is just a bunch of blocks surrounding the aircraft what can be causing this error?I just used the snappyhexmesh command without the mpirun because for some reason it told me that this command doesn't exist could this be the reason?
The reason is that in the snappyHexMeshDict, under snapControls function, see the 6th and the 7th parameters. set the implicitFeatureSnap to false and set explicitFeatureSnap to true. This should make your problem solved.
The behavior with just snappyHexMesh will be exactly the same as doing it with decomposed case. It is only a matter of time that differs for both the process. mpirun case is faster due to parallel processing.
I hope this is clear.
I got a huge error message after I ran the 'mpirun... np...snappyHexMesh....overwrite' command. any advice?
Please email us the command, the error message as screenshots and questions if any to codeynamics@gmail.com
Thanks for the tutorial!!
Can you please upload video for the simulation and post-processing also?
Will try. The procedure for simulation and post processing is going to be the same as the flow over a prism case. Please check my previous videos.
hello,
i received the error "mpirun noticed that process rank 2 with PID 0 on node LAPTOP... exited on signal 11 (Segmentation fault)" when i ran mpirun np -4 snappyHexMesh -overwrite -parallel. i've tried changing the number of processors, adding more swap space, and changing the parameters in decomposepar, but nothing has worked.
do you have any ideas as to what the cause of the error might be?
thank you so much!
Can you please send the error message screenshots at codeynamics@gmail.com
We will look into it.
Small mistake in the vid about parallel processing. Using mpirun with the flag --use-hwthread-cpus , OpenFOAM executables can be run with as many logical cores as you have available, not just the number of physical cores. However, it's a bad idea to use all of them. Save 1 or 2 logical cores in case the system needs to do something else. For example, I have 8 physical cores and 12 logicial cores. I run most simulations on 10 logical cores with the flag above.
One question: Are the boundary conditions handled by blockMesh? Other than that, very helpful, thanks very much!!
Thankyou for the comment.
If the virtualization is enabled in a PC, then it will take threads as you rightly mentioned. Which is actually the case in most performance or gaming laptops. But many people watching this channel use very simple laptops that don't come with virtualization enabled. So in that case only the processor will be used.
Regarding Saving a few logical cores for other tasks of the computer is absolutely true. I just didn't want to over complicate things about parallel processing in a video focused on snappyHexMesh. So didn't go much inside. I have already made a video on MPI parallel processing for OpenFOAM and I'm planning to make a dedicated video to explain the problems and it's possible solutions during parallel processing in OpenFOAM. I'll make sure to include this suggestion of yours too ☺️. Thankyou very much.
The boundary patch names are handled by blockMesh. The boundary conditions as such as handled by files under 0/ folder.
@@Codeynamics Ahhh thank you very much for explaining! I use a wsl2 environment, so I've always had virtualization enabled! I never knew!
How much time to run this ?
Depends on the PC Config. It took me 8-10 mins. I only have an average PC.
Hey this is a great video and thank you for that.
Would be nice if you can also run the sim and make a video of it, PLEASE!!!
I will try for sure!
@@Codeynamics Thanks!!!!
Need a help about the surfacefeatureExtract command its not working for me?
Please write a detailed email about the error along with screenshots to codeynamics@gmail.com. Our engineers will reply soon.
We do not suggest using the .org/foundation version. Especially anything after v-10. To follow our videos, please use ESI/.com version of OpenFOAM.
@@Codeynamics Alright thanks so much!
@@Codeynamics Hi, is this email address still active? Thanks!
Thanks for your video, I change all the motorbike name for the goodone and launch simplefoam but at the time=6 i have a error with #1 to #12 line, do you know what's the cause?
Thanks for commenting. Please mail the zipped case file to codeynamics@gmail.com we will get back to you asap
@@Codeynamics thanks a lot, have a great day
Hello,
Thanks for this great video!
I am having difficulty working with a 2D case using snappyHexMesh. Despite defining the front and back patches as empty in the blockMeshDict file, snappyHexMesh is still refining the blockMesh in the third direction, which should not happen for a 2D case. Could you please provide some suggestions on what changes I should make?
Thank you!
Have you kept the third direction as a single cell length in blockMesh itself?
I generally wouldn't recommend snappyHexMesh for 2D cases, it is good for 3D. You can try gmsh. That's much better.
@@Codeynamics Yes, I’ve kept the number of cells in the third direction to just a single cell. The blockMesh creates a good representation of a 2D mesh with only one cell in the third direction, as defined in the blockMeshDict file. The issue arises when I use snappyHexMesh to snap the mesh to the .stl geometry, which is a CD nozzle. I was trying out this particular geometry because I wanted hands-on experience with mesh generation, rather than just using the tutorial files. And also after running snappyHexMesh the boundary condition file in constant/boundary directory gets altered and shows absurd boundaries.
I’ll definitely try Gmsh, but as I'm learning OpenFOAM, I’m curious: What do industries typically prefer for meshing-snappyHexMesh or Gmsh? Or does it depend on the specific problem?
Thank you
@@swap_pat29 The way to do that is, you have to take a section of the 3D geometry and extract the 2D. Then extrude it to give a thickness. Now use snappyHexMesh to make the 3D mesh.
Then, you can use the extrudeMesh tool to change the thickness of the mesh to 0 and then extrude it back to 1 cell thickness.
This sure is cumbersome. Most people prefer using blockMesh for simple 2D meshes. For geometry driven meshes, gmsh is much better and convenient than the above mentioned process.
This is the thing with Open source tools. You learn one, and one way or the other you will have to learn the associated opensource tools as well sooner or later (if you want to be efficient at what you do).
@@CodeynamicsThanks a lot for the detailed explanation! That makes sense now.
Sorry for bothering you but I cannot successfully scale down the stl file, could you show me how to fix it ?
Please mail your problem with detailed description to admin@codeynamics.com