{ "info": { "author": "Haran Jackson", "author_email": "jackson.haran@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Atmospheric Science", "Topic :: Scientific/Engineering :: Chemistry", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Scientific/Engineering :: Physics" ], "description": "ADER\n====\n\nA Python implementation of the ADER method for solving any (potentially very\nstiff) hyperbolic system of PDEs of the following form:\n\n.. figure:: https://github.com/haranjackson/ADER/raw/master/images/eq1.png\n :alt: Figure 1\n\nAn arbitrary number of spatial domains can be used, and this implementation is\ncapable of solving the equations to any order of accuracy. Second-order\nparabolic PDEs will be implemented soon.\n\n.. image:: https://travis-ci.org/haranjackson/ADER.svg?master\n :target: https://travis-ci.org/haranjackson/ADER\n :alt: Build Status\n\nInstallation\n------------\n\nRequires Python 3.6. Run ``pip install ader``\n\nThe following dependencies will be installed:\n\n- NumPy 1.14.5\n- SciPy 1.1.0\n- Tangent 0.1.9\n\nBackground\n----------\n\nGiven cell-wise constant initial data defined on a computational grid, this\nprogram performs an arbitrary-order polynomial reconstruction of the data in\neach cell, according to a modified version of the WENO method, as presented in\n[1].\n\nTo the same order, a spatio-temporal polynomial reconstruction of the data is\nthen obtained in each spacetime cell by the Discontinuous Galerkin method,\nusing the WENO reconstruction as initial data at the start of the timestep\n(see [2,3]).\n\nFinally, a finite volume update step is taken, using the DG reconstruction to\ncalculate the values of the intercell fluxes and non-conservative intercell\njump terms, and the interior source terms and non-conservative terms (see [3]).\n\nThe intercell fluxes and non-conservative jumps are calculated using either a\nRusanov-type flux [4], a Roe-type flux [5], or an Osher-type flux [6].\n\nUsage\n-----\n\nDefining the System of Equations\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe user must define the flux function (returning a NumPy array):\n\n``F(Q, d, model_params)``\n\nGiven a vector of conserved variables ``Q``, ``F`` must return the flux in\ndirection ``d`` (where ``d=0,1,...`` corresponds to the x-,y-,... axes).\n``model_params`` should be an object containing any other parameters required\nby the model in the calculation of the flux (for example, the heat capacity\nratio in the Euler equations, or the viscosity in the Navier-Stokes equations).\n``model_params`` does not have to be used, but it must be contained in the\nsignature of ``F``.\n\nSimilarly, if required, the nonconservative matrix B(Q) in direction d must be\ndefined as a square NumPy array, thus:\n\n``B(Q, d, model_params)``\n\nIf required, the source terms must be defined as a NumPy array thus:\n\n``S(Q, model_params)``\n\nNote that the governing system of PDEs can be written as:\n\n.. figure:: https://github.com/haranjackson/ADER/raw/master/images/eq2.png\n :alt: Figure 2\n\nwhere the system Jacobian M corresponds to:\n\n.. figure:: https://github.com/haranjackson/ADER/raw/master/images/eq3.png\n :alt: Figure 3\n\nIf an analytical form for M is known, it should be defined thus:\n\n``M(Q, d, model_params)``\n\nIf an analytical form for the eigenvalue of M with the largest absolute value\nis known, it should be defined thus:\n\n``max_eig(Q, d, model_params)``\n\nThe system Jacobian and largest absolute eigenvalue are required for the ADER\nmethod. If no analytical forms are available, they will be derived from the\nsupplied flux (and nonconservative matrix, if supplied) using `automatic\ndifferentiation `__.\nThis will introduce some computational overhead, however, and some\nconsiderations need to be made when defining the flux function (see the\ndedicated section below).\n\nSolving the Equations\n~~~~~~~~~~~~~~~~~~~~~\n\nSuppose we are solving the `reactive Euler equations `__\nin 2D. We define ``F`` and ``S`` as above (but not ``B``, as the equations are\nconservative). We also define ``model_params`` to hold the heat capacity ratio\nand reaction constants. These equations contain 5 conserved variables. To solve\nthem to order 3, with 4 CPU cores, we set up the solver object thus:\n\n::\n\n from ader import Solver\n\n solver = Solver(nvar=5, ndim=2, F=F, B=None, S=S, model_params=model_params, order=3, ncore=4)\n\nAnalytical forms of the system Jacobian and the eigenvalue of largest absolute\nsize exist for the reactive Euler equations. If we define these in ``M`` and\n``max_eig`` we may instead create the solver object thus:\n\n::\n\n solver = Solver(nvar=5, ndim=2, F=F, B=None, S=S, M=M, max_eig=max_eig, model_params=model_params, order=3, ncore=4)\n\nTo solve a particular problem, we must define the initial state,\n``initial_grid``. This must be a NumPy array with 3 axes, such that\n``initial_grid[i,j,k]`` is equal to the value of the kth conserved variable in\ncell (i,j). We must also define list ``dX=[dx,dy]`` where dx,dy are the grid\nspacing in the x and y axes. To solve the problem to a final time of 0.5, with\na CFL number of 0.9, while printing all output, we call:\n\n::\n\n solution = solver.solve(initial_grid, 0.5, dX, cfl=0.9, verbose=True)\n\nAdvanced Usage\n~~~~~~~~~~~~~~\n\nThe Solver class has the following additional arguments:\n\n- **riemann\\_solver** (default 'rusanov'): Which Riemann solver should be\n used. Options: 'rusanov', 'roe', 'osher'.\n- **stiff\\_dg** (default False): Whether to use a Newton Method to solve the\n root finding involved in calculating the DG predictor.\n- **stiff\\_dg\\_guess** (default False): Whether to use an advanced initial\n guess for the DG predictor (only for very stiff systems).\n- **newton\\_dg\\_guess** (default False): Whether to compute the advanced\n initial guess using a Newton Method (only for very, very stiff systems).\n- **DG\\_TOL** (default 6e-6): The tolerance to which the DG predictor is\n calculated.\n- **DG\\_MAX\\_ITER** (default 50): Maximum number of iterations attempted if\n solving the DG root finding problem iteratively (not with a Newton Method)\n- **WENO\\_r** (default 8): The WENO exponent r.\n- **WENO\\_\u03bbc** (default 1e5): The WENO weighting of the central stencils.\n- **WENO\\_\u03bbs** (default 1): The WENO weighting of the side stencils.\n- **WENO\\_\u03b5** (default 1e-14): The constant used in the WENO method to avoid\n numerical issues.\n\nThe Solver.solve method has the following additional arguments:\n\n- **boundary\\_conditions** (default 'transitive'): Which kind of boundary\n conditions to use. Options: 'transitive', 'periodic',\n ``func(grid, N, ndim)``. In the latter case, the user defines a function\n with the stated signature. It should return a NumPy array with the same\n number of axes as grid, but with ``N`` more cells on either side of the grid\n in each spatial direction, where ``N`` is equal to the order of the method\n being used. These extra cells are required by an N-order method.\n- **callback** (default None): A user-defined callback function with signature\n ``callback(grid, t, count)`` where ``grid`` is the value of the\n computational grid at time ``t`` (and timestep ``count``).\n\nExamples\n~~~~~~~~\n\nCheck out example.py to see a couple of problems being solved for the GPR model\nand the reaction Euler equations.\n\nNotes\n-----\n\nSpeed\n~~~~~\n\nThis implementation is pretty slow. It's really only intended to be used only\nfor academic purposes. If you have a commercial application that requires a\nrapid, bullet-proof implementation of the ADER method or the GPR model, then\nget in touch (jackson.haran@gmail.com).\n\nAutomatic Differentiation\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe automatic differentiation used to derive ``M`` and ``max_eig`` is\nperformed using `Google's Tangent library `__.\nAlthough it's great, this library is quite new, and it cannot cope with all\noperations that you may use in your fluxes (although development is proceeding\nquickly). In particular, it will never be able to handle closures, and classes\nare not yet implemented. Some NumPy functions such as ``inv`` have not yet been\nimplemented. If you run into issues, drop me a quick message and I'll let you\nknow if I can make it work.\n\nReferences\n----------\n\n1. Dumbser, Zanotti, Hidalgo, Balsara - *ADER-WENO finite volume schemes with\n space-time adaptive mesh refinement*\n2. Dumbser, Castro, Pares, Toro - *ADER schemes on unstructured meshes for\n nonconservative hyperbolic systems: Applications to geophysical flows*\n3. Dumbser, Hidalgo, Zanotti - *High order space-time adaptive ADER-WENO finite\n volume schemes for non-conservative hyperbolic systems*\n4. Toro - *Riemann Solvers and Numerical Methods for Fluid Dynamics: A\n Practical Introduction*\n5. Dumbser, Toro - *On Universal Osher-Type Schemes for General Nonlinear\n Hyperbolic Conservation Laws*\n6. Dumbser, Toro - *A simple extension of the Osher Riemann solver to\n non-conservative hyperbolic systems*", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/haranjackson/ADER/archive/1.2.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/haranjackson/ADER", "keywords": "ADER,WENO,Discontinuous Galerkin,Finite Volume,PDEs,Partial Differential Equations", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ader", "package_url": "https://pypi.org/project/ader/", "platform": "", "project_url": "https://pypi.org/project/ader/", "project_urls": { "Download": "https://github.com/haranjackson/ADER/archive/1.2.0.tar.gz", "Homepage": "https://github.com/haranjackson/ADER" }, "release_url": "https://pypi.org/project/ader/1.2.1/", "requires_dist": null, "requires_python": "", "summary": "The ADER method for solving any (potentially very stiff) hyperbolic system of PDEs", "version": "1.2.1" }, "last_serial": 5768028, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "be3f8b8dc4432eec59300b4693a22321", "sha256": "ded69b3e076e7d20616d97dd794c89031b1cb1aed793eedf49a6f0b48e9c55d0" }, "downloads": -1, "filename": "ader-1.0.3.tar.gz", "has_sig": false, "md5_digest": "be3f8b8dc4432eec59300b4693a22321", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14838, "upload_time": "2018-04-05T10:55:31", "url": "https://files.pythonhosted.org/packages/2d/5d/40a1d6acff3ed132159560813bd5c61bc0a0fd443900b22a5da5b987340c/ader-1.0.3.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "70f1d51bbbbe7871e241b2208e0b0538", "sha256": "a2fe3b1786ceb3ffa14b02a79162fb21c20bef001c937afd3387d79a5441f884" }, "downloads": -1, "filename": "ader-1.1.0.tar.gz", "has_sig": false, "md5_digest": "70f1d51bbbbe7871e241b2208e0b0538", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17143, "upload_time": "2018-04-07T11:05:20", "url": "https://files.pythonhosted.org/packages/7f/f9/631283222c0336606cee57e76a322f13e105c746babc73255894965f62d7/ader-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "e90fa67c7731eafff6b0b40acfc63fcd", "sha256": "5a206f97398c218ef488cd7d7f8414bdc611e620c5be298fe70e24449c0a38ac" }, "downloads": -1, "filename": "ader-1.1.1.tar.gz", "has_sig": false, "md5_digest": "e90fa67c7731eafff6b0b40acfc63fcd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20383, "upload_time": "2018-05-02T23:21:53", "url": "https://files.pythonhosted.org/packages/46/4e/33eda15f16716e84cf3f704c4d9c6ffe9d40256c770504727519e3653066/ader-1.1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "9fada8ddfd1365f109578e4359af4434", "sha256": "9f9291af23e70e5ef125ac3b09d0f9a36d60fbeba7093fa68490fa60e3824055" }, "downloads": -1, "filename": "ader-1.2.0.tar.gz", "has_sig": false, "md5_digest": "9fada8ddfd1365f109578e4359af4434", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16805, "upload_time": "2018-08-23T12:09:01", "url": "https://files.pythonhosted.org/packages/01/ca/2a6dbb977924fbcf18cbb3c22f0e15dddad5c12216a4d941ec3b97422922/ader-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "2c66e7dcea7dc5f51e5a79032940d5d5", "sha256": "204576a968ba37b172e206bb3f3ce514b5fd05fc794b84528ba487b8d6a55d5e" }, "downloads": -1, "filename": "ader-1.2.1.tar.gz", "has_sig": false, "md5_digest": "2c66e7dcea7dc5f51e5a79032940d5d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19758, "upload_time": "2019-09-01T20:56:11", "url": "https://files.pythonhosted.org/packages/2f/9e/dfc1397341e76b32618e24ce7fae694e7492102ef1fe5ae2b52a147f9b5a/ader-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2c66e7dcea7dc5f51e5a79032940d5d5", "sha256": "204576a968ba37b172e206bb3f3ce514b5fd05fc794b84528ba487b8d6a55d5e" }, "downloads": -1, "filename": "ader-1.2.1.tar.gz", "has_sig": false, "md5_digest": "2c66e7dcea7dc5f51e5a79032940d5d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19758, "upload_time": "2019-09-01T20:56:11", "url": "https://files.pythonhosted.org/packages/2f/9e/dfc1397341e76b32618e24ce7fae694e7492102ef1fe5ae2b52a147f9b5a/ader-1.2.1.tar.gz" } ] }