Skip to main content

geoparticle 1.0.2

Project description

geoparticle

A Python package for geometry construction in particle-based simulation.

I mainly use this package for geometry construction in LAMMPS, with some examples provided in the repository; of course, it can also be used for other software.

Installation

Installing from pypi

pip install geoparticle

Installing from the source code

Download and enter the source code directory, then

pip install .

Background

Particles of specified geometries are typically created by the lattice command in LAMMPS, which can lead to rough surfaces when the particle spacing is not small enough. However, too small spacing can result in too many particles and thus increase the computational cost.

The case is the same when one creates atoms based on an external STL file (an example STL file exported by COMSOL is shown below):

Features

To resolve this problem, I developed this package for easy construction of geometries where smooth surfaces are required. Miscellaneous geometries are provided, including 1D geometries (lines and curves):

2D geometries (rectangles and circles):

3D geometries (blocks, cylinders, tori, and spheres):

all of which can be surface, thick shells, or filled bodies.

Diverse operations are also provided, including translation, mirror, rotation, stack, clipping, union, intersection, and subtraction.

Some utility functions are also provided.

Quick start

examples/gallery.py provided detailed scripts to yield the geometries above.

Two more examples are given to shown how to couple geoparticle with LAMMPS. The first example is the 2D gas-liquid dam break, while the second is a 3D intestine connected with an inlet and an outlet.

See the documentation for details.

Limitations

The particle spacings may be not exactly as specified in order to create a smooth surface.

Resultant geometries of boolean operations can have more particles than expected in some cases, because

  • For intersection and subtraction, only particles with distances smaller than rmax will be identified the same. Users should align particles of different geometries to get the expected results.
  • For union, particles of all the given geometries will be collected to yield the union. Users should ensure no particles are overlapped.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geoparticle-1.0.2.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geoparticle-1.0.2-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file geoparticle-1.0.2.tar.gz.

File metadata

  • Download URL: geoparticle-1.0.2.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geoparticle-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8685f58dc0bc2556cdcf8d2114b2bbcedbf807ccfc273d6988ca25d5ab44be86
MD5 183acd91e1ee490de20e14e06848e148
BLAKE2b-256 4008eb1db34bcffd91a529f19a6a179e4e8d6631934ad1a6691a95b302b1a9f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoparticle-1.0.2.tar.gz:

Publisher: python-publish.yml on Jasmine969/geoparticle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geoparticle-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: geoparticle-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geoparticle-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ccf0532d3dc8802404ec0d6b354d9699d792cc553690c2d47e76b274a3ef8afc
MD5 50dd561ee6604e835d499819f8b0b4e5
BLAKE2b-256 080fd89d2ddea66a494d1b1e44873df575015e4d0893ace99b2d92a82e3afb04

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoparticle-1.0.2-py3-none-any.whl:

Publisher: python-publish.yml on Jasmine969/geoparticle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page