problem about a periodic moving wall
Hi guys,
I tried to test my UDF in a simple conical chamber and defined one under-surface as a moving wall using UDF. But when I review the speed of this moving wall after more than one period simulation. The velocity of this wall did not fit the function defined in UDF. Does that mean I can't simply assign this UDF to a wall? Can anyone told me is there anything I missed? My UDF is as following: #include "udf.h" #define OMEGA 10.0 /* User constants can be set like this */ #define V_AMP 5.0 DEFINE_PROFILE(y_velocity, ft, var) { real flow_time; face_t f; /* Face index has its own type */ flow_time = CURRENT_TIME; /* Special Fluent macro */ begin_f_loop(f,ft) /* Fluent has special face loop macros too */ { F_PROFILE(f,ft,var) =-V_AMP * cos(OMEGA*flow_time); } end_f_loop(f,ft) } Regards, itsqi7 |
I am not sure it works but you can try this.
Instead of begin_f_loop(f,ft) /* Fluent has special face loop macros too */ try if (CURRENT_TIME>=0 && ... CURRENT_TIME>=time_period) |
Quote:
Thanks for ur reply. What I found is that I have to use dynamic meshing so that the moving wall won't be 'fixed'. Could you pls tell me what is the function of ur code and what is '...' mean?:D Thanks, itsqi7 |
Hello
'...' means nothing. You can put whatever logical condition you want to use. By the way I could think of two methods to tackle the problem you have. 1. I would create my domain with wall having small thickness. Make sure that the wall appears as separate zone. Then go to Cell Zone Condition>Wall Zone ('Wall Zone is illustrative name. Your can name the wall whatever you want to'). Then activate 'Mesh Motion' Then use UDF for zone motion function. 2. Go to boundary conditions and open the wall window. Then select 'moving wall'. Then select 'Components'. Now you can use UDF for x-velocity, y-velocity and z-velocity. You can use geometry without wall for this method. All the best. |
Quote:
Since my model is similar to a piston in an cylinder, do I need to use dynamic meshing? Regards, itsqi7 |
I do not know much about your experiments and so can not comment on weather you need dynamic mesh or now. Also I have not done any piston-cylinder simulations.
Based on my experience I just wanted to let you know how you could use moving mesh and moving frame of reference. |
Quote:
Anyway, thank you so much. I'll try your advice later. Regards, itsqi7 |
All times are GMT -4. The time now is 07:53. |