Closed Gorkowski closed 1 month ago
This pull request implements significant changes across multiple modules in the particula project, including updates to gas species handling, coagulation strategies, and various utility functions. The changes involve refactoring existing code, adding new functionality, and improving type hinting and error handling.
classDiagram
class GasSpecies {
- name: Union[str, NDArray[np.str_]]
- molar_mass: Union[float, NDArray[np.float64]]
- pure_vapor_pressure_strategy: Union[VaporPressureStrategy, list[VaporPressureStrategy]]
- condensable: Union[bool, NDArray[np.bool_]]
- concentration: Union[float, NDArray[np.float64]]
+ get_molar_mass() Union[float, NDArray[np.float64]]
+ get_condensable() Union[bool, NDArray[np.bool_]]
+ get_concentration() Union[float, NDArray[np.float64]]
+ get_pure_vapor_pressure(temperature: Union[float, NDArray[np.float64]]) Union[float, NDArray[np.float64]]
+ get_partial_pressure(temperature: Union[float, NDArray[np.float64]]) Union[float, NDArray[np.float64]]
+ get_saturation_ratio(temperature: Union[float, NDArray[np.float64]]) Union[float, NDArray[np.float64]]
+ get_saturation_concentration(temperature: Union[float, NDArray[np.float64]]) Union[float, NDArray[np.float64]]
+ add_concentration(added_concentration: Union[float, NDArray[np.float64]])
}
classDiagram
class Stream {
- header: List[str]
- data: NDArray[np.float64]
- time: NDArray[np.float64]
- files: List[str]
+ validate_inputs()
+ __getitem__(index: Union[int, str]) NDArray[np.float64]
+ __setitem__(index: Union[int, str], value: NDArray[np.float64])
+ __len__() int
+ datetime64() NDArray[np.float64]
+ header_dict() dict[int, str]
+ header_float() NDArray[np.float64]
}
class StreamAveraged {
- average_interval: float
- start_time: float
- stop_time: float
- standard_deviation: NDArray[np.float64]
+ validate_averaging_params()
+ get_std(index: Union[int, str]) NDArray[np.float64]
}
StreamAveraged --|> Stream
Change | Details | Files |
---|---|---|
Refactored and enhanced gas species handling |
|
particula/next/gas/species.py particula/next/gas/vapor_pressure_strategies.py particula/next/gas/vapor_pressure_factories.py particula/next/gas/properties/mean_free_path.py particula/next/gas/properties/thermal_conductivity.py |
Implemented new coagulation strategies and related functionality |
|
particula/next/dynamics/coagulation/strategy.py particula/next/particles/properties/friction_factor_module.py particula/next/particles/properties/knudsen_number_module.py |
Updated and refactored utility functions and modules |
|
particula/util/input_handling.py particula/util/time_manage.py particula/util/stats.py particula/util/reduced_quantity.py |
Updated data handling and processing modules |
|
particula/data/stream.py particula/data/lake.py particula/data/loader.py particula/data/process/size_distribution.py |
Updated documentation and examples |
|
README.md particula/__init__.py docs/How-To-Guides/Light_Scattering/index.md docs/How-To-Guides/Equilibria/index.md |
PR Preview Action v1.4.8
:---:
:rocket: Deployed preview to https://uncscode.github.io/particula/pr-preview/pr-474/
on branch gh-pages
at 2024-10-04 12:29 UTC
I'm just wanted to create some issues for most of the soucery comments so we don't forget
I'm good with it now
Fixes #473
Summary by Sourcery
Introduce new coagulation strategies and surface tension factories, enhance existing classes with improved methods and flexibility, fix bugs in mean free path calculations, and update documentation and tests to reflect these changes.
New Features:
CoagulationStrategy
module with various strategies for calculating coagulation rates, includingDiscreteSimple
,DiscreteGeneral
,ContinuousGeneralPDF
, andParticleResolved
strategies.SurfaceFactory
class to create surface tension strategy builders for calculating surface tension and the Kelvin effect for species in particulate phases.VaporPressureFactory
class to create vapor pressure strategy builders for calculating vapor pressure of gas species.convert_mass_concentration
module.Bug Fixes:
mean_free_path
calculation by updating the method to use the correct dynamic viscosity and gas constant values.convert_units
function to ensure accurate conversions between Celsius, Fahrenheit, and Kelvin.Enhancements:
GasSpecies
class to support both single and array inputs for gas properties, improving flexibility and usability.Stream
andStreamAveraged
classes by adding methods for data manipulation, such as__getitem__
,__setitem__
, andget_std
.CoulombEnhancement
class by adding detailed docstrings and improving the calculation methods for potential ratio and enhancement limits.vapor_pressure_builders
module to use a baseBuilderABC
class for better code organization and error handling.Build:
setup-python
action in GitHub workflows to cache pip dependencies, improving build efficiency.CI:
Documentation:
mean_free_path
notebook to reflect changes in the calculation method and improve clarity.Tests:
CoagulationStrategy
module to ensure the correctness of different coagulation strategies.SurfaceFactory
class to verify the creation of surface tension strategies.convert_mass_concentration
module to cover new functionalities and edge cases.Chores:
0.0.17.dev0
to reflect ongoing development changes.