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

udf for multi domain problems

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2012, 10:34
Exclamation udf for multi domain problems
  #1
New Member
 
hzsme
Join Date: Sep 2012
Posts: 7
Rep Power: 13
hzsme is on a distinguished road
I have a two domain problem....air is passed over a solid sphere and has mass transfer with it....for exerting a boundary condition on the interface of the air and the sphere, I use WALL boundary condition on the sphere and I have to access to the data in the fluid and the solid zone at the same time to show the mass transfer...how can I loop over two different cell threads at the same time to use data on both sides of the wall (wall and wall_shadow)?
thank you in advance.
hzsme is offline   Reply With Quote

Old   September 23, 2012, 01:44
Default
  #2
Member
 
eng_s_sadeghi's Avatar
 
Join Date: Mar 2011
Posts: 64
Rep Power: 15
eng_s_sadeghi is on a distinguished road
It is possible to connect two cells that are connected to a wall and wall-shadow. Did you mean that?
__________________
Saeed Sadeghi
Ansys Fluent CFD Consultant
eng_s_sadeghi is offline   Reply With Quote

Old   September 23, 2012, 02:02
Default
  #3
New Member
 
hzsme
Join Date: Sep 2012
Posts: 7
Rep Power: 13
hzsme is on a distinguished road
Yes...Exactly...I have an equation that relates the concentration of two domains to each other.So, at the same time, I have to access to the neighboring cells which are in two different domain.I don't know how to loop over these two different cells which have tow different cell-thread.
Would you please help me?
Thanks in advance.
hzsme is offline   Reply With Quote

Old   June 11, 2019, 06:18
Default
  #4
Member
 
Join Date: Aug 2018
Posts: 85
Rep Power: 7
esha is on a distinguished road
Hi, I have divided a cylindrical wall into two different parts and I have UDF for one part but I do not know how to add other part parts in UDF. Help me to add another? I will be highly appreciated..

DEFINE_EXECUTE_AT_END(execute_at_end)
{
FILE *fp;
real ft;
real fx;
real fy;
real fxp=0;
real fyp=0;
real fxs=0;
real fys=0;
#if !RP_HOST
real f_body[ND_ND];
real physical_dt;
Domain *domain = Get_Domain(1);
Thread *thread=Lookup_Thread(domain,15);
face_t f;
real A[ND_ND];

real f_shear[ND_ND];


physical_dt = RP_Get_Real("physical-time-step");
begin_f_loop_int(f,thread)
{
F_AREA(A,f,thread);
fxp =fxp+F_P(f,thread)*A[0];
fyp =fyp+F_P(f,thread)*A[1];
NV_VS(f_shear,+=,F_STORAGE_R_N3V(f,thread,SV_WALL_ SHEAR),*,-1);
fxs =fxs-eps*mu/tao*(F_UDSI(f,thread,0)/(1-(F_UDSI(f,thread,0)+F_UDSI(f,thread,1))/L/L)*A[0]+F_UDSI(f,thread,2)/(1-(F_UDSI(f,thread,0)+F_UDSI(f,thread,1))/L/L)*A[1]);
fys =fys-eps*mu/tao*(F_UDSI(f,thread,1)/(1-(F_UDSI(f,thread,0)+F_UDSI(f,thread,1))/L/L)*A[1]+F_UDSI(f,thread,2)/(1-(F_UDSI(f,thread,0)+F_UDSI(f,thread,1))/L/L)*A[0]);
}
end_f_loop_int(f,thread)
fx=fxp+f_shear[0]+fxs;
fy=fyp+f_shear[1]+fys;

#endif;

Last edited by esha; June 11, 2019 at 09:07.
esha 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
UDF to constrain one of the phase to stay in the domain Koromajor Fluent UDF and Scheme Programming 23 April 15, 2020 19:21
UDF problems - velocity profile Oli Fluent UDF and Scheme Programming 6 October 24, 2016 10:38
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
UDF: how to know domain number in the model? mssound FLUENT 0 May 17, 2010 15:00
Problems with changing turbulent viscosity by UDF sarah_ron FLUENT 0 February 14, 2005 00:31


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