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 Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 19, 2017, 23: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: 12
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, 49 views)
File Type: jpg 22.jpg (194.2 KB, 44 views)
h04581803 is offline   Reply With Quote

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

Old   September 21, 2017, 21:06
Default
  #3
New Member
 
xiao
Join Date: May 2011
Posts: 6
Rep Power: 12
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, 00:28
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,639
Rep Power: 23
AlexanderZ 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, 08:55
Default
  #5
New Member
 
xiao
Join Date: May 2011
Posts: 6
Rep Power: 12
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, 09:05
Default
  #6
New Member
 
xiao
Join Date: May 2011
Posts: 6
Rep Power: 12
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, 30 views)
h04581803 is offline   Reply With Quote

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

Old   February 3, 2021, 00: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, 09:31
Default
  #9
New Member
 
Marcelo
Join Date: Feb 2021
Posts: 5
Rep Power: 2
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, 01: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

Reply

Tags
ansys fluent, dynamic mesh, udf

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
UDF controlled dynamic mesh problem joson_gu Fluent UDF and Scheme Programming 0 September 6, 2017 20:01
udf for valve closing a pipe using dynamic mesh chem engineer Fluent UDF and Scheme Programming 2 May 13, 2017 09:39
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
UDF applied dynamic mesh and mesh motion in the same time lostmmind Fluent UDF and Scheme Programming 7 April 6, 2015 09: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 02:44


All times are GMT -4. The time now is 14:03.