# Problem related with UDF for dynamic mesh

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 16, 2004, 06:03 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; }

 April 18, 2004, 06:53 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

 April 18, 2004, 10:51 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.

 April 18, 2004, 11:09 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

 April 19, 2004, 02:43 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

 April 29, 2004, 03:25 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

 April 29, 2004, 09:29 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.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20 aeroslacker Open Source Meshers: Gmsh, Netgen, CGNS, ... 12 January 19, 2012 04:52 Tom Clark FLUENT 9 July 7, 2010 07:56 naveen CFX 3 March 25, 2006 09:47 Frank Muldoon Main CFD Forum 1 January 5, 1999 11:09

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

 Contact Us - CFD Online - Top