flowterm Derived Type

type, public, extends(pbeterm) :: flowterm

Flow term class.


Inherits

type~~flowterm~~InheritsGraph type~flowterm flowterm type~pbeterm pbeterm type~flowterm->type~pbeterm grid1 grid1 type~pbeterm->grid1 grid type~base base type~pbeterm->type~base

Inherited by

type~~flowterm~~InheritedByGraph type~flowterm flowterm type~pbe pbe type~pbe->type~flowterm flow

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,


Constructor

public interface flowterm

  • private function flowterm_init(grid, name) result(self)

    Initialize flowterm object.

    Arguments

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

    grid1 object

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

    name (default="growth-term")

    Return Value type(flowterm)


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) :: eval => flowterm_eval

  • private pure subroutine flowterm_eval(self, u, uin, qin, qout, v, vdot, udot)

    Evaluate rate of change due to flow at a given instant .

    Arguments

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

    object

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

    cell-average number density,

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

    inlet cell-average number density,

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

    inlet flowrate,

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

    outlet flowrate,

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

    system volume,

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

    volume derivative,

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

    net rate of change,

Source Code

   type, extends(pbeterm) :: flowterm
   !! Flow term class.
      private
      procedure(uinfnc_t), nopass, pointer :: uinfnc => null()
         !! inlet number density function
   contains
      procedure, pass(self), public :: eval => flowterm_eval
   end type flowterm