Skip to content
ME-505 · FEM/CFD Lab/Quick Revision Short Notes

FEM/CFD Lab (ME-505) - Unit 1 Short Notes

UNIT 1: FUNDAMENTALS OF FEM/CFD & PRE-PROCESSING WORKFLOW

1.0 Introduction to FEM & CFD

  • FEM (Finite Element Method): A numerical technique for finding approximate solutions to boundary value problems for partial differential equations. It subdivides a large, continuous system (geometry) into a finite number of smaller, simpler parts (elements) called meshing or discretization.

  • CFD (Computational Fluid Dynamics): The branch of fluid mechanics that uses numerical analysis and data structures to solve and analyze problems involving fluid flows. It simulates the interaction of liquids and gases with surfaces defined by boundary conditions.

  • Key Difference: FEM is primarily used for structural/thermal analysis (solids), while CFD is for fluid flow analysis. They share the same underlying discretization philosophy.

  • General Simulation Workflow:

    1. Pre-processing: Geometry creation/import, mesh generation, physics setup (materials, BCs).

    2. Solving: The solver assembles and solves the system of algebraic equations.

    3. Post-processing: Visualization and analysis of results (contours, plots, animations).

[!TIP] Exam Focus: Be ready to define FEM and CFD in one sentence each and state the three main workflow stages.

2.0 Software Environment & Basic Operations

  • Common Platforms:

    • Commercial: ANSYS Workbench (Mechanical APDL/Fluent), COMSOL Multiphysics, Simcenter STAR-CCM+.

    • Open-Source: OpenFOAM (CFD-focused).

  • User Interface (UI) Concept: Most platforms use a project schematic or tree structure where nodes like Geometry, Mesh, Solution, Results are added sequentially.

  • File Management: Always save the project file (e.g., .wbpj in ANSYS). Export results in standard formats (e.g., .csv for data, .png/.jpg for images).

  • Units System: CRITICAL. Define a consistent unit system before starting (e.g., SI: m, kg, s, Pa). Mismatched units are a leading cause of erroneous results.

3.0 Geometry Creation & Import

  • CAD in CAE: Create 2D sketches (extrude, revolve) or import 3D CAD from external sources.

  • Import Formats: STEP (.stp) and IGES (.iges) are neutral, widely used. Parasolid (.x_t, .x_b) is also common.

  • Geometry Cleanup (Defeature): Remove small fillets, holes, logos that are irrelevant to the physics but harm mesh quality. Fix gaps, overlaps, and sliver faces.

  • Bodies & Parts: A "Part" is a single topological entity. "Bodies" are instances of parts. Each distinct physical region (e.g., fluid domain, solid wall) often needs to be a separate body/part for material and BC assignment.

4.0 Mesh Generation (The Heart of Pre-processing)

  • What is a Mesh? A discretized representation of geometry composed of:

    • Nodes: Points at element corners/edges.

    • Elements/Cells: Geometric shapes connecting nodes (1D: beam, 2D: tri/quad, 3D: tet/hex/wedge/pyramid).

  • Element Types:

    | Type | Dimension | Common Use | Pros | Cons | | :--- | :--- | :--- | :--- | :--- | | Tetrahedral (Tet) | 3D | Complex geometry, CFD | Automatic meshing, robust | Poor aspect ratio, slower solver | | Hexahedral (Hex) | 3D | Structural, high-quality CFD | Excellent quality, efficient solver | Difficult to auto-generate | | Triangular (Tri) | 2D | Quick 2D, surface mesh | Easy generation | Poor quality vs. quad | | Quadrilateral (Quad) | 2D | Structural 2D, mapped | High quality, accurate | Requires structured approach |

  • Mesh Quality Metrics (Must Know!):

    • Skewness: Measures deviation from an "ideal" element shape (e.g., equilateral triangle, square). Aim for < 0.85 (scale 0-1). High skewness causes solution inaccuracy.

    • Aspect Ratio: Ratio of longest to shortest edge/side. Aim for < 5:1 for good quality. High AR indicates stretched elements, bad for gradient calculation.

    • Orthogonal Quality: Measures how "orthogonal" element faces are to each other. Aim for > 0.1 (scale 0-1). Low value indicates poorly shaped elements.

    • Warpage: Measures deviation of a face from being planar (for 2D/quads). High warpage is bad.

    • Jacobian Ratio: Measures element distortion from its ideal shape. Must be > 0 (negative = inverted element). \boxed{\text{Jacobian Ratio} > 0}

  • Mesh Sizing & Refinement:

    • Global Element Size: Default average size for the entire model.

    • Local Sizing: Apply smaller sizes on faces, edges, bodies, or points where high gradients are expected (e.g., near holes, corners, inlets).

    • Curvature & Proximity Refinement: Automatically adds elements to capture curved geometry and small gaps between bodies.

  • Inflation Layers (Boundary Layer Mesh): CRITICAL FOR CFD & STRESS GRADIENTS. Adds layers of highly stretched elements normal to a wall (e.g., no-slip wall) to resolve steep velocity/temperature or stress gradients. Key parameter: First Layer Height (based on y+ value for CFD).

  • Mesh Independence Study: The process of systematically refining the mesh (increasing element count) until a key result (e.g., max stress, pressure drop) stops changing significantly. Proves the solution is not mesh-dependent.

  • Mesh Check & Report: Always run a mesh quality check (skewness, AR, orthogonal quality). Generate a mesh report showing statistics: total nodes/elements, min/max quality metrics.

[!TIP] Common Pitfall: A "good-looking" mesh can still be numerically poor. Always check quality metrics, not just element count. For CFD, inflation layers are non-negotiable for accurate wall shear stress.

5.0 Physics Setup & Boundary Conditions (BCs)

  • Solver/Physics Selection: Choose the correct analysis type first (e.g., Static Structural, Modal, Fluent, CFX). This dictates available BCs and material properties.

  • Material Property Assignment:

    • Structural: Young's Modulus (E), Poisson's Ratio (ν), Density (ρ).

    • Fluid: Density (ρ), Viscosity (μ_dynamic or ν_kinematic). Must be in consistent units!

  • Boundary Conditions (BCs) - Named Selections:

    • Pre-process: Create Named Selections (e.g., "Inlet", "Wall", "Fixed_Support") on geometry faces/edges/bodies. This makes BC assignment robust and readable.

    • Structural BCs:

      • Fixed Support: Constrains all DOFs (0 displacement).

      • Displacement: Specifies translational/rotational movement.

      • Force/Pressure: Applied loads.

      • Symmetry: For models with geometric and loading symmetry.

    • CFD BCs:

      • Velocity Inlet: Specifies flow velocity vector.

      • Pressure Inlet/Pressure Outlet: Specifies total/static pressure.

      • Wall: No-slip (default, u=0) or Slip (inviscid).

      • Symmetry/Periodic: For symmetric or repeating flow patterns.

  • Initial Conditions (ICs): Required for transient or some CFD simulations (e.g., initial velocity/pressure field).

6.0 Solver Configuration & Execution

  • Solver Selection:

    • Direct Solver (e.g., MUMPS, PARDISO): Solves equations directly. Robust for small/medium models, memory-intensive.

    • Iterative Solver (e.g., CG, GMRES): Solves via iterations. Memory-efficient for large models, requires good preconditioning.

  • CFD-Specific:

    • Pressure-Velocity Coupling: Algorithm (e.g., SIMPLE, SIMPLEC, PISO) to link momentum and continuity equations.

    • Under-Relaxation Factors (URFs): Control solution update per iteration (0<URF≤1). Lower URFs (0.2-0.5) aid convergence for difficult problems.

  • Convergence Criteria: Monitor residuals (measure of equation imbalance). Solution is considered converged when residuals drop below a tolerance (e.g., 1e-4 for momentum, 1e-6 for continuity). Also monitor integrated quantities (e.g., drag, mass flow rate) for plateau.

  • Running: Start solve, monitor residual plots and monitor points. Stop if divergence occurs (residuals rise).

7.0 Basic Post-Processing & Result Visualization

  • Accessing Results: After successful solve, results are available under the Solution (FEM) or Results (CFD) node.

  • Key Result Plots:

    • Structural:

      • Total Deformation: Displacement magnitude/vector.

      • Equivalent Stress (von Mises): \boxed{\sigma_{vm} = \sqrt{\frac{(\sigma_1-\sigma_2)^2 + (\sigma_2-\sigma_3)^2 + (\sigma_3-\sigma_1)^2}{2}} (for yielding in ductile materials).

      • Equivalent Elastic Strain.

    • CFD:

      • Velocity Magnitude/Vectors.

      • Static Pressure/Total Pressure.

      • Static Temperature.

      • Turbulence Parameters (e.g., Turbulent Kinetic Energy, k).

  • XY Plots: Create line plots of results along a path or over a surface (e.g., pressure along a pipe length, temperature profile).

  • Query: Get numerical values at a point, on a surface (min/max/avg), or along an edge.

  • Animation: Animate deformation (structural) or flow (velocity vectors/streamlines) over time (transient) or just to visualize the static field.

8.0 Validation, Troubleshooting & Reporting

  • Validation (Sanity Checks):

    • Is deformation direction as expected (tension/compression)?

    • Are pressure drops reasonable (order of magnitude)?

    • Do velocity profiles match known physics (e.g., parabolic in pipe)?

    • Check force/moment balances (sum of forces ≈ 0 for static equilibrium).

  • Common Errors & Warnings:

    • Divergence / Solution did not converge: Often due to poor mesh, bad BCs, high URFs, or unrealistic material properties.

    • Negative Volume / Inverted Element: Fatal mesh error. Fix geometry or mesh controls.

    • High Skewness / Poor Orthogonal Quality: Will cause inaccurate results. Refine mesh locally.

    • Unphysical Results (e.g., negative pressure, velocity spikes): Check BCs, reference values, and mesh quality.

  • Basic Troubleshooting Steps:

    1. Check Mesh: Quality metrics, inflation layers, sizing.

    2. Review BCs: Correct entity selected? Units consistent?

    3. Adjust Solver: Lower under-relaxation factors (CFD), use different solver scheme.

    4. Refine Mesh: Perform a mesh independence study.

  • Lab Report Structure:

    1. Objective: Problem statement.

    2. Methodology: Software used, geometry, mesh details (size, type, quality metrics), materials, BCs, solver settings.

    3. Results: Include clear images (contours, vectors, deformed shape) and tables/plots (XY graphs, convergence history).

    4. Discussion: Interpret results, compare with expectations/theory, discuss mesh sensitivity.

    5. Conclusion: Summarize key findings and their implications.

Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in