CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Velocity Adjustment

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2020, 17:31
Default Velocity Adjustment
  #1
New Member
 
Join Date: Oct 2019
Posts: 12
Rep Power: 7
ArikGuyz is on a distinguished road
Hi,

I am conducting simulations on eularian granular multiphase model. Initially, my whole domain was consisting of primary phase. Later on, I add source terms via UDF and generating secondary phase from the primary phase(phase transition). I add mass momentum and energy source terms to secondary phase, whereas subtracting them from the primary phase.

My question is this, are there any way to stop the velocity of the secondary phase which I generated? Meaning that, I want to keep my secondary phase motionless during its generation. In other words, I want them to stick each other, so that they can accumulate and grow without flying inside the domain.

I have tried to DEFINE_ADJUST, DEFINE_EXECUTE_AT_END macros, and add second momentum sink term (first one was while generating the phase), but they did not work. I am also giving my UDF in below.

Thank you very much!

DEFINE_ADJUST(stop_secondary, domain)
{
cell_t cell;
Domain *primary_domain = DOMAIN_SUB_DOMAIN(domain,1);
Domain *secondary_domain = DOMAIN_SUB_DOMAIN(domain,0);
Thread *secondary_th = Lookup_Thread(secondary_domain, 6);
Thread *primary_th = Lookup_Thread(primary_domain, 6);
real volume_fraction_secondary;
thread_loop_c(secondary_th, secondary_domain)
{
begin_c_loop(cell, secondary_th)
{
volume_fraction_secondary = C_VOF(cell, secondary_th);
if(volume_fraction_secondary > 0.)
{
C_U(cell, secondary_th) = 0.;
C_V(cell, secondary_th) = 0.;
}
}
end_c_loop(cell,secondary_th)
}
}

DEFINE_EXECUTE_AT_END(execute_at_end)
{
cell_t cell;
Domain *secondary_domain = Get_Domain(3);
Domain *primary_domain = Get_Domain(2);
Thread *secondary_th = Lookup_Thread(secondary_domain, 6);
Thread *primary_th = Lookup_Thread(primary_domain, 6);
real volume_fraction_secondary;
thread_loop_c(secondary_th,secondary_domain)
{
begin_c_loop(cell, secondary_th)
{
volume_fraction_secondary = C_VOF(cell, secondary_th);
if(volume_fraction_secondary > 0.)
{
C_U(cell, secondary_th) = 0.;
C_V(cell, secondary_th) = 0.;
}
}
end_c_loop(cell,secondary_th)
}
}
ArikGuyz is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
serial udf to parallel udf radioss Fluent UDF and Scheme Programming 10 January 19, 2019 09:56
wrong velocity contour of rotating propeller - Fluent calv FLUENT 1 September 6, 2018 12:48
Velocity in Porous medium : HELP! HELP! HELP! Kali Sanjay Phoenics 0 November 6, 2006 07:10
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


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