v7.48: VDE feedback — FEA sparse solver VDE-1175, Modal eigenvalue solver VDE-1176, CFD NS solver VDE-1177
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
# VDE-1175: FEA Sparse Linear Solver & Element Stiffness Assembly Kernel (有限元稀疏求解器与单元刚度装配内核)
|
||||
|
||||
**Date**: 2026-08-10
|
||||
**Source**: ViewDesign v7.48 CaeFeaPanel deepening — 1D truss/beam direct stiffness method, analytical beam comparison
|
||||
**Module**: `vde/fea/sparse_solver.h`, `vde/fea/element.h`, `vde/fea/assembly.h`
|
||||
**Status**: Open — Engine requirement proposal
|
||||
**Priority**: P1
|
||||
**Category**: FEA / Sparse Solver / Stiffness Assembly / Element Library
|
||||
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
Finite Element Analysis (FEA) is the cornerstone of modern mechanical design validation. From simple truss structures to complex 3D assemblies, FEA transforms the continuous partial differential equations of elasticity into a discrete system of linear algebraic equations Ku = f, where K is the global stiffness matrix, u is the nodal displacement vector, and f is the nodal force vector. The ViewDesign FEA panel currently provides UI scaffolding (mesh settings, material database, BC assignment, result visualization) but relies entirely on dummy solver output. The following kernel functionality is needed to perform real FEA computation:
|
||||
|
||||
The direct stiffness method (DSM) is the fundamental algorithm for assembling element-level stiffness matrices into the global system. For a 1D bar/truss element in local coordinates, the stiffness matrix is:
|
||||
|
||||
k_loc = (E*A/L) * [[1, -1], [-1, 1]]
|
||||
|
||||
For a 2D Euler-Bernoulli beam element with 4 DOF per node (u_x, u_y, θ_z), the stiffness matrix is:
|
||||
|
||||
k_beam = [[EA/L, 0, 0, -EA/L, 0, 0],
|
||||
[0, 12EI/L³, 6EI/L², 0, -12EI/L³, 6EI/L²],
|
||||
[0, 6EI/L², 4EI/L, 0, -6EI/L², 2EI/L],
|
||||
[-EA/L, 0, 0, EA/L, 0, 0],
|
||||
[0, -12EI/L³, -6EI/L², 0, 12EI/L³, -6EI/L²],
|
||||
[0, 6EI/L², 2EI/L, 0, -6EI/L², 4EI/L]]
|
||||
|
||||
Each element stiffness matrix must be transformed from local to global coordinates using the rotation matrix R(θ), then assembled into the global stiffness matrix K_global by mapping local DOF indices to global DOF indices using the element connectivity table.
|
||||
|
||||
## Requirements
|
||||
|
||||
### 1. Sparse Linear System Solver
|
||||
|
||||
A sparse linear system solver is the single most performance-critical component in any FEA engine. For realistic 3D meshes with 100K-10M DOF, the global stiffness matrix K is highly sparse (bandwidth depends on node numbering), symmetric positive-definite (for linear elastic problems), and typically stored in Compressed Sparse Row (CSR) or Coordinate (COO) format.
|
||||
|
||||
Required solver infrastructure:
|
||||
- **CSR/CSC sparse matrix storage** with efficient element-level assembly (add contribution to matrix entries indexed by global DOF pairs)
|
||||
- **Direct solvers**: Gaussian elimination with partial pivoting (dense, for small verification problems 2-6 DOF), Cholesky decomposition LL^T (sparse, for symmetric positive-definite K), or LU decomposition with skyline/profile storage for moderate-scale problems (<100K DOF). A robust implementation should use nested dissection or minimum degree ordering to minimize fill-in during factorization.
|
||||
- **Iterative solvers**: Conjugate Gradient (CG) with Jacobi or incomplete Cholesky preconditioner (IC). For ill-conditioned problems arising from high aspect ratio elements or nearly-incompressible materials (ν→0.5), CG may fail to converge; a MINRES or GMRES solver with appropriate preconditioner is needed. Convergence criterion: ||r_k||/||r_0|| < tol (default tol=1e-8).
|
||||
- **Boundary condition application**: The penalty method (add a very large stiffness ~1e12*max(K_ii) to constrained DOF diagonal entries, or set K_ii=1, f_i=u_0, zero out off-diagonal row/column entries). The penalty approach preserves matrix symmetry and is simpler to implement than partitioning.
|
||||
|
||||
### 2. Element Library
|
||||
|
||||
A comprehensive element library with analytical verification benchmarks:
|
||||
|
||||
- **Bar/Truss element (2-node linear)**: Linear shape functions, constant axial strain, exact for statically determinate trusses. Verification: 2-bar truss → analytical force equilibrium, 3-bar statically indeterminate truss → compatibility condition.
|
||||
- **Euler-Bernoulli beam element (2-node cubic)**: Hermite cubic interpolation, C¹ continuous (slope continuity at nodes). Verification: simply-supported beam midpoint deflection δ=FL³/(48EI) vs analytical, cantilever tip deflection δ=FL³/(3EI), clamped-clamped beam.
|
||||
- **Timoshenko beam element**: Includes shear deformation (important for short/deep beams where L/h < 10). Additional shear stiffness term kGA/L, where k is the shear correction factor (5/6 for rectangular, 0.9 for circular).
|
||||
- **Plane stress/strain quadrilateral (Q4 bilinear)**: 4-node isoparametric element with 2×2 Gauss quadrature. Suffers from shear locking and parasitic shear. Verification: Cook's membrane problem, cantilever beam with tip shear.
|
||||
- **Plane stress/strain quadrilateral (Q8 serendipity)**: 8-node quadratic element with 3×3 Gauss quadrature. Better accuracy but more expensive. Reduced integration (2×2) with hourglass control may be needed for near-incompressible materials.
|
||||
- **Solid tetrahedron (Tet4 linear)**: 4-node constant-strain tetrahedron. Volumetric locking in nearly-incompressible materials. Verification: block under uniform pressure, sphere under hydrostatic pressure.
|
||||
- **Solid tetrahedron (Tet10 quadratic)**: 10-node quadratic tetrahedron. Preferred for production FEA. Mid-side node placement accuracy is critical for curved geometry.
|
||||
- **Shell elements**: MITC4 (Mixed Interpolation of Tensorial Components) quadrilateral shell for thin-to-moderately-thick shells, with membrane + bending coupling. Verification: Scordelis-Lo roof, pinched cylinder.
|
||||
|
||||
### 3. Assembly & Post-processing Pipeline
|
||||
|
||||
- **Assembly pipeline**: Loop over all elements → compute element stiffness k_e → transform to global coordinates (k_global = R^T * k_loc * R) → scatter to global K using element connectivity table. Parallel assembly using coloring (elements with non-overlapping DOF can be assembled concurrently).
|
||||
- **Stress recovery**: After solving for nodal displacements, compute element strains ε = B·u_e (B is the strain-displacement matrix evaluated at integration points), then stresses σ = D·ε (D is the constitutive matrix). Gauss point stress extrapolation to nodes using superconvergent patch recovery (SPR) or simple averaging.
|
||||
- **Error estimation**: Zienkiewicz-Zhu a-posteriori error estimator: compare smoothed (continuous) stress field with raw (discontinuous) element stresses to identify mesh refinement regions. Energy norm error η = ||e*||_E / (||u_h||²_E + ||e*||²_E)^(1/2).
|
||||
- **Analytical comparison suite**: Built-in catalogue of problems with closed-form solutions (beam bending, plate deflection, cylinder under pressure, stress concentration at a hole) for automatic verification of solver accuracy.
|
||||
|
||||
### 4. Contact & Constraint Handling (Phase 2)
|
||||
|
||||
- **Penalty contact**: Add normal contact stiffness k_n when penetration δ > 0: F_contact = k_n·δ·n. Simple and preserves matrix symmetry, but requires careful penalty parameter selection (too large→ill-conditioning, too small→excessive penetration).
|
||||
- **Lagrange multiplier contact**: Enforce exact no-penetration constraint g≥0 via Lagrange multipliers λ. Creates saddle-point system [[K, C^T], [C, 0]]·[u, λ]^T = [f, g]^T — larger but exact.
|
||||
- **Multi-point constraints (MPC)**: Rigid body links (RBE2/RBE3), cyclic symmetry, periodic boundary conditions. Implemented via transformation matrix T: u = T·u_reduced.
|
||||
|
||||
VDE currently lacks:
|
||||
- Sparse matrix assembly kernel (element-to-global DOF mapping, coordinate transformation R^T·k_loc·R, CSR scatter-add accumulation, parallel assembly via coloring)
|
||||
- Sparse direct/iterative solver kernel (Cholesky LL^T with fill-reducing ordering, CG with Jacobi/IC preconditioner, convergence monitoring, boundary condition penalty method)
|
||||
- Element library with analytical verification benchmarks (bar/beam Q4/Q8 Tet4/Tet10 shell MITC4, standard test problems catalogue)
|
||||
- Stress recovery and error estimation kernel (superconvergent patch recovery, Zienkiewicz-Zhu error estimator, adaptive h-refinement criterion)
|
||||
- Penalty and Lagrange multiplier contact constraint kernel with Coulomb friction
|
||||
@@ -0,0 +1,74 @@
|
||||
# VDE-1176: Modal Eigenvalue Solver & Campbell Diagram Kernel (模态特征值求解器与Campbell图内核)
|
||||
|
||||
**Date**: 2026-08-10
|
||||
**Source**: ViewDesign v7.48 CaeModalPanel deepening — 2-5 DOF eigenvalue problem, natural frequencies, mode shapes, Campbell diagram
|
||||
**Module**: `vde/modal/eigenvalue.h`, `vde/modal/campbell.h`, `vde/modal/lanczos.h`
|
||||
**Status**: Open — Engine requirement proposal
|
||||
**Priority**: P1
|
||||
**Category**: Modal / Eigenvalue / Campbell / Vibration / Rotordynamics
|
||||
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
Modal analysis is the fundamental method for understanding structural dynamic behavior. Natural frequencies and mode shapes characterize how a structure responds to dynamic excitation, and are the essential input for harmonic response, random vibration, response spectrum, and transient dynamic analyses. The ViewDesign modal panel provides UI for solver method selection (Lanczos/Subspace/PCG), frequency range specification, buckling analysis type, mode shape visualization, and Campbell diagram plotting, but currently uses dummy solver output. The generalized eigenvalue problem Kφ = ω²Mφ must be solved for the k lowest eigenpairs (ω_i, φ_i), where K is the stiffness matrix (N×N sparse), M is the mass matrix (consistent or lumped), ω_i are the natural angular frequencies, and φ_i are the corresponding mode shapes.
|
||||
|
||||
For small systems (2-5 DOF), the eigenvalue problem can be solved analytically by expanding det(K-λM)=0 into the characteristic polynomial and finding its roots. However, for production FEA meshes (10⁴-10⁷ DOF), iterative subspace methods are mandatory.
|
||||
|
||||
## Requirements
|
||||
|
||||
### 1. Generalized Eigenvalue Solver
|
||||
|
||||
The core eigenvalue solver must handle the generalized symmetric eigenvalue problem:
|
||||
|
||||
K φ = λ M φ, with λ = ω², K = K^T, M = M^T positive-definite
|
||||
|
||||
**Small dense systems (2-50 DOF)**:
|
||||
- Direct characteristic polynomial expansion: det(K-λM)=0 → n-th degree polynomial in λ → companion matrix → QR algorithm for eigenvalues and eigenvectors
|
||||
- Jacobi method for symmetric eigenproblems (diagonalization by plane rotations)
|
||||
- QR algorithm with Wilkinson shifts for the standard form M^(-1)K or (after Cholesky M=LL^T) L^(-1)KL^(-T)
|
||||
|
||||
**Large sparse systems (>50 DOF)**:
|
||||
- **Subspace iteration**: Classic method that iteratively refines a subspace of trial vectors V_0. The subspace V_k+1 is computed by solving K·Ṽ_k+1 = M·V_k, then orthogonalizing (Gram-Schmidt) and computing the Rayleigh-Ritz projection K_proj = V^T K V, M_proj = V^T M V (both q×q where q = desired modes × safety factor, typically 2p). The reduced generalized eigenvalue problem K_proj·y = λ·M_proj·y is solved by dense methods. Convergence when max|λ_i^(k+1)-λ_i^(k)|/λ_i^(k+1) < tol. The subspace method has quadratic convergence and is robust, but requires solving K·x = b at each iteration.
|
||||
- **Block Lanczos**: The preferred production algorithm. Generates a sequence of Lanczos vectors q_j through the three-term recurrence: r_j = K_inv·M·q_j - α_j·q_j - β_j-1·q_j-1, where α_j = q_j^T·M·K_inv·M·q_j and β_j = ||r_j||. This builds a tridiagonal matrix T that has the same eigenvalues as the original problem. The eigenvalues of T are found by bisection with Sturm sequence check or QR iteration. The block variant (multi-vector) handles multiple and closely-spaced eigenvalues correctly by maintaining full orthogonality. Shift-invert spectral transformation can focus convergence on eigenvalues near a specified shift σ.
|
||||
- **Frequency shift**: Solves (K-σM)^(-1)M φ = θ φ where θ = 1/(λ-σ), concentrating eigenvalues near σ. Essential for extracting modes in a specific frequency range without computing all lower modes.
|
||||
- **Sturm sequence check**: After computing k eigenvalues, verify that no eigenvalues were missed in the requested range [ω_min, ω_max] by counting sign changes in the LDL^T factorization of K-ω²M at ω_min and ω_max.
|
||||
|
||||
### 2. Mass Matrix Formulation
|
||||
|
||||
- **Consistent mass matrix** (M_cons = ∫_Ω ρ N^T N dΩ): Derived from the same shape functions N as the stiffness matrix. Produces upper-bound frequency estimates.
|
||||
- **Lumped mass matrix** (M_lump = diag(∫_Ω ρ dΩ / n_nodes_per_element)): Diagonal mass matrix formed by equally distributing element mass to its nodes. Computationally efficient (diagonal), produces lower-bound frequency estimates. Preferred for explicit dynamics.
|
||||
- **HRZ (Hinton-Rock-Zienkiewicz) lumping**: Scales the diagonal of the consistent mass matrix to preserve total mass: M_ii^lump = M_ii^cons * (total_elem_mass / trace(M_cons)).
|
||||
|
||||
### 3. Mode Shape Post-processing
|
||||
|
||||
After computing eigenvalues and eigenvectors:
|
||||
- **Modal effective mass**: M_eff,i = (φ_i^T M r)^2 / (φ_i^T M φ_i), where r is the rigid-body displacement vector in each direction (X, Y, Z, RX, RY, RZ). Sum of M_eff across all modes in each direction should approach the total structural mass. A common criterion: include modes until ΣM_eff ≥ 90% of total mass in each direction.
|
||||
- **Modal participation factor**: Γ_i = φ_i^T M r / (φ_i^T M φ_i). Indicates how strongly mode i responds to base excitation in direction r.
|
||||
- **Mass normalization**: Scale eigenvectors such that φ_i^T M φ_i = 1 (orthonormal with respect to M). Then φ_i^T K φ_i = ω_i² automatically.
|
||||
- **Mode shape orthogonality check**: φ_i^T M φ_j should be < tolerance for i≠j. Cross-orthogonality checks detect incorrectly converged or duplicate modes.
|
||||
|
||||
### 4. Analytical Modal Verification
|
||||
|
||||
Closed-form modal solutions for simple geometries serve as solver verification benchmarks:
|
||||
- **Axial bar fixed-free**: f_n = (2n-1)c/(4L), where c = √(E/ρ), n=1,2,3,...
|
||||
- **Simply-supported beam**: f_n = n²π/(2L²) · √(EI/(ρA)), mode shape sin(nπx/L)
|
||||
- **Cantilever beam**: f_n = β_n²/(2πL²) · √(EI/(ρA)), where β_1=1.8751, β_2=4.6941, β_3=7.8548, β_n≈(n-0.5)π for n≥4
|
||||
- **Longitudinal vibration of a bar**: f_n = n/(2L)√(E/ρ)
|
||||
- **Two-DOF spring-mass system**: analytical roots of quadratic characteristic equation
|
||||
|
||||
### 5. Campbell Diagram & Rotordynamics (Phase 2)
|
||||
|
||||
For rotating machinery (turbines, compressors, pumps, motors), the Campbell diagram plots natural frequencies vs. rotor speed. Gyroscopic effects make eigenvalues speed-dependent.
|
||||
|
||||
- **Gyroscopic matrix G**: Anti-symmetric matrix from kinetic energy of rotating elements. The equation of motion becomes Mü + ΩGü̇ + Ku = 0, leading to the quadratic eigenvalue problem (λ²M + λΩG + K)φ = 0.
|
||||
- **Forward whirl (FW)** and **backward whirl (BW)**: At a given rotor speed Ω, the whirl frequency ω determines the whirl direction: forward (same as rotation) or backward (opposite to rotation). BW modes can become unstable above certain speeds.
|
||||
- **Critical speed detection**: When ω_FW(Ω) = Ω (intersection of FW curve with the 1× line on the Campbell diagram). These are the speeds where unbalance excitation is resonant.
|
||||
- **Stability analysis**: Log decrement δ = -2π Re(λ)/|Im(λ)|. Negative δ indicates instability (oil whirl/whip, internal friction).
|
||||
|
||||
VDE currently lacks:
|
||||
- Generalized eigenvalue solver kernel (characteristic polynomial expansion for small dense, subspace iteration with Gram-Schmidt orthogonalization and Rayleigh-Ritz projection for large sparse, Block Lanczos with Sturm sequence verification, shift-invert spectral transformation)
|
||||
- Mass matrix formulation kernel (consistent mass integration, lumped mass diagonalization, HRZ lumping with total mass preservation)
|
||||
- Mode shape post-processing kernel (modal effective mass M_eff, modal participation factor Γ, mass orthonormalization, cross-orthogonality verification)
|
||||
- Analytical modal verification suite (bar/beam closed-form frequency benchmarks)
|
||||
- Campbell diagram and rotordynamics kernel (gyroscopic matrix assembly, forward/backward whirl computation, critical speed detection via intersection, log decrement stability analysis)
|
||||
@@ -0,0 +1,106 @@
|
||||
# VDE-1177: CFD Incompressible NS Solver & Engineering Correlation Kernel (不可压NS求解器与工程关联式内核)
|
||||
|
||||
**Date**: 2026-08-10
|
||||
**Source**: ViewDesign v7.48 CaeCfdPanel deepening — Bernoulli equation, Darcy-Weisbach pipe flow, drag/lift force, Nusselt heat transfer, Manning open channel
|
||||
**Module**: `vde/cfd/incompressible.h`, `vde/cfd/pipe_flow.h`, `vde/cfd/heat_transfer.h`
|
||||
**Status**: Open — Engine requirement proposal
|
||||
**Priority**: P1
|
||||
**Category**: CFD / Incompressible / Pipe Flow / Heat Transfer / Open Channel
|
||||
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
Computational Fluid Dynamics (CFD) is essential for predicting fluid flow, heat transfer, and aerodynamic performance in mechanical design. Applications range from internal flow in pipes/valves/heat exchangers to external aerodynamics of vehicles and turbomachinery. The ViewDesign CFD panel provides UI for fluid property selection, turbulence model choice, solver scheme configuration, BC assignment, and result visualization, but currently uses dummy solver output. This feedback focuses on the engineering correlation layer (essential for rapid design iteration) and the foundational incompressible Navier-Stokes solver infrastructure.
|
||||
|
||||
Engineering correlations provide fast, validated predictions for canonical flow configurations without requiring full 3D CFD simulation. The correlation layer should be built on a foundation of dimensionless analysis (Reynolds, Prandtl, Nusselt, Grashof numbers) and systematically organized by flow category (internal pipe, external body, heat transfer, open channel).
|
||||
|
||||
## Requirements
|
||||
|
||||
### 1. Incompressible Navier-Stokes Solver (Foundation)
|
||||
|
||||
The core solver must solve the incompressible Navier-Stokes equations:
|
||||
|
||||
∇·u = 0 (continuity / mass conservation)
|
||||
ρ(∂u/∂t + u·∇u) = -∇p + μ∇²u + ρg (momentum)
|
||||
|
||||
Key numerical ingredients:
|
||||
|
||||
- **Pressure-velocity coupling**: SIMPLE (Semi-Implicit Method for Pressure-Linked Equations) for steady-state flows. Algorithm: guess p* → solve momentum for u* → solve pressure correction p' from Poisson equation ∇·(1/a_p ∇p') = ∇·u* → correct u and p → repeat. Under-relaxation factors α_u (0.7 for momentum) and α_p (0.3 for pressure) are critical for convergence. SIMPLEC (SIMPLE-Consistent) omits the neighbor velocity correction term for faster convergence. PISO (Pressure-Implicit with Splitting of Operators) adds a second corrector step for transient flows.
|
||||
- **Spatial discretization**: Finite Volume Method (FVM) on unstructured polyhedral meshes. Second-order upwind for convection terms (balances accuracy vs stability). Least-squares or Green-Gauss node-based gradient reconstruction. Rhie-Chow interpolation to prevent checkerboard pressure oscillations on collocated grids.
|
||||
- **Solution of linear systems**: Pressure correction equation yields a Poisson-type system — solved by Algebraic Multigrid (AMG) for optimal O(N) scaling. Momentum equations solved by ILU-preconditioned GMRES or BiCGSTAB.
|
||||
- **Turbulence models**:
|
||||
- Spalart-Allmaras (1-equation): Wall-bounded aerodynamic flows, good for attached boundary layers, poor for free shear flows. Transport equation for modified turbulent viscosity ν̃.
|
||||
- k-ε RNG (2-equation): Industrial standard for fully turbulent flows. Transport equations for turbulent kinetic energy k and dissipation rate ε. Wall functions for near-wall region (y+ > 30).
|
||||
- k-ω SST (2-equation): Blends k-ω near walls (accurate for adverse pressure gradients and separation) with k-ε in the free stream. Industry standard for external aerodynamics. Requires y+ < 1 at walls (resolved viscous sublayer).
|
||||
- LES (Large Eddy Simulation): Resolves large energy-containing eddies, models subgrid-scale (SGS) dissipation. Smagorinsky SGS model: μ_t = ρ(C_sΔ)²|S̄|, where C_s≈0.1 and Δ=∛(cell_volume). Requires fine mesh for accurate results.
|
||||
- **Boundary conditions**: Velocity inlet, pressure outlet, mass flow inlet, wall (no-slip/free-slip with specified roughness ε), symmetry, periodic, and outflow (zero gradient).
|
||||
|
||||
### 2. Engineering Correlation Library
|
||||
|
||||
A comprehensive library of dimensionless parameter calculations and validated empirical/analytical correlations:
|
||||
|
||||
**Dimensionless Parameter Calculator**:
|
||||
- Reynolds: Re = ρVL_reference/μ (ratio of inertial to viscous forces, determines laminar/turbulent transition at Re_crit ≈ 2300 for pipe flow, ≈ 5×10⁵ for flat plate)
|
||||
- Prandtl: Pr = μC_p/k (ratio of momentum diffusivity to thermal diffusivity; Pr≈0.7 for air, Pr≈7 for water, Pr≈0.01 for liquid metals)
|
||||
- Nusselt: Nu = hL/k (dimensionless heat transfer coefficient; Nu=1 for pure conduction, Nu>1 indicates convection enhancement)
|
||||
- Grashof: Gr = gβΔTL³/ν² (ratio of buoyancy to viscous forces; Gr/Re² determines forced vs natural convection dominance)
|
||||
- Rayleigh: Ra = Gr·Pr (natural convection parameter; Ra>10⁹ indicates turbulent natural convection)
|
||||
- Mach: Ma = V/c (compressibility indicator; Ma>0.3 requires compressibility correction)
|
||||
- Froude: Fr = V/√(gL) (free-surface flow parameter; Fr<1 subcritical, Fr>1 supercritical)
|
||||
- Weber: We = ρV²L/σ (surface tension relative to inertia; important for droplet/spray flows)
|
||||
- Euler: Eu = ΔP/(ρV²) (pressure coefficient, essentially C_p)
|
||||
|
||||
**Internal Pipe Flow**:
|
||||
- Darcy-Weisbach equation: h_f = f·(L/D)·(V²/(2g)) for major losses. Friction factor f from:
|
||||
- Laminar (Re<2300): f = 64/Re (Poiseuille flow, exact)
|
||||
- Transitional (2300<Re<4000): interpolation or conservative f=max(f_laminar, f_turbulent)
|
||||
- Turbulent (Re>4000): Colebrook-White implicit equation 1/√f = -2log₁₀[(ε/D)/3.7 + 2.51/(Re√f)], solved by Newton-Raphson iteration (converges in 3-5 iterations from f_0=0.02 initial guess). For explicit alternatives: Swamee-Jain f=0.25/[log₁₀(ε/(3.7D)+5.74/Re^0.9)]² valid for 10⁻⁶<ε/D<10⁻² and 5000<Re<10⁸.
|
||||
- Pressure drop: ΔP = ρgh_f [Pa]
|
||||
- Minor losses: h_m = K·V²/(2g) with K-factor database (elbow 90° K=0.75, gate valve full open K=0.15, globe valve K=10, sudden expansion K=(1-A₁/A₂)²)
|
||||
- Required pump power: P = ΔP_total·Q/η_pump, where Q=V·A and η_pump is pump efficiency (typically 0.60-0.85 for centrifugal pumps)
|
||||
- Fully-developed entrance length: L_e/D ≈ 0.06Re (laminar), L_e/D ≈ 4.4Re^(1/6) (turbulent)
|
||||
|
||||
**External Aerodynamics (Drag & Lift)**:
|
||||
- Drag force: F_D = ½ρV²·C_D·A_ref. Where A_ref is the projected frontal area for bluff bodies or planform area for wings.
|
||||
- Drag coefficient database with Reynolds-dependent interpolation:
|
||||
- Sphere: C_D = 24/Re for Re<0.1 (Stokes), C_D = 24/Re·(1+0.15Re^0.687) for 0.1<Re<800 (Schiller-Naumann), C_D≈0.47 for 800<Re<2×10⁵ (Newton regime), C_D≈0.2 for Re>2×10⁵ (drag crisis / critical Re, boundary layer transition to turbulence causes later separation and smaller wake)
|
||||
- Smooth cylinder (2D, per unit length): C_D≈1.0 for 400<Re<2×10⁵ (subcritical, wide wake), C_D≈0.6 for Re>5×10⁵ (supercritical, narrower wake). A_ref = D·L.
|
||||
- Flat plate perpendicular to flow: C_D≈1.17 (constant, flow separation at sharp edges fixes the separation point)
|
||||
- Streamlined body (airfoil): C_D≈0.005-0.02 (laminar) or 0.01-0.04 (turbulent), depending on angle of attack
|
||||
- Lift force: F_L = ½ρV²·C_L·A_planform. C_L database for NACA airfoils as function of angle of attack α (linear C_L≈2πα for thin airfoils, stalls at α≈15°)
|
||||
- Newton's impact theory (hypersonic approximation): C_p = 2sin²θ for windward surfaces (θ = angle between surface normal and freestream)
|
||||
|
||||
**Heat Transfer Correlations**:
|
||||
- Nusselt number Nu = hL/k → convective heat transfer coefficient h = Nu·k/L [W/m²·K]
|
||||
- Heat flux: q = h·|T_wall - T_fluid| [W/m²]
|
||||
- Internal forced convection (Dittus-Boelter for fully developed turbulent pipe flow): Nu = 0.023·Re^0.8·Pr^n, with n=0.4 (heating, T_w>T_f) or n=0.3 (cooling). Valid for 0.6<Pr<160, Re>10⁴, L/D>10. For gases: Nu = 0.021·Re^0.8·Pr^0.43 (Petukhov).
|
||||
- External forced convection over flat plate (laminar, Re<5×10⁵): Nu = 0.664·Re^0.5·Pr^(1/3). Turbulent (Re>5×10⁵): Nu = 0.037·Re^0.8·Pr^(1/3). Mixed boundary layer: average Nu = (0.037·Re_L^0.8 - 871)·Pr^(1/3).
|
||||
- External forced convection over cylinder (Zhukauskas): Nu = C·Re^m·Pr^n·(Pr/Pr_w)^0.25, where (C,m) depend on Re range: (0.75,0.4) for 1<Re<40, (0.51,0.5) for 40<Re<10³, (0.26,0.6) for 10³<Re<2×10⁵, (0.076,0.7) for 2×10⁵<Re<10⁷.
|
||||
- Natural convection vertical plate: Nu = {0.59·Ra^(1/4) for 10⁴<Ra<10⁹ (laminar), 0.10·Ra^(1/3) for 10⁹<Ra<10¹³ (turbulent)}. Characteristic length L = plate height.
|
||||
- Natural convection horizontal cylinder: Nu = {0.53·Ra^(1/4) for 10³<Ra<10⁹, 0.13·Ra^(1/3) for Ra>10⁹}. L = cylinder diameter.
|
||||
|
||||
**Open Channel Flow**:
|
||||
- Manning equation: V = (1/n)·R_h^(2/3)·S^(1/2) [m/s, SI units]
|
||||
- Hydraulic radius R_h = A/P (cross-sectional area / wetted perimeter)
|
||||
- Trapezoidal channel: A = y(b+my), P = b+2y√(1+m²) where m = side slope (horizontal:vertical)
|
||||
- Flow rate: Q = V·A [m³/s]
|
||||
- Manning's n roughness database: concrete (smooth) 0.012, concrete (rough) 0.016, earth channel (clean) 0.022, earth channel (weedy) 0.030, gravel 0.028, natural stream (clean) 0.030, floodplain (cultivated) 0.040
|
||||
- Critical depth (Froude=1 condition): Fr = V/√(gy_h), where y_h = A/T (top width T = b+2my). At critical depth, Q²/g = A³/T.
|
||||
- Normal depth calculation: solve Manning equation for y_n given Q, S, n, b, m. Iterative solution required (fixed-point or Newton iteration from initial guess y_0 ≈ (nQ/(b√S))^(3/5)).
|
||||
|
||||
### 3. Fluid Property Database
|
||||
|
||||
A comprehensive fluid property database with temperature-dependent properties:
|
||||
- Ideal gas: ρ = p/(R·T), Sutherland viscosity μ = μ_0·(T/T_0)^(3/2)·(T_0+S)/(T+S) (S=110.4K for air)
|
||||
- Liquids: constant density (incompressible), temperature-dependent viscosity via Andrade equation μ = A·exp(B/T)
|
||||
- Water: ρ(T), μ(T), k(T), Cp(T) from IAPWS-IF97 steam tables (0-100°C range at 1 atm)
|
||||
- Air at 1 atm: ρ=1.225@25°C (ideal gas), μ=1.83e-5 (Sutherland), k=0.0262, Cp=1005, Pr≈0.71
|
||||
- Hydraulic oils: ρ≈870, μ≈0.04-0.3 (highly dependent on ISO VG grade and temperature), k≈0.145, Cp≈1900
|
||||
- Water-glycol mixtures: ρ, μ, Cp from mixture ratio (0-60% glycol), freezing point depression
|
||||
|
||||
VDE currently lacks:
|
||||
- Incompressible Navier-Stokes solver kernel (FVM discretization on unstructured meshes, SIMPLE/SIMPLEC/PISO pressure-velocity coupling with Rhie-Chow interpolation, AMG-preconditioned pressure solver, k-ε/k-ω SST/SA turbulence models with wall functions, LES Smagorinsky subgrid model)
|
||||
- Dimensionless parameter calculator kernel (Re, Pr, Nu, Gr, Ra, Ma, Fr, We, Eu unified computation from fluid state and geometry)
|
||||
- Engineering correlation library kernel (Darcy-Weisbach with Colebrook-White Newton solver, drag coefficient database with Reynolds interpolation for sphere/cylinder/airfoil, Dittus-Boelter/Zhukauskas/flat-plate heat transfer correlations with Pr correction, Manning open-channel with iterative normal depth solver)
|
||||
- Fluid property database kernel (temperature-dependent ρ, μ, k, Cp via Sutherland/IAPWS-IF97/Andrade models, water-glycol mixture properties, ISO VG oil viscosity grades)
|
||||
Reference in New Issue
Block a user