CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF for Species mass fraction

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

LinkBack Thread Tools Display Modes
Old   June 6, 2005, 04:07
Default UDF for Species mass fraction
Posts: n/a
Hi everyone! Im solving flow in a artificial heart and need to "reset" mass fraction of a species at certain times during the simulation. I,ve written a DEFINE_ADJUST UDF for the mass fraction, C_YI. But nothing really happens in Fluent. No errors, but the UDF doesnt effect the solution.

Has someone else experienced the same?

What to do? Please help.
  Reply With Quote

Old   June 6, 2005, 13:44
Default Re: UDF for Species mass fraction
Allan Walsh
Posts: n/a
Not sure what you mean by "nothing really happens in Fluent".

Have you checked that the DEFINE_ADJUST UDF runs? To check it, I would put a dummy print statement in your UDF and make sure you have it hooked up properly.

The only times I've used DEFINE_ADJUST, I've had to manually specify the thread_id to perform D_A on. (This can be found by looking at a list of boundaries and domains in Fluent).

I've used C_YI several times. I would suggest that you print the initial values of C_YI one time and then print the values of C_YI again once you have changed them in your D_A UDF. Could be that they are changed somewhere else in Fluent, especially if your "reset" doesn't physically make sense.
  Reply With Quote

Old   June 8, 2005, 15:55
Default Re: UDF for Species mass fraction
Posts: n/a
I have the same problem, I need someone's help for writing the UDF. Can Daniel or Allan help me out in this? I'll be happy to talk to you guys in email. Thank you.
  Reply With Quote

Old   June 22, 2005, 08:40
Default Re: UDF for Species mass fraction
Posts: n/a
Hi! I believe that define adjust would work. To reset the mass fraction, one should just loop over all threads and cells:

Domain *d = Get_Domain(1); Thread *t; cell_t c;

/*Loop over Thread and cell*/ C_YI(c,t,0) = 0.; /*End Thread and cell loop*/

where C_YI(c,t,0) is the species mass fraction. Since I have had other, more severe problems, I have not tried it. I get convergence problems related to the spcies transport equation. If you have any general guidelines for this I'd be happy to hear them. /Daniel I
  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
Multiphase Mass transfer UDF issue therandomestname FLUENT 0 April 21, 2011 14:51
PB: Saving mass fraction of species on two points with an udf biget.a FLUENT 2 July 23, 2009 03:06
Vof, udf and mass transfer panel Jay FLUENT 1 March 15, 2005 01:29
HELP! adding a mass source to VOF eqn. by UDF??? ROOZBEH FLUENT 4 May 29, 2003 09:54
UDF for Species mass fraction Rahul FLUENT 0 September 20, 2002 04:22

All times are GMT -4. The time now is 03:41.