- **FLUENT**
(*https://www.cfd-online.com/Forums/fluent/*)

- - **UDF for sloshing
**
(*https://www.cfd-online.com/Forums/fluent/50786-udf-sloshing.html*)

UDF for sloshing
Hi every one ,
I'm modeling a sloshing of a rectangular tank on FLUENT 6.3 and I kind of need some help for the UDF defining it. I want to simulate the sloshing from A to Z and and I'm facing problems in defining the source terms, the unsteady iteration, and what equations i need to activate. on the experimental side, My tank is doing sinusoidal movements (right/left and up/down). My biggest problem is the UDF. Mine is the following : #include "udf.h" #include "stdio.h" double x[ND_ND]; double PI=3.14159; real thetamax = (4*3.14159*2)/360; real frequence = 0.50 ; real phi=0; DEFINE_SOURCE(xmom_source, c, t, dS, eqn) { real temps; real omega, deromega; real source_x; temps = CURRENT_TIME; C_CENTROID (x, c, t); omega = thetamax*sin(temps*(2*PI)*frequence + phi); deromega = thetamax*(frequence*(2*PI))*cos(temps*frequence*(2 *PI) + phi); source_x = C_R(c,t)*(-9.8*sin(omega*temps)-x[1]*deromega-C_V(c,t)*omega-2*pow(omega, 2)*(x[0]-0.2)); dS[eqn] = 0; return source_x; } DEFINE_SOURCE(ymom_source, c, t, dS, eqn) { real temps; real omega, deromega; real source_y; temps = CURRENT_TIME; C_CENTROID (x, c, t); omega = thetamax*sin(temps*(2*PI)*frequence + phi); deromega = thetamax*(frequence*(2*PI))*cos(temps*frequence*(2 *PI) + phi); source_y = C_R(c,t)*(-9.8*cos(omega*temps)+(x[0]-0.2)*deromega+C_U(c,t)*omega-2*pow(omega, 2)*x[1]); dS[eqn] = 0; return source_y; } Thank you for responding. |

hiihii,did u get solution for ur problem,
i also need help regarding same and i m also not able to create udf plz help me |

All times are GMT -4. The time now is 07:18. |