breakterm Derived Type

type, public, extends(particleterm) :: breakterm

Breakage term class.


Inherits

type~~breakterm~~InheritsGraph type~breakterm breakterm type~particleterm particleterm type~breakterm->type~particleterm type~pbeterm pbeterm type~particleterm->type~pbeterm grid1 grid1 type~pbeterm->grid1 grid type~base base type~pbeterm->type~base

Inherited by

type~~breakterm~~InheritedByGraph type~breakterm breakterm type~pbe pbe type~pbe->type~breakterm break

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: name

object name

character(len=:), public, allocatable :: msg

error message

integer, public :: ierr = 0

error code

logical, public :: inited = .false.

initialization flag

type(grid1), public, pointer :: grid => null()

pointer to grid object

real(kind=rk), public, allocatable :: udot(:)

net rate of change,

integer, public :: moment = 1

moment of conserved during aggregation/breakage

real(kind=rk), public, allocatable :: udot_birth(:)

rate of birth

real(kind=rk), public, allocatable :: udot_death(:)

rate of death


Constructor

public interface breakterm

  • private function breakterm_init(grid, b, d, moment, update_b, update_d, name) result(self)

    Initialize breakterm object. where is the moment of conserved upon breakage. For example, if denotes particle mass or volume, then , whereas if denotes particle radius or diameter, then .

    Arguments

    Type IntentOptional Attributes Name
    type(grid1), intent(in) :: grid

    grid1 object

    procedure(bfnc_t) :: b

    breakage frequency function,

    procedure(dfnc_t) :: d

    daughter distribution function,

    integer, intent(in), optional :: moment

    moment of conserved during breakage (default=1)

    logical, intent(in), optional :: update_b

    if true, is reevaluated at each step (default=true)

    logical, intent(in), optional :: update_d

    if true, is reevaluated at each step (default=true)

    character(len=*), intent(in), optional :: name

    name (default="break-term")

    Return Value type(breakterm)


Type-Bound Procedures

procedure, public, pass(self) :: set_name

  • private pure subroutine set_name(self, name, default)

    Setter method for name.

    Arguments

    Type IntentOptional Attributes Name
    class(base), intent(inout) :: self

    object

    character(len=*), intent(in), optional :: name

    name

    character(len=*), intent(in), optional :: default

    default name

procedure, public, pass(self) :: error_msg

  • private pure subroutine error_msg(self, msg)

    Error method.

    Arguments

    Type IntentOptional Attributes Name
    class(base), intent(inout) :: self

    object

    character(len=*), intent(in) :: msg

    message

procedure, public, pass(self) :: check_inited

  • private pure subroutine check_inited(self)

    Check initialization method.

    Arguments

    Type IntentOptional Attributes Name
    class(base), intent(inout) :: self

    object

procedure, public, pass(self) :: set_grid

  • private subroutine set_grid(self, grid)

    Setter method for grid.

    Arguments

    Type IntentOptional Attributes Name
    class(pbeterm), intent(inout) :: self

    object

    type(grid1), intent(in), target :: grid

    grid1 object

procedure, public, pass(self) :: pbeterm_allocations

  • private pure subroutine pbeterm_allocations(self)

    Allocator for arrays of pbeterm class.

    Arguments

    Type IntentOptional Attributes Name
    class(pbeterm), intent(inout) :: self

    object

procedure, public, pass(self) :: set_moment

  • private pure subroutine set_moment(self, moment)

    Setter method for moment.

    Arguments

    Type IntentOptional Attributes Name
    class(particleterm), intent(inout) :: self

    object

    integer, intent(in) :: moment

    moment of to be preserved upon aggregation/breakage

procedure, public, pass(self) :: particleterm_allocations

  • private pure subroutine particleterm_allocations(self)

    Allocator for arrays of particleterm class.

    Arguments

    Type IntentOptional Attributes Name
    class(particleterm), intent(inout) :: self

    object

procedure, public, pass(self) :: eval => breakterm_eval

  • private pure subroutine breakterm_eval(self, u, y, udot, udot_birth, udot_death)

    Evaluate the rate of breakage at a given instant , using the technique described in Section 3.3 of Kumar and Ramkrishna (1996). The birth term is computed using a slightly different procedure: the summation is done from the perspective of the original particles (the ones that break up), which allows for a simpler and more efficient calculation of the particle split fractions.

    Arguments

    Type IntentOptional Attributes Name
    class(breakterm), intent(inout) :: self

    object

    real(kind=rk), intent(in) :: u(:)

    cell-average number density,

    real(kind=rk), intent(in) :: y(:)

    environment vector,

    real(kind=rk), intent(out), optional :: udot(:)

    net rate of change (birth-death),

    real(kind=rk), intent(out), optional :: udot_birth(:)

    rate of birth

    real(kind=rk), intent(out), optional :: udot_death(:)

    rate of death

Source Code

   type, extends(particleterm) :: breakterm
   !! Breakage term class.
      private
      procedure(bfnc_t), nopass, pointer :: bfnc => null()
         !! breakage frequency function
      procedure(dfnc_t), nopass, pointer :: dfnc => null()
         !! daughter distribution function
      real(rk), allocatable :: b(:)
         !! vector of breakage frequencies
      real(rk), allocatable :: d(:)
         !! vector of daughter probabilities
      logical :: update_b = .true.
         !! flag to select if vector **b** should be updated at each step.
      logical :: empty_b = .true.
         !! flag indicating state of vector **b**.
      logical :: update_d = .true.
         !! flag to select if vector **d** should be updated at each step.
      logical :: empty_d = .true.
         !! flag indicating state of vector **d**.
   contains
      procedure, pass(self), public :: eval => breakterm_eval
      procedure, pass(self), private :: compute_b
      procedure, pass(self), private :: compute_d
   end type breakterm