https://github.com/brmather/conduction
Python package for solving implicit heat conduction
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Keywords
Repository
Python package for solving implicit heat conduction
Basic Info
- Host: GitHub
- Owner: brmather
- License: lgpl-3.0
- Language: Jupyter Notebook
- Default Branch: master
- Homepage: https://brmather.github.io/conduction/
- Size: 3.74 MB
Statistics
- Stars: 8
- Watchers: 3
- Forks: 4
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Conduction
Implicit heat conduction solver on a structured grid written in Python. It interfaces with PETSc to provide highly scalable meshes and solve the steady-state heat equation using direct or iterative methods.
Dependencies
- Python 2.7 and above
- Numpy 1.9 and above
- Scipy 0.14 and above
- mpi4py
- petsc4py
- h5py (optional - for saving parallel data)
- Matplotlib (optional - for visualisation)
PETSc installation
PETSc is used extensively via the Python frontend, petsc4py. It is required that PETSc be configured and installed on your local machine prior to using this module. You can use pip to install petsc4py and its dependencies.
shell
pip install [--user] numpy mpi4py
pip install [--user] petsc petsc4py
If that fails, you must compile these dependencies manually.
Usage
All of the scripts in the tests directory can be run in parallel, e.g.
mpirun -np 4 python conduction3d_benchmark.py
where the number after the np flag specifies the number of processors.
API
A ConductionND object can be defined based on the extent of the domain and the number of cells. The simplified use-case below outlines the following tasks:
- Define a mesh on which to solve the heat equation
- Populate the thermal conductivity and heat production fields
- Set boundary conditions on the top and bottom walls
- Solve for temperature
```python from conduction import ConductionND
define the mesh
minX, minY, minZ = 0.0, 0.0, 0.0 maxX, maxY, maxZ = 1.0, 1.0, 1.0 resX, resY, resZ = 10, 10, 10
mesh = ConductionND((minX, minY, minZ), (maxX, maxY, maxZ), (resX, resY, resZ))
populate thermal conductivity and heat production fields
n = resXresYresZ k = np.ones(n) H = np.ones(n)
mesh.update_properties(k, H)
set boundary conditions
mesh.boundarycondition("maxZ", 0.0, flux=False) # Dirichlet BC mesh.boundarycondition("minZ", 1.0, flux=True) # Neumann BC
solve temperature
T = mesh.solve() ```
More complex examples can be found in the Examples directory.
Owner
- Name: Ben Mather
- Login: brmather
- Kind: user
- Location: Sydney, Australia
- Company: University of Sydney
- Website: https://www.benmather.info
- Twitter: BenRMather
- Repositories: 4
- Profile: https://github.com/brmather
Computational Geophysicist
GitHub Events
Total
Last Year
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Ben Mather | b****r@c****e | 78 |
| Ben Mather | b****1@g****m | 50 |
| alex-dickinson | n****8@c****k | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 1
- Average time to close issues: 16 days
- Average time to close pull requests: 13 days
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 3.0
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- brmather (1)
Pull Request Authors
- alex-dickinson (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 20 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 1
- Total maintainers: 1
pypi.org: conduction
Python package for solving implicit heat conduction
- Homepage: https://github.com/brmather/conduction
- Documentation: https://conduction.readthedocs.io/
- License: lgpl-3.0
-
Latest release: 0.1
published about 6 years ago
Rankings
Maintainers (1)
Dependencies
- mpi4py *
- numpy *
- scipy >=0.15.0
- numpy *