Add pre-crack and per-particle Dirichlet for BB-PD#1881
Add pre-crack and per-particle Dirichlet for BB-PD#1881alhermann wants to merge 2 commits into4C-multiphysics:mainfrom
Conversation
|
|
||
| // pre-crack line segments: bonds crossing these lines are broken at init | ||
| // format: "x1 y1 x2 y2 ; x3 y3 x4 y4 ; ..." (semicolon-separated segments) | ||
| parameter<std::string>("PRE_CRACKS", |
There was a problem hiding this comment.
The pre-cracks are defined for 2D problems in this version. I wonder if there is an alternative via some plane description to directly account for 3D problems which incorporate the 2D variant automatically?!
There was a problem hiding this comment.
I had the same thought here, if there is a general way ... probably one could define a plane similar than with the open boundaries?
…ynamics
Add two new features to the BB-PD module:
1. PRE_CRACKS input parameter (PARTICLE DYNAMIC/PD section):
Semicolon-separated 2D line segments ("x1 y1 x2 y2 ; ...").
Bonds crossing any segment are broken at initialization,
producing non-zero initial damage near the crack.
2. PDFixedFlag (PDFIXED keyword in PARTICLES section):
Per-particle zero-displacement Dirichlet condition.
Particles with PDFIXED 1 are reset to their reference
position with zero velocity at every time step.
Also fix a crash in VTK restart path resolution when
parent_path() or working directory is empty by guarding
with "." fallback before calling std::filesystem::absolute().
Tested with a minimal 2D input-file test
(particle_sph_2d_pdbody_precrack_fixedflag.4C.yaml, 14 checks).
e999507 to
481de37
Compare
ppraegla
left a comment
There was a problem hiding this comment.
The per particle dirichlet conditions are nice 👍
Please open a separate PR for the changes to the restart.
Also I would have split the pre-cracking and introduction of the new dirichlet condition in separate PRs. But I'm fine with one PR as both address the particle code.
Extracted the per particle dbs into #1895 for better reviewability. |
Description and Context
This PR adds two features to the bond-based peridynamics (BB-PD) module and
includes a minor bugfix in VTK restart path handling.
1. Pre-crack support (
PRE_CRACKS)PARTICLE DYNAMIC/PDsection"x1 y1 x2 y2 ; x3 y3 x4 y4"InitialConnectedBonds, so particles near pre-cracks have non-zero initial damage (pd_damage_phi > 0)2. Per-particle fixed flag (
PDFixedFlag/PDFIXED)Updated (more general) version:
DIRICHLET_FUNCTin particle definitions (e.g.,"TYPE pdphase POS ... DIRICHLET_FUNCT 1")DIRICHLET_FUNCT 1are subject to a Dirichlet boundary condition prescribed byFUNCT13. VTK restart path fix (unrelated to PD, included for convenience)
4C_io_vtk_writer_base.cpp: guards against empty paths increate_restarted_initial_collection_file_mid_section()— the original code passesp_restart.parent_path()andpath_existing_working_directory_directly tostd::filesystem::absolute(), which throws when either is empty (e.g., restart file has no directory component). The fix substitutes"."as fallback.Verification
particle_sph_2d_pdbody_precrack_fixedflag.4C.yaml:pd_damage_phifrom pre-crackRelated Issues and Pull Requests
None.