Exemplo n.º 1
0
    def transformDerivU(self, u, m):
        self.setModel(m)
        alpha = self.alpha
        I = self.I
        n = self.n
        Ks = self.Ks
        m = 1.0 - 1.0 / n

        g = I * alpha * n * np.exp(Ks) * abs(alpha * u) ** (n - 1.0) * np.sign(alpha * u) * (1.0 / n - 1.0) * (
            (abs(alpha * u) ** n + 1) ** (1.0 / n - 1)
        ) ** (I - 1) * (
            (1 - 1.0 / ((abs(alpha * u) ** n + 1) ** (1.0 / n - 1)) ** (1.0 / (1.0 / n - 1))) ** (1 - 1.0 / n) - 1
        ) ** 2 * (
            abs(alpha * u) ** n + 1
        ) ** (
            1.0 / n - 2
        ) - (
            2
            * alpha
            * n
            * np.exp(Ks)
            * abs(alpha * u) ** (n - 1)
            * np.sign(alpha * u)
            * (1.0 / n - 1)
            * ((abs(alpha * u) ** n + 1) ** (1.0 / n - 1)) ** I
            * ((1 - 1.0 / ((abs(alpha * u) ** n + 1) ** (1.0 / n - 1)) ** (1.0 / (1.0 / n - 1))) ** (1 - 1.0 / n) - 1)
            * (abs(alpha * u) ** n + 1) ** (1.0 / n - 2)
        ) / (
            ((abs(alpha * u) ** n + 1) ** (1.0 / n - 1)) ** (1.0 / (1.0 / n - 1) + 1)
            * (1 - 1.0 / ((abs(alpha * u) ** n + 1) ** (1.0 / n - 1)) ** (1.0 / (1.0 / n - 1))) ** (1.0 / n)
        )
        g[u >= 0] = 0
        g = Utils.sdiag(g)
        return g
Exemplo n.º 2
0
    def transformDerivU(self, u, m):
        self.setModel(m)
        alpha = self.alpha
        I = self.I
        n = self.n
        Ks = self.Ks
        m = 1.0 - 1.0 / n

        g = I * alpha * n * np.exp(Ks) * abs(alpha * u)**(n - 1.0) * np.sign(
            alpha * u) * (1.0 / n - 1.0) * (
                (abs(alpha * u)**n + 1)**(1.0 / n - 1))**(I - 1) * (
                    (1 - 1.0 / ((abs(alpha * u)**n + 1)**(1.0 / n - 1))**
                     (1.0 / (1.0 / n - 1)))**(1 - 1.0 / n) -
                    1)**2 * (abs(alpha * u)**n + 1)**(1.0 / n - 2) - (
                        2 * alpha * n * np.exp(Ks) * abs(alpha * u)**
                        (n - 1) * np.sign(alpha * u) * (1.0 / n - 1) *
                        ((abs(alpha * u)**n + 1)**(1.0 / n - 1))**I *
                        ((1 - 1.0 / ((abs(alpha * u)**n + 1)**(1.0 / n - 1))**
                          (1.0 / (1.0 / n - 1)))**(1 - 1.0 / n) - 1) *
                        (abs(alpha * u)**n + 1)**(1.0 / n - 2)) / (
                            ((abs(alpha * u)**n + 1)**
                             (1.0 / n - 1))**(1.0 / (1.0 / n - 1) + 1) *
                            (1 - 1.0 /
                             ((abs(alpha * u)**n + 1)**(1.0 / n - 1))**
                             (1.0 / (1.0 / n - 1)))**(1.0 / n))
        g[u >= 0] = 0
        g = Utils.sdiag(g)
        return g
Exemplo n.º 3
0
 def transformDerivU(self, u, m):
     self.setModel(m)
     g = (self.alpha*((self.theta_s - self.theta_r)/
          (self.alpha + abs(u)**self.beta)**2)
          *(-self.beta*abs(u)**(self.beta-1)*np.sign(u)))
     g[u >= 0] = 0
     g = Utils.sdiag(g)
     return g
Exemplo n.º 4
0
 def transformDerivU(self, u, m):
     self.setModel(m)
     g = (self.alpha*((self.theta_s - self.theta_r)/
          (self.alpha + abs(u)**self.beta)**2)
          *(-self.beta*abs(u)**(self.beta-1)*np.sign(u)))
     g[u >= 0] = 0
     g = Utils.sdiag(g)
     return g
Exemplo n.º 5
0
 def transformDerivU(self, u, m):
     self.setModel(m)
     g = -(np.exp(self.Ks) * self.A * self.gamma * abs(u) ** (self.gamma - 1) * np.sign(u)) / (
         (self.A + abs(u) ** self.gamma) ** 2
     )
     g[u >= 0] = 0
     g = Utils.sdiag(g)
     return g
Exemplo n.º 6
0
 def transformDerivU(self, u, m):
     g = -self.alpha * self.n * abs(self.alpha * u)**(self.n - 1) * np.sign(
         self.alpha * u) * (1. / self.n - 1) * (
             self.theta_r - self.theta_s) * (abs(self.alpha * u)**self.n +
                                             1)**(1. / self.n - 2)
     g[u >= 0] = 0
     g = Utils.sdiag(g)
     return g
Exemplo n.º 7
0
 def transformDerivU(self, u, m):
     self.setModel(m)
     g = -(np.exp(self.Ks) * self.A * self.gamma * abs(u)**
           (self.gamma - 1) * np.sign(u)) / (
               (self.A + abs(u)**self.gamma)**2)
     g[u >= 0] = 0
     g = Utils.sdiag(g)
     return g
Exemplo n.º 8
0
 def transformDerivU(self, u, m):
     g = (
         -self.alpha
         * self.n
         * abs(self.alpha * u) ** (self.n - 1)
         * np.sign(self.alpha * u)
         * (1.0 / self.n - 1)
         * (self.theta_r - self.theta_s)
         * (abs(self.alpha * u) ** self.n + 1) ** (1.0 / self.n - 2)
     )
     g[u >= 0] = 0
     g = Utils.sdiag(g)
     return g