Outputting calculation results

Outputs the calculation results to the CGNS file.

The calculation result types that iRIClib can output are as follows:

  • One value for each time step
  • Value defined at grid nodes
  • Value defined at grid cells
  • Value defined at grid edges
  • Value defined at particles
  • Value defined at particles (groups supported)
  • Value defined at polygon or polydata

In case of outputting every types, you have to use the functions in Table 68 and Table 69.

Please refer to One value for each time step to Value defined at polygons or polylines for detailed procedure to output each types.

Table 68 Subroutines to use before and after outputting calculation result for each timestep
Subroutine Remarks
iric_check_cancel_f Checks whether user canceled solver execution
iric_check_lock_f Checks whether the CGNS file is locked by GUI
iric_write_sol_start_f Inform the GUI that the solver started outputting result
iric_write_sol_end_f Inform the GUI that the solver finished outputting result
cg_iric_flush_f Flush calculation result into CGNS file
Table 69 Subroutines to output time and iteration count
Subroutine Remarks
cg_iric_write_sol_time_f Outputs time
cg_iric_write_sol_iteration_f Outputs iteration count

Note

Vector quantities and scalar quantities

In iRIClib, the same subroutines are used to output vector quantities and scalar quantities.

When outputting vector quantities, output each component with names like “VelocityX” and “VelocityY”.

Please note that if you use names whose last character is “X”, “Y”, or “Z”, the value is not loaded properly by GUI, and user can not visualize the value. You can use lower case letters “x”, “y”, or “z” instead.

Note

Special names for calculation results

For calculation results, iRIC defines special names, and when you want to output calculation result for certain purposes, you should use those names. Refer to Calculation results for those names.

Note

Grid nodes, grid cells, and grid edges

For grid related values, now iRIClib has function to output values defined at grid nodes, grid cells and grid edges.

Basically, please select the functions so that you can output the values at the position where the variable is defined in your solver.

There is an exception: Please output vector quantities at grid nodes. If you output vector quantities at grid cells, iRIC GUI can not visualize arrows, streamlines or particles for that value.