define 2d geometry from binary file
› Forums › OpenLB › General Topics › define 2d geometry from binary file
- This topic has 5 replies, 3 voices, and was last updated 5 years ago by mathias.
-
AuthorPosts
-
August 11, 2020 at 10:38 pm #5094lmkerguelenParticipant
Hello,
I’m wondering what’s the most straightforward way to load a 2d binary file (microfluidic configuration with 0’s as void and 1’s as solid) as a simulation domain. From the cylinder2d example I understand I have to set the material numbers in my superGeometry to their appropriate values. In the example, this is done using Indicators. However, obstacles in my domain are irregular and would be challenging to define using indicators.
Is there a way I can access elements directly in my superGeometry to set the material numbers by iterating through my 2d binary file and modifying the elements at their corresponding indices? Or perhaps a way to load a geometry with appropriate material numbers (generated via matlab or another platform)?Thanks,
Lucas
August 12, 2020 at 8:18 am #5095mathiasKeymasterDear Lucas,
you can save the data as vti file and use the reader BlockVTKwriter2D. From it get BlockF and transform the functur by using an iterpolation fonctor to an indicator functor. You may also right your own reader with an indicator interface.
Best
MathiasFebruary 3, 2021 at 5:20 pm #5465AleksParticipantDear Mathias,
Could you share some example of the usage of vti files as a straightforward source of the material numbers? User Guide and examples contain nothing close while Developer Guide is just doxygen files which do not allow to catch the approach easily.
Kind regards,
AleksFebruary 3, 2021 at 6:23 pm #5466mathiasKeymasterI have no example for it, sorry. In a common project, we can set it up for you. Best Mathias
February 3, 2021 at 6:44 pm #5467AleksParticipantPlease, let me ask the following questions then
* You said: “save the data as vti file and use the reader BlockVTKwriter2D”. Isn’t some typo here, since BlockVTKwriter2D is a writer, not a reader?
* If it’s typo and we are talking about vtiReader in particular, I’d like to ask about principle ability to import 2D vti files so far as declaration and implementation of VTIreader2D is commented in current version of code?
* If my guesses are incorrect partially or completely could you point sort of some more detailed workflow to import material numbers from 2D vti files?
February 3, 2021 at 7:05 pm #5470mathiasKeymasterYou are right, I meant the vtiReader!
-
AuthorPosts
- You must be logged in to reply to this topic.
