CGNS file name etc.¶
Abstract¶
“CGNS file name” and “Calculation result in CGNS file” is used together.
Widget to select CGNS file name can be created with valueType attribute “cgns_filename”.
Widget to select calculation result in CGNS file can be created with valueType attribute “result_gridNodeReal” etc., and cgnsFile attribute that refers the name of “CGNS file name” widget.
Definition¶
1<Item name="input_file" caption="CGNS file for input">
2 <Definition valueType="cgns_filename" />
3</Item>
4<Item name="result_to_read" caption="Calculation result to read">
5 <Definition valueType="result_gridNodeReal" cgnsFile="input_file" />
6</Item>
Example of widget¶
Example code to read data¶
Calculation condition, Grid generating condition¶
FORTRAN¶
1integer:: ier
2character(200):: cgnsName, resultName
3
4call cg_iRIC_Read_String(fid, "input_file", cgnsName, ier)
5call cg_iRIC_Read_String(fid, "result_to_read", resultName, ier)
C/C++¶
1int ier;
2char cgnsName[200], resultName[200];
3
4ier = cg_iRIC_Read_String(fid, "input_file", cgnsName);
5ier = cg_iRIC_Read_String(fid, "result_to_read", resultName);
Python¶
1cgnsName = cg_iRIC_Read_String(fid, "input_file")
2resultName = cg_iRIC_Read_String(fid, "result_to_read")
Boundary condition¶
FORTRAN¶
1integer:: ier
2character(200):: cgnsName, resultName
3
4call cg_iRIC_Read_BC_String(fid, "inflow", 1, "input_file", cgnsName, ier)
5call cg_iRIC_Read_BC_String(fid, "inflow", 1, "result_to_read", resultName, ier)
C/C++¶
1int ier;
2char cgnsName[200], resultName[200];
3
4ier = cg_iRIC_Read_BC_String(fid, "inflow", 1, "input_file", cgnsName)
5ier = cg_iRIC_Read_BC_String(fid, "inflow", 1, "result_to_read", resultName)
Python¶
1cgnsName = cg_iRIC_Read_BC_String(fid, "inflow", 1, "input_file")
2resultName = cg_iRIC_Read_BC_String(fid, "inflow", 1, "result_to_read")
Calculation result types and corresponding “valueType” values¶
The list of calculation result types and corresponding “valueType” values are shown in Table 9.
Definition position |
Value type |
Value of “valueType” attribute |
---|---|---|
Global |
Real |
result_baseIterativeReal |
Global |
Integer |
result_baseIterativeInteger |
Grid Node |
Real |
result_gridNodeReal |
Grid Node |
Integer |
result_gridNodeInteger |
Grid Cell |
Real |
result_gridCellReal |
Grid Cell |
Integer |
result_gridCellInteger |
Grid Edge (I direction) |
Real |
result_gridEdgeIReal |
Grid Edge (I direction) |
Integer |
result_gridEdgeIInteger |
Grid Edge (J direction) |
Real |
result_gridEdgeJReal |
Grid Edge (J direction) |
Integer |
result_gridEdgeJInteger |