|
[Sponsors] |
June 22, 2007, 15:29 |
STAR source UDF syntax
|
#1 |
Guest
Posts: n/a
|
Hi,
Another question about syntax for UDFs... In SORSCA.F, I'm having a hard time getting the scalar sources to perform the way I expect. I'd like to have cells ICTID 4 & 5 consume/produce scalars according to the following (the main part of my SORSCA.F subroutine is below)... IF(IS.EQ.1.AND.ICTID.EQ.4)THEN !scalar 1 is hydrogen S1P=(-1)*Janode/Z/F*MH2*GREAT S2P=GREAT END IF IF(IS.EQ.2.AND.ICTID.EQ.4)THEN !scalar 2 is water S1P=Janode/Z/F*MH2O*GREAT S2P=GREAT ENDIF IF(IS.EQ.3.AND.ICTID.EQ.5)THEN !scalar 3 is Nitrogen (inert) S1P=Jcathode/Z/F*MN2*.7/0.3*GREAT !For a given amount of Oxygen in a space, there will be 0.7/0.3 times as much N2 S2P=GREAT ENDIF IF(IS.EQ.4.AND.ICTID.EQ.5)THEN !scalar 4 is oxygen S1P=(-Jcathode)/Z/F*MO2*GREAT S2P=GREAT ENDIF Can anyone notice any obvious errors in the above coding? Thanks in advance, -Emmanuel |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Source Terms in Star-CCM+ | mk_mat | Siemens | 2 | March 13, 2012 09:14 |
species source in star ccm+ | jef | Siemens | 3 | April 11, 2008 15:46 |
Order of Call for STAR Source UDFs | Emmanuel Resch | Siemens | 2 | June 25, 2007 06:56 |
How to add fire source in STAR-CD?? | raymond | Siemens | 2 | February 22, 2002 14:49 |