CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Definition of energy equation using UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2015, 23:22
Default Definition of energy equation using UDF
  #1
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 12
aestas is on a distinguished road
Hello,my friend.
Recently i have been working on a plasma simulation problem.I have a problem in defining the energy equation.

In the Fluent 6.3 manual,fluent define the energy equation like this:
1111.jpg

and i made my equation similar to that form:
123.jpg

How ever in the UDS theory section, fluent solve the equation like this
123123123.jpg

if i make my energy equation into this form, it will have different source terms.

so i have a question, what scalar does the energy equation solve?T or h or else? what source terms should i define?
aestas is offline   Reply With Quote

Old   April 24, 2015, 06:21
Default
  #2
Member
 
Join Date: Oct 2011
Posts: 34
Rep Power: 15
chittipo is on a distinguished road
Hi,
sorry, I deleted my earlier post as I am not totally sure...
chittipo is offline   Reply With Quote

Old   April 24, 2015, 09:04
Default
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
In the UDS section, the Fluent manual describes how Fluent solves the equations for a UDS. It does not mention the energy equation there. Energy is not a UDS.
pakk is offline   Reply With Quote

Old   April 24, 2015, 10:06
Default
  #4
Member
 
Join Date: Oct 2011
Posts: 34
Rep Power: 15
chittipo is on a distinguished road
Hi, now i feel bit comfortable to reply.
Let us say your equation t1 = t2 + t3
t1 = convection
t2 = diffusion
t3 = source
you do not have transient term.

Is it possible to transform "h + 0.5 u^2" to T. Then it is good. there are two ways.


1. keep only "rho and v" multiplication factor in convection term (t1) and take remaining coefficient to other side. This is only possible you have constant coefficient.
In this case your diffusion term (lambda/this_coefficient) and source term would have division with this coefficient.

2. keep resulted new coeficient with convection term ("t1") itself. But, there should be some where in UDS panel, there should be an option to select user defined convection term. By default it is "mass flow". Select this user defined convection, provide your "rho*v*this_coefficient" as a flow term. The corresponding macro "DEFINE_UDS_FLUX"

If there are additions/substractions, they should go to source term (as you rightly said before).

through DEFINE_DIFFUSIVITY() evaluated as it is now units lamda (W/m.s). If there are any coefficients they should be part of this Macro. e.g., lamda*x*y/z

through DEFINE_SOURCE() you get t3

Note: all the units should match. It appears t1, t2 are in W/m3.s. Therefore t3 should also be in same units


NOTE: I have last used FLUENT in 2012. If there is something changed i am sorry.
chittipo is offline   Reply With Quote

Old   April 24, 2015, 13:04
Default
  #5
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 12
aestas is on a distinguished road
Quote:
Originally Posted by pakk View Post
In the UDS section, the Fluent manual describes how Fluent solves the equations for a UDS. It does not mention the energy equation there. Energy is not a UDS.
Thanks my friend. You mean that i should follow exactly the form of energy equation defined in fluent? I just need to define the source term in my equation(equation 1 and source one in the attachment file)?
123123.jpg
aestas is offline   Reply With Quote

Old   April 24, 2015, 13:07
Default
  #6
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 12
aestas is on a distinguished road
Quote:
Originally Posted by chittipo View Post
Hi, now i feel bit comfortable to reply.
Let us say your equation t1 = t2 + t3
t1 = convection
t2 = diffusion
t3 = source
you do not have transient term.

Is it possible to transform "h + 0.5 u^2" to T. Then it is good. there are two ways.


1. keep only "rho and v" multiplication factor in convection term (t1) and take remaining coefficient to other side. This is only possible you have constant coefficient.
In this case your diffusion term (lambda/this_coefficient) and source term would have division with this coefficient.

2. keep resulted new coeficient with convection term ("t1") itself. But, there should be some where in UDS panel, there should be an option to select user defined convection term. By default it is "mass flow". Select this user defined convection, provide your "rho*v*this_coefficient" as a flow term. The corresponding macro "DEFINE_UDS_FLUX"

If there are additions/substractions, they should go to source term (as you rightly said before).

through DEFINE_DIFFUSIVITY() evaluated as it is now units lamda (W/m.s). If there are any coefficients they should be part of this Macro. e.g., lamda*x*y/z

through DEFINE_SOURCE() you get t3

Note: all the units should match. It appears t1, t2 are in W/m3.s. Therefore t3 should also be in same units


NOTE: I have last used FLUENT in 2012. If there is something changed i am sorry.
I am so appreciate your reply, thank you so much my friend.

i think the method you meant is the equation 2 and source term 2 in the below picture.

It's sure that this form meet the standard UDS equation in fluent, but i am not sure whether the build-in equation should be defined like this...
Attached Images
File Type: jpg 123123.jpg (29.3 KB, 61 views)
aestas is offline   Reply With Quote

Old   April 27, 2015, 06:49
Default
  #7
Member
 
Join Date: Oct 2011
Posts: 34
Rep Power: 15
chittipo is on a distinguished road
Hi,
what do you mean by 'built in equation...defined like this?'
where do you want to use this equation?
chittipo is offline   Reply With Quote

Old   April 27, 2015, 07:36
Default
  #8
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 12
aestas is on a distinguished road
Quote:
Originally Posted by chittipo View Post
Hi,
what do you mean by 'built in equation...defined like this?'
where do you want to use this equation?
This is the energy equation in fluent...
aestas is offline   Reply With Quote

Old   April 28, 2015, 03:45
Default
  #9
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Dear aestas,

It is not clear what you want to know. You want to know something about the energy equation, and something about sources, but what exactly?
pakk is offline   Reply With Quote

Old   April 28, 2015, 04:06
Default
  #10
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 12
aestas is on a distinguished road
Quote:
Originally Posted by pakk View Post
Dear aestas,



It is not clear what you want to know. You want to know something about the energy equation, and something about sources, but what exactly?


well, i wonder why you do not understand that..



it's easy to say, i activated the energy equation in fluent, and in my model the energy equation has the form in the picture.As you can see, i made two forms of energy euqation, euqation 1 has the form like the fluent defined in In the Fluent 6.3 manual, whereas equation 2 has the form like the UDS equation solved by the equation defined in the in the UDS theory section.

I don't know which form should be used, because it has totally different diffusion term and source term(which should be defined in the energy source term in fluent).


123.jpg
aestas is offline   Reply With Quote

Old   April 28, 2015, 04:14
Default
  #11
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Quote:
Originally Posted by aestas View Post
I don't know which form should be used, because it has totally different diffusion term and source term(which should be defined in the energy source term in fluent).
Used for what?
Do you want to write the energy equation in a report?
Do you want to make your own CFD code that does the same as what Fluent does?

As long as you don't say what you want to do, I can not help you.
pakk is offline   Reply With Quote

Old   April 28, 2015, 04:19
Default
  #12
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 12
aestas is on a distinguished road
Quote:
Originally Posted by pakk View Post
Used for what?
Do you want to write the energy equation in a report?
Do you want to make your own CFD code that does the same as what Fluent does?

As long as you don't say what you want to do, I can not help you.
I want used it as the energy equation in fluent, i am working on a plasma problem, my energy equation is deduced from plasma theory, and i donot konw which form meet the energy equation requirements in fluent, because i have to define source terms of energy, you understand?
aestas is offline   Reply With Quote

Old   April 28, 2015, 04:24
Default
  #13
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Quote:
Originally Posted by aestas View Post
I want used it as the energy equation in fluent, i am working on a plasma problem, my energy equation is deduced from plasma theory, and i donot konw which form meet the energy equation requirements in fluent, because i have to define source terms of energy, you understand?
No, I don't know what you mean with "use it as the energy equation in Fluent". Fluent does not allow you to choose an energy equation.

But maybe you mean to say: I want to add a source term for the energy equation, and I don't know exactly how. Is that what you want? Then please ask that, and don't ask something else.
pakk is offline   Reply With Quote

Old   April 28, 2015, 04:26
Default
  #14
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 12
aestas is on a distinguished road
Quote:
Originally Posted by pakk View Post
No, I don't know what you mean with "use it as the energy equation in Fluent". Fluent does not allow you to choose an energy equation.

But maybe you mean to say: I want to add a source term for the energy equation, and I don't know exactly how. Is that what you want? Then please ask that, and don't ask something else.
yes, I want to add a source term for the energy equation

and you can see i have two forms of source term...which one should i pick?
aestas is offline   Reply With Quote

Old   April 28, 2015, 04:30
Default
  #15
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
If you want to add an energy source, you should use the energy equation.
If you want to add a UDS source, you should use the UDS equation.

So in your case, just use the energy equation.
pakk is offline   Reply With Quote

Old   April 28, 2015, 04:33
Default
  #16
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 12
aestas is on a distinguished road
Quote:
Originally Posted by pakk View Post
If you want to add an energy source, you should use the energy equation.
If you want to add a UDS source, you should use the UDS equation.

So in your case, just use the energy equation.
ok, i see. Thank you so much.
aestas is offline   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
Source Term due to evaporation in energy transport equation styleworker OpenFOAM Programming & Development 3 September 7, 2022 04:09
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
Source term energy equation for reactive flows DaIN Main CFD Forum 0 October 6, 2011 16:11
SIMPLE and energy equation convergence Fabio Main CFD Forum 0 June 1, 2007 07:06
UDF to switch on energy equation each time step galary FLUENT 1 January 5, 2006 20:24


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