Representation¶
Particula Index / Particula / Particles / Representation
Auto-generated documentation for particula.particles.representation module.
ParticleRepresentation¶
Show source in representation.py:20
Everything needed to represent a particle or a collection of particles.
Represents a particle or a collection of particles, encapsulating the strategy for calculating mass, radius, and total mass based on a specified particle distribution, density, and concentration. This class allows for flexibility in representing particles.
Attributes¶
- strategy : The computation strategy for particle representations.
- activity : The activity strategy for the partial pressure calculations.
- surface : The surface strategy for surface tension and Kelvin effect.
- distribution : The distribution data for the particles, which could represent sizes, masses, or another relevant metric.
- density : The density of the material from which the particles are made.
- concentration : The concentration of particles within the distribution.
- charge : The charge on each particle.
- volume : The air volume for simulation of particles in the air, default is 1 m^3. This is only used in ParticleResolved Strategies.
Signature¶
class ParticleRepresentation:
def __init__(
self,
strategy: DistributionStrategy,
activity: ActivityStrategy,
surface: SurfaceStrategy,
distribution: NDArray[np.float64],
density: NDArray[np.float64],
concentration: NDArray[np.float64],
charge: NDArray[np.float64],
volume: float = 1,
): ...
See also¶
ParticleRepresentation().str¶
Show source in representation.py:64
Returns a string representation of the particle representation.
Returns¶
- str : A string representation of the particle representation.
Examples¶
str_rep = str(particle_representation)
print(str_rep)
Signature¶
def __str__(self) -> str: ...
ParticleRepresentation().add_concentration¶
Show source in representation.py:416
Adds concentration to the particle distribution.
Arguments¶
- added_concentration : The concentration to be added per distribution bin.
Examples¶
particle_representation.add_concentration(added_concentration)
Signature¶
def add_concentration(
self,
added_concentration: NDArray[np.float64],
added_distribution: Optional[NDArray[np.float64]] = None,
) -> None: ...
ParticleRepresentation().add_mass¶
Show source in representation.py:396
Adds mass to the particle distribution, and updates parameters.
Arguments¶
- added_mass : The mass to be added per distribution bin.
Examples¶
particle_representation.add_mass(added_mass)
Signature¶
def add_mass(self, added_mass: NDArray[np.float64]) -> None: ...
ParticleRepresentation().collide_pairs¶
Show source in representation.py:447
Collide pairs of indices, used for ParticleResolved Strategies.
Arguments¶
- indices : The indices to collide.
Examples¶
particle_representation.collide_pairs(indices)
Signature¶
def collide_pairs(self, indices: NDArray[np.int64]) -> None: ...
ParticleRepresentation().get_activity¶
Show source in representation.py:119
Returns the activity strategy used for partial pressure calculations.
Arguments¶
- clone : If True, then return a deepcopy of the activity strategy.
Returns¶
- The activity strategy used for partial pressure calculations.
Examples¶
activity = particle_representation.get_activity()
Signature¶
def get_activity(self, clone: bool = False) -> ActivityStrategy: ...
See also¶
ParticleRepresentation().get_activity_name¶
Show source in representation.py:138
Returns the name of the activity strategy used for partial pressure calculations.
Returns¶
- The name of the activity strategy used for partial pressure calculations.
Examples¶
activity_name = particle_representation.get_activity_name()
print(activity_name)
Signature¶
def get_activity_name(self) -> str: ...
ParticleRepresentation().get_charge¶
Show source in representation.py:266
Returns the charge per particle.
Arguments¶
- clone : If True, then return a copy of the charge array.
Returns¶
- The charge of the particles.
Examples¶
charge = particle_representation.get_charge()
Signature¶
def get_charge(self, clone: bool = False) -> NDArray[np.float64]: ...
ParticleRepresentation().get_concentration¶
Show source in representation.py:225
Returns the volume concentration of the particles.
For ParticleResolved Strategies, the concentration is the number of particles per self.volume to get concentration/m^3. For other Strategies, the concentration is the already per 1/m^3.
Arguments¶
- clone : If True, then return a copy of the concentration array.
Returns¶
- The concentration of the particles.
Examples¶
concentration = particle_representation.get_concentration()
Signature¶
def get_concentration(self, clone: bool = False) -> NDArray[np.float64]: ...
ParticleRepresentation().get_density¶
Show source in representation.py:207
Returns the density of the particles.
Arguments¶
- clone : If True, then return a copy of the density array.
Returns¶
- The density of the particles.
Examples¶
density = particle_representation.get_density()
Signature¶
def get_density(self, clone: bool = False) -> NDArray[np.float64]: ...
ParticleRepresentation().get_distribution¶
Show source in representation.py:189
Returns the distribution of the particles.
Arguments¶
- clone : If True, then return a copy of the distribution array.
Returns¶
- The distribution of the particles.
Examples¶
distribution = particle_representation.get_distribution()
Signature¶
def get_distribution(self, clone: bool = False) -> NDArray[np.float64]: ...
ParticleRepresentation().get_mass¶
Show source in representation.py:322
Returns the mass of the particles as calculated by the strategy.
Arguments¶
- clone : If True, then return a copy of the mass array.
Returns¶
- The mass of the particles.
Examples¶
mass = particle_representation.get_mass()
Signature¶
def get_mass(self, clone: bool = False) -> NDArray[np.float64]: ...
ParticleRepresentation().get_mass_concentration¶
Show source in representation.py:342
Returns the total mass / volume simulated.
The mass concentration is as calculated by the strategy, taking into account the distribution and concentration.
Arguments¶
- clone : If True, then return a copy of the mass concentration.
Returns¶
- np.float64 : The mass concentration of the particles, kg/m^3.
Examples¶
mass_concentration = (
particle_representation.get_mass_concentration()
)
print(mass_concentration)
Signature¶
def get_mass_concentration(self, clone: bool = False) -> np.float64: ...
ParticleRepresentation().get_radius¶
Show source in representation.py:376
Returns the radius of the particles as calculated by the strategy.
Arguments¶
- clone : If True, then return a copy of the radius array.
Returns¶
- The radius of the particles.
Examples¶
radius = particle_representation.get_radius()
Signature¶
def get_radius(self, clone: bool = False) -> NDArray[np.float64]: ...
ParticleRepresentation().get_species_mass¶
Show source in representation.py:302
Returns the masses per species in the particles.
Arguments¶
- clone : If True, then return a copy of the mass array.
Returns¶
- The mass of the particles per species.
Examples¶
species_mass = particle_representation.get_species_mass()
Signature¶
def get_species_mass(self, clone: bool = False) -> NDArray[np.float64]: ...
ParticleRepresentation().get_strategy¶
Show source in representation.py:87
Returns the strategy used for particle representation.
Arguments¶
- clone : If True, then return a deepcopy of the strategy.
Returns¶
- The strategy used for particle representation.
Examples¶
strategy = particle_representation.get_strategy()
Signature¶
def get_strategy(self, clone: bool = False) -> DistributionStrategy: ...
See also¶
ParticleRepresentation().get_strategy_name¶
Show source in representation.py:105
Returns the name of the strategy used for particle representation.
Returns¶
- The name of the strategy used for particle representation.
Examples¶
strategy_name = particle_representation.get_strategy_name()
print(strategy_name)
Signature¶
def get_strategy_name(self) -> str: ...
ParticleRepresentation().get_surface¶
Show source in representation.py:154
Returns the surface strategy used for surface tension and Kelvin effect.
Arguments¶
- clone : If True, then return a deepcopy of the surface strategy.
Returns¶
- The surface strategy used for surface tension and Kelvin effect.
Examples¶
surface = particle_representation.get_surface()
Signature¶
def get_surface(self, clone: bool = False) -> SurfaceStrategy: ...
See also¶
ParticleRepresentation().get_surface_name¶
Show source in representation.py:173
Returns the name of the surface strategy used for surface tension and Kelvin effect.
Returns¶
- The name of the surface strategy used for surface tension and Kelvin effect.
Examples¶
surface_name = particle_representation.get_surface_name()
print(surface_name)
Signature¶
def get_surface_name(self) -> str: ...
ParticleRepresentation().get_total_concentration¶
Show source in representation.py:247
Returns the total concentration of the particles.
Arguments¶
- clone : If True, then return a copy of the concentration array.
Returns¶
- The concentration of the particles.
Examples¶
total_concentration = (
particle_representation.get_total_concentration()
)
print(total_concentration)
Signature¶
def get_total_concentration(self, clone: bool = False) -> np.float64: ...
ParticleRepresentation().get_volume¶
Show source in representation.py:284
Returns the volume of the particles.
Arguments¶
- clone : If True, then return a copy of the volume array.
Returns¶
- The volume of the particles.
Examples¶
volume = particle_representation.get_volume()
Signature¶
def get_volume(self, clone: bool = False) -> float: ...