fluid integration
概述
fluid_integration定义并实现了弱可压流体(WCSPH)的两阶段时间推进算子:第一半步(动量/压力力)与第二半步(连续性/密度)。 fluid_integration.h声明类与模板类型,fluid_integration.hpp提供具体实现。
辅助类
DataDelegateContact:定义在base_particle_dynamics.h。接受BaseContactRelation对象作为构造函数参数。具有contact_relation_成员,提取其所有接触对象、接触对象的粒子、接触对象的配置。
InteractionWithWall:定义在base_fluid_dynamics.h。类模板。继承于BaseInteractionType<DataDelegateContact>。接受BaseContactRelation对象contact_relation_作为构造函数参数。先用contact_relation_初始化基类。在构造函数体中,获取每一个contact body的base_material_,将其dynamic_cast为Solid类型对象,然后提取其平均速度、加速度、法方向、体积。
核心类与关系
LocalDynamics(来自base_local_dynamics.h)所有局部动力学的基类,持有
SPHBody与粒子变量访问接口。
FluidInitialCondition : LocalDynamics用于初始化流体粒子的 Position、Velocity。
ContinuumVolumeUpdate : LocalDynamics根据质量和密度更新体积 Vol = Mass / rho。
BaseIntegration<DataDelegationType> : LocalDynamics, DataDelegationType通用基类,绑定关系(
Inner/Contact),抓取/注册通用状态:Vol, rho, mass, p, drho_dt, pos, vel, force, force_prior引用材料 Fluid。
模板
Integration1stHalf。第一半步(动量方程、压力梯度力、人工耗散),更新速度;同时半步更新位置与压力。可以指定是否要修正核函数。模板
Integration1stHalf<Inner<>, RiemannSolverType, KernelCorrectionType>。使用核修正correction_与RiemannSolver计算内邻域压力力。包括实例
using Integration1stHalfInnerNoRiemann = Integration1stHalf<Inner<>, NoRiemannSolver, NoKernelCorrection>;实例
using Integration1stHalfInnerRiemann = Integration1stHalf<Inner<>, AcousticRiemannSolver, NoKernelCorrection>;实例
using Integration1stHalfCorrectionInnerRiemann = Integration1stHalf<Inner<>, AcousticRiemannSolver, LinearGradientCorrection>;
模板
Integration1stHalf<Contact<Wall>, RiemannSolverType, KernelCorrectionType>。继承于InteractionWithWall<BaseIntegration>。处理墙接触,基于墙面平均加速度与镜像压力p_j_in_wall。Integration1stHalf<Contact<>, RiemannSolverType, KernelCorrectionType>。处理与其它流体体的接触,逐接触体保存各自的KernelCorrection与RiemannSolver。壁面+流体复合模板
using Integration1stHalfWithWall = ComplexInteraction<Integration1stHalf<Inner<>, Contact<Wall>>, RiemannSolverType, KernelCorrectionType>;。有内部交互,也有流体与壁面交互。实例
using Integration1stHalfWithWallNoRiemann = Integration1stHalfWithWall<NoRiemannSolver, NoKernelCorrection>;。实例
using Integration1stHalfWithWallRiemann = Integration1stHalfWithWall<AcousticRiemannSolver, NoKernelCorrection>;。实例
using Integration1stHalfCorrectionWithWallRiemann = Integration1stHalfWithWall<AcousticRiemannSolver, LinearGradientCorrection>;。实例
using Integration1stHalfCorrectionForOpenBoundaryFlowWithWallRiemann = Integration1stHalfWithWall<AcousticRiemannSolver, LinearGradientCorrectionWithBulkScope>;。
壁面+流体+多相实例
MultiPhaseIntegration1stHalfWithWallRiemann = ComplexInteraction<Integration1stHalf<Inner<>, Contact<>, Contact<Wall>>, AcousticRiemannSolver, NoKernelCorrection>。有内部交互,也有流体与壁面交互,还包括多相之间的交互。
模板
Integration2ndHalf。第二半步(连续性方程,速度散度引起的密度变化),更新密度;同时半步更新位置。不修正核函数。模板
Integration2ndHalf<Inner<>, RiemannSolverType>。根据速度跳跃u_jump累积drho_dt与压力耗散力。实例
using Integration2ndHalfInnerRiemann = Integration2ndHalf<Inner<>, AcousticRiemannSolver>;实例
using Integration2ndHalfInnerNoRiemann = Integration2ndHalf<Inner<>, NoRiemannSolver>;实例
using Integration2ndHalfInnerDissipativeRiemann = Integration2ndHalf<Inner<>, DissipativeRiemannSolver>;
模板
Integration2ndHalf<Contact<Wall>, RiemannSolverType>。使用墙面平均速度与法向,镜像速度参与散度与耗散计算。模板
Integration2ndHalf<Contact<>, RiemannSolverType>。与其它流体体的平均速度与速度跳跃计算drho_dt与耗散。壁面+流体复合模板
using Integration2ndHalfWithWall = ComplexInteraction<Integration2ndHalf<Inner<>, Contact<Wall>>, RiemannSolverType>;。实例
using Integration2ndHalfWithWallNoRiemann = Integration2ndHalfWithWall<NoRiemannSolver>;实例
using Integration2ndHalfWithWallRiemann = Integration2ndHalfWithWall<AcousticRiemannSolver>;
壁面+流体+多相实例
using MultiPhaseIntegration2ndHalfWithWallRiemann = ComplexInteraction<Integration2ndHalf<Inner<>, Contact<>, Contact<Wall>>, AcousticRiemannSolver>;。
Last updated
Was this helpful?