# Transient udf for limiting flux (solid fuel combustion)

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

 February 23, 2015, 09:46 Transient udf for limiting flux (solid fuel combustion) #1 Member   Baradwaj B S Join Date: Jan 2015 Posts: 75 Rep Power: 4 Sponsored Links Hi everyone, My name is Bharadwaj B S, I am currently doing a project on solid fuel combustion (Single particle). In this I have created a sphere inside a cylindrical fluid domain. There will be velocity inlet from one side of cylinder and another inlet from the surface of the sphere as mass flux( kg/m^2 s) signifying volatile release. I have written a simple code where the flux from the sphere is arbitrarily dependent on sphere face temperature (F_T(f, t)). Upto 20 seconds there should be mass flux from the surface of the sphere, when the time reaches 20 seconds the mass flux from surface should stop. For this I have used the if else condition. From the logic side it seems to be fine. But when I hook and see the result. It is not showing the flux from the surface. QUESTION: 1. Is there any mistake in UDF (macro used, logic or anything)? 2. Can I use CURRENT_TIME in DEFINE_PROFILE? Because there is a separate macro for transient Profiles. (DEINE_TRANSIENT_PROFILE). 3. Is there any correction in condition (if (time <= 20))?? Please reply at your earliest convenience. Any help will be of great use for me. Thanks in Advance. UDF: #include "udf.h" #include "math.h" real time; real tmp; real flx; real a; real b; int i; int ID = 13; Thread *t; face_t f; cell_t c; DEFINE_PROFILE(flux, t, i) { Domain *d; d = Get_Domain(1); t = Lookup_Thread(d, ID); flx = 0.0; tmp = 0.0; a = - 0.5; b = 0.0; time = CURRENT_TIME; begin_f_loop(f, t) { if(time <= 20) { flx = - a * tmp; tmp = F_T(f, t); F_PROFILE(f, t, i) = flx; } else { F_PROFILE(f, t, i) = b; } end_f_loop(f,t) } }

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post muizzlkfle FLUENT 0 December 10, 2014 12:22 apo FLUENT 0 December 1, 2014 13:20 sunilpatil CFX 8 April 26, 2013 07:00 giant Main CFD Forum 0 May 24, 2005 06:46 isaac FLUENT 1 June 3, 2004 16:29