1D Finite-Volume Split Newton Solver
Project description
SplitFVM
1D Finite-Volume with adaptive mesh refinement and steady-state solver using Newton and Split-Newton approach
What does 'split' mean?
The system is divided into two and for ease of communication, let's refer to first set of variables as "outer" and the second as "inner".
-
Holding the outer variables fixed, Newton iteration is performed till convergence using the sub-Jacobian
-
One Newton step is performed for the outer variables with inner held fixed (using its sub-Jacobian)
-
This process is repeated till convergence criterion is met for the full system (same as in Newton)
How to install and execute?
Just run
pip install splitfvm
There is an examples folder that contains a test model - Advection-Diffusion
You can define your own equations by simply creating a derived class from Model
and adding to the _equations
using existing or custom equations!
A basic driver program is as follows
# Define the problem
m = AdvectionDiffusion(c=0.2, nu=0.001)
# Define the domain and variables
# ng stands for ghost cell count
d = Domain.from_size(nx=20, ng=2, ["u", "v"])
# Set IC and BC
ics = {"u": "gaussian", "v": "rarefaction"}
bcs = {"u": "periodic", "v": "periodic"}
s = Simulation(d, m, ics, bcs)
# Advance in time or to steady state
s.evolve(dt=0.1)
iter = s.steady_state()
# Visualize
draw(d)
Whom to contact?
Please direct your queries to gpavanb1 for any questions.
Acknowledgements
Special thanks to Cantera and WENO-Scalar for serving as an inspiration for code architecture
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file SplitFVM-0.1.tar.gz
.
File metadata
- Download URL: SplitFVM-0.1.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d8b8e1919daab3743192da016f28e3003ecd4ae2ab28363ad2ecee1791389eb |
|
MD5 | 18b7ece40a219869550ad4bcb9de3abf |
|
BLAKE2b-256 | 4d0b1cf1891a6a2392ac8d5795378f8fd95afb5f788e5aa7cf55434264ac9c4c |