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

Define decay constant of an additional variable

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2004, 20:15
Default Define decay constant of an additional variable
  #1
jim
Guest
 
Posts: n/a
Hi,

Does anyone know how to define a decay constant for a additional variabe in cfx5.6? I am trying to simulate the transport of a chemical which can self-decay in the reactor(decay at a constant rate). I set this chemical as an additional variable, but do not know where to set the decay rate.

Could you please give me some suggestions on how to start such a simulation?

Thanks!
  Reply With Quote

Old   January 30, 2004, 03:50
Default Re: Define decay constant of an additional variabl
  #2
Pascale Fonteijn
Guest
 
Posts: n/a
You should define this as a negative source term, which should be a function of the residence time (= age).

Thus, first you have to define an additional additional variable called 'age' (see below). Then, you have to define a subdomain, in which you can define the source terms. The decay rate of zero order will be something like -constant*age.

You should do this in Pre.

Pascale


<Pre\>

LIBRARY:
ADDITIONAL VARIABLE: age
Option = Definition
Units = [ s ]
Variable Type = Volumetric
END # ADDITIONAL VARIABLE: AGE
END # LIBRARY:

DOMAIN: Domain 1
FLUID MODELS:
ADDITIONAL VARIABLE: AGE
Option = Transport Equation
END # ADDITIONAL VARIABLE: AGE
END # FLUID MODELS:
END # DOMAINomain 1
END # FLOW:

FLOW:
DOMAIN: Domain 1
SUBDOMAIN: Subdomain 1
Coord Frame = Coord 0
Location = Assembly 1
SOURCES:
EQUATION SOURCE: AGE
Option = Source
Source = 1 [s s^-1]
END # EQUATION SOURCE:AGE
END # SOURCES:
END # SUBDOMAIN:Subdomain 1
END # DOMAINomain 1
END # FLOW:

FLOW:
SOLVER CONTROL:
EQUATION CLASS: av
ADVECTION SCHEME:
Option = High Resolution
END # ADVECTION SCHEME:
CONVERGENCE CONTROL:
Physical Timescale = 100 [s]
Timescale Control = Physical Timescale
END # CONVERGENCE CONTROL:
END # EQUATION CLASS:av
END # SOLVER CONTROL:
END # FLOW:
  Reply With Quote

Old   January 30, 2004, 04:16
Default Re: Define decay constant of an additional variabl
  #3
jon
Guest
 
Posts: n/a
You could make the assumption that its a first order reaction and solve the ODE to get concentration in the form of:

c(t)=c0*exp(-k*t)

The constany k, calculated will be the constant in Pascale's above message.

By the way, I think that the above source should be set to density of fluid for a volumetric AV or 1.0 for a specific source. Above you have 1.0 for a volumetric source (which is fine for fluid density=1.0)
  Reply With Quote

Old   January 30, 2004, 07:52
Default Re: Define decay constant of an additional variabl
  #4
jon
Guest
 
Posts: n/a
  Reply With Quote

Old   January 30, 2004, 07:54
Default Re: Define decay constant of an additional variabl
  #5
jon
Guest
 
Posts: n/a
Sorry, I am an idiot.

Pascale was right. It is a source of 1.0 for volumetric sources and density for specific. Sorry.
  Reply With Quote

Old   February 2, 2004, 12:14
Default Re: Define decay constant of an additional variabl
  #6
jim
Guest
 
Posts: n/a
Hi,Pascale and jon

Sorry for the late reply! Thank you so much for your comments. Those are very helpful for me. I will try those today.

I have two questions regarding to your comments:

1. In Pascale's post,source term was defined as: Source = 1 [s s^-1] I am wondering if the unit should be s^-1?

2. Another question is: It seems that modelling the first order decay is much more easier that modeling other orders. However, some of my decay kinetics are second order or half order. Can I directly set input in cfx-pre? if no, how to do it?

Thanks again!

Best wishes!

Jim

  Reply With Quote

Old   February 5, 2004, 17:15
Default Re: Define decay constant of an additional variabl
  #7
Pascale Fonteijn
Guest
 
Posts: n/a
1) I copied it from CFX and it works fine for me.

2) Sorry, I do not see why it is easier to use 1st order than 2nd order. In 1st order your source term contains k1*C, in 2nd order it contains k2*C^2. You have to change the units of your constants k1 or k2 to obtain kmol/m^3/s.

Pascale
  Reply With Quote

Old   February 8, 2004, 22:43
Default Re: Define decay constant of an additional variabl
  #8
jim
Guest
 
Posts: n/a
Thanks a lot, Pascale,

I will try as you suggested.

Jim
  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
UDF carbon conversion papteo Fluent UDF and Scheme Programming 1 August 18, 2011 08:32
Installing OF 1.6 on Mac OS X gschaider OpenFOAM Installation 129 June 19, 2010 10:23
use additional variable for CO concentration MinJaeHong CFX 0 August 25, 2008 06:14
How to delete additional variable in CFX Pre Ahlo CFX 0 August 21, 2008 13:34
Additional Variable - Diffusive Transport Equation RadheShyam Das CFX 3 October 18, 2007 13:35


All times are GMT -4. The time now is 07:46.