Skip to content

Comments

Add AdvancedMDBC option for dynamic boundary handling#167

Open
AhmedSalih3d wants to merge 1 commit intocodex/refactor-to-avoid-if-statementfrom
codex/update-mdbc-for-advancedmdbc-option
Open

Add AdvancedMDBC option for dynamic boundary handling#167
AhmedSalih3d wants to merge 1 commit intocodex/refactor-to-avoid-if-statementfrom
codex/update-mdbc-for-advancedmdbc-option

Conversation

@AhmedSalih3d
Copy link
Owner

Motivation

  • Introduce a more advanced dynamic-boundary condition mode that follows the provided images and enables improved numerical handling, pressure cloning and no-slip style velocity correction for MDBC ghost nodes.
  • Allow simulations to select the new mode through the existing SimulationMetaData type so examples and callers can opt in without breaking existing SimpleMDBC behaviour.

Description

  • Add a new AdvancedMDBC type and export it alongside existing MDBC modes by extending SimulationMetaDataConfiguration and SPHExample with AdvancedMDBC and the export list (AdvancedMDBC).
  • Provide a LoadMDBCNormals! overload for AdvancedMDBC in PreProcess.jl so ghost points and normals are populated from CSV in the same way as SimpleMDBC via LoadBoundaryNormals.
  • Implement advanced MDBC neighbour accumulation and correction steps in SPHCellList.jl by adding NeighborLoopMDBCAdvanced!, ApplyMDBCBeforeHalf! for AdvancedMDBC, and ApplyMDBCCorrectionAdvanced which performs numerical checks (kernel sum, matrix determinant/condition), selects a shepherd fallback, computes boundary pressure/density, and applies a no-slip-like velocity correction.
  • Make density-limiter behaviour mode-aware by extending LimitDensityAtBoundary! in SimulationEquations.jl to accept an MDBCMode or SimulationMetaData and skip clamping for AdvancedMDBC, and wire conditional calls to the advanced MDBC apply function in the main time-stepping path in SPHCellList.jl.
  • Update README.md to document the new AdvancedMDBC() option and its high-level behaviour.

Testing

  • No automated tests were executed for these changes; only static code inspection and local edits were performed.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant