Real number

Definition

List 68 Example of a real number type condition definition
1<Item name="g" caption="Gravity [m/s2]">
2  <Definition valueType="real" default="9.8" />
3</Item>

Example of widget

../_images/widget_example_real.png

Figure 55 Widget example of a real number type condition

Example code to read data

Calculation condition, Grid generating condition

FORTRAN

List 69 Code example to load a real number type condition (for calculation conditions and grid generating conditions) FORTRAN
1integer:: ier
2double precision:: g
3
4call cg_iRIC_Read_Real(fid, "g", g, ier)

C/C++

List 70 Code example to load a real number type condition (for calculation conditions and grid generating conditions) C/C++
1int ier;
2double g;
3
4ier = cg_iRIC_Read_Real(fid, "g", &g)

Python

List 71 Code example to load a real number type condition (for calculation conditions and grid generating conditions) Python
1g = cg_iRIC_Read_Real(fid, "g")

Boundary condition

FORTRAN

List 72 Code example to load a real number type condition (for boundary conditions) FORTRAN
1integer:: ier
2double precision:: g
3
4call cg_iRIC_Read_BC_Real(fid, "inflow", 1, "g", g, ier)

C/C++

List 73 Code example to load a real number type condition (for boundary conditions) C/C++
1int ier;
2double g;
3
4ier = cg_iRIC_Read_BC_Real(fid, "inflow", 1, "g", &g)

Python

List 74 Code example to load a real number type condition (for boundary conditions) Python
1g = cg_iRIC_Read_BC_Real(fid, "inflow", 1, "g")