velocity_hydraulic_gradient¶
Class summary¶
DarcyFlowModel ([k]) |
Darcian flow model |
HansboNonDarcianFlowModel ([klinear, kstar, …]) |
Hansbo non-darcian flow model |
OneDimensionalFlowRelationship |
Base class for defining velocity vs hydraulic gradient relationships |
Module listing¶
Relationships between velocity and hydraulic gradient
-
class
geotecha.constitutive_models.velocity_hydraulic_gradient.
DarcyFlowModel
(k=1.0)[source]¶ Bases:
geotecha.constitutive_models.velocity_hydraulic_gradient.OneDimensionalFlowRelationship
Darcian flow model
Parameters: - k : float, optional
Darcian permeability. Default k=1.
Notes
Darcian flow is described by:
\[v = ki\]Methods
dv_di
(hyd_grad, **kwargs)Slope of velocity vs hydraulic gradient relationship i_from_v
(velocity, **kwargs)Hydraulic gradient from velocity plot_model
(**kwargs)Plot the velocity-hydraulic gradient relationship v_and_i_for_plotting
(**kwargs)Velocity and hydraulic gradient that plot the relationship v_from_i
(hyd_grad, **kwargs)Velocity from hydraulic gradient vdrain_strain_rate
(eta, head, **kwargs)Vertical drain strain rate as based on the eta method”“ -
dv_di
(hyd_grad, **kwargs)[source]¶ Slope of velocity vs hydraulic gradient relationship
Parameters: - hyd_grad : float
Hydraulic gradient.
- **kwargs : any
Any keyword arguments are ignored.
Returns: - slope : float
slope of velocity-hydraulic gradient relationship at hyd_grad.
Examples
>>> a = DarcyFlowModel(k=3) >>> a.dv_di(8.0) 3.0 >>> a.dv_di(-8.0) -3.0 >>> a.dv_di(np.array([5.0, 8.0])) array([3., 3.])
-
i_from_v
(velocity, **kwargs)[source]¶ Hydraulic gradient from velocity
Parameters: - v : float
Flow velocity.
- **kwargs : any
Any keyword arguments are ignored.
Returns: - hyd_grad : float
Hydraulic gradient.
Examples
>>> a = DarcyFlowModel(k=3) >>> a.i_from_v(24.0) 8.0 >>> a.i_from_v(-24.0) -8.0 >>> a.i_from_v(np.array([15, 24])) array([5., 8.])
-
non_Darcy
= False¶
-
v_and_i_for_plotting
(**kwargs)[source]¶ Velocity and hydraulic gradient that plot the relationship
Parameters: - npts : int, optional
Number of points to return. Default npts=100.
- xmin, xmax : float, optional
Range of x (i.e. hydraulic gradient) values from which to return points. Default xmin=0, xmax=50.
Returns: - x, y : 1d ndarray
npts permeability, and void ratio values between xmin and xmax.
-
v_from_i
(hyd_grad, **kwargs)[source]¶ Velocity from hydraulic gradient
Parameters: - hyd_grad : float
Hydraulic gradient.
- **kwargs : any
Any keyword arguments are ignored.
Returns: - v : float
Flow velocity.
Examples
>>> a = DarcyFlowModel(k=3) >>> a.v_from_i(8.0) 24.0 >>> a.v_from_i(-8.0) -24.0 >>> a.v_from_i(np.array([5.0, 8.0])) array([15., 24.])
-
vdrain_strain_rate
(eta, head, **kwargs)[source]¶ Vertical drain strain rate as based on the eta method”“
[strain rate] = head * self.k * eta
Parameters: - eta : float
Value of vertical drain geometry, peremability parameter. This value should be calculated based on Darcy’s law (see geotecha.consolidation.smearzones.drain_eta)
- head : float
Hydraulic head driving the flow. For vertical drains this is usually the difference between the average head in the soil and the head in the drain.
- **kwargs : any
Any additional keyword arguments are ignored.
Returns: - strain_rate : float
Strain rate based on eta method.
See also
geotecha.consolidation.smearzones
- Functions to determine eta.
Examples
>>> a = DarcyFlowModel(k=3) >>> a.vdrain_strain_rate(eta=2.5, head=4) 30.0
-
class
geotecha.constitutive_models.velocity_hydraulic_gradient.
HansboNonDarcianFlowModel
(klinear=None, kstar=None, n=None, i0=None, iL=None)[source]¶ Bases:
geotecha.constitutive_models.velocity_hydraulic_gradient.OneDimensionalFlowRelationship
Hansbo non-darcian flow model
Various combinations of parameters can be used to specify the model. Basically three parameters are required, one of which must be kstar or klinear. If n==1 or i0=0, or iL=0 then the model will reduce to Darcy flow model with peremability equal to klinear (or kstar if klinear is not defined).
Parameters: - klinear : float, optional
This is the slope of the linear portion of the v-i relationship for i>iL. klinear = kstar * n * iL**(n-1). Default klinear=None. klinear and kstar cannot both be None, you must use one or the other.
- kstar : float, optional
Permability coefficient in the power law, v=kstar*i**n, flow section, i<iL. Default kstar=None. klinear and kstar cannot both be None.
- n : float, optional
Exponent for non-Darcian portion of flow. n must be greater than or equal to 1. Default n=None.
- i0 : float, optional
x-axis intercept of the linear portion of the flow law. Default i0=None. i0 must be greater or equal to zero.
- iL : float, optional
Limiting hydraulic gradient, beyond which v-i relationship is linear. iL = i0 * n / (n -1). Default iL=None.
Notes
Hansbo’s Non-darcian flow relationship is defined by:
\[\begin{split}v=\left\{\begin{array}{lr} k^{\ast}i^{n} & i<i_{L} \\ k_{\rm{linear}} \left({i-i_0}\right) & i\geq i_{L} \end{array}\right.\end{split}\]where,
\[k_{\rm{linear}} = k^{\ast}ni_L^\left(n-1\right)\]\[i_L=\frac{i_0 n}{\left(n-1\right)}\]Examples
These examples show the various ways to define the model: >>> p = dict(kstar=2, n=1.3, iL=16.2402611294, i0=3.7477525683, klinear=6) >>> a = HansboNonDarcianFlowModel(kstar=p[‘kstar’], n=p[‘n’], iL=p[‘iL’]) >>> print(a) kstar = 2 n = 1.3 iL = 16.240… i0 = 3.747… klinear = 6 >>> a = HansboNonDarcianFlowModel(kstar=p[‘kstar’], n=p[‘n’], i0=p[‘i0’]) >>> print(a) kstar = 2 n = 1.3 iL = 16.240… i0 = 3.747… klinear = 6 >>> a = HansboNonDarcianFlowModel(kstar=p[‘kstar’], iL=p[‘iL’], i0=p[‘i0’]) >>> print(a) kstar = 2 n = 1.3 iL = 16.240… i0 = 3.747… klinear = 6 >>> a = HansboNonDarcianFlowModel(kstar=p[‘kstar’], iL=p[‘iL’], klinear=p[‘klinear’]) >>> print(a) kstar = 2 n = 1.3 iL = 16.240… i0 = 3.747… >>> a = HansboNonDarcianFlowModel(kstar=p[‘kstar’], i0=p[‘i0’], klinear=p[‘klinear’]) >>> print(a) kstar = 2 n = 1.3 iL = 16.240… i0 = 3.747… klinear = 6 >>> a = HansboNonDarcianFlowModel(n=p[‘n’], iL=p[‘iL’], klinear=p[‘klinear’]) >>> print(a) kstar = 2 n = 1.3 iL = 16.240… i0 = 3.747… klinear = 6 >>> a = HansboNonDarcianFlowModel(n=p[‘n’], i0=p[‘i0’], klinear=p[‘klinear’]) >>> print(a) kstar = 2 n = 1.3 iL = 16.240… i0 = 3.747… klinear = 6 >>> a = HansboNonDarcianFlowModel(iL=p[‘iL’], i0=p[‘i0’], klinear=p[‘klinear’]) >>> print(a) kstar = 2 n = 1.3 iL = 16.240… i0 = 3.747… klinear = 6
If the behaviour is not as you expect when i0=0, iL=0, n==1 then use very small values of i0 or iL, n just greater than 1.
Methods
dv_di
(hyd_grad, **kwargs)Slope of velocity vs hydraulic gradient relationship i_from_v
(velocity, **kwargs)Hydraulic gradient from velocity plot_model
(**kwargs)Plot the velocity-hydraulic gradient relationship v_and_i_for_plotting
(**kwargs)Velocity and hydraulic gradient that plot the relationship v_from_i
(hyd_grad, **kwargs)Velocity from hydraulic gradient vdrain_strain_rate
(eta, head, **kwargs)Vertical drain strain rate as based on the eta method”“ -
dv_di
(hyd_grad, **kwargs)[source]¶ Slope of velocity vs hydraulic gradient relationship
Parameters: - hyd_grad : float
Hydraulic gradient.
- **kwargs : any
Any keyword arguments are ignored.
Returns: - slope : float
slope of velocity-hydraulic gradient relationship at hyd_grad.
Examples
>>> a = HansboNonDarcianFlowModel(kstar=2, n=1.3, iL=16.2402611294) >>> a.dv_di(8.0) 4.851... >>> a.dv_di(-8.0) -4.851... >>> a.dv_di(np.array([8.0, 20.0])) array([4.851..., 6...])
-
i_from_v
(velocity, **kwargs)[source]¶ Hydraulic gradient from velocity
Parameters: - v : float
Flow velocity.
- **kwargs : any
Any keyword arguments are ignored.
Returns: - velocity : float
Flow velocity.
Examples
>>> a = HansboNonDarcianFlowModel(kstar=2, n=1.3, iL=16.2402611294) >>> a.i_from_v(29.858) 8.0... >>> a.i_from_v(-29.858) -8.0... >>> a.i_from_v(np.array([29.858, 97.514])) array([ 8.0..., 20.0...])
-
non_Darcy
= True¶
-
v_and_i_for_plotting
(**kwargs)[source]¶ Velocity and hydraulic gradient that plot the relationship
Parameters: - npts : int, optional
Number of points to return. Default npts=100.
- xmin, xmax : float, optional
Range of x (i.e. hydraulic gradient) values from which to return points. Default xmin=0, xmax=50.
Returns: - x, y : 1d ndarray
npts permeability, and void ratio values between xmin and xmax.
-
v_from_i
(hyd_grad, **kwargs)[source]¶ Velocity from hydraulic gradient
Parameters: - hyd_grad : float
Hydraulic gradient.
- **kwargs : any
Any keyword arguments are ignored.
Returns: - v : float
Flow velocity.
Examples
>>> a = HansboNonDarcianFlowModel(kstar=2, n=1.3, iL=16.2402611294) >>> a.v_from_i(8.0) 29.857... >>> a.v_from_i(-8.0) -29.857... >>> a.v_from_i(np.array([8.0, 20.0])) array([29.857..., 97.513...])
-
vdrain_strain_rate
(eta, head, **kwargs)[source]¶ Vertical drain strain rate as based on the eta method”“
[strain rate] = head**self.nflow * self.klinear * gamw**(nflow - 1) * eta
Note that vdrain_strain_rate only uses the exponential portion of the Non-Darcian flow relationship. If hydraulic gradients are greater than the limiting value iL then the flow rates will be overestimated.
Parameters: - eta : float
Value of vertical drain geometry, peremability parameter. This value should be calculated based on Hansbo’s non-Darcian flow model (see geotecha.consolidation.smearzones.non_darcy_drain_eta)
- head : float
Hydraulic head driving the flow. For vertical drains this is usually the difference between the average head in the soil and the head in the drain.
- gamw : float, optional
Unit weight of water. Note that this gamw must be consistent with the value used to determine eta. Default gamw=10.
- **kwargs : any
Any additional keyword arguments, other than ‘gamw’, are ignored.
Returns: - strain_rate : float
Strain rate based on eta method.
See also
geotecha.consolidation.smearzones
- Functions to determine eta.
Examples
>>> a = HansboNonDarcianFlowModel(klinear=2, n=1.3, iL=16.2402611294) >>> a.vdrain_strain_rate(eta=0.1, head=4, gamw=10) 2.419...
-
class
geotecha.constitutive_models.velocity_hydraulic_gradient.
OneDimensionalFlowRelationship
[source]¶ Bases:
object
Base class for defining velocity vs hydraulic gradient relationships
Attributes: - non_Darcy: True
A class variable indicating if model has a non-Darcian flow relationship. Can be overridden in subclasses. Basically the Darcian flow equations are simple and it might be simpler to bypass the use of a OneDimensionalFlowRelationship.
Methods
dv_di
(hyd_grad, **kwargs)Slope of velocity vs hydraulic gradient relationship i_from_v
(velocity, **kwargs)Hydraulic gradient from velocity plot_model
(**kwargs)Plot the velocity-hydraulic gradient relationship v_and_i_for_plotting
(**kwargs)Velocity and hydraulic gradient that that plot the relationship v_from_i
(hyd_grad, **kwargs)Velocity from hydraulic gradient vdrain_strain_rate
(eta, head, **kwargs)Vertical drain strain rate as based on the eta method -
non_Darcy
= True¶