AI SummaryViscoelastic3D extends the Basilisk C CFD solver with 3D viscoelastic flow capabilities, providing development guidelines and code structure for computational fluid dynamics researchers and engineers working with complex fluids.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "Viscoelastic3D — Windsurf Rules" prompt rules to my project. Repository: https://github.com/comphy-lab/Viscoelastic3D Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
This is the 3D extension of Basilisk C viscoelastic solver
project structure
├-- basilisk/src/: Core Basilisk CFD library (reference only, do not modify) <- This contains the codebase for Basilisk C--a wrapper around C to do computational fluid dynamics.
Some selected files inside basilisk/src:
│ ├── navier-stokes/centered.h: Main centered Navier-Stokes solver │ ├── navier-stokes/conserving.h: Conservative form solver with VoF momentum advection │ ├── two-phase*.h: Two-phase flow implementations (VoF/Level-set/CLSVOF) │ ├── reduced.h: this implements the reduced gravity approach. │ ├── curvature.h: this implements the curvature module for computing interface properties. │ ├── tension.h: this implements the surface tension force using the Brackbill method. │ ├── integral.h: Integral formulation for surface tension. │ ├── tracer.h: this implements the advection equation for passive tracers. │ ├── diffusion.h: this implements the diffusion equation for passive tracers. │ ├── vof.h: this implements the volume of fluid (VOF) method. │ ├── viscosity.h: this implements the implicit viscous stress solver in Basilisk. │ ├── axi.h: this implements axisymmetric metric so that 2D equations can be extended to axi. ├── postProcess/: Project-specific post-processing tools ├── src-local/: Custom header files extending Basilisk functionality ├── testCases/: Test cases with their own Makefile
Code Style
• Indentation: 2 spaces (no tabs) • Line length: 80 characters max • Documentation: Use markdown in comments starting with /** • Spacing: Space after commas, spaces around operators (+, -) • Files: Core functionality in .h headers, tests in .c files • Naming: Snake_case for variables, camelCase for functions • Error handling: Return values with stderr messages • Documentation: Use detailed header comments with title, features, author, update history • Functions: Document mathematical equations in comments before implementation • Comments: Include TODO notes for future improvements
Build & Test Commands
• Compile: qcc -autolink file.c -o executable -lm • Compile with specific headers: qcc -I$PWD/src-local -autolink file.c -o executable -lm
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts