How to create and export your geometry for simulations in OpenFOAM - tutorial

  Рет қаралды 72,727

József Nagy (OpenFOAM tutorials)

József Nagy (OpenFOAM tutorials)

Күн бұрын

Пікірлер: 110
@luofenghuang8015
@luofenghuang8015 7 жыл бұрын
another amazing tutorial! (and great to catch up in Gothenburg ^ ^)
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 7 жыл бұрын
Thank you! It was nice to talk to you!
@agatasoda
@agatasoda 3 жыл бұрын
One of the rare tutorials that involve blender and NOT instantly obliterating the default cube.
@guillemoreno95
@guillemoreno95 2 жыл бұрын
this comment is extremely underrated
@CAL1MBO
@CAL1MBO Жыл бұрын
True
@peti6c
@peti6c 3 жыл бұрын
Köszi! Lényegre törő és átfogó előadás volt!
@altoroos
@altoroos 7 жыл бұрын
Great Videos (ALL OF THEM) Jósef. Please keep it up. Your efforts are much appreciated.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 7 жыл бұрын
Thank you. I am glad. Please support me further!
@pureheroin9902
@pureheroin9902 6 жыл бұрын
"Calculate the drag coefficient of the monkey" 🐒 So many gems in this video
@metel71
@metel71 7 жыл бұрын
Simply amazing, Jozsef! This is awesome!
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 7 жыл бұрын
I am glad. Thank you.
@carelesseagle
@carelesseagle 4 жыл бұрын
You sir are a GOD! Thank you so much!
@keithrunyon7746
@keithrunyon7746 4 жыл бұрын
Great video. One update is that this add-in is part of the current version of blender, so you may want to update with note and hyperlink to click ahead because the rheologic explanation is not not needed.
@garrettmoyer7049
@garrettmoyer7049 4 жыл бұрын
Hi Keith, Do you still access this add-in in the same fashion as the video shows? I don't seem to see this in my version of blender (2.83.1) when trying to search it like the video shows. Thanks!
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 4 жыл бұрын
@@garrettmoyer7049 The Rheo add on only works for blender versions v2.7x not 2.8.
@eldencw
@eldencw 5 жыл бұрын
Thanks for the video......I'm using blender 2.81 I wrote a little python script to change the titles, put it in the directory where your stl's are and it creates a subdirectory that has the components renamed and a combined stl file, copy and paste this into a file such as fixName.py and run with python fixNames.py: import glob,os def fixFile(filename,outf,subdir): head,tail=os.path.split(filename) outFn=os.path.join(head,subdir,tail) file_name = os.path.basename(filename) partName=tail.rsplit('.')[0] print partName,"outFn='%s'"%outFn with open(filename) as inf: with open(outFn,"wb") as out2: for l in inf: # inf.readline(): if l.startswith("solid"): l="solid %s "%partName if l.startswith("endsolid"): l="endsolid %s "%partName print >>outf,l, print >>out2,l, #outf.write(l) outFn="combined.stl" files=[f for f in glob.glob("*.stl") if not f.startswith(outFn)] dirname="retitled" os.makedirs(dirname) with open(outFn,"wb") as outf: #fixFile("rightEar.stl",outf) for f in files: fixFile(f,outf,dirname)
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 5 жыл бұрын
Thank you for providing this script. I will test it.
@parth3791
@parth3791 4 жыл бұрын
Thank you @Elden Crom, was going to write my self. I just made compatible for python 3 import glob import os def fixFile(filename, outf, subdir): head, tail = os.path.split(filename) outFn = os.path.join(head, subdir, tail) file_name = os.path.basename(filename) partName = tail.rsplit('.')[0] print(partName, "outFn='%s'" % outFn) with open(filename) as inf: with open(outFn, "w") as out2: for l in inf: # inf.readline(): if l.startswith("solid"): l = "solid %s " % partName if l.startswith("endsolid"): l = "endsolid %s " % partName print(l, file=outf, end='') # >>outf, l, print(l, file=out2, end='') # >>out2, l, # outf.write(l) # out2.write(l) # outf.write(l) outFn = "combined.stl" files = [f for f in glob.glob("*.stl") if not f.startswith(outFn)] dirname = "retitled" os.makedirs(dirname) with open(outFn, "w") as outf: # fixFile("rightEar.stl",outf) for f in files: fixFile(f, outf, dirname)
@ashuftw
@ashuftw 4 жыл бұрын
@@parth3791 Thank you so much
@jonesbr49424
@jonesbr49424 2 жыл бұрын
Thank you Jozsef! I have been using RhinoCAD and can do as you recommend for STL (ASCII) then combine.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 2 жыл бұрын
Great!
@oumaimaboualam5803
@oumaimaboualam5803 4 жыл бұрын
thank you ; it help a lot
@riturajborah382
@riturajborah382 Жыл бұрын
Great video again! Thank you! I have a questions: Is it possible to export .obj files of the faces and the geometry instead of .stl?
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy Жыл бұрын
Yes, as far as I know OBJ works also with snappy.
@riturajborah382
@riturajborah382 Жыл бұрын
@@OpenFOAMJozsefNagy😊thank you for the response!
@ninjaabcde
@ninjaabcde 3 жыл бұрын
you have a very nice channel, I am subscribed!
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 3 жыл бұрын
Thank you
@dr.gordontaub1702
@dr.gordontaub1702 Жыл бұрын
I know this is an older video. Jozsef or others, if you happen to see this message, can you confirm for me if the Andrew Price KZbin tutorials you refer too are posted under the name: Blender Guru? If you (Jozsef) are recommending Blender tutorials I want to make sure I am watching the correct ones.
@dr.gordontaub1702
@dr.gordontaub1702 Жыл бұрын
Please disregard. I now see that you linked to his page in your comments
@User-Tal1951
@User-Tal1951 2 жыл бұрын
Do you know about a tutorial or video with simulation of an air bubble being injected in liquid column ? Thanks!
@sem-devinc.3445
@sem-devinc.3445 6 жыл бұрын
always awesome
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 6 жыл бұрын
Thanks!
@vonBuchen
@vonBuchen 9 ай бұрын
Hi József. I am a complete newbie to OpenFOAM and am mainly interested in modelling fluid flow through porous materials. Basically, we have a tube filled with fibres, which creates a fairly complex geometry that comes from SEM images. What free tools could import XYZ coordinate files and create an input geometry for OpenFOAM? Thank you very much!
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 9 ай бұрын
Salome, Blender, FreeCad, input is mostly in STL. Check my Multiphase simulation project on how to get the geometry into OF.
@vonBuchen
@vonBuchen 9 ай бұрын
@@OpenFOAMJozsefNagy Thanks a lot, József.
@JhoEspana
@JhoEspana 2 жыл бұрын
Can I bring the openFoam simulation to Blender? Thank you
@sadeqsaleh5287
@sadeqsaleh5287 4 жыл бұрын
Thank you for the tutorial. Rheologic blender export add on is not supported by blender 2.8x and the STL export capability in blender generates separate STL files with wrong headers: "Solid Exported from blender...". Any suggestion on how to create STL files with correct solid name? Thank you
@mohammadmohagheghfaghih8313
@mohammadmohagheghfaghih8313 4 жыл бұрын
I have the same problem! Any one found another way to export stl files separately with correct naming?
@alina-valentinaavram7654
@alina-valentinaavram7654 5 жыл бұрын
very useful tutorial :)
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 5 жыл бұрын
I am glad.
@shivamgupta9967
@shivamgupta9967 Жыл бұрын
Sir, If working on 2D simulation. Do i need to give some thickness to the body while making CAD model in any CAD making software.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy Жыл бұрын
2D is a bit different. cfMesh can generate 2D meshes snappy cannot. You can use blockMesh and extrudeMesh for 2D.
@42mateos
@42mateos 6 жыл бұрын
I'm new to Blender, so I'm not following some things. How did you select a face of the cube and give it a separate name?
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 6 жыл бұрын
Right mouse button is select. With P you separate and rename it afterwards.
@andrewjackson3817
@andrewjackson3817 2 жыл бұрын
Hi! So I’m very new to all of this. How would I take my combined stl file and use it for a simulation in open foam. My goal is to have a simulation that shows the aerodynamic flow around the monkey head within the wind tunnel cube as you had created in the video.
@shivamgupta9967
@shivamgupta9967 Жыл бұрын
while exporting through Rheo stl, do we have to change the scale from 1 to 0.001 in order to convert to m. because i do it after importing from CAD to blender i change my scale from 1 to 0.001 to make it into m.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy Жыл бұрын
If you draw in mm yes you have to scale.
@komodiemo93
@komodiemo93 7 жыл бұрын
Gracias.
@peterparrish7890
@peterparrish7890 2 жыл бұрын
How can you use blender with blockMesh?
@hackernik6572
@hackernik6572 10 ай бұрын
Great, now I have the geometry. But how do I continue? I need to create a blockMeshDict file in order to start the simulation, but how do I do that?
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 10 ай бұрын
Check my multiphase simulation project for a detailed case setup.
@hackernik6572
@hackernik6572 10 ай бұрын
@@OpenFOAMJozsefNagy Alright, thanks
@francootaola9172
@francootaola9172 4 жыл бұрын
dear Jozsef, I am having trouble with this tutorial at minute 15.12 you combine all the .stls to one with the following line "cat *.stl >> combined.stl" my issue is that the combine.stl is opened in ParaView correctly but any other program I use to see .stl tells me that the STL file is broken (needs reparation). for the test, I was using surfaces (not solids) for example, divided a cube in its 6 surfaces and exported each of them in separate .stls, and tried to combine them to create the cube. ( i don't know if using only surfaces could provoke this issue or if I should use another command) thanks for the help, and the great videos.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 4 жыл бұрын
I am not sure. Some software packages have only a limited STL support.
@francootaola9172
@francootaola9172 4 жыл бұрын
@@OpenFOAMJozsefNagy oh well, either way, thanks a lot for the answer! as always love your videos!
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 4 жыл бұрын
@@francootaola9172 Thank you
@codingspace
@codingspace 6 жыл бұрын
really nice tutorial, but what about the units, if I import a cad model in blender or Salome, what will be the effect on the units. I am using Salome now and the defaults units are in meters, so if I export the .stl file for snappyHexMesh will the units still be in meters or I have to change manually.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 6 жыл бұрын
OpenFOAM assumes, that your geoemtry is in meters. If it is in mm, your can scale it with transformPoints -scale '(0.001 0.001 0.001)'
@antoine1407
@antoine1407 3 жыл бұрын
Thanks!
@hessmess9504
@hessmess9504 6 жыл бұрын
Thank you very much for this great tutorial. I tried to use SwiftBlock to generate the SHM file but it didn't work on blender 2.79. In your tutorial we can see only the geometry of the objects. What about the mesh ? Please if you can make an example it will be very helpfull.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 6 жыл бұрын
Check out my multiphase simulation project for additional information.
@salehabuhanieh3598
@salehabuhanieh3598 7 жыл бұрын
Great work Jozsef, I use salome for building and meshing the geometry, for me it was easier than Blender. the mesh can be prepared including any boundary patches (surfaces) or regions (volumes) and once converted (unvToFoam) the same can be found (including names) in OpenFOAM. I have a concern, in case of multi region, do we need to have one mesh only and assigning the regions over the mesh, or we need to have separate mesh? for example with one mesh, the regions can be separated in openfoam using splitMeshRegions but as far I know, only one polymesh folder is constructed. however, if we need to use a multi region solver, each region shall have it's own polymesh folder. if we divide the simulation domain for different meshes (region wise), we will have separate polymesh folders, but are compatible with each other according to openfoam? can the openfoam understand the global/merged mesh
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 7 жыл бұрын
I am not entirely sure, what your question is. Yes, first you create your overall mesh as one big mesh and then you separate it with splitMeshRegions. Then you have submeshes. chtMultiRegionFoam just uses those submeshes, not the original mesh. Was this your question?
@salehabuhanieh3598
@salehabuhanieh3598 7 жыл бұрын
Thanks for your reply yes indeed, I just got confused since the general structure for multiRegion solver mentions that the ployMesh shall be inside each region separately in the constant folder and the blockMesh is executed for each region. so, with using salome with the MAIN mesh concept there will be no need. The UnvToFoam and splitMeshRegions shall be executed in the case folder. There was an error during the splitMeshRegions execution. now it's ok this command segregates the constant, system and 0 folders according to the detected regions in the unv file. thank you again
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 7 жыл бұрын
Great, I am glad!
@leili8163
@leili8163 4 жыл бұрын
Rheology add-on is not available for blender 2.8 now.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 4 жыл бұрын
Yes, v2.8 is more or less a new software, so the add on can only work for v2.79 of blender.
@felipelorenzoortega6640
@felipelorenzoortega6640 5 жыл бұрын
hello Jozsef, To import the geometry to openFOAM, is it neccesary to define the inlets, outlets and walls before? I am using inventor, can I do that there?
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 5 жыл бұрын
Yes it is important. I am not familiar with inventor. Sorry.
@rob3rt86
@rob3rt86 6 жыл бұрын
Hi Jozsef, Can you please do a tutorial on swiftBlock? I need a tool that sort of convert stl points into blockMesh. I know how to use snappy, and other similar type of edges smoother or features, but I need a precise grid in faces and this is feasible in blockmesh Thanks Robert
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 6 жыл бұрын
I think the programmer's of swiftBlock can help you.
@syafiejelima986
@syafiejelima986 6 жыл бұрын
Hi sir I have a question here. Need to ask for your help. okay. let say I have a 3d CAD model of a car, and i want to run the simulation using OpenFOAM. Can I know, what softwares that is needed in the process to get to know about the aerodynamic of the car. And a bit explanation if possible. Thank you sir, I just confused on what is the software needed to solve this.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 6 жыл бұрын
You need the stl file of the car. snappy can work with that. Check out my multiphase simulation project, how this works.
@LUCASSILVA-jf1zc
@LUCASSILVA-jf1zc 2 жыл бұрын
Is there a way to import a part from SolidWorks?
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 2 жыл бұрын
Video coming up soon. Make sure to subscribe not to miss it.
@estaykylyshbek8347
@estaykylyshbek8347 4 жыл бұрын
I created all my geometries in Solidworks and all of them are centered at the origin but in Paraview they are everywhere, how do I fix it.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 4 жыл бұрын
What do you mean "everywhere"?
@estaykylyshbek8347
@estaykylyshbek8347 4 жыл бұрын
@@OpenFOAMJozsefNagy none of them is centered at the origin in paraview.
@estaykylyshbek8347
@estaykylyshbek8347 4 жыл бұрын
@@OpenFOAMJozsefNagy Can I send you an image of the models?
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 4 жыл бұрын
@@estaykylyshbek8347 Sorry for the late reply. Sure, send it to my email, but I guess this is an issue with the export function of your CAD tool
@estaykylyshbek8347
@estaykylyshbek8347 4 жыл бұрын
@@OpenFOAMJozsefNagy could you please leave your email address ?
@djdelta777
@djdelta777 5 жыл бұрын
So how can you convert from .stl to .step or .iges for example so as to mesh in another software?
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 5 жыл бұрын
In an external CAD tool. Freecad, salome
@djdelta777
@djdelta777 5 жыл бұрын
@@OpenFOAMJozsefNagy thanks. Salome worked.. after a bit of effort
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 5 жыл бұрын
@@djdelta777 I am glad!
@DeepakKumar-cm3lk
@DeepakKumar-cm3lk 6 жыл бұрын
thank you so much for this video,can we use .CATPart or .CATProduct file for openFoam ??
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 6 жыл бұрын
No, only STL or OBJ formats.
@ijazakbar3276
@ijazakbar3276 4 жыл бұрын
Hi József Nagy, i Hope you are going well. I am a new user on OpenFOAM and trying to follow the same instructions as you have in this monkey head tutorial. Even I have same results, views in paraview after exporting (.stl) file with ASCII but when you are applying (nano test.stl) to see which part belongs to which boundary my Ubuntu is not working (Error reading file.stl: Permission denied). I think I am missing some features to install in Ubuntu-19.10.. Could you please guide me How I can manage this issue?
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 4 жыл бұрын
I guess you have to modify the permission of the file
@ijazakbar3276
@ijazakbar3276 4 жыл бұрын
@@OpenFOAMJozsefNagy Thanks Sir, I did by using this command in terminal as i am using VIRTUEL BOX : "sudo usermod -G vboxsf -a username" then restart the terminal.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 4 жыл бұрын
@@ijazakbar3276 Is your username "username"?
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 4 жыл бұрын
chmod +x file.stl?
@ijazakbar3276
@ijazakbar3276 4 жыл бұрын
@@OpenFOAMJozsefNagy yes sir, the name ones has have for his/her terminal (UNIX Username)
@ISaacffds
@ISaacffds 7 жыл бұрын
Hi, When will be the case of using snappyHexMesh instead of blockMesh?
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 7 жыл бұрын
For complicated real life geometries. Simple geometries are easy with blockMesh, but imagine to set up manually a blockMeshDict for an engine block. There is a blender plugin, which does help a bit called swiftBlock, but I would still use snappy for complicated geometries.
@juthedowser
@juthedowser 5 жыл бұрын
Thanks a lot !
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 5 жыл бұрын
I am glad to help.
@STWNoman
@STWNoman 5 жыл бұрын
In need your help in developing a model
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 5 жыл бұрын
You can contact me over the form at www.eulerian-solutions.com/training.html
@Veghead211
@Veghead211 3 жыл бұрын
You blew past how to separate the inlet and outlet. I'm new to blender.
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 3 жыл бұрын
Select the nodes and press P to separate.
@mertcaj
@mertcaj 3 жыл бұрын
Evolved from Monke to create the digital Monke
@isaacc4026
@isaacc4026 7 жыл бұрын
For the latest version of Blender (Mac OS), if you want to install an addon (ie. Rheologic), I found this helpful for me. blender.stackexchange.com/questions/1688/installing-an-addon
@OpenFOAMJozsefNagy
@OpenFOAMJozsefNagy 7 жыл бұрын
Thank you, this is a good guide, how to install an addon for blender.
Channel update - 2018
9:11
József Nagy (OpenFOAM tutorials)
Рет қаралды 1,2 М.
I missed this in my CFD geometry workflow for OpenFOAM simulations for years. This is how I fix it.
14:29
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 26 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 191 МЛН
How to create a grid with blockMesh in OpenFOAM - tutorial
39:05
József Nagy (OpenFOAM tutorials)
Рет қаралды 152 М.
Open Foam Tutorial: Simulation with 3D Geometry (.stl)
14:03
Lily Stewart
Рет қаралды 47 М.
How to create your first mesh with cfMesh - tutorial
26:54
József Nagy (OpenFOAM tutorials)
Рет қаралды 30 М.
How SIMULATION NODES Works in Blender
30:07
Xan 3D
Рет қаралды 5 М.
What the h*ll is OpenFOAM? Explained with a PIZZA!
14:38
József Nagy (OpenFOAM tutorials)
Рет қаралды 14 М.
Checking the mesh quality in OpenFOAM
11:46
József Nagy (OpenFOAM tutorials)
Рет қаралды 14 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 26 МЛН