CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Udf, define_profile, vof

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

LinkBack Thread Tools Display Modes
Old   October 24, 2010, 14:05
Question Udf, define_profile, vof
New Member
Grzegorz Kondora
Join Date: Oct 2010
Posts: 13
Rep Power: 9
kondora is on a distinguished road
Hello all,

Let's assume that we have a Eulerian multiphase simulation. Number of phases is n_phases. For the velocity inlet for each phase we would like to specify volume fraction, which is calculated somewhere within UDF and written to global variable. To do that, we must use DEFINE_PROFILE macro, whose arguments are: DEFINE_PROFILE(vof_profile,t,i), so: name, thread and position/index of variable being set. Let say that we would like to create only one universal function DEFINE_PROFILE, which will be hooked in B.C. panel for each phase other than 1. Here's part of my code:

some code


    #if !RP_HOST /* SERIAL or NODE */

        int ii;

        face_t f;

        Thread *mixture_thread = THREAD_SUPER_THREAD(t);

        Thread **pt;
        pt = THREAD_SUB_THREADS(mixture_thread);

        for(ii = 1; ii < n_phases+1; ii++)
            if(pt[ii] == t)
                Message("\Found it!!!, DOMAIN_PHASE_INDEX is, ii = %d\n", ii);

            F_PROFILE(f,t,i) = alpha[ii-1]; /* global array whose elements are calculated in other function
                                                          and having indices according to: ii = PHASE_DOMAIN_INDEX - 1 */

    #endif /* !RP_HOST */
Can it be easier? I mean - is there any super-hidden macro wich return pointer to the Domain or PHASE_DOMAIN_INDEX, for example:

Do you know any other, easier way than I posted? It should be available in FLUENT, esspecialy because people are often using DEFINE_PROFILE macro. Thanks in advance!!!

Last edited by kondora; October 24, 2010 at 14:14. Reason: Changed title
kondora is offline   Reply With Quote


define_profile, udf, vof

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
HELP! adding a mass source to VOF eqn. by UDF??? ROOZBEH FLUENT 5 December 3, 2016 18:53
UDF Defining VOF Free Surface at Outlet Alex Fluent UDF and Scheme Programming 13 August 8, 2012 16:50
HELP! UDF sinusoidal wave, VOF model, porous face! A8anato_psofimi FLUENT 2 November 10, 2009 15:42
UDF to read data from a file for VOF model Pablo FLUENT 0 October 23, 2008 07:02
writing UDF for modelig mass transfer for VOF ardalan soleymani FLUENT 0 July 11, 2007 01:09

All times are GMT -4. The time now is 23:25.