"""Source Term in UDS"""
Hi every body I want to add a source term in UDS. Suppose the scalar is "fi" and the source is S=A+B*(fi)+C*(d(fi)/dx). How can I produce d(fi)/dx ?
Thanks for your help |
Re: """Source Term in UDS"""
<font face = "courier new">You do not "produce" the derivative. You just calculate the derivative and enter the expression. Refer to the example of adding a momentum source in the UDF manual under DEFINE_SOURCE. It clearly explains.</font>
|
Re: """Source Term in UDS"""
Thank for your response, but my PDE is
[d^2(fi)/d(x^2)]+[d^2(fi)/d(y^2)]=A*[d(fi)/dt]+B*(fi) +C*(d(fi)/dx so, I want to add A+B*(fi)+C*(d(fi)/dx as a source term. How can I do it? Please explain more. |
Re: """Source Term in UDS"""
<font face = "courier new">I presume you are not too familiar with the macro stuff in F6. I strongly suggest you go through Chapter 5 of the UDF manual.
That said, your problem can be tackled by accessing the derivatives of the particular variable from F6. Refer to page 5-5 of UDF manual to set up F6 for accessing the gradient information. I presume that "fi" in your equation is a UDS. Hence the derivative of the UDS is accessed by C_UDSI_G(c,t,1) Now when you specify a source term for a variable phi you are NOT required to find out the derivative of that variable with respect to spatial coordinate, BUT the partial derivative of the "sourece term" eith respect to the variable. Hence if fi^2 is the source term then B = 2*fi. find your B similarly and use the macros to get your expression. Regards Murali</font> |
Re: """Source Term in UDS"""
A small correction:
if fi^2 is the source term then B = 2*fi. Sorry. It should read: if fi^2 is then derivative of source term = 2*fi. Hence A= 0 and B = phi and dS[1] = 2*fi Regards Murali |
Re: """Source Term in UDS"""
Thanks for your help murali As another question, In general form of UDS (chapter 9.2) I assumed ro(Density) as porosity(coefficient of d(fi)/dt) ,but in my problem the porosity varies in the cells.I have a database file of prosity and want to assign it to the cells. How it's possible?
Thank you in advance |
Re: """Source Term in UDS"""
<font face = "courier new">Sebeci:
Nice qn. As far as I know porosity "cannot" be a user modifiable function in F6. I suggest you discuss this with FLUENT people. Murali </font> |
All times are GMT -4. The time now is 05:58. |