Calculating Forces on Surfaces in ParaView: A Technical Guide for Engineers

Published by Ruggero Poletto on

Understanding and quantifying forces acting on surfaces is paramount in many engineering disciplines, particularly in fluid dynamics and structural analysis. ParaView, an open-source, multi-platform data analysis and visualization application, offers robust capabilities for post-processing computational fluid dynamics (CFD) results, including the precise calculation of forces on defined surfaces. This blog post outlines a technical methodology for achieving this in ParaView, using the illustrative example of a water pump impeller.

Introduction to Force Calculation in ParaView

At its core, calculating forces on a surface in ParaView involves integrating pressure and shear stresses over the defined area. This is achieved by leveraging ParaView’s powerful IntegrateVariables filter, typically in conjunction with the Generate Surface Normals filter to correctly orient the force vectors. The accuracy of these calculations is directly dependent on the quality of the CFD solution and the meshing of the surface of interest.

Case Study: Forces on a Water Pump Impeller

Consider a water pump, where the impeller blades are subjected to significant hydrodynamic forces from the fluid flow. Engineers need to accurately quantify these forces for various reasons, including:

  • Structural Integrity: To assess the mechanical stresses on the impeller and ensure it can withstand the operational loads.
  • Performance Evaluation: To understand the thrust and torque generated by the impeller, which directly relates to pump efficiency and head generation.
  • Design Optimization: To iteratively refine the impeller geometry for improved performance and reduced cavitation.

Step-by-Step Methodology

The following steps detail the process for calculating forces on an impeller surface within ParaView, assuming a CFD simulation has already been performed and the results (e.g., pressure, velocity, wall shear stress) are available.

  1. Load the CFD Data: Begin by loading your CFD simulation results into ParaView. This typically involves opening .foam, .vtu, .xmf, or other common CFD output formats. Ensure that the dataset includes scalar fields for pressure (p) and vector fields for wall shear stress (wallShearStress or similar, depending on your solver output). If the solver directly outputs tau_xx, tau_xy, etc., these will need to be combined into a stress tensor or directly used for shear force calculations.
  2. Extract the Impeller Surface: Isolate the surface of the impeller from the volumetric mesh. This can be achieved using the Extract Surface filter. If the impeller is part of a larger domain, you might need to use Threshold or Extract Subset based on cell IDs or material properties to select only the impeller surface before extracting its outer boundary.Figure 1: Extracted surface mesh of a water pump impeller, ready for force calculation.
  3. Generate Surface Normals: For accurate force calculation, the surface normals must be correctly oriented. Apply the Generate Surface Normals filter to the extracted impeller surface. Crucially, ensure that the normals point outward from the fluid domain into the solid surface, as this dictates the direction of the pressure force acting on the surface. You may need to adjust the Flip Normals option if the initial orientation is incorrect.
  4. Calculate Pressure Force: The pressure force on a surface element is given by F_p = -p n dA, where p is the pressure, n is the unit normal vector, and dA is the surface area element. In ParaView, this can be computed using the Calculator filter.
    • Field Type: Set the Attribute Mode to Point Data or Cell Data depending on where your pressure field is defined.
    • Result Array Name: Name the output array, for instance, PressureForceDensity.
    • Expression: Enter the expression -p*Normals. Ensure Normals is correctly capitalized and refers to the output of the Generate Surface Normals filter. If p is defined as cell data, you might need to convert it to point data using Cell Data to Point Data filter or vice-versa for consistency.
  5. Calculate Shear Force: The shear force on a surface element is given by F_s = τw dA, where τw​ is the wall shear stress vector.
    • Field Type: Set the Attribute Mode as appropriate for your wallShearStress vector.
    • Result Array Name: Name the output array, for instance, ShearForceDensity.
    • Expression: Enter the expression wallShearStress.
  6. Integrate Forces over the Surface: With the pressure and shear force densities calculated, the final step is to integrate these over the entire impeller surface to obtain the total forces. Apply the IntegrateVariables filter to the dataset containing PressureForceDensity and ShearForceDensity.
    • Input Array Selection: Select PressureForceDensity and ShearForceDensity in the IntegrateVariables properties panel.
    • The output of this filter will be a single data point containing the integrated values. The PressureForceDensity integral will yield the total pressure force vector, and ShearForceDensity integral will yield the total shear force vector.
    Figure 2: ParaView pipeline illustrating the sequence of filters for force calculation.
  7. Calculate Total Force and Moments (Optional): The total force on the impeller is the vector sum of the pressure and shear forces. This can be done outside of ParaView or by using another Calculator filter on the integrated results.For calculating moments, additional steps are required. The moment arm needs to be defined from a reference point (e.g., the center of the impeller shaft). This typically involves:
    • Calculating the vector from the reference point to each cell centroid on the surface (coords - center_of_rotation).
    • Using another Calculator to compute the cross product of this vector with the force density (cross(coords - center_of_rotation, PressureForceDensity + ShearForceDensity)).
    • Integrating this resulting moment density using IntegrateVariables.

Interpretation and Validation

Once the forces are calculated, it is crucial to interpret them in the context of the pump’s operation.

  • Direction: Verify that the calculated force vectors are physically reasonable. For example, the axial thrust on the impeller should align with the direction of flow through the pump.
  • Magnitude: Compare the magnitudes with theoretical predictions, experimental data, or previous design iterations.
  • Mesh Convergence: Ensure that the force calculations are sufficiently converged with respect to the mesh density. Perform a mesh refinement study to confirm that further refinement does not significantly alter the calculated forces.

Conclusion

ParaView provides a powerful and flexible environment for performing advanced post-processing tasks, including the precise calculation of forces on surfaces from CFD simulations. By meticulously following the outlined steps, engineers can gain critical insights into the hydrodynamic loads acting on components like water pump impellers, thereby facilitating robust design, performance optimization, and informed decision-making. The ability to visualize and quantify these forces graphically further enhances understanding, making ParaView an indispensable tool in the modern engineering workflow.


CloudHPC is a HPC provider to run engineering simulations on the cloud. CloudHPC provides from 1 to 224 vCPUs for each process in several configuration of HPC infrastructure - both multi-thread and multi-core. Current software ranges includes several CAE, CFD, FEA, FEM software among which OpenFOAM, FDS, Blender and several others.

New users benefit of a FREE trial of 300 vCPU/Hours to be used on the platform in order to test the platform, all each features and verify if it is suitable for their needs


Categories: ParaView