CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Problem related with UDF for dynamic mesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2004, 06:03
Default Problem related with UDF for dynamic mesh
  #1
Ryan
Guest
 
Posts: n/a
I am now learning how to use UDF to describe a dynamic mesh. I adopt a very simple situation: four edges forming a rectangle shpe. left edge is pressure inlet, top and bottom edge are deforming walls, right edge is rigid body motion (at a constant x-velocity 0.4m/s).

Then I wrote a UDF to define the right edge's motion as below. It is also very simple and compiled successfully. But using this UDF, I can not preview the expected motion (the right edge doesn't move at all and no dynamic mesh appears). Could anyone check this UDF and tell me the reason? Thanks a lot.

#include "udf.h"

DEFINE_CG_MOTION(translation, dt, vel, omega, time, dtime)

{ /* reset velocities */

NV_S(omega, =, 0.0);

if(!Data_Valid_P())

return;

/* set x-component of velocity */

vel[0]=-0.4;

}
  Reply With Quote

Old   April 18, 2004, 06:53
Default Re: Problem related with UDF for dynamic mesh
  #2
emma
Guest
 
Posts: n/a
Hi,

Just add the line '#include "dynamesh_tools.h"' before DEFINE_CG_MOTION..........

Regards, Emma
  Reply With Quote

Old   April 18, 2004, 10:51
Default Re: Problem related with UDF for dynamic mesh
  #3
Ryan
Guest
 
Posts: n/a
The result is the same as the old one. Right wall still don't move, and no new mesh generates.
  Reply With Quote

Old   April 18, 2004, 11:09
Default Re: Problem related with UDF for dynamic mesh
  #4
Ryan
Guest
 
Posts: n/a
Hi, Emma,

Is there any other adjustment required? I am really confused.

Best regards,

Ryan
  Reply With Quote

Old   April 19, 2004, 02:43
Default Re: Problem related with UDF for dynamic mesh
  #5
Ryan
Guest
 
Posts: n/a
Hi, Emma,

I have solved this problem. Looking backward, I find that I made a very stupid mistake all the time. Before, I only read the case file to preview the dynamic mesh. Today, I found that it is impossible to preview it successfully without reading the data file together.

Thanks & regards,

Ryan

  Reply With Quote

Old   April 29, 2004, 03:25
Default Re: Problem related with UDF for dynamic mesh
  #6
emma
Guest
 
Posts: n/a
Hi, Ryan,

Congratulations!

Actually, you can see the mesh motion before it is iterated by reading your original case file (motion not yet), including successful compiling,defining the correspondent dynamic mesh parameter and zones, and pressing solve-mesh motion, you just need to give the number of time steps and the display frequency. I mean, if you only want to see the mesh motion and to check if there are no negative volumes during the mesh motion. By reading data file, you can get as many distributions of different parameters during the dynamic process as you want.

Regards

Emma
  Reply With Quote

Old   April 29, 2004, 09:29
Default Re: Problem related with UDF for dynamic mesh
  #7
Ryan
Guest
 
Posts: n/a
Hi, emma

Thanks for your message. But the situation I faced is a bit different. When only case file exists (I mean all are ready, including udf compling and setting parameters and zones, only without saving data file), I can't preview the mesh motion through "solve-mesh motion" operation. Only when I save the data file can it be successful.

By the way, do you know the exact meaning of the data in case file? Now I am facing another problem: original case file is OK, but the case file of later time step can't be saved completely (for example, the size of original is 800k, but later one often stops at 600k). I tried to open the case file through other text-editor software, but could not understand the data in case file. If you know it and have time, would you help me check it? Anyway, thanks a lot.
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Mesh Problem. Tom Clark FLUENT 10 June 21, 2021 04:27
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52
problem related to mesh naveen CFX 3 March 25, 2006 08:47
unstructured vs. structured grids Frank Muldoon Main CFD Forum 1 January 5, 1999 10:09


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