Concentration dependent surface tension
hello,
i want so specify surface tension as a function of concentration in the liquid phase. the liquid phase has two species and i´m using VOF multiphase model. so which thread is the t - thread in the define_property macro ? with DEFINE_PROPERTY(surface_tension,c,t) and C_YI(c,t,0) fluent shows an access violation error with several multiphase macros like thread_sub_threads... fluent shows the same error please help thx |
i still have this problem :(
can anyone help me or give a suggestion ? thanks a lot |
Hey there anyone it may help. I know this reply is late, but this post helped me on my journey and I would like to answer.
I have the same objective as this post states, to write a UDF that controls the surface tension coefficient by analyzing the mixture species fraction. The following code seems to be the answer: DEFINE_PROPERTY(Custom_Surface_Tension, c, t) { Domain *mix; mix = Get_Domain(1); Thread *mix_thread = Lookup_Thread(mix, 2); Thread *sec_phase = THREAD_SUB_THREAD(mix_thread,1); real sigma, xm; xm = C_YI(c,sec_phase,1); sigma = 0.043*xm*xm - 0.1081*xm + 0.0702; return sigma; } The key part being the first 4 lines of code: Lines 1-2. grab the mixture domain pointer (domain ID=1 for mixture domain) & assign variable *mix. Line 3. Find the relevant thread (domain ID=1 for mixture, Zone ID=2 for fluid), assign the lookup to a variable *mix_thread (this is a mixture level thread) Line 4. Assign a phase level pointer (*sec_phase) to secondary phase thread *sec_phase now has the required data to proceed with mass fraction function C_YI |
All times are GMT -4. The time now is 00:07. |