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

Dynamic Mesh Preview Error in simulation of undulation motion using UDF!

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2017, 00:09
Smile Dynamic Mesh Preview Error in simulation of undulation motion using UDF!
  #1
New Member
 
xiao
Join Date: May 2011
Posts: 6
Rep Power: 15
h04581803 is on a distinguished road
hi,moring everyone:
i am now implementing the simulation on sinusoidal undulation of fish with dynamic mesh technology in ANSYS FLUENT, the undulation function is imported into FLUENT with the macro DEFINE_CG_MOTION, and the udf can be successfully built and loaded.
Now the problem is that the preview of dynamic mesh cann‘t be accomplished smoothly , the error dialogue box pops up once i click the "preview" botton, and at the same time ,the profile of fish changes in a very strange way: the two lines(white solid lines in the figure below) merge into a single line after previewing, and the error dialogue box is always poping up again after i click the OK botton, and i can still see the motion of fish (a singe line), i was so puzzled , is there any problem with my mesh or with my code? i will be really appreciated if anyone can provide some information, thanks again.
appendixes are the initial status of hydrofoil and the status after clicking preview botton, respectively:
Attached Images
File Type: jpg 11.jpg (138.8 KB, 56 views)
File Type: jpg 22.jpg (194.2 KB, 49 views)
h04581803 is offline   Reply With Quote

Old   September 20, 2017, 04:44
Smile
  #2
New Member
 
xiao
Join Date: May 2011
Posts: 6
Rep Power: 15
h04581803 is on a distinguished road
can anyone help me?
h04581803 is offline   Reply With Quote

Old   September 21, 2017, 22:06
Default
  #3
New Member
 
xiao
Join Date: May 2011
Posts: 6
Rep Power: 15
h04581803 is on a distinguished road
hi everyone, now the error problem is solved by setting the interface circle and the corresponding internal domain as ""deforming" boundaries, and the mesh can be previewed , but the hydrofoil (two white solid lines) still merge into one single line once they start to undulate. DOES this imply that sth is wrong with my UDF?
h04581803 is offline   Reply With Quote

Old   September 22, 2017, 01:28
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Hello

how in your opinion people can help you if you do not show any data. no case settings, no udf?


Best regards
pakk likes this.
AlexanderZ is offline   Reply With Quote

Old   September 23, 2017, 09:55
Default
  #5
New Member
 
xiao
Join Date: May 2011
Posts: 6
Rep Power: 15
h04581803 is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
Hello

how in your opinion people can help you if you do not show any data. no case settings, no udf?


Best regards
Thanks for your kind advice, i will post my UDF and the settings of dynamic mesh.
the undulation.c, a program of hydrofoil , can be expressed as follows:
//
#include "udf.h"
#include "dynamesh_tools.h"
#include "math.h"
#define U 40.05
#define L 1.00
#define a0 0.02
#define a1 0.08
#define a2 0.16

DEFINE_GRID_MOTION(undulation005_fish, domain, dt, time, dtime)
{
Thread *tf = DT_THREAD(dt); /* pointer to a thread*/
face_t f;
int n;
Node *node_p;
real A, x, y, wave, sign;
real St = 0.05;

/* set deforming flags */

SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));

begin_f_loop(f, tf)
{
f_node_loop(f, tf, n)
{
node_p = F_NODE(f, tf, n);

if (NODE_POS_NEED_UPDATE(node_p))
{
NODE_POS_UPDATED(node_p);
x = NODE_X(node_p);
A = a0 - a1*x + a2*x*x;
wave = 2 * M_PI / L;
sign = x - St * U * time;
y = A * sin(wave*sign);
NODE_Y(node_p) = y;


}
}
}
end_f_loop(f, tf);
}
h04581803 is offline   Reply With Quote

Old   September 23, 2017, 10:05
Default
  #6
New Member
 
xiao
Join Date: May 2011
Posts: 6
Rep Power: 15
h04581803 is on a distinguished road
and chose "Smoothing and Remeshing" as the mesh update methods, the corresponding settings are displayed below:
Attached Images
File Type: png ???.png (18.6 KB, 32 views)
h04581803 is offline   Reply With Quote

Old   September 26, 2017, 06:42
Default
  #7
New Member
 
xiao
Join Date: May 2011
Posts: 6
Rep Power: 15
h04581803 is on a distinguished road
can anybody help me, please?
h04581803 is offline   Reply With Quote

Old   February 3, 2021, 01:10
Default
  #8
New Member
 
Mohamed Ayman
Join Date: Jan 2021
Posts: 2
Rep Power: 0
Mohamed_Ayman is on a distinguished road
Hello!...Did you solved your problem?....I am simulating the same case of you
Mohamed_Ayman is offline   Reply With Quote

Old   February 4, 2021, 10:31
Default
  #9
New Member
 
Marcelo Ruiz
Join Date: Feb 2021
Location: Italy
Posts: 17
Rep Power: 5
CFDavatar is on a distinguished road
They answered already. You have to use DEFINE_GRID_MOTION() macro, you can find the code in early replies
CFDavatar is offline   Reply With Quote

Old   March 17, 2021, 02:58
Default
  #10
New Member
 
Mohamed Ayman
Join Date: Jan 2021
Posts: 2
Rep Power: 0
Mohamed_Ayman is on a distinguished road
I have compiled the same UDF and it worked!....But still facing the same problem of two lines merging....If anyone solved this problem can suggest me a solution?

Thanks in advance
Mohamed_Ayman is offline   Reply With Quote

Old   July 27, 2021, 16:22
Unhappy
  #11
New Member
 
Join Date: Oct 2017
Posts: 18
Rep Power: 9
fadoobaba is on a distinguished road
I have the lines merging problem as well.
fadoobaba is offline   Reply With Quote

Reply

Tags
ansys fluent, dynamic mesh, udf


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
UDF controlled dynamic mesh problem joson_gu Fluent UDF and Scheme Programming 0 September 6, 2017 21:01
udf for valve closing a pipe using dynamic mesh chem engineer Fluent UDF and Scheme Programming 2 May 13, 2017 10:39
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
UDF applied dynamic mesh and mesh motion in the same time lostmmind Fluent UDF and Scheme Programming 7 April 6, 2015 10:57
Dynamic mesh Problem: How can I set UDF to the motion of train? Majid Zarif Fluent UDF and Scheme Programming 4 January 27, 2015 03:44


All times are GMT -4. The time now is 04:48.