decreasing volume of solid area with time step
hello
I'm new in udf so please help me to learn i want to reform a solid domain with time step in 2D which my fluid area is a 16*16 mm Square and my solid domain is 2*2 Square in middle of fluid area. so i want to reform to decreasing solid area volume with time step. this is my udf but i think there is some problems, my code doesn't compile in fluent. i want to read every cell in every time step and decrease voulume of all cells of domain. thanks for your help. #include "udf.h" DEFINE_GEOM(solid,domain,dt,position) { real vol,vol2; Domain *domain; Thread *c_thread; thread_loop_c(c_thread, domain) /*loops over all cell threads in domain*/ { cell_t c; Thread*t; vol=C_VOLUME(c,t); if (vol<=0) vol2=0; if (vol>0) vol2=vol-0.01*vol; position[0]=vol2; } position[1]=position[0]; } |
Code:
#include "udf.h" |
Quote:
Thanks for your reply i'm wonder how can i change the code for reading all faces area in a cell groups and changing those faces area. |
All times are GMT -4. The time now is 18:34. |