{"id":20196315,"url":"https://github.com/gpavanb1/splitfvm","last_synced_at":"2025-04-10T10:43:30.861Z","repository":{"id":65151121,"uuid":"584292348","full_name":"gpavanb1/SplitFVM","owner":"gpavanb1","description":"1D Finite-Volume with AMR and steady-state solver using Newton and Split-Newton","archived":false,"fork":false,"pushed_at":"2023-01-03T06:16:37.000Z","size":127,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-16T15:55:12.575Z","etag":null,"topics":["1d","amr","cfd","finite-volume","newton-raphson","optimization","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gpavanb1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-02T06:08:53.000Z","updated_at":"2023-09-11T08:38:38.000Z","dependencies_parsed_at":"2023-01-03T20:32:18.687Z","dependency_job_id":null,"html_url":"https://github.com/gpavanb1/SplitFVM","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpavanb1%2FSplitFVM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpavanb1%2FSplitFVM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpavanb1%2FSplitFVM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpavanb1%2FSplitFVM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpavanb1","download_url":"https://codeload.github.com/gpavanb1/SplitFVM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248200224,"owners_count":21063853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["1d","amr","cfd","finite-volume","newton-raphson","optimization","python"],"created_at":"2024-11-14T04:23:13.905Z","updated_at":"2025-04-10T10:43:30.840Z","avatar_url":"https://github.com/gpavanb1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Note\n\nThis repository has been archived. Please refer to [SplitFXM](https://github.com/gpavanb1/SplitFXM)\n\n# SplitFVM\n\n[![Downloads](https://pepy.tech/badge/splitfvm)](https://pepy.tech/project/splitfvm)\n\n![img](https://github.com/gpavanb1/SplitFVM/blob/main/assets/logo.jpg)\n\n1D [Finite-Volume](https://en.wikipedia.org/wiki/Finite_volume_method) with [adaptive mesh refinement](https://en.wikipedia.org/wiki/Adaptive_mesh_refinement) and steady-state solver using Newton and [Split-Newton](https://github.com/gpavanb1/SplitNewton) approach\n\n## What does 'split' mean?\n\nThe 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\".\n\n* Holding the outer variables fixed, Newton iteration is performed till convergence using the sub-Jacobian\n\n* One Newton step is performed for the outer variables with inner held fixed (using its sub-Jacobian)\n\n* This process is repeated till convergence criterion is met for the full system (same as in Newton)\n\n## How to install and execute?\n\nJust run \n```\npip install splitfvm\n```\n\nThere is an [examples](https://github.com/gpavanb1/SplitFVM/examples) folder that contains a test model - [Advection-Diffusion](https://en.wikipedia.org/wiki/Convection%E2%80%93diffusion_equation)\n\nYou can define your own equations by simply creating a derived class from `Model` and adding to the `_equations` using existing or custom equations!\n\nA basic driver program is as follows\n```\n# Define the problem\nm = AdvectionDiffusion(c=0.2, nu=0.001)\n\n# Define the domain and variables\n# ng stands for ghost cell count\nd = Domain.from_size(20, 2, [\"u\", \"v\", \"w\"]) # nx, ng, variables\n\n# Set IC and BC\nics = {\"u\": \"gaussian\", \"v\": \"rarefaction\"}\nbcs = {\n    \"u\": {\n        \"left\": \"periodic\",\n        \"right\": \"periodic\"\n    },\n    \"v\": {\n        \"left\": {\"dirichlet\": 3},\n        \"right\": {\"dirichlet\": 4}\n    },\n    \"w\": {\n        \"left\": {\"dirichlet\": 2},\n        \"right\": \"periodic\"\n    }\n}\ns = Simulation(d, m, ics, bcs)\n\n# Advance in time or to steady state\ns.evolve(dt=0.1)\nbounds = [[-1., -2., 0.], [5., 4., 3.]]\niter = s.steady_state(split=True, split_loc=1, bounds=bounds)\n\n# Visualize\ndraw(d, \"label\")\n```\n\n## Whom to contact?\n\nPlease direct your queries to [gpavanb1](http://github.com/gpavanb1)\nfor any questions.\n\n## Acknowledgements\n\nDo visit its [Finite-Difference](https://github.com/gpavanb1/SplitFDM) cousin\n\nSpecial thanks to [Cantera](https://github.com/Cantera/cantera) and [WENO-Scalar](https://github.com/comp-physics/WENO-scalar) for serving as an inspiration for code architecture\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpavanb1%2Fsplitfvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpavanb1%2Fsplitfvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpavanb1%2Fsplitfvm/lists"}