getting a cell variable
Hello dear Engineers :)
I have two Zones in my simulation, one "fluid" and one "solid" and there are two boundaries named "interface" and "interface_shadow" introducing the interface between these zones. i'm trying to implement a UDF and i'm using DEFINE_PROFILE in one of the zones, say fluid, and i've used THREAD_T0 and F_C0 to get the cells and cell threads adjacent to the interface located in the fluid zone. But the point is that I want to get Solid's cells and cell threads next to the interface located in solid zone too! so i have no idea how I can access to those cells while i'm using a DEFINE_PROFILE in one zone and i need cell variables in another zone.. Here's how my code looks like: DEFINE_PROFILE(flux,f_thread,index) { real flux_jump; face_t face; cell_t cell; Thread *c_thread; cell_t scell; Thread *sc_thread; begin_f_loop(face,f_thread) { cell=F_C0(face,f_thread); c_thread=THREAD_T0(f_thread); scell=F_C1(face,f_thread); sc_thread=THREAD_T1(f_thread); flux=A*(C_T(cell,c_thread)-C_T(scell,sc_thread)); F_PROFILE(face,f_thread,index) = flux; } end_f_loop(face,f_thread) } THIS PROFILE IS TO BE USED ON THE BOUNDARY OF BOTH INTERFACES OF SOLID AND FLUID. I HAD NO IDEA HOW TO GET TEMPERATURE OF SOLID CELL ADJACENT TO INTERFACE SO I JUST USED THREAD_T1 AND F_C1 BUT ERROR OCCURRED SINCE I HAVE NO ACCESS TO GET THE TEMPERATURE OF SOLID CELLS NEXT TO THE INTERFACE. I think I have to get the other DOMAIN by GET_DOMAIN or something. is it right??? THANKS IN ADVANCE. |
In your case, I think, the usage of sc_thread in C_T(scell,sc_thread)) throws the error. Is that right?
I also don't know if F_C1(face,f_thread) can be used to access a value of a cell across an interface at all. I would be glad if someone else could resolve my uncertainty. |
All times are GMT -4. The time now is 03:01. |