Code Monkey home page Code Monkey logo

raem's Introduction

raem raem website

R-CMD-check Codecov test coverage CRAN status

raem is an R package for modeling steady-state, single-layer groundwater flow under the Dupuit-Forchheimer assumption using analytic elements.

Installation

To install the released version:

install.packages("raem")

The development version of raem can be installed from GitHub with:

# install.packages("devtools")
devtools::install_github("cneyens/raem")

Documentation

The package documentation can be found at https://cneyens.github.io/raem/.

Example

Construct an analytic element model of an aquifer with uniform background flow, two extraction wells and a reference point.

Specify the aquifer parameters and create the elements:

library(raem)

# aquifer parameters ----
k = 10     # hydraulic conductivity, m/d
top = 10   # aquifer top elevation, m
base = 0   # aquifer bottom elevation, m
n = 0.2    # aquifer porosity, -

hr = 15    # head at reference point, m
TR = k * (top - base) # constant transmissivity of background flow, m^2/d

# create elements ----
uf = uniformflow(TR, gradient = 0.001, angle = -45)
rf = constant(xc = -1000, yc = 0, hc = hr)
w1 = well(xw = 200, yw = 0, Q = 250)
w2 = well(xw = -200, yw = -150, Q = 400)

Create the model. This automatically solves the system of equations.

m = aem(k = k, top = top, base = base, n = n, uf, rf, w1, w2)

Find the head and discharge at two locations: x = -200, y = 200 and x = 100, y = 200. Note that there are no vertical flow components in this model:

heads(m, x = c(-200, 100), y = 200)
#> [1] 13.64573 13.33314
discharge(m, c(-200, 100), 200, z = top) # m^2/d
#>              Qx         Qy Qz
#> [1,] 0.15028815 -0.2923908  0
#> [2,] 0.06041242 -0.3347206  0

Plot the head contours and element locations. First, specify the contouring grid:

xg = seq(-500, 500, length = 100)
yg = seq(-250, 250, length = 100)

Now plot:

contours(m, xg, yg, 'heads', col = 'dodgerblue', nlevels = 20)
plot(m, add = TRUE)

Compute particle traces starting along y = 200 at 20 intervals per year for 5 years and add to the plot:

paths = tracelines(m, 
                   x0 = seq(-450, 450, 50), 
                   y0 = 200, 
                   z0 = top, 
                   times = seq(0, 5 * 365, 365 / 20))

plot(paths, add = TRUE, col = 'orange')

raem's People

Contributors

cneyens avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

raem's Issues

Release raem 0.1.0

First release:

Prepare for release:

  • git pull
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • Finish & publish blog post
  • Add link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • usethis::use_news_md()
  • Tweet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.