Skip to main content

hexmeshcyl

HexMeshCylinders generates hexagonal meshes for OpenFOAM. It is restricted to volumes with radial-rotational symmetry, i.e. solids that can be described as a "stack" of cylinders.

Build Status

I've created this simple tool after having problems with spurious currents (a.k.a. parasitic currents) in interFoam. I was working on microfluidics cases, but the results were not good because spurious currents were deforming the droplets. It is known that regular meshes can attenuate the problems with spurious currents, therefore I wanted to try that. I tried to create these meshes using blockMesh and gmsh, however, because my volumes were cylindrical (nozzles, reservoirs, etc.), I didn't manage to get what I wanted. So I decided to write this tool.

The problem I was working on was the formation of droplets out of nozzles measuring 50 micrometers in diameter. The regular mesh solved my problems with spurious currents. (I hope to upload a video of it soon).

Installation

pip install hexmeshcylinders

Usage example

The following example generates the mesh shown in the image bellow. For more demos, please refer to the examples folder.

from HexMeshCylinders import Stack
from HexMeshCylinders.Shapes import Rectangle, Circle

stack = Stack(cell_edge=.015, verbose=True)

stack.add_solid(
    shape2d=Rectangle(len_x=.8, len_y=1.2),
    height=1.,
    n_layers=20,
)
stack.add_solid(
    shape2d=Circle(diameter=.6),
    height=.8,
)

stack.build_mesh()
stack.export('/tmp/HexMeshCylinders/basic')

basic_1

Requirements

Requires numpy. If you want to run the tests, you will also need to have OpenFOAM installed.

Meta

Gui Miotto – @gmiotto

Distributed under the MIT license. See LICENSE for more information.

https://github.com/gui-miotto

Metadata

Release files for HexMeshCylinders 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for HexMeshCylinders 0.0.3
File Size Uploaded Provenance Actions
HexMeshCylinders-0.0.3.tar.gz 11.0 kB Without provenance Details for HexMeshCylinders-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for HexMeshCylinders 0.0.3
File Interpreter ABI Platform Actions
HexMeshCylinders-0.0.3-py3-none-any.whl Python 3 none any Details for HexMeshCylinders-0.0.3-py3-none-any.whl

Total release size: 30.6 kB

Release files / HexMeshCylinders-0.0.3.tar.gz

Download URL HexMeshCylinders-0.0.3.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c37114c3fe87bda518a123d8389291de8a91b851d9d258d1d3c31f3893632733
BLAKE2b-256 checksum
How to use checksums
c4d0fb187a94e3e940603cba6e6ecf462d93e26b0252349ac70bccf80324e194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

Release files / HexMeshCylinders-0.0.3-py3-none-any.whl

Download URL HexMeshCylinders-0.0.3-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4104c72d64771951a52269bf6d4f872791f04822574c3144da30f5f1ce299a4
BLAKE2b-256 checksum
How to use checksums
c8dfeda8ba32879bfcf577d0edb3356f9b0082b7fac596bff34eb98d6a3009f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

Security for HexMeshCylinders 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page