Skip to content

OneDimensional Heat Equation#1

Open
syedalimohsinbukhari wants to merge 24 commits into
mainfrom
oneD
Open

OneDimensional Heat Equation#1
syedalimohsinbukhari wants to merge 24 commits into
mainfrom
oneD

Conversation

@syedalimohsinbukhari

@syedalimohsinbukhari syedalimohsinbukhari commented Feb 21, 2024

Copy link
Copy Markdown
Owner

This PR will focus on making a solver for 1D Heat Equation

  • Initial condition
    • Constant
    • List of values
    • Function
  • Forcing Term
    • Included
    • Excluded
  • Separate solver for CN method
    • check with forcing term

1. Moved `fdm.py` and `fdm_.py` from `Solvers` repo.
2. Configured
    1. `setup.cfg`,
    2. `setup.py`,
    3. `pyproject.toml`
    4. `requirements.txt`
    5. `pylint.yml`
    6. `.pylintrc`
    7. `.gitignore`
@syedalimohsinbukhari syedalimohsinbukhari self-assigned this Feb 21, 2024
@syedalimohsinbukhari syedalimohsinbukhari linked an issue Feb 21, 2024 that may be closed by this pull request
5 tasks
@syedalimohsinbukhari syedalimohsinbukhari removed a link to an issue Feb 21, 2024
5 tasks
@syedalimohsinbukhari syedalimohsinbukhari mentioned this pull request Feb 21, 2024
5 tasks
1. Added HeatEquation method in `heat_equation.py`
2. `fdm_.py`
    1. Added fdm_property method
    2. Adjusted the solver to produce given number of solutions
    3. Adjusted boundary condition enforcement
    4. replaced the existing `bi_diagonal_matrix` method with NumPy equivalent.
1. changed HeatEquation from class to function in `heat_equation.py`
1. `wave_equation.py`, currently not working
2. changes to `fdm.py`
3. `fdm2.py`: Implementation of D2t via MatrixEq method (direct solver)
4. `fdm_.py`: major changes in the code-base
5. `fdm_matrix_solver_.py`: backend for `fdm2.py`
6. minor changes to `heat_equation.py` and `requirements.txt`
1. removed `wave_equation.py`
2. minor changes in `fdm.py`
3. `fdm_.py`
    1. Added `DirichletBCs`
    2. Fixed issue where the results did not match manual calculations.
    3. added a flag for wave and heat equation
4. `fdm_matrix_solver_.py` & `fdm3.py`
1. corrected `requirements.txt` for conda installation
2. minor changes to `fdm_.py`
3. need to change `fdm3.py`, and `fdm.py` to process data according to the new mode of calculation.
1. fixed the solution issue, but now need to reimplement a lot of things
1. restored the original `fdm_.py`
2. minor changes to `fdm3.py`
@syedalimohsinbukhari

Copy link
Copy Markdown
Owner Author

this is the current situation,

  • have restored the original method for solving the matrices,
  • haven't re-checked the forcing terms at all; currently, the only method tested is simple heat equations

Syed Ali Mohsin Bukhari added 3 commits May 9, 2024 10:38
1. added yaml reading capability in `fdm_.py`
2. added a `test.yaml` file
3. added `test.py` and `test2.py` for testing
4. updated `requirements.txt` with pyyaml version
1. minor changes to `.gitignore`
2. added `crank_nicolson.py` (still WIP)
3. deleted `test.yaml`
4. minor changes to `test2.py`
1. `crank_nicolson.py` is working for IC = x - x**2
@syedalimohsinbukhari

Copy link
Copy Markdown
Owner Author

18a8bef includes crank_nicolson basic solver

Syed Ali Mohsin Bukhari added 4 commits May 15, 2024 17:35
1. minor changes in `crank_nicolson.py`
2. added docstrings in `fdm_.py`
3. cosmetic changes in `heat_equation.py`
1. added `boundary_conditions.py`, will have Dirichlet, Robin and Neumann boundary conditions in the future.
2. minor changes in `crank_nicolson.py` and `fdm_.py`
1. modified `fdm_.py` to have a separate solver for `crank_nicolson` method
1. implemented CN method in `crank_nicolson.py`
2. edited the `solve_cn` method in `fdm_.py`
@syedalimohsinbukhari

Copy link
Copy Markdown
Owner Author

a529e13 has correct implementation of CN method, need to check with forcing term though

Syed Ali Mohsin Bukhari added 3 commits May 19, 2024 12:07
1. Cleaned up `crank_nicolson.py` and `fdm_.py`
1. removed the CN2 method from `crank_nicolson.py`
1. minor changes in `heat_equation.py`
2. Non-homogeneous BCs don't work properly in any FDM model
This was linked to issues May 22, 2024
@syedalimohsinbukhari

Copy link
Copy Markdown
Owner Author

99a633d See issue #3

Syed Ali Mohsin Bukhari added 6 commits June 1, 2024 02:59
1. added docstring to `fdm_.py`
2. added `GrunwaldLetnikov.py`
1. minor modification in `GrunwaldLetnikov.py`
1. testing `GrunwaldLetnikov.py` in `test_.py`
1. fixed `requirements.txt`
2. created `environment.yaml`
3. minor changes to `.gitignore`
1. adjusted `pyproject.toml`, `setup.cfg` and `setup.py` accordingly
1. removed fractional calculations for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-homogeneous BCs OneDimensional Solvers

2 participants