# Open Source Software for Seastead Wave Simulation ## Executive Summary Given your specific requirements—partially submerged NACA foil legs, high accuracy needs, GPU availability, and desire for visualization—here's my recommendation: **Primary Choice: DualSPHysics** **Secondary Choice: Chrono::FSI with SPH** Capytain/MoorDyn and WEC-Sim should be deprioritized due to BEM limitations with your partially submerged foils. --- ## Software Comparison Table | Software | Method | GPU Support | Learning Curve | Accuracy for Your Case | Setup Time | |----------|--------|-------------|----------------|------------------------|-------------| | **DualSPHysics** | SPH | Excellent (CUDA/OpenCL) | Medium | ✅ Excellent | 1-2 weeks | | **Chrono::FSI** | SPH + Multi-body | Moderate (CUDA) | High | ✅ Excellent | 3-4 weeks | | **OpenFOAM** | CFD (VOF) | Moderate | Very High | ✅ Excellent | 4-8 weeks | | **Capytain** | BEM | None | Low | ⚠️ Limited | 1-2 weeks | | **MoorDyn** | Mooring only | None | Low | ✅ Good (with BEM) | 1-2 weeks | | **WEC-Sim** | BEM + Multi-body | Moderate | Medium | ⚠️ Limited | 2-3 weeks | | **HAMS** | BEM | None | Low | ⚠️ Limited | 1 week | | **Blender** | N/A | GPU | Low | ❌ Not engineering | N/A | --- ## Detailed Analysis ### 1. DualSPHysics **Best for your needs** due to SPH method handling partially submerged bodies well. **Pros:** - True Smoothed Particle Hydrodynamics—excellent for free surface flows - Native GPU acceleration (CUDA/OpenCL)—your GPU will be fully utilized - Handles complex geometries without mesh generation issues - Excellent for bodies that emerge/submerge dynamically - Open source (GPL v3) - Active development community - ParaView integration for visualization **Cons:** - Particle methods require many particles for accuracy (computational cost) - Setting up fluid-structure coupling requires work - Less mature than some alternatives **Accuracy for your case:** ✅ **Excellent** - SPH naturally handles the free surface boundary conditions you need - No linearization assumptions—captures nonlinear wave effects - Can model wave breaking and splash-up **Estimated setup time with Claude Code:** 1-2 weeks to first meaningful simulation **Scriptability:** Python API available, JSON configuration files --- ### 2. Chrono::FSI **Strong option if you want integrated multi-body dynamics.** **Pros:** - Combines SPH fluid solver with Chrono's multi-body dynamics - Can model your entire structure including joints/constraints - GPU support via CUDA - Well-documented multi-body dynamics engine - Can couple with other physics (ropes, impacts) **Cons:** - More complex overall system - SPH implementation newer than DualSPHysics - Documentation can be sparse for FSI specifically - Steeper learning curve for fluid-structure coupling **Accuracy for your case:** ✅ **Excellent** **Estimated setup time with Claude Code:** 3-4 weeks to first meaningful simulation --- ### 3. OpenFOAM **Industry-standard CFD but overkill for your needs.** **Pros:** - Industry-validated accuracy - interFoam/multiphaseEulerFoam for free surface - Extremely flexible—can model anything - Mature community and documentation **Cons:** - Mesh generation is complex for your geometry - Primarily CPU-based (some GPU support emerging) - Extremely steep learning curve - May require 4-8 weeks to get reliable results **Accuracy for your case:** ✅ **Excellent** (if set up correctly) **Recommendation:** Only if you need to model propulsion, detailed wake effects, or have specific CFD validation requirements. --- ### 4. Capytain + MoorDyn **Fast for linear analysis, but limited for your geometry.** **Pros:** - Fast frequency-domain calculations - Good for mooring analysis when coupled with MoorDyn - Python interface is clean - Good for parametric studies **Cons:** - **BEM limitations are real for your case**: Your partially submerged foils violate BEM assumptions - Linearized wave theory - Cannot capture strongly nonlinear effects - May significantly underestimate motions when foils emerge **Accuracy for your case:** ⚠️ **Limited**—not recommended as primary tool **If you still want to try:** ```python # Example Capytain setup (simplified) import capytain from capytain import Float, Stationary # Your geometry would need careful meshing # Capytain uses PANEL method meshes ``` --- ### 5. WEC-Sim **Not open source despite being free to download.** **Pros:** - Designed for wave-structure interaction - Good visualization tools - Active marine renewables community **Cons:** - **Requires MATLAB** (~$1,000-2,000 for non-students) - Requires Simulink and Simscape Multibody - Uses BEM under the hood (same limitations as Capytain) - Not truly open source **Cost:** MATLAB + Toolboxes ≈ $1,500-3,000+ **Not recommended** given your open-source requirement. --- ### 6. HAMS (Hydrostatic/Hydrodynamic Analysis of Marine Structures) **Specialized BEM solver from Shanghai Jiao Tong University.** **Pros:** - Very fast - Good for traditional ship/platform shapes - Python interface - Well-validated for hull forms **Cons:** - BEM limitations apply - Designed for conventional hulls, not foil shapes - May struggle with your unusual geometry **Accuracy for your case:** ⚠️ **Limited** --- ### 7. Blender Physics **Not suitable for engineering analysis.** Blender's physics engine is designed for visual effects and games, not engineering analysis. It lacks: - Proper fluid-structure coupling - Wave theory foundations - Engineering-grade accuracy **Exception:** If you want to create animated visualizations of results from another simulation tool, Blender is excellent for that. --- ## Why BEM is Problematic for Your Design Your 3-foot-wide NACA foil legs that submerge from 50% to nearly 100% create several issues for BEM: 1. **Wetted surface changes**: BEM assumes small changes in wetted area 2. **Nonlinear effects**: BEM linearizes about the mean waterline 3. **Foils near free surface**: BEM assumptions break down when foils operate near the free surface 4. **Tip effects**: Your foils can emerge entirely in some conditions **SPH and VOF/CFD methods don't have these limitations**—they solve the full Navier-Stokes equations at the free surface. --- ## My Recommendation: DualSPHysics Given your priorities: 1. **GPU utilization**: DualSPHysics is built for GPU from the ground up 2. **Free surface handling**: SPH excels at tracking complex free surfaces 3. **Partially submerged bodies**: No linearization needed 4. **Visualization**: Output to VTK/CSV, visualize in ParaView 5. **Open source**: Fully open, no licensing costs 6. **Python interface**: You can script everything ### Implementation Path 1. **Week 1**: Install DualSPHysics, learn basics, test 2D wave tank 2. **Week 2**: Create your 3D geometry (STL import), test static buoyancy 3. **Week 3**: Add wave generation, validate results against theory 4. **Week 4**: Run your first dynamic simulation, visualize in ParaView 5. **Week 5+**: Parametric studies, compare designs ### Alternative: Chrono::FSI If you later want to add: - Rope dynamics (your dinghy ropes) - Joint constraints - Contact/collision Chrono::FSI would be better suited. Consider it for Phase 2. --- ## Visualization Recommendations Regardless of which simulation tool you choose: **ParaView** (free, excellent) - Industry-standard scientific visualization - Handles large particle/mesh datasets - Can create animations of wave-structure interaction - Python scripting available **Blender** (for final renders) - Import simulation data - Create photorealistic visualizations - Useful for presentations/website --- ## Design Iteration Workflow ``` Design Change → Python Script → Run Simulation → Visualize Results ↓ Claude Code helps write scripts ↓ Batch parametric studies ``` Once you have one design working, running variations is straightforward: 1. Modify geometry parameters in Python 2. Re-run simulation 3. Compare motion responses 4. Iterate --- ## Questions to Consider Before committing to a tool, consider: 1. **What wave conditions do you need to test?** Regular waves, irregular seas (JONSWAP spectrum), extreme events? 2. **Do you need to model mooring?** If so, you'll want MoorDyn integration regardless of your main solver. 3. **What's your turnaround time?** Daily iterations vs. weekly deep dives affects tool choice. 4. **Do you need to model wind effects** in addition to waves? This would add complexity. --- ## Summary Table | Priority | Recommendation | |----------|----------------| | **Best overall** | DualSPHysics | | **If you need multi-body later** | Chrono::FSI | | **If you only need rough estimates** | Capytain | | **If you want industry CFD** | OpenFOAM | | **For pretty pictures** | Blender (post-simulation) | | **Not recommended** | WEC-Sim (cost), Blender physics (accuracy) | --- Shall I help you get started with a specific software package? I can provide more detailed setup instructions, sample configuration files, or help you create your first simulation geometry.