CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   How to define a transient species source term? (http://www.cfd-online.com/Forums/fluent/85745-how-define-transient-species-source-term.html)

aleisia March 5, 2011 22:59

How to define a transient species source term?
 
In my transient analysis, I want to set my species source in a way like this:
turn it on for 1s, then switch it off. I guess there are two ways to do this, first is, to run the simulation to 1s (with a time interval ,say,0.01s) and stop it, change the BC to 0m/s and carry on.

Second is, write a udf source macro for my source, but I don't know how to, if you could share with me a good source code, I would be greatly indebted!

Also, I have some doubts about setting source term:
I set the surfaces as velocity inlet instead of setting the volume as fluid and a source term, because I don't know how to set UDF source terms. I actually tried to do that, and I can set it as source term and set the mass term as, say, 0.1kg/m^3s (choose CONSTANT) and species term as the same number 0.1kg/m^3s. I don't care much about the momentum input this release of substance brings along, so leave it alone. But according to what I found from other discussions, it seems that setting like this doesn't work, and I have to do it through UDF. I don't know if I'm getting this picture right, so you know, please tell me.

alastormoody11 March 7, 2011 01:55

Hi,

A simplistic strategy for writing your macro is to record a journal file in which you manually set the source term and use it as a base for writing your UDF.

My suggestion would be to access your physical time and then put the source term inside an if else setting so that it becomes 0 once your physical time exceeds 1s.

aleisia March 7, 2011 20:41

Quote:

Originally Posted by alastormoody11 (Post 298171)
Hi,

A simplistic strategy for writing your macro is to record a journal file in which you manually set the source term and use it as a base for writing your UDF.

My suggestion would be to access your physical time and then put the source term inside an if else setting so that it becomes 0 once your physical time exceeds 1s.

Hi, thanks for your reply. As I've no idea how to "record a journal file", do you know if there is mature set of source macro code for my situation? Of any tutorial besides the fluent udf manual?

Thanks!

alastormoody11 March 7, 2011 23:58

this is the first link that pops up after a google search for how to record a journal file in FLUENT:http://www.cfd-online.com/Wiki/Fluent_FAQ

Cant you even do a google search

I mean common


All times are GMT -4. The time now is 13:45.