aggterm Derived Type

type, public, extends(particleterm) :: aggterm

Aggregation term class.


Inherits

type~~aggterm~~InheritsGraph type~aggterm aggterm type~combarray combarray type~aggterm->type~combarray array_comb type~particleterm particleterm type~aggterm->type~particleterm type~spmatrix spmatrix type~aggterm->type~spmatrix a type~pbeterm pbeterm type~particleterm->type~pbeterm grid1 grid1 type~pbeterm->grid1 grid type~base base type~pbeterm->type~base

Inherited by

type~~aggterm~~InheritedByGraph type~aggterm aggterm type~pbe pbe type~pbe->type~aggterm agg

Contents

Source Code


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 aggterm

  • private function aggterm_init(grid, a, moment, update_a, name) result(self)

    Initialize aggterm object. where is the moment of conserved upon aggregation. 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(afnc_t) :: a

    aggregation frequency function,

    integer, intent(in), optional :: moment

    moment of conserved during aggregation (default=1)

    logical, intent(in), optional :: update_a

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

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

    name (default="agg-term")

    Return Value type(aggterm)


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 => aggterm_eval

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

    Evaluate rate of aggregation at a given instant .

    Arguments

    Type IntentOptional Attributes Name
    class(aggterm), 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) :: aggterm
   !! Aggregation term class.
      private
      procedure(afnc_t), nopass, pointer :: afnc => null()
         !! aggregation frequency function
      type(spmatrix) :: a
         !! matrix of aggregation frequencies
      type(combarray), allocatable :: array_comb(:)
         !! array of particle combinations and weights for birth term
      logical :: update_a = .true.
         !! flag to select if matrix **a** should be updated at each step.
      logical :: empty_a = .true.
         !! flag indicating state of matrix **a**.
   contains
      procedure, pass(self), public :: eval => aggterm_eval
      procedure, pass(self), private :: compute_combinations
      procedure, pass(self), private :: compute_a
   end type aggterm