Code Monkey home page Code Monkey logo

aggregate_ptsa's Introduction

aggregate_ptsa

Polydisperse tunable sequential aggregation (PTSA) method for generating a fractal-like aggregate of spheres

Algorithm reference: Singh and Tsotas 2022, https://doi.org/10.1016/j.ces.2021.117022

The performance of the code written in Python numpy was optimized by the numba-jit. The syntax of the function "ptsa" for aggregate generation is defined as follows

Np_final, xp, rp, V, Rve, Rg, eps_agg = ptsa(Np, mean_rp, rel_std_rp, Df, k, max_search_num, rng)

==== Input parameters ===
Np: number of monomers
mean_rp: mean of the normal distribution of the monomer radius
rel_std_rp: relative standard deviation of the normal distrituion of the monomer radius 
Df: fractal dimension
k: fractal prefactor
max_search_num: maximum number of iteration for searching a location of each monomer attached onto the surface of an aggregate 
rng: random number generator constructed by the numpy.random.default_rng()

=== Output variables ===
Np_final: number of monomers in the generated aggregate. If the aggregate generation failed, Np_final < Np.
xp: (x,y,z) coordinate of the center of individual monomers relative to the centroid of the aggregate. 2D of shape= (Np,3).
rp: radii of individual monomers. 1D array of size= Np.
V: volume of the aggregate.
Rve: volume-equivalent radius of the aggregate.
Rg: gyration radius of aggregate.
eps_agg: porosity of the aggregate calculated using the gyration method (cf. Singh PhD thesis, 2021).

Please see the JupyterNotebook file for an example of usage. N.Moteki tested only k=0.95, and Df= 2.35-2.95, Np=20-16000. The code execution might stack depending on the (k, Df)-pair due to the difficulty of finding an attachment condition following the scaling raw.

aggregate_ptsa's People

Contributors

nobuhiromoteki avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.