|
[Sponsors] |
January 28, 2013, 18:17 |
problem about a periodic moving wall
|
#1 |
Member
jiaqi wang
Join Date: Jan 2013
Posts: 36
Rep Power: 13 |
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 |
|
January 29, 2013, 02:47 |
|
#2 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
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) |
|
January 29, 2013, 16:34 |
|
#3 | |
Member
jiaqi wang
Join Date: Jan 2013
Posts: 36
Rep Power: 13 |
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? Thanks, itsqi7 |
||
January 30, 2013, 02:44 |
|
#4 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
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. |
|
January 30, 2013, 17:20 |
|
#5 | |
Member
jiaqi wang
Join Date: Jan 2013
Posts: 36
Rep Power: 13 |
Quote:
Since my model is similar to a piston in an cylinder, do I need to use dynamic meshing? Regards, itsqi7 |
||
January 31, 2013, 07:15 |
|
#6 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
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. |
|
January 31, 2013, 16:54 |
|
#7 | |
Member
jiaqi wang
Join Date: Jan 2013
Posts: 36
Rep Power: 13 |
Quote:
Anyway, thank you so much. I'll try your advice later. Regards, itsqi7 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Fluent3DMeshToFoam | simvun | OpenFOAM Meshing & Mesh Conversion | 50 | January 19, 2020 16:33 |
[mesh manipulation] mergeMeshes problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 3 | July 29, 2015 05:15 |
Wall formation problem in 3D geometry | subha_meter | Main CFD Forum | 0 | July 23, 2010 04:46 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 21:30 |
moving wall BC problem | Sourabh | Main CFD Forum | 1 | August 8, 2006 08:47 |