Skip to content

Example: patient aorta CFD, Gridap vs HyperFEMKernels - #3

Open
jmartfrut wants to merge 1 commit into
mainfrom
example-aorta-cfd
Open

jmartfrut wants to merge 1 commit into
mainfrom
example-aorta-cfd

Conversation

@jmartfrut

Copy link
Copy Markdown
Contributor

Adds examples/aorta_cfd/: a self-contained extract of hemodynamics/examples/patient_aorta/flow.jl. It covers incompressible Navier–Stokes with Oseen–BDF2 time stepping, Taylor–Hood P2–P1 elements with SUPG/PSPG/LSIC stabilization, backflow stabilization and Windkessel (Robin) outlets, on the coarse patient mesh (99 141 DOFs). The same weak form is assembled with Gridap and with KernelOperator.

  • aorta_flow.jl modes: compare (both assemblies every step, with relative differences and timings), gridap, kernel
  • test/test_cfd.jl: the same weak form on a small tetrahedral channel, against Gridap at 1e-12. It covers backward Euler and BDF2, the linear system with lifted Dirichlet values, data overwritten in place between steps, and update (16 tests)
  • dev/prof_cfd.jl: time breakdown per compiled group (auxiliary data vs element kernels)

Our measurement (Mac, 18 threads): matrix and vector equal to Gridap's within ~2e-16, with no fallback. Assembly takes 4.48 s with Gridap, 0.37 s with the kernel on 18 threads (×12) and 3.0 s on 1 thread (×1.5). A full step is about ×3 faster, and LU now dominates. On 1 thread, the volume Jacobian takes the dual-number path because the SUPG terms are products of auxiliary inputs.


Generated by Claude Code

…/LSIC, Windkessel) assembled with Gridap and HyperFEMKernels; test_cfd.jl

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015yYpiif3W74pG5gVuyGq4o
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.

2 participants