PoreAna 0.2
  • API
  • Sample
  • Density
  • Diffusion (Bin)
  • Diffusion (MC)
  • Further Properties
  • Site
    • Page
        • CosineModel
          • CosineModel
    • CosineModel
      • CosineModel
    Source

    CosineModel¶

    class poreana.model.CosineModel(data_link, n_diff=6, n_df=10, n_diff_radial=6, d0=1.0, is_print=False, coeff=[])¶

    This class sets the Cosine Model to calculate the free energy profile and the diffusion profile. The profiles have the typical cosine oscillation. These profiles over the bins are expressed by the following Fourier series. The diffusion profile is calculated between bin i and i+1 over the bin border with

    \[\ln \left(D_{i+ \frac{1}{2}}\right)=a_{0}+\sum_{k=1}^{n_b} a_{k} \cdot \cos \left(\frac{2\pi ki}{n}\right).\]

    Similarly, the free energy Fourier series can be written:

    \[F_{i} = a_{0}+\sum_{k=1}^{n_b} a_{k} \cdot \cos \left(\frac{2\pi ki}{n} \right),\]

    with the number of bins \(n\), the index of a bin \(i\), the coefficients \(a_{k}\) of the Fourier series and \(k\) as the number of coefficents. The free energy is calculated in the bin center.

    For the free energy the coefficient it is assumed that \(a_{0} = 0\).

    Parameters:
    data_linkstring

    Data link to the pickle data from poreana.sample.Sample.init_diffusion_mc()

    n_diffinteger, optional

    Number of the Fourier coefficients for the diffusion profile

    n_dfinteger, optional

    Number of the Fourier coefficients for the free energy profile

    n_diff_radialinteger, optional

    Number of the Fourier coefficients for the radial diffusion profile

    d0double, optional

    Initial guess of diffusion coefficient \(\left( 10^{-9} \frac{m^2}{s}\right)\)

    is_printbool, optional

    True to print output

    Methods

    __class__

    alias of type

    __delattr__(name, /)

    Implement delattr(self, name).

    __dict__

    __dir__(/)

    Default dir() implementation.

    __doc__

    __eq__(value, /)

    Return self==value.

    __format__(format_spec, /)

    Default object formatter.

    __ge__(value, /)

    Return self>=value.

    __getattribute__(name, /)

    Return getattr(self, name).

    __gt__(value, /)

    Return self>value.

    __hash__(/)

    Return hash(self).

    __init__(data_link[, n_diff, n_df, ...])

    __init_subclass__

    This method is called when a class is subclassed.

    __le__(value, /)

    Return self<=value.

    __lt__(value, /)

    Return self<value.

    __module__

    __ne__(value, /)

    Return self!=value.

    __new__(*args, **kwargs)

    __reduce__(/)

    Helper for pickle.

    __reduce_ex__(protocol, /)

    Helper for pickle.

    __repr__(/)

    Return repr(self).

    __setattr__(name, value, /)

    Implement setattr(self, name, value).

    __sizeof__(/)

    Size of object in memory, in bytes.

    __str__(/)

    Return str(self).

    __subclasshook__

    Abstract classes can override this to customize issubclass().

    __weakref__

    list of weak references to the object (if defined)

    _calc_profile(coeff, basis)

    This function calculates the diffusion and free energy profile over the bins.

    _cosine_model()

    This function sets a Fourier Cosine Series Model for the MC Diffusion Calculation and determines the initialize profiles.

    _create_basis_border()

    This function creates the basis part in every bin of the Fourier series for the diffusion \(\ln \ (D)\).

    _create_basis_center()

    This function creates the basis part of the Fourier series for the free energy and the radial diffusion profile.

    _init_model()

    This function initializes the coefficient list for the Fourier series and the profile list for the free energy and diffusion profile.

    _init_profiles()

    This function initializes the normal diffusion, radial diffusion and free energy profile over the bins.

    Back to top

    © Copyright 2021, Hamzeh Kraus.
    Created using Sphinx 7.4.6.