Misc

Miscellaneous

This submodule contains models for calculating general or generic values that are useful for all other pore-scale models, such as scaling values, or generating an array of random numbers.

Functions

blank(target)

clip(target, prop, xmax[, xmin])

Clips the given array within the supplied limits

constant(target, value)

Places the given constant value into the target object

fraction(target, numerator, denominator)

Calculates the ratio between two values

from_neighbor_pores(target, prop[, mode, ...])

Adopt a value based on the values in neighboring pores

from_neighbor_throats(target, prop[, mode, ...])

Adopt a value from the values found in neighboring throats

generic_distribution(target, seeds, func)

Accepts an 'rv_frozen' object from the Scipy.stats submodule and returns values from the distribution for the given seeds

generic_function(target, prop, func, **kwargs)

Runs an arbitrary function on the given data

invert(target, prop)

Inverts the given array

linear(target, m, b, prop)

Calculates a property as a linear function of a given property

match_histogram(target, bin_centers, bin_heights)

Generate values corresponding to a given histogram

normal(target, seeds[, mean, stddev, scale, loc])

Produces values from a Weibull distribution given a set of random numbers.

normalize(target, prop[, xmin, xmax])

Normalizes the given array between the supplied limits

polynomial(target, a, prop, **kwargs)

Calculates a property as a polynomial function of a given property

product(target, props)

Calculates the product of multiple property values

random(target, element[, seed, num_range])

Create an array of random numbers of a specified size.

scaled(target, prop, factor)

Scales an existing value by a factor.

summation(target[, props])

Sums the values in the given arrays

weibull(target, seeds, shape, scale, loc)

Produces values from a Weibull distribution given a set of random numbers.

Modules

openpnm.models.misc.basic_math

Basic Math

openpnm.models.misc.neighbor_lookups

Neighbor Lookups

openpnm.models.misc.simple_equations

Simple Equations

openpnm.models.misc.statistical_distributions