- **CFX**
(*http://www.cfd-online.com/Forums/cfx/*)

- - **Unit for a source term
**
(*http://www.cfd-online.com/Forums/cfx/21440-unit-source-term.html*)

Unit for a source term
Hi, all
I have just got a problem about the unit of a source term, hope someone can help me figure it out. To solve a bacteria decay problem, I set two volumetric additional variables, bacteria A(m^-3) and chemical B(kg m^-3). The source term of A (decay rate)is 0.6*A*(k*B^0.7)^1.4, which is based on experimental study. K is a constant with a unit of s^-1. My question is how to set the unit for this source term? The cfx-pre always remind me that I should set it as dimentionless, but the sover showed error and say it should a unit of [m^-3*s^-1]. Any comments are welcome. Best regards! JP |

Re: Unit for a source term
Hi,
The transport equation for an Aditional Variable is: d(phi)/dt + ... = ... + S(phi)So, the source term S(phi) has to have the units of phi devided by s. This is the case when you chose the option Source. However if you chose the option Total Source, CFX interprets S(phi) as being the Total Source devided by volume, and therefore the Total Source term has to have the units of phi multiplied by m^3 and devided by s.But as it seems you're using the option Source, the source term of your variable A must have units [m^-3 s^-1]. So I don't understand how CFX-Pre reminds you to set the source term as dimensionless!!!If you try to introduce a value instead of the expression, what are the units you see? |

Re: Unit for a source term
Hi, Rui,
You are right. I understand that in my case the source term of variable A must have units [m^-3 s^-1]. However, since the source term of A ( SA=-0.6*A*(k*B^0.7)^1.4 )is based on experimental study, cfx-pre will take the unit as (m^-3*(kg*m^-3)^0.7)^1.4. The error message is as follows: CEL error: Error in setting: "SA" via the expression: -0.6*A*(k*B^0.7)^1.4 [m^-3*s^-1]; Error detected at the end of the expression.; Exponent must be dimensionless; So I guess I should change my question as: how to make the unit of source term independent of the variables in its expression. Thanks a lot for your comments! Best regards! JP |

Re: Unit for a source term
Hi,
That's what I thought, CFX-Pre isn't telling you that the source term must be dimensionless, it is telling you that the exponent 1.4 has to be dimensionless.When you type 1.4 [m^-3 s^-1], this means 1.4 m^-3*s^-1. If A has units [m^-3], B has units [kg m^-3] and if you have defined K with units [s^-1], you'll have to do: SA = -0.6*A*1 [s^-1]*(K*1 [s]*(B*1 [kg^-1 m^3])^0.7)^1.4K*1 [s] is dimensionless, and B*1 [kg^-1 m^3] is also dimensionless, so SA will have units [m^-3 s^-1]. Note that when you type, for example, K*1 [s], it means that K * 1s, and not that K*1 has units [s] Regards, Rui |

Re: Unit for a source term
Hi, Rui
I just used a similar approach solved my problem, but your method is much more straightfoward. Your explaination also helps me a lot in understanding the definition of the units in CFX. Thanks a lot! Best regards! JP |

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