lettucecfd / lettuce

Computational Fluid Dynamics based on PyTorch and the Lattice Boltzmann Method
MIT License
201 stars 39 forks source link

Connection to foil Tool like Flow5 #156

Open stefano2734 opened 2 months ago

stefano2734 commented 2 months ago

Flow5 is a great tool for foils. It is the successor of XFoil and Xflsr5. https://flow5.tech/

It can use with opencascade cad with stL, iges and more.

Do you see here a fast solution for coupling your 2d-Tool to improve IBL-solver to a better solutions? https://flow5.tech/index.php/flow5/new-features/2d-ibl-solver/

PhiSpel commented 1 month ago

Hello @stefano2734, thank you for the suggestion! We are currently working on an integration of pythonocc-core to import geometries from, for example, stl files. With it, you should be able to run 2D flows on a foil shape.

stefano2734 commented 1 month ago

Perhaps https://github.com/mathLab/BladeX an example of coupling with the occ „wheel“ here.

PhiSpel commented 1 month ago

I am not 100% sure what you would like lettuce to do for you. From what I understand, the 2D xfoil solver does some very specific things. PythonOCC, on the other hand, is a very generic geometry library and BladeX uses it to create an OCC object. What we plan to do in lettuce is much more generic, using OCC to generate a suitable boundary for lt.Obstacle from an OCC.Shape/.Solid. This should enable you to do an LBM simulation of the the flow around the foil in 2D or 3D, calculating things such as lift and drag, or understanding the turbulence development better.

So, what are you looking for? Are you using lettuce already in your code?

stefano2734 commented 1 month ago

My fault. Wrong direction. Here read is target, not write of cad files. But examples of BladeX can perhaps be test files for reading of occ routines in lettuce.