VasiliBaranov / packing-generation

Hard-sphere packing generation in C++ with the Lubachevsky–Stillinger, Jodrey–Tory, and force-biased algorithms and packing post-processing.
MIT License
107 stars 44 forks source link

Particle Locations #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I've been able to run the program on Ubuntu 14.04 with minimal troubles. Now 
I'm wondering if I'm actually able to obtain a list of particle locations from 
the program, so that I may use these in a further CFD application. I assume it 
has something to do with packing.xyzd?

Any help would be much appreciated.

Cheers

Original issue reported on code.google.com by fdolam...@gmail.com on 21 Apr 2015 at 11:40

VasiliBaranov commented 9 years ago

Hi,

sorry for not replying for a long time (i didn't actually think that people will use it intensively enough to submit issues). You are right. The packing.xyzd description is here: https://github.com/VasiliBaranov/packing-generation#11-packing-file-format

It shall be straightforward to read these files in any language.

Best, Vasili

gmmonsal commented 7 years ago

Hi, I have also been able to run the program with eclipse+cygwin. However, I am unable to read the generated packing.xyzd and packing_init.xyzd files. Whenever I open these files, they seem like a collection of symbols. My guess is that this issue is related to endianness of the system, but I don't really know how to fix this bug. Any heads in how to solve the problem?

Cheers,

Gloria

VasiliBaranov commented 7 years ago

Hi Gloria,

I've added the MATLAB script for reading the packings. To make it work, you need to download the entire folder with the scripts. The code for reading the packing is in this file (the function ReadPacking). I think the C++ program always saves the packings in the Little-Endian format (and this MATLAB script also assumed it). Anyway, you may try to use it (and may be compare with what you've been trying to use). I think I should have added these scripts from the very beginning... Please also note the part about diameter rescaling in the MATLAB script. I realized it was missing from the documentation. I also updated the front page correspondingly. Hope this helps!

Best, Vasili