-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrieval of mesh geometry for a group and face data #57
Comments
Hello, First of all, thank you for your interest in this package. It's a great pleasure for us to know that it's being used by the community. Then, if you want to know the field associated with each face, simply use readfield in the same way as readmesh, something like : But beware, it will give you the "U" values for each face if these values are indeed available in the "U" file (i.e. if they are present in the corresponding boundaryfield zone in the file). Otherwise, it will give you the value of the nearest cell for each face. Enjoy ! |
Thanks for the answer, not sure if I expressed the question correctly. I am trying to obtain vertices and faces for normal estimation and mesh visualization for the For U and p I am using: cx = readscalar(args.path, args.timestep, "Cx")
print_info("Cx:", cx)
cy = readscalar(args.path, args.timestep, "Cy")
print_info("Cy:", cy)
cz = readscalar(args.path, args.timestep, "Cz")
print_info("Cz:", cz)
vel = readvector(args.path, args.timestep, "U")
print_info("U:", vel)
p = readscalar(args.path, args.timestep, "p") To read the cell centers and their corresponding force values. Please let me know if my code is correct, as you can tell I am not an OpenFOAM expert. Thanks for the help! |
I'm not used to using groups. So I'm not sure if the boundary option would work with groups. In your last answer, you read mesh and fields everywhere. The arrays size is therefore equal to the number of cells in the entire mesh (and not just the group). |
Yes, you are right. In terms of pressure and velocity, I am not only interested in the group data, I need everything. I finally had to use If you know of other ways, please let me know, right now I feel this is not the best way. |
Perhaps you could propose an extension to fluidfoam, to add this functionality? |
I can certainly do that, but right now I am in the middle of a big project. When I have time I will create a pull request. |
Great! |
I am trying to retrieve the geometry for a dynamic hybrid mesh (with hexahedral and tetrahedral cells), so I have a mix of structured and unstructured mesh. I have a 2D case, so nz is 1. I'm wondering what is the proper way to obtain the mesh geometry for a certain group and timestep. Right now I am using:
This I believe yields a set of mesh vertices, for the correct group, but just wanted to make sure that this is the proper way.
What I have not been able to figure out is how to get the face data so I can reconstruct the mesh surface and normals. Any suggestions on how to do this?
Thanks in advance, the library is awesome!
The text was updated successfully, but these errors were encountered: