Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactoring BCs #253

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

refactoring BCs #253

wants to merge 3 commits into from

Conversation

nathanielmorgan
Copy link
Collaborator

Description

The BCs are now assigned to a solver. An array stores the boundary tag sets for a given physics and solver for maximum efficiency. No if checks required.

Type of change

Please select all relevant options

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Formatting and/or style fixes
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Test A : Regression test
  • Test B :

Test Configuration:

  • OS version: MacOS
  • Hardware: x86
  • Compiler: clang

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • The code builds from scratch with my new changes
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

geometry: x_plane
direction: x_dir
value: 0.0
u: 0.0
v: 0.0
w: 1.0
type: reflected_velocity
velocity_model: reflected_velocity
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should stay type, or we need to make it just model, or just "reflected" for the velocity. Currently, its overprescribed.

Copy link
Collaborator Author

@nathanielmorgan nathanielmorgan Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BC's follow the material definitions in the input. We apply many models to a BC. This allows us to specify many types of models -- thermal, mechanical, etc on a BC. Multi-physics solvers, e.g., thermal-mechanical solvers, will have temperature and displacement conditions on the same boundary. The new input and coding in Fierro supports BC's for multi-physics solvers.

Copy link
Collaborator Author

@nathanielmorgan nathanielmorgan Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

example:
- boundary_condition:
solver_id: 0
geometry: x_plane
direction: x_dir
value: 0.0
displacement_model: fixed_displacement
temperature_model: fixed_temperature

#.... more inputs parameters here ....

Copy link
Collaborator

@Adrian-Diaz Adrian-Diaz Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be less development overhead later to have it work as a vector with
-model1: reflected velocity
-model2: fixed temperature

BTW, the way this works in the MPI solver now is that each FEA module lists its respective BCs. The difficulty there as mentioned is assigning them to the same node sets if we're overloading the same plane for example, but in theory that could be done by allowing references to previously declared geometry objects in previous BCs. Just something to think about.
EDIT: we could also automate checking that the supplied geometry parameters are identical to those in a previous module's BCS; which would be a cheap startup cost given the relatively small module count and geometry parameter set.

Copy link
Collaborator

@jacob-moore22 jacob-moore22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor tweaks to function interfaces, and moving of solver_id to parent class.

Copy link
Collaborator

@jacob-moore22 jacob-moore22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants