Metadata-Version: 2.4
Name: pyretras
Version: 0.1.0
Summary: Python code to simulate solute transport in porous media coupled with geochemical reactions
Author-email: Changbing Yang <yangcb@gmail.com>
License: MIT License
        
        Copyright (c) [2026] [Changbing Yang]
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: matplotlib
Requires-Dist: scipy
Dynamic: license-file

PyCORE
PyCORE is a Python package for simulating groundwater flow and reactive transport in porous media. It provides a flexible and extensible framework for modeling hydraulic head, solute transport, chemical reactions, ion exchange, and mineral reactions in 1D and 2D domains.

Features
Simulation of groundwater flow (confined flow, Darcy velocity, hydraulic head)
Reactive transport (solute transport, chemical reactions, ion exchange, mineral reactions)
Flexible input: Accepts data as Python dictionaries or DataFrames
Customizable chemical solver: Users can inject their own chemical equilibrium solver
Output and plotting: Built-in methods for exporting and visualizing results
Installation
Usage
Main Class: Simulation
Initialization
tran_input: Transport input data (dict)
chem_input: Chemistry input data (dict)
database_path: Path to the chemical database (str)
pecl, cour: Optional lists for Peclet and Courant numbers
chemical_equilibrium_callback: Optional user-defined function for chemical equilibrium
Key Methods
run(): Run the main simulation loop
plot_h_x(time, dimension): Plot hydraulic head distribution
plot_u_x(time, dimension, components): Plot concentration of selected components
write_hxt(file_name, dimension): Write hydraulic head data to file
write_totC(file_name, dimension): Write total primary species concentrations to file
set_chemical_equilibrium_callback(callback_fn): Set a custom chemical equilibrium solver
