Help Needed with pHydrus and Root Growth Simulation

A discussion forum for old Hydrus-1D users.
Post Reply
Huayang Miao
Posts: 17
Joined: Wed Feb 14, 2024 10:34 am
Location: China

Help Needed with pHydrus and Root Growth Simulation

Post by Huayang Miao » Wed Aug 21, 2024 4:11 pm

Dear Professor Jirka and community,

I'm working on a project analyzing soil moisture using multiple simulations. To automate this process, I'm trying to use the pHydrus package, but I've encountered some issues with my Python code.

Specifically, I have two questions:

1. Boundary Conditions: When setting boundary conditions in pHydrus, what are the specific codes for the top and bottom boundaries? I want to set the upper boundary as "Atmospheric boundary" and the lower boundary as "variable head boundary".

2. Long-Term Root Growth: I'm aiming to simulate root growth and water uptake over long time scales. I've read in Technical manual 1D that "root growth simulation requires integrating an exponential model for the potential root water uptake spatial distribution." Is my understanding accurate, and can the code I've written achieve these functionalities?

I'd greatly appreciate any guidance you can offer. Thank you for your support!

Thank you very much.

Best regards,

Huayang Miao

Huayang Miao
Posts: 17
Joined: Wed Feb 14, 2024 10:34 am
Location: China

Re: Help Needed with pHydrus and Root Growth Simulation

Post by Huayang Miao » Wed Aug 21, 2024 4:20 pm

I tried several times without adding any attachments, so I pasted some of the code below

Code: Select all

# 1. Add water flow information
ml.add_waterflow(linitw=False, top_bc=3, bot_bc=2, rroot=0)

# 2. Define loop for potential root water uptake distribution proposed by Hoffman and Van Genuchten
def z_loop(z, r1 = 10, r2 = 20):
    if z > -r1:
        return 1
    elif z < -(r1 + r2):
        return 0
    else:
        return(z+(r1+r2))/r2

ml.add_root_uptake(model=1, p50=-800,p3=2, crootmax=0.9, omegac=0)
ml.add_root_growth(2, irfak=1, trmin=0, trmed=0, trmax=2143, xrmin=10,
                   xrmed=0, xrmax=50, trperiod=365)

Jirka
Posts: 6249
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Re: Help Needed with pHydrus and Root Growth Simulation

Post by Jirka » Wed Aug 21, 2024 11:33 pm

I’m not an expert on pHydrus, and I have never looked at the code.

Saying that, I expect that the answers can be as follows:
1. The code for atmospheric BC is -4, and for variable heac BC =3.
2. For time-variable rooting depth, HYDRUS uses Hoffman and van Genuchten (1983) function.

J.

Huayang Miao
Posts: 17
Joined: Wed Feb 14, 2024 10:34 am
Location: China

Re: Help Needed with pHydrus and Root Growth Simulation

Post by Huayang Miao » Thu Aug 22, 2024 3:48 am

Thank you, Professor

Post Reply