Get position of a moving wall every time step in UDF
Hey everyone,
I defined a DEFINE_ADJUST function, where I patch water every time step to a wall. This should simulate raindrops on a windshield. This works up to this point. The problem is, that there is also a wiper that moves left and right along the windshield wall. I want to patch the water always just on the right hand side of this wiper. Now, my question is, if there is a possibility to get the position of the wiper. I already tried to do it with begin_f_loop(face, tf) /* get position of blade */ { F_CENTROID(xf, face, tf); xblade = xf[0]; } end_f_loop(face, tf) , but this doesn't seem to work in the DEFINE_ADJUST environment. Maybe there is a special command, I havn't found in the manual, yet? I use the following settings: 2D, Dynamic Mesh, VOF, Transient Thanks a lot for your help! |
Did you use a different subdomain and corresponding thread pointer for the thread "tf" here. I think you will have to use the subdomain for the wiper and then define the thread for that.
|
Now, I solved the problem by defining a function in the UDf that gets the F_CENTROID of the blade. This is the function that works finally:
Code:
void Get_Thread_Face_Centroids(Domain *domain, int id) |
All times are GMT -4. The time now is 15:45. |