https://github.com/brmather/conduction

Python package for solving implicit heat conduction

https://github.com/brmather/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

adjoint diffusion-equation heat-transfer inversion python thermal-models
Last synced: 5 months ago · JSON representation

Repository

Python package for solving implicit heat conduction

Basic Info
Statistics
  • Stars: 8
  • Watchers: 3
  • Forks: 4
  • Open Issues: 0
  • Releases: 0
Topics
adjoint diffusion-equation heat-transfer inversion python thermal-models
Created about 6 years ago · Last pushed almost 5 years ago
Metadata Files
Readme Contributing License

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:

  1. Define a mesh on which to solve the heat equation
  2. Populate the thermal conductivity and heat production fields
  3. Set boundary conditions on the top and bottom walls
  4. 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

Computational Geophysicist

GitHub Events

Total
Last Year

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 129
  • Total Committers: 3
  • Avg Commits per committer: 43.0
  • Development Distribution Score (DDS): 0.395
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 20 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 15.4%
Stargazers count: 19.4%
Dependent repos count: 21.6%
Average: 24.2%
Downloads: 54.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

conduction.egg-info/requires.txt pypi
  • mpi4py *
  • numpy *
  • scipy >=0.15.0
setup.py pypi
  • numpy *