{"id":1227,"date":"2026-05-12T21:47:09","date_gmt":"2026-05-12T21:47:09","guid":{"rendered":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/chapter\/an-introduction-to-modflow\/"},"modified":"2026-05-13T03:16:36","modified_gmt":"2026-05-13T03:16:36","slug":"an-introduction-to-modflow","status":"publish","type":"chapter","link":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/chapter\/an-introduction-to-modflow\/","title":{"raw":"10.5 An Introduction to MODFLOW","rendered":"10.5 An Introduction to MODFLOW"},"content":{"raw":"<div id=\"an-introduction-to-modflow\" class=\"level1\">\r\n<div data-custom-style=\"First Paragraph\">\r\n\r\nA rigorous finite difference model consists of computer code that reads the model grid and other input values, performs the iterative calculations, and records the output in some usable format. A finite difference model code requires the following items.\r\n\r\n<\/div>\r\n<ul>\r\n \t<li>A means of inputting grid node locations, boundary conditions, and hydraulic parameters ([latex]K,\\ S_{s}[\/latex]) at each node.<\/li>\r\n \t<li>An algorithm that calculates heads at each value and controls the iterative process\u2014that is, compares calculated heads from each successive iteration, to determine if the convergence criteria are met.<\/li>\r\n \t<li>A means of writing the final head values to an output file for processing.<\/li>\r\n<\/ul>\r\n<div data-custom-style=\"First Paragraph\">\r\n\r\nConstructing simple finite difference models using FORTRAN, python, or some other computer language to do the calculations is not too difficult. However, models can get very complex in a very short period, and the time spent writing the code can increase dramatically with increasing complexity.\r\n\r\n<\/div>\r\n<div data-custom-style=\"Body Text\">\r\n\r\nIn the early days of groundwater modeling the modeler needed to write the computer code to build the model for any given specific problem. In the late 1970s, hydrogeologists and programmers started writing model codes that were flexible and could be applied to a variety of situations. Then in the early 1980s, two hydrogeologists at the USGS named McDonald and Harbaugh (1984) developed and published the code for a finite\u2011difference\u2011based software package called MODFLOW, which quickly became the industry standard for developing groundwater flow models.\r\n\r\n<\/div>\r\n<div data-custom-style=\"Body Text\">\r\n\r\nWhat made their model so useful and universally acceptable was that, rather than set up a single computer program with all the steps outlined above, they set up their software as a series of subroutines, or <em>modules<\/em>, with each module associated with a specific part of a finite difference model. For example, they have a pumping well module, a recharge module, a river boundary module, etc. The user is still responsible for putting together the input files and setting up the grid, but then they can choose the modules that are appropriate for their model and construct it accordingly. This, along with the fact that their software was free, resulted in widespread distribution of the model and an almost universal acceptance of the program.\r\n\r\n<\/div>\r\n<div data-custom-style=\"Body Text\">\r\n\r\nOver the years since the original release of MODFLOW there have been numerous subsequent versions with various improvements, and several non\u2011USGS affiliated companies started developing and selling <em>pre\u2011processor<\/em> software that use graphical user interfaces (GUI) and special programs to aid in grid construction and parameter distribution. These are then linked directly to MODFLOW, so the model grid and parameters go right into the MODFLOW algorithm. They also developed <em>post\u2011processor<\/em> programs that take the output and make nice images and animations illustrating model results. These programs are in widespread use today, and they give any individual with a standard PC computer the ability to generate and run fairly complex groundwater models.\r\n\r\n<\/div>\r\n<div data-custom-style=\"Body Text\">\r\n\r\nThis section provides a limited overview of groundwater modeling and the MODFLOW modeling environment. Students and practicing hydrogeologist who want more information on groundwater modeling are encouraged to download and read <a href=\"https:\/\/gw-project.org\/books\/getting-started-with-modflow\/\"><span data-custom-style=\"Hyperlink\"><em><u>Getting Started with MODFLOW<\/u><\/em><\/span><\/a>\u2197 by Winston (2023) and <a href=\"https:\/\/gw-project.org\/books\/geologic-frameworks-for-groundwater-flow-models\/\"><span data-custom-style=\"Hyperlink\"><em><u>Geologic Frameworks for Groundwater Flow Models<\/u><\/em><\/span><\/a>\u2197 by Brandenburg (2020); both books are available as free downloads from The Groundwater Project.\r\n\r\n<\/div>\r\n<\/div>","rendered":"<div id=\"an-introduction-to-modflow\" class=\"level1\">\n<div data-custom-style=\"First Paragraph\">\n<p>A rigorous finite difference model consists of computer code that reads the model grid and other input values, performs the iterative calculations, and records the output in some usable format. A finite difference model code requires the following items.<\/p>\n<\/div>\n<ul>\n<li>A means of inputting grid node locations, boundary conditions, and hydraulic parameters ([latex]K,\\ S_{s}[\/latex]) at each node.<\/li>\n<li>An algorithm that calculates heads at each value and controls the iterative process\u2014that is, compares calculated heads from each successive iteration, to determine if the convergence criteria are met.<\/li>\n<li>A means of writing the final head values to an output file for processing.<\/li>\n<\/ul>\n<div data-custom-style=\"First Paragraph\">\n<p>Constructing simple finite difference models using FORTRAN, python, or some other computer language to do the calculations is not too difficult. However, models can get very complex in a very short period, and the time spent writing the code can increase dramatically with increasing complexity.<\/p>\n<\/div>\n<div data-custom-style=\"Body Text\">\n<p>In the early days of groundwater modeling the modeler needed to write the computer code to build the model for any given specific problem. In the late 1970s, hydrogeologists and programmers started writing model codes that were flexible and could be applied to a variety of situations. Then in the early 1980s, two hydrogeologists at the USGS named McDonald and Harbaugh (1984) developed and published the code for a finite\u2011difference\u2011based software package called MODFLOW, which quickly became the industry standard for developing groundwater flow models.<\/p>\n<\/div>\n<div data-custom-style=\"Body Text\">\n<p>What made their model so useful and universally acceptable was that, rather than set up a single computer program with all the steps outlined above, they set up their software as a series of subroutines, or <em>modules<\/em>, with each module associated with a specific part of a finite difference model. For example, they have a pumping well module, a recharge module, a river boundary module, etc. The user is still responsible for putting together the input files and setting up the grid, but then they can choose the modules that are appropriate for their model and construct it accordingly. This, along with the fact that their software was free, resulted in widespread distribution of the model and an almost universal acceptance of the program.<\/p>\n<\/div>\n<div data-custom-style=\"Body Text\">\n<p>Over the years since the original release of MODFLOW there have been numerous subsequent versions with various improvements, and several non\u2011USGS affiliated companies started developing and selling <em>pre\u2011processor<\/em> software that use graphical user interfaces (GUI) and special programs to aid in grid construction and parameter distribution. These are then linked directly to MODFLOW, so the model grid and parameters go right into the MODFLOW algorithm. They also developed <em>post\u2011processor<\/em> programs that take the output and make nice images and animations illustrating model results. These programs are in widespread use today, and they give any individual with a standard PC computer the ability to generate and run fairly complex groundwater models.<\/p>\n<\/div>\n<div data-custom-style=\"Body Text\">\n<p>This section provides a limited overview of groundwater modeling and the MODFLOW modeling environment. Students and practicing hydrogeologist who want more information on groundwater modeling are encouraged to download and read <a href=\"https:\/\/gw-project.org\/books\/getting-started-with-modflow\/\"><span data-custom-style=\"Hyperlink\"><em><u>Getting Started with MODFLOW<\/u><\/em><\/span><\/a>\u2197 by Winston (2023) and <a href=\"https:\/\/gw-project.org\/books\/geologic-frameworks-for-groundwater-flow-models\/\"><span data-custom-style=\"Hyperlink\"><em><u>Geologic Frameworks for Groundwater Flow Models<\/u><\/em><\/span><\/a>\u2197 by Brandenburg (2020); both books are available as free downloads from The Groundwater Project.<\/p>\n<\/div>\n<\/div>\n","protected":false},"author":8,"menu_order":39,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1227","chapter","type-chapter","status-publish","hentry"],"part":1495,"_links":{"self":[{"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/pressbooks\/v2\/chapters\/1227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/wp\/v2\/users\/8"}],"version-history":[{"count":2,"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/pressbooks\/v2\/chapters\/1227\/revisions"}],"predecessor-version":[{"id":1744,"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/pressbooks\/v2\/chapters\/1227\/revisions\/1744"}],"part":[{"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/pressbooks\/v2\/parts\/1495"}],"metadata":[{"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/pressbooks\/v2\/chapters\/1227\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/wp\/v2\/media?parent=1227"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/pressbooks\/v2\/chapter-type?post=1227"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/wp\/v2\/contributor?post=1227"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/books.gw-project.org\/basic-hydrogeology-an-introduction-to-the-fundamentals-of-groundwater-science\/wp-json\/wp\/v2\/license?post=1227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}