flux#
Flux computation.
- class openalea.hydroroot.flux.Flux(g, Jv, psi_e, psi_base, invert_model=True, k=None, K=None, CONSTANT=1.0, cut_and_flow=False)[source]#
Bases:
objectCompute the water potential and fluxes at each vertex of the MTG.
- run()[source]#
Compute the water potential and fluxes of each segment
- For each vertex of the root, compute :
the water potential (\(\psi_{\text{out}}\)) at the base;
the water potential (\(\psi_{\text{in}}\)) at the end;
the water flux (J) at the base;
the lateral water flux (j) entering the segment.
The vertex base is the side toward the basal direction, the vertex end is the one toward the root tip.
- Algorithm:
The algorithm has two stages:
First, on each segment, an equivalent conductance is computed in post_order (children before parent).
Finally, the water flux and potential are computed in pre order (parent then children).
Note
Here \(\psi\) are the hydrostatic water potential i.e. the hydrostatic pressure. There are no osmotic components.
- openalea.hydroroot.flux.cut(g, cut_length, threshold=0.0001)[source]#
Cut the architecture at a given length cut_length.
- Params:
g (MTG) - the root architecture
cut_length (float, m) - length at which the architecture is cut from collar.
threshold (float, mm) - length threshold to select the segments to remove corresponds to the length of the vertices
- Returns:
g(MTG) - the architecture after the cut process. This is a copy.
- Example:
g_cut = cut(g, 0.09) # Cut g at 9cm. Remove the 2 last cm of a root architecture of 11 cm (primary length). and all the properties associated with them
- openalea.hydroroot.flux.cut_and_set_conductance(g, cut_length, threshold=0.0001)[source]#
Cut the architecture at a given length cut_length, and set to the axial conductance value the radial conductance at the cut tips. The hypothesis is that the xylem channels are directly open to the surrounding
- Params:
g (MTG) - the root architecture
cut_length (float, m) - length at which the architecture is cut from collar.
‘threshold’ (float, m) - length threshold to select the segments to remove in segments_at_length()
- Returns:
g(MTG) - the architecture after the cut process. This is a copy.
- Example:
- g_cut = cut(g, 0.09) # Cut g at 9cm. Remove the 2 last cm of a root architecture of 11 cm (primary length).
k = K at the cut tips
- openalea.hydroroot.flux.flux(g, Jv=0.1, psi_e=None, psi_base=0.101325, invert_model=True, k=None, K=None, CONSTANT=1.0, shunt=False, a=1.0, b=0.0, cut_and_flow=False)[source]#
flux computes water potential and fluxes at each vertex of the MTG g.
- Parameters:
g – MTG
Jv – float used when invert_model is False (Default value = 0.1)
psi_e – hydrostatic pressure outside the roots (Default value = None), if None in Flux has_soil will be True
psi_base – hydrostatic pressure at the root base (Default value = 0.101325)
invert_model – when false distribute a given output into the root system,
True compute the water output for the given root system and conditions (Default value = False) :param k: dict radial conductivity along the MTG (Default value = None) :param K: dict axial conductance along the MTG (Default value = None) :param shunt: bool call RadialShuntFlux deprecated (Default value = False) :param a: if shunt relative factor to the main radial path conductivity (Default value = 1.) :param b: if shunt relative factor to the shortcut path conductivity (Default value = 0.) :param cut_and_flow: bool (Default value = False) deprecated unused :param CONSTANT: (Default value = 1.) deprecated unused
- openalea.hydroroot.flux.ramification_length_law(g, root=1, dl=0.0001)[source]#
Returns the length of the ramified axes along the main axis.
X is the distance to tip along the main axis Y is the length of the ramification
- Parameters:
g
root – (Default value = 1)
dl – (Default value = 1e-4)
- openalea.hydroroot.flux.segments_at_length(g, l, root=1, dl=0.0001)[source]#
Returns all the segments intercepted at a given length.
- Parameters:
g – MTG
l – length
root – (Default value = 1)
dl – (Default value = 1e-4)
- Returns:
number of segment
Download the source file ../../src/openalea/hydroroot/flux.py.