fraggle Module

  • The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott
  • 90 statements
  • Source File

Definition of classes and methods specific to Fraggle: Fragment generation that conserves angular momentum (L) and energy (E)


Uses

  • module~~fraggle~~UsesGraph module~fraggle fraggle module~swiftest swiftest module~fraggle->module~swiftest globals globals module~swiftest->globals module~encounter encounter module~swiftest->module~encounter module~collision collision module~swiftest->module~collision module~lambda_function lambda_function module~swiftest->module~lambda_function module~base base module~swiftest->module~base module~walltime walltime module~swiftest->module~walltime module~netcdf_io netcdf_io module~swiftest->module~netcdf_io module~operators operators module~swiftest->module~operators module~io_progress_bar io_progress_bar module~swiftest->module~io_progress_bar module~solver solver module~swiftest->module~solver module~encounter->globals module~encounter->module~base module~encounter->module~netcdf_io module~collision->globals module~collision->module~encounter module~collision->module~base module~lambda_function->globals module~base->globals module~coarray coarray module~base->module~coarray module~walltime->globals module~walltime->module~base module~netcdf_io->globals module~netcdf_io->module~base module~operators->globals module~io_progress_bar->globals module~io_progress_bar->module~base module~solver->globals module~solver->module~lambda_function module~solver->module~base ieee_exceptions ieee_exceptions module~solver->ieee_exceptions module~coarray->globals

Used by

  • module~~fraggle~~UsedByGraph module~fraggle fraggle module~s_symba_util s_symba_util module~s_symba_util->module~fraggle module~s_fraggle_generate s_fraggle_generate module~s_fraggle_generate->module~fraggle module~s_swiftest_util s_swiftest_util module~s_swiftest_util->module~fraggle module~s_fraggle_util s_fraggle_util module~s_fraggle_util->module~fraggle

Contents


Variables

TypeVisibilityAttributesNameInitial
real(kind=DP), public :: Mrat
real(kind=DP), public :: Mslr
integer(kind=I4B), public, parameter:: NFRAGMIN =iMrem+2
integer(kind=I4B), public, parameter:: iMlr =1
integer(kind=I4B), public, parameter:: iMrem =3
integer(kind=I4B), public, parameter:: iMslr =2
integer(kind=I4B), public :: nfrag

Interfaces

interface

  • public module module subroutine fraggle_generate(self, nbody_system, param, t)

    Arguments

    TypeIntentOptionalAttributesName
    class(collision_fraggle), intent(inout) :: self

    Fraggle fragment system object

    class(base_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(base_parameters), intent(inout) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: t

    The time of the collision

interface

  • public module module subroutine fraggle_generate_disrupt(self, nbody_system, param, t, lfailure)

    Arguments

    TypeIntentOptionalAttributesName
    class(collision_fraggle), intent(inout) :: self

    Fraggle system object

    class(base_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(base_parameters), intent(inout) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: t

    Time of collision

    logical, intent(out) :: lfailure

    True if Fraggle could not satisfy all constraints.

interface

  • public module module subroutine fraggle_generate_hitandrun(self, nbody_system, param, t)

    Arguments

    TypeIntentOptionalAttributesName
    class(collision_fraggle), intent(inout) :: self

    Fraggle system object

    class(base_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(base_parameters), intent(inout) :: param

    Current run configuration parameters with SyMBA additions

    real(kind=DP), intent(in) :: t

    Time of collision

interface

  • public module module subroutine fraggle_generate_merge(self, nbody_system, param, t)

    Arguments

    TypeIntentOptionalAttributesName
    class(collision_fraggle), intent(inout) :: self

    Fraggle system object

    class(base_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(base_parameters), intent(inout) :: param

    Current run configuration parameters

    real(kind=DP), intent(in) :: t

    The time of the collision

interface

  • public module module subroutine fraggle_generate_pos_vec(collider, nbody_system, param, lfailure)

    Arguments

    TypeIntentOptionalAttributesName
    class(collision_fraggle), intent(inout) :: collider

    Fraggle collision system object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

    logical, intent(out) :: lfailure

    Did the velocity computation fail?

interface

  • public module module subroutine fraggle_generate_rot_vec(collider, nbody_system, param)

    Arguments

    TypeIntentOptionalAttributesName
    class(collision_fraggle), intent(inout) :: collider

    Collision system object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

interface

  • public module module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailure)

    Arguments

    TypeIntentOptionalAttributesName
    class(collision_fraggle), intent(inout) :: collider

    Fraggle collision system object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

    logical, intent(out) :: lfailure

    Did the velocity computation fail?

interface

  • public module module subroutine fraggle_util_restructure(self, nbody_system, param, lfailure)

    Arguments

    TypeIntentOptionalAttributesName
    class(collision_fraggle), intent(inout) :: self

    Fraggle collision system object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

    class(swiftest_parameters), intent(inout) :: param

    Current run configuration parameters

    logical, intent(out) :: lfailure

    Did the computation fail?

interface

  • public module module subroutine fraggle_util_set_mass_dist(self, param)

    Arguments

    TypeIntentOptionalAttributesName
    class(collision_fraggle), intent(inout) :: self

    Fraggle collision object

    class(swiftest_parameters), intent(in) :: param

    Current Swiftest run configuration parameters

interface

  • public module module function fraggle_util_sfd_function(x) result(y)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=DP), intent(in) :: x

    Return Value real(kind=DP)


Derived Types

type, public, extends(collision_basic) :: collision_fraggle

Components

TypeVisibilityAttributesNameInitial
real(kind=DP), public :: Escale =1.0_DP

Angular momentum scale factor (a convenience unit that is derived from dscale, tscale, and mscale)

real(kind=DP), public, dimension(NDIM,2):: L_orbit

Before/after rotational angular momentum

real(kind=DP), public, dimension(NDIM,2):: L_rot

Before/after total nbody_system angular momentum

real(kind=DP), public, dimension(NDIM,2):: L_total

Before/after orbital kinetic energy

real(kind=DP), public :: Lscale =1.0_DP

Before/after orbital angular momentum fers to the entire n-body system in its pre-collisional state and index 2 refers to the system in its post-collisional state

class(base_nbody_system), public, allocatable:: after

Status flag to pass to the collision list once the collision has been resolved

real(kind=DP), public, dimension(2):: be

Before/after total system energy

class(base_nbody_system), public, allocatable:: before

A snapshot of the subset of the nbody_system containing products of the collision

integer(kind=I4B), public :: collision_id

The current maximum collision id number

real(kind=DP), public :: dscale =1.0_DP

Mass scale factor

real(kind=DP), public :: fail_scale

Scale factor to apply to distance values in the position model when overlaps occur.

class(collision_fragments), public, allocatable:: fragments

Object containing information on the post-collision system

class(collision_impactors), public, allocatable:: impactors

A snapshot of the subset of the nbody_system involved in the collision

real(kind=DP), public, dimension(2):: ke_orbit

Before/after rotational kinetic energy

real(kind=DP), public, dimension(2):: ke_rot

Before/after potential energy

real(kind=DP), public :: max_rot =0.0_DP

Distance dimension scale factor

integer(kind=I4B), public :: maxid_collision =0

Minimum fragment mass

real(kind=DP), public :: min_mfrag =0.0_DP

Maximum rotation rate (in system or natural units, depending on )

real(kind=DP), public :: mscale =1.0_DP

Time scale factor

real(kind=DP), public, dimension(2):: pe

Before/after binding energy

integer(kind=I4B), public :: status

ID number of this collision event

real(kind=DP), public, dimension(2):: te
real(kind=DP), public :: tscale =1.0_DP

Velocity scale factor (a convenience unit that is derived from dscale and tscale)

real(kind=DP), public :: vscale =1.0_DP

Energy scale factor (a convenience unit that is derived from dscale, tscale, and mscale)

Type-Bound Procedures

procedure, public :: add_fragments => collision_util_add_fragments_to_collider

Add fragments to nbody_system

procedure, public :: dealloc => collision_util_dealloc_basic

Deallocates all allocatables

procedure, public :: disrupt => fraggle_generate_disrupt

Generates a system of fragments in barycentric coordinates that conserves energy and momentum.

procedure, public :: generate => fraggle_generate

A simple disruption models that does not constrain energy loss in collisions

procedure, public :: get_energy_and_momentum => collision_util_get_energy_and_momentum

Calculates total nbody_system energy in either the pre-collision outcome state (lbefore = .true.) or the post-collision outcome state (lbefore = .false.)

procedure, public :: get_regime => collision_regime_collider

Determine which fragmentation regime the set of impactors will be

procedure, public :: hitandrun => fraggle_generate_hitandrun

Generates either a pure hit and run, or one in which the runner is disrupted

procedure, public :: merge => fraggle_generate_merge

Merges bodies unless the rotation would be too high, then it switches to pure hit and run.

procedure, public :: restructure => fraggle_util_restructure

Restructures the fragment distribution after a failure to converge on a solution

procedure, public :: set_coordinate_system => collision_util_set_coordinate_collider

Sets the coordinate system of the collisional system

procedure, public :: set_mass_dist => fraggle_util_set_mass_dist

Sets the distribution of mass among the fragments depending on the regime type

procedure, public :: set_natural_scale => collision_util_set_natural_scale_factors

Scales dimenional quantities to ~O(1) with respect to the collisional system.

procedure, public :: set_original_scale => collision_util_set_original_scale_factors

Restores dimenional quantities back to the original system units

procedure, public :: setup => collision_util_setup_collider

Initializer for the encounter collision system and the before/after snapshots

procedure, public :: setup_fragments => collision_util_setup_fragments_collider

Initializer for the fragments of the collision system.

procedure, public :: setup_impactors => collision_util_setup_impactors_collider

Initializer for the impactors for the encounter collision system. Deallocates old impactors before creating new ones