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

Different Boundary Conditions for Standard Abaqus #1799

Merged
merged 78 commits into from
Jan 25, 2024

Conversation

DanielDoehring
Copy link
Contributor

@DanielDoehring DanielDoehring commented Jan 5, 2024

This PR aims to be able to use meshes in Abaqus format with different treatment for the boundaries.
This is especially useful if you have meshes coming from tools such as gmsh which allow specification of physical boundaries, based on which boundary conditions can be specified.

I plan to add a tutorial in the docs if this is merged.

I am not sure if we want to keep the parser helper functions in the p4est_mesh.jl file or if they should live somewhere else.

For illustration, here is $v_x$ of the airfoil example alongside the mesh:

NACA_v1

Copy link
Contributor

github-actions bot commented Jan 5, 2024

Review checklist

This checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging.

Purpose and scope

  • The PR has a single goal that is clear from the PR title and/or description.
  • All code changes represent a single set of modifications that logically belong together.
  • No more than 500 lines of code are changed or there is no obvious way to split the PR into multiple PRs.

Code quality

  • The code can be understood easily.
  • Newly introduced names for variables etc. are self-descriptive and consistent with existing naming conventions.
  • There are no redundancies that can be removed by simple modularization/refactoring.
  • There are no leftover debug statements or commented code sections.
  • The code adheres to our conventions and style guide, and to the Julia guidelines.

Documentation

  • New functions and types are documented with a docstring or top-level comment.
  • Relevant publications are referenced in docstrings (see example for formatting).
  • Inline comments are used to document longer or unusual code sections.
  • Comments describe intent ("why?") and not just functionality ("what?").
  • If the PR introduces a significant change or new feature, it is documented in NEWS.md.

Testing

  • The PR passes all tests.
  • New or modified lines of code are covered by tests.
  • New or modified tests run in less then 10 seconds.

Performance

  • There are no type instabilities or memory allocations in performance-critical parts.
  • If the PR intent is to improve performance, before/after time measurements are posted in the PR.

Verification

  • The correctness of the code was verified using appropriate tests.
  • If new equations/methods are added, a convergence test has been run and the results
    are posted in the PR.

Created with ❤️ by the Trixi.jl community.

@DanielDoehring DanielDoehring added the enhancement New feature or request label Jan 5, 2024
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (1946f9d) 96.34% compared to head (453c275) 82.69%.
Report is 2 commits behind head on main.

Files Patch % Lines
src/meshes/p4est_mesh.jl 96.51% 3 Missing ⚠️
src/solvers/dgsem_p4est/dg_2d_parabolic.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1799       +/-   ##
===========================================
- Coverage   96.34%   82.69%   -13.65%     
===========================================
  Files         450      451        +1     
  Lines       35938    35923       -15     
===========================================
- Hits        34622    29704     -4918     
- Misses       1316     6219     +4903     
Flag Coverage Δ
unittests 82.69% <96.08%> (-13.65%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

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

Sounds nice! I will let others review the internal code - I just had a quick look at the elixirs

examples/p4est_2d_dgsem/elixir_euler_airfoil_mach2.jl Outdated Show resolved Hide resolved
examples/p4est_2d_dgsem/elixir_euler_airfoil_mach2.jl Outdated Show resolved Hide resolved
Copy link
Member

@efaulhaber efaulhaber left a comment

Choose a reason for hiding this comment

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

Looking good, but I didn't take a super close look at the parsing stuff.

NEWS.md Outdated Show resolved Hide resolved
src/meshes/p4est_mesh.jl Show resolved Hide resolved
src/meshes/p4est_mesh.jl Outdated Show resolved Hide resolved
Copy link
Member

@andrewwinters5000 andrewwinters5000 left a comment

Choose a reason for hiding this comment

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

This is a very nice new feature to expand the usability of the p4est solver. I left a few questions for clarification. It makes sense to me to keep the helper parsing functions for the mesh files in p4est_mesh.jl, but if we are worried about the length of that source file we can split it apart.

examples/p4est_2d_dgsem/elixir_euler_airfoil_mach2.jl Outdated Show resolved Hide resolved
examples/p4est_2d_dgsem/elixir_euler_airfoil_mach2.jl Outdated Show resolved Hide resolved
examples/p4est_2d_dgsem/elixir_euler_airfoil_mach2.jl Outdated Show resolved Hide resolved
examples/p4est_2d_dgsem/elixir_euler_airfoil_mach2.jl Outdated Show resolved Hide resolved
examples/p4est_2d_dgsem/elixir_euler_airfoil_mach2.jl Outdated Show resolved Hide resolved
src/meshes/p4est_mesh.jl Show resolved Hide resolved
src/meshes/p4est_mesh.jl Outdated Show resolved Hide resolved
src/meshes/p4est_mesh.jl Outdated Show resolved Hide resolved
src/meshes/p4est_mesh.jl Outdated Show resolved Hide resolved
src/meshes/p4est_mesh.jl Outdated Show resolved Hide resolved
@DanielDoehring
Copy link
Contributor Author

Looking good, but I didn't take a super close look at the parsing stuff.

I also suspect that you can relatively easy construct .inp files for which the current parsers do not return the right thing. There might be some actual usage required to ultimately converge to a robust implementation.

@DanielDoehring
Copy link
Contributor Author

@jmark Thanks for the valuable suggestions!

Copy link
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

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

Thanks a lot! I just have very minor comments. Nice job 👍

docs/literate/src/files/p4est_from_gmsh.jl Outdated Show resolved Hide resolved
docs/literate/src/files/p4est_from_gmsh.jl Show resolved Hide resolved
docs/literate/src/files/p4est_from_gmsh.jl Outdated Show resolved Hide resolved
src/meshes/p4est_mesh.jl Outdated Show resolved Hide resolved
@ranocha ranocha requested a review from jmark January 23, 2024 15:01
@ranocha ranocha enabled auto-merge (squash) January 23, 2024 15:10
@sloede
Copy link
Member

sloede commented Jan 24, 2024

@jmark Once you approve this PR, it should get auto-merged (assuming that all your comments have been addressed)

@DanielDoehring
Copy link
Contributor Author

@jmark Once you approve this PR, it should get auto-merged (assuming that all your comments have been addressed)

I guess codecov is preventing this, right?

@JoshuaLampert
Copy link
Member

codecov is not a required status check.

@DanielDoehring
Copy link
Contributor Author

codecov is not a required status check.

Ah, did we change this some time? But coveralls is still required?

@JoshuaLampert
Copy link
Member

codecov is not a required status check.

Ah, did we change this some time? But coveralls is still required?

Yes, coveralls is required. Maybe this was changed because of the problems codecov made in TrixiShallowWater.jl? I don't remember if it was required before.

@ranocha
Copy link
Member

ranocha commented Jan 24, 2024

Yes, only coveralls is required becaucse of some issues. This PR isn't merged yet since @jmark has to approve it, too (after requesting changes earlier).

@ranocha ranocha merged commit 585fb93 into trixi-framework:main Jan 25, 2024
33 of 35 checks passed
@DanielDoehring DanielDoehring deleted the BCs_for_Standard_Abaqus branch January 25, 2024 09:38
@DanielDoehring DanielDoehring restored the BCs_for_Standard_Abaqus branch January 25, 2024 09:38
@DanielDoehring DanielDoehring deleted the BCs_for_Standard_Abaqus branch January 25, 2024 09:39
@torrilhon torrilhon mentioned this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants