CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   Dynamic mesh simple moving (http://www.cfd-online.com/Forums/fluent-udf/108286-dynamic-mesh-simple-moving.html)

DonQuijote October 18, 2012 13:04

Dynamic mesh simple moving
 
Hi all,

Hi am unexperienced in UDF compiling. So I'd like to show you my case and hope to receive some help...

I want to move the hole I have in my domain as shown in the picture attached. For that, I suppose to make an UDF as follows:

# include "udf.h"
# include "dynamesh_tools.h"
*************HOle Movement**************************
DEFINE_CG_MOTION(holemov, dt, vel, omega, time, dtime)
{
Thread *t;
face_t f;
vel[1]=40;
}


So the walls of the hole have a constant speed of 40 m/s. I know that I miss some things in the UDF, but as the case is quite simple, it is sure that there is somebody that could help me... ;)

Thank you for your help!!!

http://imageshack.us/a/img7/1870/dynamiccase.th.jpg

phanh October 19, 2012 04:50

Quote:

Originally Posted by DonQuijote (Post 387364)
Hi all,

Hi am unexperienced in UDF compiling. So I'd like to show you my case and hope to receive some help...

I want to move the hole I have in my domain as shown in the picture attached. For that, I suppose to make an UDF as follows:

# include "udf.h"
# include "dynamesh_tools.h"
*************HOle Movement**************************
DEFINE_CG_MOTION(holemov, dt, vel, omega, time, dtime)
{
Thread *t;
face_t f;
vel[1]=40;
}


So the walls of the hole have a constant speed of 40 m/s. I know that I miss some things in the UDF, but as the case is quite simple, it is sure that there is somebody that could help me... ;)

Thank you for your help!!!

http://imageshack.us/a/img7/1870/dynamiccase.th.jpg

Hi,

Tell me exactly which problem are you facing with your UDF code? I may help you

DonQuijote October 22, 2012 06:19

Thank you phanh for your interest. I have tested the UDF and it seems to do what I wanted (to move the hole in one direction). So the problem is solved and the dynamic mesh not produces any.

But thank you again ;)
Regards

627680136 November 12, 2012 22:53

reply
 
Quote:

Originally Posted by DonQuijote (Post 387364)
Hi all,

Hi am unexperienced in UDF compiling. So I'd like to show you my case and hope to receive some help...

I want to move the hole I have in my domain as shown in the picture attached. For that, I suppose to make an UDF as follows:

# include "udf.h"
# include "dynamesh_tools.h"
*************HOle Movement**************************
DEFINE_CG_MOTION(holemov, dt, vel, omega, time, dtime)
{
Thread *t;
face_t f;
vel[1]=40;
}


So the walls of the hole have a constant speed of 40 m/s. I know that I miss some things in the UDF, but as the case is quite simple, it is sure that there is somebody that could help me... ;)

Thank you for your help!!!

http://imageshack.us/a/img7/1870/dynamiccase.th.jpg

hi,I'd like to know how you solve the problem,thank you!!!

ghost82 November 13, 2012 04:06

Quote:

Originally Posted by 627680136 (Post 391751)
hi,I'd like to know how you solve the problem,thank you!!!

vel[1] moves in y direction; looking at the picture DonQuijote wants to move the object in +- x direction, so he must use vel[0]; supposing you want to move the object with constant 40 m/s velocity in +x direction you have to write vel[0]=40;

Daniele

DonQuijote November 13, 2012 05:29

Sorry, I forgot this post since I finally didn't develop so much the model.

What ghost82 comments is totally right! I had to change the direction of velocity to vel[0] (when I first began the thread I didin't know what [1] means...). Since I only wanted to move in one direction (x+), vel[0]=40.

Regards

627680136 November 14, 2012 20:56

reply
 
Quote:

Originally Posted by ghost82 (Post 391769)
vel[1] moves in y direction; looking at the picture DonQuijote wants to move the object in +- x direction, so he must use vel[0]; supposing you want to move the object with constant 40 m/s velocity in +x direction you have to write vel[0]=40;

Daniele

thank you! I got it:)

627680136 November 14, 2012 20:57

reply
 
Quote:

Originally Posted by DonQuijote (Post 391791)
Sorry, I forgot this post since I finally didn't develop so much the model.

What ghost82 comments is totally right! I had to change the direction of velocity to vel[0] (when I first began the thread I didin't know what [1] means...). Since I only wanted to move in one direction (x+), vel[0]=40.

Regards

Thank you very much for your answer!


All times are GMT -4. The time now is 19:38.