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

UDF applied dynamic mesh and mesh motion in the same time

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2015, 03:09
Arrow UDF applied dynamic mesh and mesh motion in the same time
  #1
New Member
 
shuoyuanxu
Join Date: Jun 2014
Posts: 9
Rep Power: 12
lostmmind is on a distinguished road
Hi guys

I'm working on a car electroplate case. It is about a car rotate and translate in a big water tank. I tried dynamic mesh for both rotation and translation. But as you can imagine, the mesh twisted so hard and give me errors about negative volume. So i am thinking about applying interface boundary for the car rotational region, and apply mesh motion in it. Then use dynamic mesh only for the outter interface which does not rotate.

Anyone done that before? Is that possible? please help me, my boss is killing me

Thank you.
lostmmind is offline   Reply With Quote

Old   March 16, 2015, 21:22
Talking hahaha
  #2
New Member
 
shuoyuanxu
Join Date: Jun 2014
Posts: 9
Rep Power: 12
lostmmind is on a distinguished road
I nailed it!! write a udf contains both CG_MOTION and ZONE_MOTION. Compile it and apply ZONE_MOTION in the mesh motion(in cell zone conditions). And apply CG_MOTION in dynamic mesh part.

Here is something important.
1.CG_MOTION should only contain the translational velocity but not the rotational velocity.
2.CG_MOTION should be applied to all the moving boundaries including those you already defined in mesh motion

here is my udf, hope it is helpful.


#include "udf.h"
DEFINE_CG_MOTION(dong, dt, vel, omega, time, dtime)
{
vel[0]=0.1;
vel[1]=-0.3;
vel[2]=0;
}

DEFINE_ZONE_MOTION(rotor, omega, axis, origin, velocity, time, dtime)
{
real ox1, oy1;

*omega = 1;

ox1 = -2.3+0.1*(time+dtime);
oy1 = 0.8-0.3*(time+dtime);
origin[0] = ox1;
origin[1] = oy1;
origin[2] = 0.0;
}
lostmmind is offline   Reply With Quote

Old   March 26, 2015, 05:37
Default
  #3
New Member
 
Join Date: Sep 2014
Posts: 6
Rep Power: 12
shadiparsa is on a distinguished road
Hello and thanks for the case
I am using the DEFINE_GRID_MOTION and the DEFINE_GEOM macros for the UDF of mine. My case is a 2D case with a moving part. I have been getting the negative mesh error constantly and don't know how to solve the problem. Do you have any idea how this can be solve?
shadiparsa is offline   Reply With Quote

Old   March 26, 2015, 20:36
Default hi
  #4
New Member
 
shuoyuanxu
Join Date: Jun 2014
Posts: 9
Rep Power: 12
lostmmind is on a distinguished road
I think the reason you get negative volume is because the displacement of you boundary in some time step is bigger than the size of your mesh, try to coarsen your mesh or reduce the size of you time step.

sorry for reply late, it's been so busy of me.

XU
lostmmind is offline   Reply With Quote

Old   March 27, 2015, 04:18
Default
  #5
New Member
 
Join Date: Sep 2014
Posts: 6
Rep Power: 12
shadiparsa is on a distinguished road
Quote:
Originally Posted by lostmmind View Post
I think the reason you get negative volume is because the displacement of you boundary in some time step is bigger than the size of your mesh, try to coarsen your mesh or reduce the size of you time step.

sorry for reply late, it's been so busy of me.

XU
Hello lostmind
Thanks alot for your reply.
I will try this to see what is the problem but I will post the pictures I get to show you what is going on,I tried first with the very coarse mesh but still got the same error.
https://drive.google.com/file/d/0B1n...ew?usp=sharing
https://drive.google.com/file/d/0B1n...ew?usp=sharing
shadiparsa is offline   Reply With Quote

Old   March 28, 2015, 22:25
Default
  #6
New Member
 
shuoyuanxu
Join Date: Jun 2014
Posts: 9
Rep Power: 12
lostmmind is on a distinguished road
sorry pal, im in china, google is blocked, please try something else. and Dropbox is blocked too.
lostmmind is offline   Reply With Quote

Old   March 28, 2015, 22:34
Default
  #7
New Member
 
shuoyuanxu
Join Date: Jun 2014
Posts: 9
Rep Power: 12
lostmmind is on a distinguished road
and please put some pics about your dynamic mesh settings in Fluent. My email 1067542448@qq.com
lostmmind is offline   Reply With Quote

Old   April 6, 2015, 10:57
Default
  #8
New Member
 
Join Date: Sep 2014
Posts: 6
Rep Power: 12
shadiparsa is on a distinguished road
Thanks lostmmind,I have sent some details to the prescribed email...still stuck with this error!
shadiparsa is offline   Reply With Quote

Reply


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 05:13
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 08:37
dynamic mesh and udf problem boboroo FLUENT 1 January 20, 2008 22:26
UDF, dynamic mesh motion phil FLUENT 0 September 15, 2004 06:42


All times are GMT -4. The time now is 10:38.