CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > STAR-CD

Look-up table for combustion problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 6, 2012, 12:06
Default Look-up table for combustion problem
  #1
Senior Member
 
Join Date: Apr 2009
Posts: 118
Rep Power: 8
lost.identity is on a distinguished road
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!
lost.identity is offline   Reply With Quote

Old   November 6, 2012, 13:12
Default
  #2
Senior Member
 
Pauli
Join Date: Mar 2009
Posts: 181
Rep Power: 8
Pauli is on a distinguished road
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
Pauli is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conduction problem venkataramana OpenFOAM 3 December 1, 2013 08: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


All times are GMT -4. The time now is 18:33.