CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens

subroutine reacfn.f

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2006, 20:39
Default subroutine reacfn.f
  #1
kris
Guest
 
Posts: n/a
I am thinking of using star-subroutine reacfn.f

sample code included Hybrid-reaction model is as follow

************************************************** ******

SUBROUTINE REACFN(RATE)

~~~~~~~~~~~~ abbrev. ~~~~~~~~~~~

CC WMF and WMR are fuel and reactant molecular weights

ZERO=0.0

WMF=16.0

WMR=32.0

UGC=8314.3

IF(IR.EQ.1) THEN

CC Eddy break-up rate dependent on minimum of fuel, reactant and CC Product mass fractions

RMFR=MAX(ZERO,AMFU)

RRFR=MAX(ZERO,AMRC(1)/4.0)

RMFR=MIN(RMFR,RRFR)

RPFR=MAX(ZERO,BEBM*AMFB)

RMFR=MIN(RMFR,RPFR)

CC Eddy break-up reaction rate

RSOUE=DEN*TAUL*AEBM*RMFR

CC Chemical kinetic rate

RCON=ARCK*WMF*

* T**BETCK*EXP(-EACT/(UGC*T))

RCON=RCON*(DEN*MAX(ZERO,AMFU)/

* WMF)**RTCKF

RCON=RCON*(DEN*MAX(ZERO,AMRC(1))/

* WMR)**RTCKR(1)

CC Minimum rate

RATE=MIN(RSOUE,RCON)

ENDIF

************************************************** ******

2-step reaction model

1st C3H8 + 3.5O2 -> 3CO + 4H2O ==>rate1

2nd CO + 0.5O2 -> CO2 ==>rate2

if i want to use 2 step model, how do I use those? because the problem is that return value is only one "RATE"!

in addition, I compared with result using subroutine sample codes and using STAR-CD setting value about 1 step reaction model

but I found out different contours of Temperature

what is the problem?

thank you for my words

  Reply With Quote

Old   February 17, 2006, 13:20
Default Re: subroutine reacfn.f
  #2
Yongzhe Zhang
Guest
 
Posts: n/a
Parameter IR indicates which reaction RATE corresponds to. So this subrotine is called for each reaction, each cell. You only need to do sth. like if (ir. eq. 1) ... rate=rate1 elseif (ir .eq. 2) ... rate=rate2 endif

You need to make sure you set up everything exactly same to each other for the two cases. THe sample subroutine apparently is a combined-rate EBU model. In pro-star, you can set is as EBU, combined-time, combtined-rate or finite-rate chemistry.

  Reply With Quote

Old   February 20, 2006, 20:17
Default Re: subroutine reacfn.f
  #3
kris
Guest
 
Posts: n/a
Dear. Zhang

I have one more question

I have make codes for propane and air

would you tell me why there is the different results between coding and PROSTAR setting(combined rate model)

my coding have something wrong ?

the sample code is as follow 1-STEP(combined model)

************************************************** *

ZERO=0.0

WMF=44.1

WMR=32.0

UGC=8314.3

s_oxid=5*WMR/(1.0*WMF)

s_prod=1.0+s_oxid

Aebu=4.0

Bebu=0.5

IF(IR.EQ.1) THEN CC Eddy break-up rate dependent on minimum of fuel, reactant and

CC Product mass fractions

RMFR=MAX(ZERO,AMFU)

RRFR=MAX(ZERO,AMRC(1)/s_oxid)

RMFR=MIN(RMFR,RRFR)

RPFR=MAX(ZERO,Bebu*AMFB/s_prod)

RMFR=MIN(RMFR,RPFR)

CC Eddy break-up reaction rate

RSOUE=DEN*TAUL*Aebu*RMFR

cc Extinction

tau_tur=0.41*(VISM/DE/DEN)**(1/2)

tau_chem=DEN*AMFM/RSOUE

CC Minimum rate

IF(tau_tur<tau_chem) THEN

RSOUE=0.0

ENDIF

CC Chemical kinetic rate

RCON=ARCK*WMF*

* T**BETCK*EXP(-EACT/(UGC*T))

RCON=RCON*(DEN*MAX(ZERO,AMFU)/

* WMF)**RTCKF

RCON=RCON*(DEN*MAX(ZERO,AMRC(1))/

* WMR)**RTCKR(1)

RATE=MIN(RSOUE,RCON)

ENDIF ************************************************** ******

and more,...

when I make code as follow, Is the parameters in AMFB,AMFU in reaction1 part different with AMFB,AMFU in reaction2 ??

IF(IR.EQ.1) THEN ...

AMFB - Fuel burnt mass fraction

AMFU - Fuel mass fraction

AMRC(IA) - Reactant IA mass fraction

RTCKR(IA) - Reactant IA exponent

RATE=MIN(RSOUE,RCON)

ENDIF ...

IF(IR.EQ.2) THEN

...

AMFB - Fuel burnt mass fraction

AMFU - Fuel mass fraction

AMRC(IA) - Reactant IA mass fraction

RTCKR(IA) - Reactant IA exponent

RATE=MIN(RSOUE,RCON) ...

ENDIF

RETURN

END
  Reply With Quote

Old   February 23, 2006, 10:02
Default Re: subroutine reacfn.f
  #4
Yongzhe Zhang
Guest
 
Posts: n/a
For EBU setup, did you use local or global time scale? For rate expression, did you include the products? The code for extinction is not clear, so no idea about it.

The RATE is the reaction rate for leading reactant. For two reactions, the reactants can't be IA at the same time, because the leading reactants must be different for different reactions.

  Reply With Quote

Old   February 23, 2006, 23:31
Default Re: subroutine reacfn.f
  #5
kris
Guest
 
Posts: n/a
I used local time scale and product is as follow

RPFR=MAX(ZERO,Bebu*AMFB/s_prod)

and I'm sorry that I added extinction method.

How can I use variables, such as AMFB,AMFU,AMRC(1) for 2-step reaction?

Aren't there other method that I can get a scalar value

How can I get the scalar values for 2nd step(CO+O2->CO2)?

*******************************************

COMMON/USREAI/IR,NR

COMMON/USREAR/TAUL,TAUG,AEBM,BEBM,AMFU,AMFB,ARCK,BETCK,EACT,

* RTCKF,AMRC(3),RTCKR(3)

DIMENSION SCALAR(50), HFORM(50)

~~~~~~~~abbrev. ~!~~~~~~~~~

EQUIVALENCE( UDAT04(006), P )

EQUIVALENCE( UDAT04(008), TE )

EQUIVALENCE( UDAT04(009), SCALAR(01) )

EQUIVALENCE( UDAT04(059), U )

EQUIVALENCE( UDAT04(060), V )

EQUIVALENCE( UDAT04(061), W )

EQUIVALENCE( UDAT04(062), VISM )

~~~~~~~~abbrev. ~!~~~~~~~~~ ************************************

  Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what subroutine is used? nut Siemens 1 December 8, 2006 13:56
subroutine Tipakorn Siemens 0 May 10, 2006 04:16
About reacfn.f and sorent.f subroutines Esti Siemens 2 January 20, 2005 09:28
Use subroutine Moon Siemens 1 March 13, 2003 07:49
Eddy-Break-Up in Reacfn.f and Sorent.f Daniel Siemens 6 December 2, 2001 04:21


All times are GMT -4. The time now is 13:12.