|
[Sponsors] |
June 7, 2006, 03:20 |
udf problem
|
#1 |
Guest
Posts: n/a
|
hi Using UDF, I try to calculate the accumulated concentration of species. but I have some problem. What kind of UDF do i use?
|
|
June 7, 2006, 05:37 |
Re: udf problem
|
#2 |
Guest
Posts: n/a
|
hi Can you tell us more abot the system you are modelling? what do you want to know about the species? if you want to know their mass fractions you should use the C_YI macro have a look in the fluent manual see you
|
|
June 7, 2006, 20:23 |
Re: thanks..but...
|
#3 |
Guest
Posts: n/a
|
thanks your answer I hope you understand that I can't speak English well. I want to know the accumulated mass fraction data in fluent. 1) unsteady solver 2) nh3 species 3) using UDF, I want to accumulate the mass fraction data each time step 4) I want to see the contour of accumulated value in fluent Is it possible?
|
|
June 9, 2006, 16:41 |
Sorry for intervention
|
#4 |
Guest
Posts: n/a
|
I noticed your posts about that UDF. I posted since a while, a request of help in a heat source UDF that is going to be represented in trasient simulation of fire in a room. The UDF should supply heat source from zero to 6 MW in 100 seconds. Could any body help me how to write it?. I am not good with C++.
Cheers, Amr |
|
June 9, 2006, 20:31 |
Re: Sorry for intervention
|
#5 |
Guest
Posts: n/a
|
I am not good with C++,too I hope you understand me that I can't speak English well. I think you can use the DEFINE_SOURCE macro and RP_Get_Real.
First you must define the "flow-time"... then..you can define the MW - value of fire souce according "flow-time" DEFINE_SOURCE(Energy, cell, thread, dS, eqn ) { real flow_time = RP_Get_Real("flow-time"); cell_t c; begin_c_loop (c,thread) { if(flow_time >= 100)dS[eqn] = " " ; else dS[eqn] =" " ; } end_c_loop (c,thread) return dS[eqn]; } I write the UDF simply you must input the value between " "... except "flow_time" I hope you understand my explanation. If I can speak English well, I will help you more...I am sorry..good luck! |
|
June 10, 2006, 19:38 |
Re: Sorry for intervention
|
#6 |
Guest
Posts: n/a
|
Hi Jim:
Thanks much for your post. Anyways, I really don't get what you mean by RP_Get_Real. Also, why do I use a macro instead of a simple profile file or UDF to give the transient MW's values?. In your last message, do I only write in between the " "? What does dS eqn means?. Thanks so much. I owe you. Cheers, Amr |
|
June 11, 2006, 19:42 |
Re: Sorry for intervention
|
#7 |
Guest
Posts: n/a
|
Hi Amr
you're look in fluent manual about my answer. 1) RP_Get_Real....is returns current simulation time 2) because you want to input the value of heat source from zero to 6 MW in 100 seconds, UDF is more useful than simple profile file (... I think so) 3) According your volum of source term, MW's values are different. you must input the value between quotation marks 4) DEFINE_SOURCE macro There are five arguments to DEFIEN_SOURCE....DEFINE_SOURCE(name,c,t,dS,eqn) dS specifies the derivative of the source term with respect to the dependent variable of the transport equation |
|
June 11, 2006, 21:05 |
Re: Sorry for intervention
|
#8 |
Guest
Posts: n/a
|
Thanks again Jim !.
One more question here: Do I need to specify something in "eqn" or it is only a programming symbol?. Same question applies to c and t symbols. Cheers, Amr |
|
June 12, 2006, 03:05 |
Re: Sorry for intervention
|
#9 |
Guest
Posts: n/a
|
Your thinking is right. "eqn","c","t" are programming symbols.
|
|
June 12, 2006, 23:41 |
Re: Sorry for intervention
|
#10 |
Guest
Posts: n/a
|
Hi all,
Just a couple of things to note! You should have a "Source" equation for which to write its derivative dS. First comes source, then its derivative. Check UDF manual. I guess you are talking about ramping up your heat source (from 0 to 6 MW in 100 s). This should give you a clue about your Source equation. Swarup. |
|
June 14, 2006, 01:32 |
Re: Sorry for intervention
|
#11 |
Guest
Posts: n/a
|
Hi Swarup,
Could you illustrate this in the udf? Thanks much for your input. Have you been into heat generation problems before??? Cheers, Amr |
|
June 14, 2006, 23:06 |
Re: Sorry for intervention
|
#12 |
Guest
Posts: n/a
|
You may have already done that. I will tell in short.
You need your current flow time. Access it using CURRENT_TIME. you then write a simple equation source=coeffi*CURRENT_TIME such that when your CURRENT_TIME is 100 s you get the final value. your dS[eqn]=0.0 since it does not depend upon any primitive variable. eqn is the number provided by solver once you hook your UDF in appropriate zone and variable. Energy source UDF hook is at the end of list of possible hooks. I have not tried heat generation problems before. Swarup |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 06:05 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 06:56 |
UDF problem | mansha goraya | FLUENT | 0 | October 29, 2007 00:31 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 07:14 |
UDF problem | chiseung | FLUENT | 4 | January 10, 2002 09:58 |