This commit is contained in:
@@ -38,6 +38,12 @@
|
||||
- 节点反力查询接口。
|
||||
- 接触状态、接触力和接触功查询接口。
|
||||
|
||||
第四版扩展:
|
||||
|
||||
- node-based surface、analytical rigid plane surface 和 contact property 查询/输入子集。
|
||||
- contact pair active-set、gap residual 和 augmented penalty 诊断接口。
|
||||
- contact pair 搜索统计接口,用于 V4.4 搜索/并行性能验收。
|
||||
|
||||
## 3. 接口设计原则
|
||||
|
||||
接口设计遵循:
|
||||
@@ -555,16 +561,132 @@ subroutine fem_get_contact_summary(active_count, work_step, work_total, &
|
||||
end subroutine
|
||||
```
|
||||
|
||||
第四版追加接触诊断查询接口,不改变旧 summary 接口:
|
||||
|
||||
```fortran
|
||||
subroutine fem_get_contact_diagnostics(active_pair_count, &
|
||||
activated_pair_count, &
|
||||
maintained_pair_count, &
|
||||
released_pair_count, &
|
||||
max_gap_residual, max_aug_lambda, ierr)
|
||||
integer, intent(out) :: active_pair_count
|
||||
integer, intent(out) :: activated_pair_count
|
||||
integer, intent(out) :: maintained_pair_count
|
||||
integer, intent(out) :: released_pair_count
|
||||
real(rk), intent(out) :: max_gap_residual
|
||||
real(rk), intent(out) :: max_aug_lambda
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
```
|
||||
|
||||
- `active_pair_count`:最近一次接触力评估中至少有一个激活贡献的 contact pair 数。
|
||||
- `activated_pair_count`:本次由 open 切换为 active 的 pair 数。
|
||||
- `maintained_pair_count`:本次保持 active 的 pair 数。
|
||||
- `released_pair_count`:本次由 active 切换为 open 的 pair 数。
|
||||
- `max_gap_residual`:逐 pair gap 残差最大值,当前定义为最近一次力评估中的最大穿透量。
|
||||
- `max_aug_lambda`:逐 pair augmented penalty 法向乘子最大值。
|
||||
|
||||
第四版 V4.3 起步追加摩擦输出查询接口:
|
||||
|
||||
```fortran
|
||||
subroutine fem_get_contact_friction(work_step, work_total, &
|
||||
max_accumulated_slip, ierr)
|
||||
real(rk), intent(out) :: work_step
|
||||
real(rk), intent(out) :: work_total
|
||||
real(rk), intent(out) :: max_accumulated_slip
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
```
|
||||
|
||||
- `work_step`:最近一次接触评估中的正摩擦耗散功估计。
|
||||
- `work_total`:累计正摩擦耗散功估计。
|
||||
- `max_accumulated_slip`:逐 contact pair 累计滑移最大值。
|
||||
|
||||
V4.3 进一步追加 mortar 积分点级历史统计接口:
|
||||
|
||||
```fortran
|
||||
subroutine fem_get_contact_hist_stats(slot_count, max_slot_slip, &
|
||||
max_slot_work, max_tangent_force, ierr)
|
||||
integer, intent(out) :: slot_count
|
||||
real(rk), intent(out) :: max_slot_slip
|
||||
real(rk), intent(out) :: max_slot_work
|
||||
real(rk), intent(out) :: max_tangent_force
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
```
|
||||
|
||||
- `slot_count`:当前模型内已创建的 mortar 积分点摩擦历史槽数量。
|
||||
- `max_slot_slip`:单个历史槽的最大累计滑移。
|
||||
- `max_slot_work`:单个历史槽的最大累计摩擦功。
|
||||
- `max_tangent_force`:单个历史槽中历史切向力模长最大值。
|
||||
- 当前历史槽键为 `pair + slave element/face + master element/face + point_id`,其中 `point_id` 是该 slave/master facet overlap 内的 mortar 积分点序号。
|
||||
|
||||
V4.4 起步追加 contact pair 搜索统计接口:
|
||||
|
||||
```fortran
|
||||
subroutine fem_get_contact_search_stats(facet_count, master_count, &
|
||||
broad_count, active_count, &
|
||||
bvh_node_count, ierr)
|
||||
integer, intent(out) :: facet_count
|
||||
integer, intent(out) :: master_count
|
||||
integer, intent(out) :: broad_count
|
||||
integer, intent(out) :: active_count
|
||||
integer, intent(out) :: bvh_node_count
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
```
|
||||
|
||||
- `facet_count`:最近一次接触力评估中累计处理的 boundary facet 数;多 contact pair 时按 pair 评估次数累计。
|
||||
- `master_count`:最近一次接触力评估中累计识别的 master facet 数。
|
||||
- `broad_count`:搜索第一遍候选评估次数;全搜索、uniform grid 和 BVH 路径均记录。
|
||||
- `active_count`:候选评估中判定为接触激活的次数。
|
||||
- `bvh_node_count`:最近一次接触力评估累计构建的 BVH 节点数;非 BVH 路径为 0。
|
||||
|
||||
V4.4 追加接触性能计时接口,时间单位为秒,口径为 Fortran `cpu_time`:
|
||||
|
||||
```fortran
|
||||
subroutine fem_get_contact_perf_stats(search_time, force_time, &
|
||||
tangent_time, ierr)
|
||||
real(rk), intent(out) :: search_time
|
||||
real(rk), intent(out) :: force_time
|
||||
real(rk), intent(out) :: tangent_time
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
```
|
||||
|
||||
- `search_time`:最近一次接触状态周期内 contact pair 搜索准备和第一遍候选评估累计 CPU 时间。
|
||||
- `force_time`:最近一次 `contact_apply_plane_forces` 总 CPU 时间。
|
||||
- `tangent_time`:最近一次接触切线装配累计 CPU 时间;若未调用切线装配则为 0。
|
||||
|
||||
V4.4 追加 BVH 局部候选缓存统计接口:
|
||||
|
||||
```fortran
|
||||
subroutine fem_get_contact_cache_stats(used_count, overflow_count, ierr)
|
||||
integer, intent(out) :: used_count
|
||||
integer, intent(out) :: overflow_count
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
```
|
||||
|
||||
- `used_count`:最近一次接触力评估中使用 BVH active 候选缓存施力的 slave facet 数。
|
||||
- `overflow_count`:active 候选数超过固定缓存容量并回退到旧 BVH 遍历施力路径的 slave facet 数。
|
||||
|
||||
Restart 说明:
|
||||
|
||||
- restart 文件格式从 V4.3 起写出为 `FEMLITE_RESTART 2`。
|
||||
- v2 在 DOF、单元状态和高斯点状态之后追加 `CONTACT_HISTORY` 段,用于保存 mortar 积分点摩擦历史槽。
|
||||
- 读入端兼容旧的 v1 文件;若旧文件没有 `CONTACT_HISTORY` 段,则读入时清空当前接触历史。
|
||||
|
||||
第三版当前 contact pair 支持两种配置方式:
|
||||
|
||||
1. INP 文件中的 FemLite 子集:
|
||||
|
||||
```inp
|
||||
*CONTACT PAIR, SLAVE=slave_target, MASTER=master_target, PENALTY=value, DAMPING=value, SEARCH=value, FRICTION=value
|
||||
*CONTACT PAIR, SLAVE=slave_target, MASTER=master_target, PENALTY=value, DAMPING=value, SEARCH=value, FRICTION=value, FRICTION_REGULARIZATION=value, AUGMENT=value
|
||||
```
|
||||
|
||||
- header 式写法中,`SLAVE`、`MASTER` 和 `PENALTY` 为必填参数。
|
||||
- `DAMPING`、`SEARCH` 和 `FRICTION` 为可选参数,未给出时默认为 0。
|
||||
- `DAMPING`、`SEARCH`、`FRICTION`、`FRICTION_REGULARIZATION` 和 `AUGMENT` 为可选参数,未给出时默认为 0。
|
||||
- `SLAVE` 和 `MASTER` 可为 surface 名称、elset 名称、element id 字符串或 `ALL`。
|
||||
- 解析器接受大小写混用、参数等号两侧空格以及单/双引号包裹的名称。
|
||||
|
||||
@@ -575,17 +697,17 @@ end subroutine
|
||||
slave_elset_or_element, face_label
|
||||
*SURFACE, NAME=master_surface, TYPE=ELEMENT
|
||||
master_elset_or_element, face_label
|
||||
*CONTACT PAIR, PENALTY=value, DAMPING=value, SEARCH=value, FRICTION=value
|
||||
*CONTACT PAIR, PENALTY=value, DAMPING=value, SEARCH=value, FRICTION=value, FRICTION_REGULARIZATION=value
|
||||
slave_surface, master_surface
|
||||
```
|
||||
|
||||
- `*SURFACE` 当前支持 `NAME` 参数;`TYPE` 可省略或显式写为 `ELEMENT`,其它 `TYPE` 会作为输入错误拒绝。
|
||||
- `*SURFACE` 当前支持 `TYPE=ELEMENT`、`TYPE=NODE` 和 analytical rigid `PLANE` 子集;`TYPE` 可省略,缺省为 `ELEMENT`。
|
||||
- `OP` 可省略或写为 `ADD` / `NEW`:省略时按 `ADD` 处理;同名 surface 的 `ADD` 会追加数据行,`NEW` 会清除该 surface 已有数据行后重新定义。
|
||||
- surface 可包含多条数据行;每行第一个字段可为 elset 名称或 element id,二者可在同一 surface 中混用。
|
||||
- 第二字段 `face_label` 可省略;省略、`ALL` 或 `EXTERIOR` 表示该 target 的所有候选 facet 均可匹配。
|
||||
- 当前支持 `S1`、`S2` 等面号标签,以及 `F1`、`FACE1` 等等价写法;壳单元支持 `SPOS`/`SNEG` 匹配其当前单一 shell facet。
|
||||
- `SPOS`/`SNEG` 已参与接触计算语义:master surface 的 `SNEG` 会翻转有效接触法向;slave surface 若显式给出 `SPOS`/`SNEG`,候选接触只接受该侧法向朝向 master facet 的组合。
|
||||
- 更完整的 Abaqus surface 变体、surface 操作、node-based surface、analytic rigid surface 和更复杂的数据行变体仍列入后续版本。
|
||||
- 更完整的 Abaqus surface 变体、曲线/球/柱 analytical surface 和更复杂的数据行变体仍列入后续版本。
|
||||
- 数据行式 `*CONTACT PAIR` 的 header 中仍要求 `PENALTY`,slave/master 从下一行读取。
|
||||
|
||||
2. Fortran95 核心数据库接口:
|
||||
@@ -616,6 +738,8 @@ end subroutine
|
||||
- `contact_pair_damping(pair)`:法向阻尼,必须非负。
|
||||
- `contact_pair_search(pair)`:搜索距离,0 表示只按 facet 等效半径过滤。
|
||||
- `contact_pair_friction(pair)`:Coulomb 摩擦系数,必须非负;0 表示无摩擦。
|
||||
- `contact_pair_friction_reg(pair)`:摩擦正则化滑移尺度,必须非负;0 表示经典 Coulomb 截断。
|
||||
- `contact_pair_aug_factor(pair)`:augmented penalty 更新系数,必须非负;0 表示仅使用 penalty。
|
||||
|
||||
当前 contact pair 支持投影裁剪 mortar 形函数积分、多 master facet 面积上限修正、Coulomb 粘滑历史、均匀空间网格候选搜索、OpenMP BVH 宽相搜索和 facet 空间 broad-phase 精筛。
|
||||
|
||||
@@ -627,7 +751,7 @@ end subroutine
|
||||
- `contact_max_penetration`:最近一次接触力评估的最大穿透量。
|
||||
- `contact_force_norm`:最近一次接触力评估的接触力范数累加。
|
||||
|
||||
逐 contact pair 统计保存在 `contact_pair_active/work/max_penetration/force_norm`、`contact_pair_stick_count/slip_count/slip/tangent_force` 数组中,并写入 `contact_XXXXXXXX.csv`。
|
||||
逐 contact pair 统计保存在 `contact_pair_active/work/max_penetration/force_norm`、`contact_pair_status/activation_count/release_count/gap_residual/aug_lambda`、`contact_pair_stick_count/slip_count/slip/tangent_force`、`contact_pair_friction_work/fric_work_total` 数组中,并写入 `contact_XXXXXXXX.csv`。V4.4 起,contact CSV 的 `SUMMARY` 行写出 `search_facets/search_masters/search_candidates/search_active/search_bvh_nodes` 全局搜索统计、`search_cache_used/search_cache_overflow` 缓存统计,以及 `search_cpu_time/contact_force_cpu_time/contact_tangent_cpu_time` 计时统计;逐 `PAIR` 行通过内部 Fortran 查询 `contact_get_pair_stats` 写出对应接触对的搜索、缓存和计时统计。当前 C ABI 只暴露全局 search/perf/cache 统计,pair 级查询先作为 Fortran 内部接口和 CSV 输出提供。
|
||||
|
||||
## 13. 输出控制接口
|
||||
|
||||
@@ -771,3 +895,13 @@ fem_finalize
|
||||
|
||||
- C ABI 暴露静力求解、反力查询和收敛状态查询。
|
||||
- Python 调试接口支持运行静力算例并导出关键位移、反力和残差历史。
|
||||
|
||||
第四版包装层扩展:
|
||||
|
||||
- C ABI 追加 `femlite_get_contact_diagnostics`,返回 active pair 数、activated/maintained/released pair 数、最大 gap residual 和最大 augmented penalty 乘子。
|
||||
- C ABI 追加 `femlite_get_contact_friction_summary`,返回摩擦 step/total 功和最大累计滑移。
|
||||
- C ABI 追加 `femlite_get_contact_history_stats`,返回 mortar 积分点摩擦历史槽数量、单槽最大累计滑移、单槽最大累计摩擦功和单槽最大切向力模长。
|
||||
- C ABI 追加 `femlite_get_contact_search_stats`,返回 contact pair 搜索 facet/master/candidate/active/BVH 节点统计。
|
||||
- C ABI 追加 `femlite_get_contact_perf_stats`,返回 contact search/force/tangent CPU 时间统计。
|
||||
- C ABI 追加 `femlite_get_contact_cache_stats`,返回 BVH 候选缓存使用和溢出统计。
|
||||
- 上述函数只追加新符号,不改变 `femlite_get_contact_summary` 的签名和含义。
|
||||
|
||||
Reference in New Issue
Block a user