CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Define decay constant of an additional variable (https://www.cfd-online.com/Forums/cfx/20137-define-decay-constant-additional-variable.html)

jim January 29, 2004 19:15

Define decay constant of an additional variable
 
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!

Pascale Fonteijn January 30, 2004 02:50

Re: Define decay constant of an additional variabl
 
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 # DOMAIN:Domain 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 # DOMAIN:Domain 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:

jon January 30, 2004 03:16

Re: Define decay constant of an additional variabl
 
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)

jon January 30, 2004 06:52

Re: Define decay constant of an additional variabl
 

jon January 30, 2004 06:54

Re: Define decay constant of an additional variabl
 
Sorry, I am an idiot.

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

jim February 2, 2004 11:14

Re: Define decay constant of an additional variabl
 
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


Pascale Fonteijn February 5, 2004 16:15

Re: Define decay constant of an additional variabl
 
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

jim February 8, 2004 21:43

Re: Define decay constant of an additional variabl
 
Thanks a lot, Pascale,

I will try as you suggested.

Jim


All times are GMT -4. The time now is 22:03.