|
[Sponsors] |
September 22, 2012, 11:34 |
udf for multi domain problems
|
#1 |
New Member
hzsme
Join Date: Sep 2012
Posts: 7
Rep Power: 14 |
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. |
|
September 23, 2012, 02:44 |
|
#2 |
Member
Join Date: Mar 2011
Posts: 64
Rep Power: 15 |
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 |
|
September 23, 2012, 03:02 |
|
#3 |
New Member
hzsme
Join Date: Sep 2012
Posts: 7
Rep Power: 14 |
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. |
|
June 11, 2019, 07:18 |
|
#4 |
Member
Join Date: Aug 2018
Posts: 90
Rep Power: 8 |
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 10:07. |
|
|
|
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 20:21 |
UDF problems - velocity profile | Oli | Fluent UDF and Scheme Programming | 6 | October 24, 2016 11:38 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
UDF: how to know domain number in the model? | mssound | FLUENT | 0 | May 17, 2010 16:00 |
Problems with changing turbulent viscosity by UDF | sarah_ron | FLUENT | 0 | February 14, 2005 01:31 |