~mpesz/code

THIS SITE IS PERMANENTLY UNDER CONSTRUCTION and the software available for download can change or temporarily disappear so we can make it better.
The code(s) authors are listed and the copyright to Department of Mathematics has been indicated. When using the software for your needs, please acknowledge the authors, the copyright, and the funding listed below. You are also welcome to send me an email to let us know you've used the code.
The software available through these pages includes prototypes only. For example, it works in 1D only, or with kludges and commented-out code to support testing on some elementary examples, or to promote the use for some specific applications. [Hence, the code ain't always pretty]. The code should always work on examples indicated in the header but not necessarily on all the combinations of code you would un-comment. We have full research versions available but unfortunately do not have the resources to provide documentation and/or support, so we will likely not be able to answer questions on the code. If you would like to collaborate on full research versions, and are affiliated with an academic institution as a student or researchers, please contact me so we can work out a way to do it.

Please consider visiting for a different layout od CODE and CODE CAPSULES, with lionks to github
Links
General
Research software
Code for classes
Utilities and other
Software
Please README first.
Content Description Files References
fd_node A set of routines setting up a grid and solving an elliptic problem with 2D FD-node centered discretization. elliptic solver.m
See other files and generate_ijk_grid.m
This code was used in porescale Navier-Stokes solver in stream-vorticity function formulation described in the following publication
M. Peszynska, A. Trykozko, K. Augustson, Computational upscaling of inertia effects from porescale to mesoscale, ICCS 2009 Proceedings, Eds.: G. Allen, J. Nabrzyski, E. Seidel, D. van Albada, J. Dongarra, and P. Sloot, accepted (Feb. 2009). LNCS 5544, Part I, pp. 695-704. Springer-Verlag, Berlin-Heidelberg, 2009.
fd Set of routines for solving two-point BVPs and elliptic problems in 2D using Cell-Centered FD. Specific application is single-phase incompressible flow in porous media with Darcy-type momentum equation and non-Darcy (Forchheimer).
Also, coupled transport.
See files This code was used in publication
C. Garibotti and M. Peszynska, Upscaling Non-Darcy Flow, Transport in Porous Media, published online March 13, 2009. DOI 10.1007/s11242-009-9369-2. Volume 80, Issue 3 (2009), pp. 401-430
two_phase Set of routines for solving two-phase flow problems in 1D and 2D using Cell-Centered FD, upwinding, and Newton solver. Also, a Richards' solver. See files This code was used in publication
M. Peszynska and S.-Y. Yi, Numerical methods for unsaturated flow with dynamic capillary pressure in heterogeneous porous media , International Journal of Numerical Analysis and Modeling, Vol. 5 (2008), Supp, pp. 126-149.
rock Rock properties (functions for relative premeabilities and capillary pressures) See files Supports the multiphase code.
stochastic Set of routines for stochastic simulations using Monte-Carlo method. The underlying equation is an elliptic PDE. Also, stochastic parametrizations using Karhunen-Loeve expansions and Haar basis of some simple fields. See files This code was used in publication
[] M. Ossiander, M. Peszynska and V. Vasylkivska, in preparation.
fem1d Galerkin FE solver in 1D; follows [Becker/Carey/Oden]. See files This code is used primarily for teaching in MTH 65? sequence
fem Galerkin FE solver in 2D-3D; extends ACF software developed by

J. Alberty, C. Carstensen\ and\ S. A. Funken, Numer. Algorithms {\bf 20} (1999), no.~2-3, 117--137; MR 1709562 and available from 'Software' link from the Author's webpage or from www.netlib.org

It solves elliptic and parabolic problems with advection and reaction terms with non-unit and more generally variable coefficients. Provides templates for a-priori error checking and includes a-posteriori error estimates for elliptic problems. Advection terms are handled by streamline diffusion. Code with a driver can be applied to simulate a coupled flow and transport problem.
See files This code was used in research towards publications
M. Peszynska, R.E. Showalter, Multiscale elliptic-parabolic systems for flow and transport, Electron. J. Diff. Eqns., Vol. 2007(2007), No. 147, pp. 1-30.
and
Son-Young Yi, M. Peszynska, R.E. Showalter Numerical upscaled model of transport with non-separated scales. Paper #188 in Proceedings of CMWR XVIII in Barcelona, June 21-24, 2010 available online at http://congress.cimne.com/CMWR2010/Proceedings.
mh Methane hydrate simulation; includes phase equilibria in kinetic and equilibrium version. Both hydrate and free gas zones are included. See files This code was used in research towards publications
M. Peszynska, M. Torres, A. Trehu, Adaptive modeling of methane hydrates , International Conference on Computational Science, ICCS 2010 Procedia Computer Science Vol. 1 (2010), pp 709-717. Available online via www.elsevier.com/locate/procedia and www.sciencdirect.com
twogrid (Written by Viviane Klein) Two-grid finite element solution of a coupled system of reaction-diffusion equations. See files This code was used in research towards publications
V. Klein, M. Peszynska, Adaptive multi-level modeling of coupled multiscale phenomena with applications to methane evolution in subsurface. Paper #47 in Proceedings of CMWR XVIII in Barcelona, June 21-24, 2010, available online at http://congress.cimne.com/CMWR2010/Proceedings.
and
V. Klein, M. Peszynska, Robust a-posteriori estimators for multilevel discretizations of reaction-diffusion systems, International Journal of Numerical Analysis and Modeling, Vol. 8, No.1, pp 1-27, 2011
and
was included in Viviane Klein's PhD Thesis
dd_semiconductor (Written by Tim Costa) Domain decomposition algorithms DDP and DDC for two-domain algorithm with a jump See files This code was used in research towards publications
D. Foster, T. Costa, M. Peszynska, G. Schneider, Multiscale modeling of solar cells with interface phenomena, J. Coupled Syst. Multiscale Dyn., Volume 1, Issue 2, pp 179-204, 2013, doi:10.1166/jcsmd.2013.1013
and other publications under review.
The code was also included in Tim Costa's MSc Thesis.
The semiconductor-specific code can be obtained by request.