Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the default hydraulics solver? #773

Closed
rgknox opened this issue Sep 1, 2021 · 5 comments · Fixed by #1263
Closed

update the default hydraulics solver? #773

rgknox opened this issue Sep 1, 2021 · 5 comments · Fixed by #1263
Labels
discussion NOTE: issues with discussion labels should be converted

Comments

@rgknox
Copy link
Contributor

rgknox commented Sep 1, 2021

@pnlfang has introduced a 2D solver for hydraulics as an alternative to the original 1D solver that first rolled out with FATES-HYDRO. The 2D solver simultaneously calculates the fluxes through the above-ground plant, root and soil compartments, whereas the 1D solve will iteratively perform solve on the plant and 1 soil layer at a time (assuming that each root layer has a partial share of the stem/leaf conduit above ground).

Could we use this space to make some decisions?

  1. Should we update default solver to be the 2D?

  2. Should we move the switch controlling the solver from a hard-code logical to the parameter file? We have the choice of solver as a hard-coded logical constant, shown here:

logical, parameter, public :: use_2d_hydrosolve = .false.

  1. What type of simulation(s) and benchmarks would help us decide which solution should be the default?

  2. There are other hard-coded parameters controlling both 2D and 1D solves that we may impact this decision that we want to consider. For instance, we use 5 concentric soil shells around the root, are those needed and does one solver excel in one environment over the other?

@rgknox rgknox added the discussion NOTE: issues with discussion labels should be converted label Sep 1, 2021
@pnlfang
Copy link
Contributor

pnlfang commented Sep 1, 2021

  1. The 1D and 2D are solving the same discretized form in the following eq (n is time step, m is iteration number).
  2. 1D has no iteration within a time step, i.e., the last term in the RHS of the eq is 0, where 2D allows iteration.
  3. 1D solves multiple layers, introducing artifact of top boundary flux. 2D solves the eq altogether.
    image

Adding an external file for solver related parameters would be helpful. One can then specify 1D or 2D, how many layer or shells to include in the simulation. Solver can then be selected by the code like this in the image below:
image

@pnlfang
Copy link
Contributor

pnlfang commented Sep 1, 2021

agb
npp
sw

@pnlfang
Copy link
Contributor

pnlfang commented Sep 1, 2021

Figure showing comparison among different solvers.

@ckoven
Copy link
Contributor

ckoven commented Sep 1, 2021

@pnlfang thanks! Do you have a timing comparison to evaluate the relative computational costs?

@pnlfang
Copy link
Contributor

pnlfang commented Sep 1, 2021

@ckoven Looking at the restart file time stamps, for one year simulation it took 12 min, 18 min, and 24 min for the particular 1D test using 1D, picard, and newton, respectively.
Global simulation using 2D picard is feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion NOTE: issues with discussion labels should be converted
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants