CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

UDS n It's source term

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Thomas

LinkBack Thread Tools Display Modes
Old   December 16, 2003, 20:34
Default UDS n It's source term
Posts: n/a
Dear all,

I have an equation to solve. I think I can use UDS for that. The eqn is like,

A div(phi)=-((phi)^2)/B Where A and B are constant values.

Now I need to solve this differential eqn. using UDS for phi. Can anybody suggest how I can do that.

Thanks for your time and effort.

  Reply With Quote

Old   December 17, 2003, 13:45
Default Re: UDS n It's source term
Posts: n/a
Hi, I kinda face the same kind of problem recently but I did not have yet enought time to test my programm lines so I am interested in your problem and the way to solve it. Here is some thoughts.

According to your equation, I agree to say phi needs to be solved by a scalar (UDS or UDSI -> same thing). UDS transport equation transport are composed of 4 terms: advection, unsteaday, diffusion, source term. I think only the source term can help you to get the solution of your problem. So what I personaly did and what I would suggest is to declare in a UDF a DEFINE_SOURCE. In this define_source devlare a UDSI = phi. There you are gonna be able to get macro to calculate the gradient 'C_UDSI_G(c,t,i)'in all direction. Therefore you can calulate you DIV(phi) term and get your solution phi. According to what I read on the documentation C_UDSI_G seems to be a matrix, so you need to compute a dot product to calculate you divergenge term. Then hook you source term in your fluid zone panel next to the term scarlar_(i) (i = indenfier you gave to your UDSI (0,1,2,3....). Do not forget to declare your sclar BCs.

Hope I am enought clear and do not forget to let me know how your results are going and how is the life at Western ? Who are you working with ? What department are you in ?

Cheers Thomas
  Reply With Quote

Old   December 17, 2003, 14:07
Default Re: UDS n It's source term
Posts: n/a
yeah Thomas, I need to to have the DEFINE_SOURCE to solve (phi^2)/B. But the problem is how can I implement this equation in UDS. What I mean is, the UDS solves

div^2(phi) = S

while my differential equation of kind,

div(phi) = S

How can I solve this equation. do you get my point?

Well, I m doing Masters' in Chemical engineering dept. My personal experience with western is good, I like the campus and work environment. Where are you and what do you do?


  Reply With Quote

Old   December 17, 2003, 17:31
Default Re: UDS n It's source term
Posts: n/a
Hey, Well I do not understand what you mean by 'UDS is solving div^2(phi) = S' and sincerely I have never seen the operator div^2 before, unless you try a way to mean the laplacian operator in the duffusivy term of the transport equation. your equation is A.div(phi)=-((phi)^2)/B so your solution will be to find in each cells the value of 'phi' which will be phi(cell) = square [A/B . div(phi)]. Am I wrong ? You might also discretize the 'phi(cell)' term but I don't see the interest of doing that as long as phi(cell) is the exact value of the solution you want. So the only unknown you have is div(phi)= d(phi)/dx + d(phi)/dy + d(phi)/dy (obviously phi is not a vector but a scalar also called potential). So the way to calculate that is to define phi as a UDSI(c,t,i) and calculate the right dot_product with the gradient matrix C_UDSI_G(c,t,i). Then put that in a DEFINE_SOURCE which will allow you to get the 'phi' value. Of course the source term will be the only term of your scalar transport equation which means when you declare your UDSI in fluent you are gonna to put 'none' to 'unsteady' and 'flux' term. So the DEFINE_SOURCE and the UDS is a way to solve your equation. However I wonder if you cannot replace the define_source and the UDS by modifying the DEFINE_FLUX macro, better user could answer. This is the way I see it. You or someone else can show me if I am wrong and I would be very interested to know why !

I was in western last year in the chem. department for an exchange. I did the 497 project with Prakash and Ali was my ghost TA . I am french and undergraduate in Process Eng.

Wait for your answer.


johnwinter likes this.
  Reply With Quote


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
Problem of SOURCE term gradient in UDS wind Fluent UDF and Scheme Programming 5 June 21, 2013 05:39
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 13, 2000 23:03

All times are GMT -4. The time now is 18:33.