|
[Sponsors] |
April 16, 2004, 07:03 |
Problem related with UDF for dynamic mesh
|
#1 |
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, 07:53 |
Re: Problem related with UDF for dynamic mesh
|
#2 |
Guest
Posts: n/a
|
Hi,
Just add the line '#include "dynamesh_tools.h"' before DEFINE_CG_MOTION.......... Regards, Emma |
|
April 18, 2004, 11:51 |
Re: Problem related with UDF for dynamic mesh
|
#3 |
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, 12:09 |
Re: Problem related with UDF for dynamic mesh
|
#4 |
Guest
Posts: n/a
|
Hi, Emma,
Is there any other adjustment required? I am really confused. Best regards, Ryan |
|
April 19, 2004, 03:43 |
Re: Problem related with UDF for dynamic mesh
|
#5 |
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, 04:25 |
Re: Problem related with UDF for dynamic mesh
|
#6 |
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, 10:29 |
Re: Problem related with UDF for dynamic mesh
|
#7 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh Problem. | Tom Clark | FLUENT | 10 | June 21, 2021 05:27 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 04:52 |
problem related to mesh | naveen | CFX | 3 | March 25, 2006 09:47 |
unstructured vs. structured grids | Frank Muldoon | Main CFD Forum | 1 | January 5, 1999 11:09 |