spx_float_object Module

浮体粒子集模块



Contents


Derived Types

type, public ::  float_object_type

浮体刚体粒子集数据结构

Components

Type Visibility Attributes Name Initial
integer, public :: istart

浮体粒子集的索引

integer, public :: iend

浮体粒子集的索引

real(kind=rk), public :: mass(2)

浮体质量、转动惯量Izz

real(kind=rk), public :: loc(2)

浮体质心

real(kind=rk), public :: vel(2)

浮体速度

real(kind=rk), public :: acc(2)

浮体加速度

real(kind=rk), public :: ang_vel

浮体角速度

real(kind=rk), public :: ang_acc

浮体角加速度

Type-Bound Procedures

procedure , public , :: update_particle_step Subroutine
procedure , public , :: update_particle_init Subroutine
procedure , public , :: get_acc Subroutine
procedure , public , :: init Subroutine

Functions

private pure function cross_product_local(a, b) result(c)

简单叉乘, 2 维叉乘

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(2) :: a
real(kind=rk), intent(in), dimension(2) :: b

Return Value real(kind=rk)

private pure function cross_product_local2(a, b) result(c)

简单叉乘 2, @tocheck \( \omega \cdot r \)

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: a
real(kind=rk), intent(in), dimension(2) :: b

Return Value real(kind=rk), dimension(2)


Subroutines

private pure subroutine init(self, particle, istart, iend)

初始化浮体的质量、质心、转动惯量、速度、角速度

Arguments

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

浮体粒子集

type(particle_type), intent(in) :: particle

区域

integer, intent(in) :: istart

浮体粒子集的索引

integer, intent(in) :: iend

浮体粒子集的索引

private pure subroutine get_acc(self, particles)

获取浮体受力,更新浮体的加速度

Read more…

Arguments

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

浮体粒子集

type(particle_type), intent(in) :: particles

区域

private pure subroutine update_particle_init(self, particles, dt)

初始化leapfrog算法,基于加速度,推进速度半步长

Read more…

Arguments

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

浮体粒子集

type(particle_type), intent(inout) :: particles

区域

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

时间步长

private pure subroutine update_particle_step(self, particles, dt)

更新粒子, 速度比位移、加速度快半步长

Arguments

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

浮体粒子集

type(particle_type), intent(inout) :: particles

区域

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

时间步长