CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   problem about a periodic moving wall (https://www.cfd-online.com/Forums/fluent/112436-problem-about-periodic-moving-wall.html)

itsqi7 January 28, 2013 18:17

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

vasava January 29, 2013 02:47

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)

itsqi7 January 29, 2013 16:34

Quote:

Originally Posted by vasava (Post 404704)
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)

Hi Vasava,

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

vasava January 30, 2013 02:44

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.

itsqi7 January 30, 2013 17:20

Quote:

Originally Posted by vasava (Post 404941)
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.

Thanks so much for ur reply.
Since my model is similar to a piston in an cylinder, do I need to use dynamic meshing?

Regards,
itsqi7

vasava January 31, 2013 07:15

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.

itsqi7 January 31, 2013 16:54

Quote:

Originally Posted by vasava (Post 405260)
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.

Actually, I'm new to FLUENT. :p
Anyway, thank you so much. I'll try your advice later.

Regards,
itsqi7


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