Exemplo n.º 1
0
    def __init__(self, c,n,m,d,N):
        """initialize radial solitary wave profile fc(r) using PySolwave Routines

        c: wavespeed
        n: permeability exponent
        m: bulk viscosity exponent
        d: wave dimension
        N: number of collocation points
        """

        # calculate profiles checking for special cases
        if m == 1:
            if n == 2:
                r, f = solwave_con(c, d, N)
            else:
                r, f = solwave_m1(c,n, d, N)
        else:
            if n == 3:
                r, f = solwave_mck(c, d, N)
            else:
                r, f = solwave_gen(c, n, m, d, N)
                
        self.r = r
        self.f = f
        self.finterp = interp1d(r,f, kind='cubic', fill_value=1.0)
Exemplo n.º 2
0
def wave_profile(c,n,m,d,N):
    """ return 1-D solitary wave profile fc(r) using PySolwave Routines

    c: wavespeed
    n: permeability exponent
    m: bulk viscosity exponent
    d: wave dimension
    N: number of collocation points
    """

    # calculate profiles checking for special cases
    if m == 1:
        if n == 2:
            r, f = solwave_con(c, d, N)
        else:
            r, f = solwave_m1(c,n, d, N)
    else:
        if n == 3:
            r, f = solwave_mck(c, d, N)
        else:
            r, f = solwave_gen(c, n, m, d, N)

    return r, f
Exemplo n.º 3
0
def wave_profile(c, n, m, d, N):
    """ return 1-D solitary wave profile fc(r) using PySolwave Routines

    c: wavespeed
    n: permeability exponent
    m: bulk viscosity exponent
    d: wave dimension
    N: number of collocation points
    """

    # calculate profiles checking for special cases
    if m == 1:
        if n == 2:
            r, f = solwave_con(c, d, N)
        else:
            r, f = solwave_m1(c, n, d, N)
    else:
        if n == 3:
            r, f = solwave_mck(c, d, N)
        else:
            r, f = solwave_gen(c, n, m, d, N)

    return r, f