Creating a skelton

First, create a scelton of a solver. Create a new file with the source code in List 6, and save as “sample.f90”. At this point, the solver does nothing.

Compile this source code. The way to compile a source code differs by the compiler. Refer to Linking iRIClib, cgnslib using Fortran for the procedure to compile using Intel Fortran Compiler and gfortran.

List 6 Sample solver source code
1
2
3
4
5
6
7
8
program SampleProgram
  implicit none
  include 'cgnslib_f.h'
  include 'iriclib_f.h'

  write(*,*) "Sample Program"
  stop
end program SampleProgram

When it was compiled successfully, copy the executable file to the folder you created in Creating a folder, and rename it into the name you specified as [executable] attribute in Defining basic information. This time, rename into “solver.exe”. Copy the DLL files into that folder, that is needed to run the solver.

Now check whether it can be launched from iRIC successfully.

Starts a new project that uses “Example Solver”, and performs the following:

Menu bar: [Simulation] (S) –> [Run] (R)

The [Solver Console] opens, and the message “Sample Program” will be shown (Figure 17). If the message is shown, it means that the solver was launched by iRIC successfully.

../_images/solverconsole_only_message.png

Figure 17 The [Solver Console]