Skip to main content

Common Fluids Format 2024 R2

<a class="el" href="classansys_1_1_project_1_1_project.xhtml" title="Base class for Project API, also see SimProject.">Project</a>

Last update: 16.07.2025

The Project Concept

A Project is an index file that provides hierarchical organization for file references and their associated properties (Metadata). The files can be organized locally within a project folder or elsewhere as defined by a file URL. The index file is an XML file (file extension: *.flprj), which is read, written, and modified using the ansys::Project API.

There are two types of project storage:

  • Managed storage: A Project with a project folder: A folder is created side by side with the index file. All files imported to the project are copied into the project folder. Erasing the project will erase all files. For example
    FILENAME.flprj
    FILENAME.cffdb/
      file      
      folder/  
      folder/file 
    
  • Free storage: Project is an index file only. All files are referenced as either a relative or global/remote path. Relative paths are calculated from the project file location.
    FILENAME.flprj
    file     (indexed as ./file)
    folder/file   (indexed as ./folder/file)
    /home/user/file   (indexed as /home/user/file)
    

The project internal hierarchy is organized using Path. The file or folder references are stored as a URL.

A Path will define a unique location in the project, the file name of a path entry does not need to match the URL filename.

/Meshes/file.cas  -> ./file.cas
/Meshes/database/  -> /share/all/mesh-database/

Project Buiding Blocks

At the lowest level, the project contains only either:

  • Files
  • Folders: A container (typically a directory) containing multiple Files
  • Links: A link to another project location

All project items will define the following properties:

  • Name: The name of the item in the project, used in the access Path
  • Metadata: A dictionary of properties (variable -> value)

Files and folders will define a URL to a storage location.

  • If the URL is empty, the file or folder is only stored in the project index and can be seen as a virtual filesystem. Virtual items can have Metadata.
  • The URL can point to a location currently accessible, or to a file that is removed or to a file that will be created in the future in that location.

Simulations

The Project allows storage of any file or folders. However, specialized concepts specific to computational applications are defined.

  • SimProject: Specialized version of Project, set up to manage the Simulation and its Results.
  • Simulation: A folder stored in the project, containing a Case and its Result files, stored into Run subfolders.
  • Run: A subfolder of a Simulation, containing Results grouped in Output subfolders.
  • Output: Groups of Result files. For example, an Output might be recorded for each time step or parametric design point. Typically, an Output is created as a virtual subfolder, as all of the files are stored in the Run folder, but the Output is used to regroup the files created by each step.
  • Result: One output file.

Simulation, Run, and Output are project folders. The storage policy might define them to be actual folders on disk, or project-only concepts.

For example, for a storage policy in which Output is virtual folders, all Results are side by side in the Run folder on the disk:

Sim1/demo.cas                   -> Sim1/demo.cas
Sim1/run1/out1/demo.000001.dat  -> Sim1/run1/demo.000001.dat
Sim1/run1/out2/demo.000002.dat  -> Sim1/run1/demo.000002.dat
Sim1/run1/out3/demo.000003.dat  -> Sim1/run1/demo.000003.dat

Iterators

All operations in the project are done through the Iterator. The Iterator is a pointer to a location in the project. It is possible to obtain the Iterator for a specific Path, or to navigate through the children, parent, or links from an Iterator or its Metadata.

Simulation, Run, Output, and Result are specialized iterators, offering extra functions and validations for the file/folder at that location.

Connect with Ansys