udf for multi domain problems
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. |
It is possible to connect two cells that are connected to a wall and wall-shadow. Did you mean that?
|
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. |
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; |
All times are GMT -4. The time now is 18:03. |