CONVERGE CFD Software

Blog

Published January 21, 2025

Visualizing Your Results: How to Export Lagrangian Data Into CGNS

Author:
Allie Yuxin Lin

Marketing Writer

Standardization is a foundational pillar of modern civilization, shaping our world in ways we might not even notice. It can be found in our currency, our language, and our sciences. In computational fluid dynamics (CFD), standardization has an indispensable role in ensuring consistency, accuracy, and interoperability between different CFD tools. Some examples of standardization in CFD include standards on boundary conditions, mesh generation, and file formats. 

A well-known file format system is the CFD General Notation System (CGNS), which is a general and extensible standard for the storage and retrieval of CFD output files. Storing such files in CGNS format allows your CFD data to be easily read and interpreted by many post-processing tools, such as ParaView, Tecplot, EnSight, Cassiopée, and more. This post-processing is a critical part of CFD, since it allows for the visualization of raw data in the form of plots, images, videos, and more. By following the CGNS standard, CFD engineers can run their simulations, export their data, and prepare it for analysis, all in one streamlined process.

However, as of May 2024, the CGNS conventions lacked documentation on particle data. Therefore, if your CFD results included Lagrangian data or particle-laden flows, you would have needed to use a different file format for exporting the data to post-processing. As such, several CFD solvers, CONVERGE included, exported their files in a proprietary format.

To address this limitation, Convergent Science proposed an extension to the CGNS format that would enable the export of particle data. With the acceptance of our proposal by the international CGNS steering committee, we have compiled the appropriate modifications to the various components of the CGNS: the SIDS (Standard Interface Data Structures), the MLL (Mid-Level Library), and the FMM (File Mapping Manual).

CONVERGE simulation of a spray jet in crossflow showing the modeling shift from an Eulerian approach to Lagrangian. 

The CGNS platform now includes new nodes containing precise definitions for information related to particle data. The highest level structure in a CGNS database is CGNSBase_t, a self-contained entity with data that can be used to archive and reproduce a complete CFD computation. To this base, we have added a new node, defined as type ParticleZone_t. In any given base, there can be multiple nodes of type ParticleZone_t, where each node contains data pertaining to a specific set of particles. Different groups of particles can be differentiated using the FamilyName_t and AdditionalFamilyName_t nodes. ParticleCoordinates_t describes the physical coordinates of the particle centers and contains a list of data arrays for the individual components of the position vector. Additionally, ParticleSolutions_t describes the solution on each particle and contains a list for the data arrays of the individual solution variables. Since the framework allows multiple particle sets within a single ParticleZone_t, there can be numerous instances of both ParticleCoordinates_t and ParticleSolutions_t. These two nodes are linked to the simulation time using ParticleIterativeData_t, which is used to record pointers to particle data at different time steps.

While ParticleZone_t nodes are useful for exporting Lagrangian data, Zone_t nodes export Eulerian data. These types are independent, and particles defined in a ParticleZone_t do not necessarily need to be carried by a flow defined in a Zone_t. Simulation results can be fully defined by a CGNSBase_t and a ParticleZone_t (i.e., without a Zone_t), when there is no Eulerian data to export. Consequently, our extension may be employed by codes that use smoothed-particle hydrodynamics (SPH), a meshfree Lagrangian computational method. 

In order to describe the governing particle equations, we have created several different model and equation nodes which may be found in ParticleEquationSet_t. This structure, which can be defined as a child node of CGNSBase_t and/or ParticleZone_t, includes the dimensionality of the governing equations, as well as a collection of equation-set descriptions. The additional models can be used to describe particle breakup, particle collision, particle forces (including lift and drag), wall interactions, and phase changes.

If you have any questions regarding this extension to the CGNS format, please contact us on our website! We are more than happy to talk to you about standardization in CFD, the limitations of the previous CGNS standard, and how Convergent Science proposed and implemented a solution to that constraint.

Contact Us Today

Learn more about how CONVERGE helps you quickly and accurately solve your CFD problems.