Look-up table for combustion problem
I'm trying to use a user-defined combustion model in Star-CD. I do this by including additional scalars where the source terms are included in sorsca.f.
However, the problem I'm facing is the model I'm using uses a look-up table. Ideally, I would like this look-up table to be called only once and have the data from the table saved in arrays which will be used later during the computations.
If I read this table in sorsca.f, does that mean it will be read at every cell and at every time step?
That will significantly slow down my code. Is it possible to read it at the start of the calculations?
You need to wrap the file read in a conditional which only allows the file read the first time through. INTFLG is an array you can use to store the conditional value.
C ... Set flag to only read files on first pass
if( INTFLG(14).ne.-999 )then
INTFLG(14) = -999
i = 1
11 read(180,*,end=21) x,y,z
i = i+1
ndata_1 = i-1
|All times are GMT -4. The time now is 14:11.|