|
[Sponsors] |
November 6, 2012, 11:06 |
Look-up table for combustion problem
|
#1 |
Senior Member
Join Date: Apr 2009
Posts: 118
Rep Power: 17 |
Hi,
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? Thanks! |
|
November 6, 2012, 12:12 |
|
#2 |
Senior Member
Pauli
Join Date: Mar 2009
Posts: 189
Rep Power: 17 |
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 open(180,file='MyFile.txt',status='old') i = 1 11 read(180,*,end=21) x,y,z i = i+1 goto 11 21 continue close(180) ndata_1 = i-1 endif |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
conduction problem | venkataramana | OpenFOAM | 3 | December 1, 2013 07:30 |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 04:43 |
Incoherent problem table in hollow-fiber spinning | Gianni | FLUENT | 0 | April 5, 2008 10:33 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 06:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |