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 problem - using DEFINE_CG_MOTION

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By dmoroian

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2010, 10:08
Default Dynamic mesh problem - using DEFINE_CG_MOTION
  #1
New Member
 
Pham Khac viet
Join Date: Oct 2010
Posts: 1
Rep Power: 0
sk8erb0i is on a distinguished road
Hello everyone,

I'm trying simulate for an airship rotating with omega= 1 deg/s and v = 12m/s
Here is my meshed geometry.

http://img839.imageshack.us/img839/2809/airship1.jpg
http://img411.imageshack.us/img411/65/airship2.jpg

My UDF file...
Quote:
#include "udf.h"
#include "mem.h"
#include "dynamesh_tools.h"
DEFINE_CG_MOTION(quayz,dt,vel,omega,time,dtime)
{
Thread *t;
face_t f;
Domain *domain= Get_Domain (2);
Thread *tf1 = Lookup_Thread (domain, 2);
t= DT_THREAD((Dynamic_Thread*)dt);
omega[2]=-0.01745; */
}
I defined dynamicmesh zone like that..
http://img38.imageshack.us/img38/759/airship3.jpg

But when i run calculation, the static pressure at airship can't display
Error: (ani-monitor-update 1 #t #f)

I would very glad if anyone can help me.
Thank you so much.

Regards,
sk8erb0i is offline   Reply With Quote

Old   October 14, 2010, 10:02
Default
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
For this case I would suggest a sliding mesh approach instead of the dynamic. You don't have to change anything (maybe the definition of the interface between the 2 rotating domains), on the contrary, it doesn't need the udf DEFINE_CG_MOTION. The rotating speed should be defined in a menu panel. On top of this, the sliding mesh seems to be slightly faster than the dynamic mesh approach.
dmoroian is offline   Reply With Quote

Old   October 17, 2010, 18:42
Default
  #3
Member
 
lehoang_mai's Avatar
 
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16
lehoang_mai is on a distinguished road
Hey, guy! Can I simulate steady flow with udf DEFINE_CG_MOTION (dynamic mesh)? I mean airship make motion with velocity 12m/s. Regards!
lehoang_mai is offline   Reply With Quote

Old   October 18, 2010, 02:56
Default
  #4
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
I'm curious how are you going to define the motion, if you don't have time as a variable in your computation?
In any case, the macro DEFINE_CG_MOTION needs time as input variable, so, I don't expect it to run for a stationary case... but you never know until you don't try it!
dmoroian is offline   Reply With Quote

Old   October 18, 2010, 05:37
Default
  #5
Member
 
lehoang_mai's Avatar
 
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16
lehoang_mai is on a distinguished road
Thank you for advice!
Can you help me in this problem? This problem I took when I readed about "Moving Zones", in the 1-st point of "Introduction"
http://progdata.umflint.edu/MAZUMDER/Fluent/Intro%20Training/L-9%20Moving%20Zones.pdf
I want to simulate steady flow of train in tunnel(natural case),i.e simple motion of train toward.

I don't know macro DEFINE_CG_MOTION can or cannot calculate it with dynamic mesh in steady flow.
I try run it with Single Translational Reference. by set
- Fluid> moving reference frame> set Translational X-velocity to 50m/s.
- Wall> moving wall> adjacent to the cells zone> set zero of velocity.
- Iterate.
But I'm not sure I'm right, because in 3D it isn't run . Please tell me how to solve it!
Thank you very much!
lehoang_mai is offline   Reply With Quote

Old   October 18, 2010, 05:51
Default
  #6
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Why do you want to use dynamic mesh approach for this problem?
Just set the inlet velocity to 12 m/s, zero gradient outlet, walls on the tunnel and train, and start iterate.
dmoroian is offline   Reply With Quote

Old   October 18, 2010, 06:27
Default
  #7
Member
 
lehoang_mai's Avatar
 
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16
lehoang_mai is on a distinguished road
Quote:
Originally Posted by dmoroian View Post
Why do you want to use dynamic mesh approach for this problem?
Just set the inlet velocity to 12 m/s, zero gradient outlet, walls on the tunnel and train, and start iterate.
With this case, I got it. This is as experimental case. a I want to set natural case with Motion of Train(toward). so, this is my problem. Do you know how to set it in Fluent?
Thanks for answer!
lehoang_mai is offline   Reply With Quote

Old   October 18, 2010, 06:37
Default
  #8
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Sorry, but I'm confused.
If you need a relative motion between the walls of the tunnel and train, then you will need some sort of moving mesh approach.
If you want to setup the problem as a stationary one, then you probably have to use MRF approach, otherwise for sliding mesh or dynamic mesh, I think you have to use an unsteady approach.
dmoroian is offline   Reply With Quote

Old   October 18, 2010, 06:59
Default
  #9
Member
 
lehoang_mai's Avatar
 
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16
lehoang_mai is on a distinguished road
Quote:
Originally Posted by dmoroian View Post
Sorry, but I'm confused.
If you need a relative motion between the walls of the tunnel and train, then you will need some sort of moving mesh approach.
If you want to setup the problem as a stationary one, then you probably have to use MRF approach, otherwise for sliding mesh or dynamic mesh, I think you have to use an unsteady approach.
Sorry for description!
Yes, my problem is stationary, at all time train in tunnel(as andless tunnel and train make motion in it). Simple, I don't want set velocity in INLET, a want set motion of train itself, but not dependence at time. I think I need use MRF. Please let me how to set it in detail!
Thanks for help!
Problem is in this
http://progdata.umflint.edu/MAZUMDER/Fluent/Intro%20Training/L-9%20Moving%20Zones.pdf
lehoang_mai is offline   Reply With Quote

Old   October 18, 2010, 07:26
Default
  #10
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
If your tunnel has a simple surface (like a cylinder for instance), then you don't need to use even the MRF approach. Just set translational velocities on the walls of the tunnel.
So, setup a velocity inlet, translational velocity on the walls of the tunnel, fixed walls on the train, zero gradient, or pressure outlet and steady state solution. You can think of this as a the train stands still and the tunnel passes by it.
If you still want MRF, check the Tutorial Guide, chap. 9 and 10. There you can find a step by step explanation on how to set it up.
irancell340 likes this.
dmoroian is offline   Reply With Quote

Old   October 18, 2010, 07:41
Default
  #11
Member
 
lehoang_mai's Avatar
 
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16
lehoang_mai is on a distinguished road
Quote:
Originally Posted by dmoroian View Post
If your tunnel has a simple surface (like a cylinder for instance), then you don't need to use even the MRF approach. Just set translational velocities on the walls of the tunnel.
So, setup a velocity inlet, translational velocity on the walls of the tunnel, fixed walls on the train, zero gradient, or pressure outlet and steady state solution. You can think of this as a the train stands still and the tunnel passes by it.
Thanks for answers!
- A how to set translational velocity on the walls of the tunnel? ----train stands still----
- If I want to set motion of train, so I going to use MRF, I'm right?
lehoang_mai is offline   Reply With Quote

Old   October 18, 2010, 08:18
Default
  #12
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Quote:
Originally Posted by lehoang_mai View Post
Thanks for answers!
- A how to set translational velocity on the walls of the tunnel? ----train stands still----
This is really basic, check the User Guide, 7.3.14 Wall Boundary Conditions, Wall Motion paragraph.

Quote:
- If I want to set motion of train, so I going to use MRF, I'm right?
All the methods discussed here set in fact the motion of the train. The latest approaches (including MRF) do not modify the mesh and are available for steady state calculation, as you requested.
dmoroian is offline   Reply With Quote

Old   October 18, 2010, 08:33
Default
  #13
Member
 
lehoang_mai's Avatar
 
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16
lehoang_mai is on a distinguished road
Quote:
Originally Posted by dmoroian View Post
All the methods discussed here set in fact the motion of the train. The latest approaches (including MRF) do not modify the mesh and are available for steady state calculation, as you requested.
Dear dmoroian!
Thank you very much! I'm thankful for your replies!
Could you say me for detail how to set motion of the train in my problem with MRF?
I had run it by set
- Fluid> moving reference frame> set Translational X-velocity to 50m/s.
- Wall(of the train)> moving wall> adjacent to the cells zone> set zero of velocity.
- Iterate
Let me know, this is right?
Regards!
lehoang_mai is offline   Reply With Quote

Old   October 18, 2010, 08:43
Default
  #14
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Yes, that looks correct.
dmoroian is offline   Reply With Quote

Old   October 18, 2010, 09:38
Default
  #15
Member
 
lehoang_mai's Avatar
 
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16
lehoang_mai is on a distinguished road
Thanks for advice!
this is considered motion fo the train toward, isn't this?
lehoang_mai is offline   Reply With Quote

Old   August 2, 2011, 04:14
Default combination of 2 dynamicFvMesh
  #16
New Member
 
Rasoul
Join Date: Nov 2010
Posts: 3
Rep Power: 16
rasoulgharaei is on a distinguished road
Hi all,
I could with combination of three solvers in OpenFOAM-1.5-dev Include
interDyMFoam, stressedFoam and icoFsiFoam, I created a new solver
(interDyMFsiFoam) but I have problem to make appropriate case for this solver.
The model that I want to design is a rigid tank of liquid with an
elastic baffle in the middle of it. This tank, oscillate with a
Specified frequency and amplitude. For this purpose I used the
solidBodyMotionFvMesh method in dynamicMeshDict file of constant
folder. While for expression of the elastic baffle motion caused by
sloshing of liquid, dynamicMotionSolverFvMesh method should be used in
dynamicMeshDict file. Note that only one method can be used in
dynamicMeshDict file, so It seems the only way is combining these two
methods (solidBodyMotionFvMesh & dynamicMotionSolverFvMesh) and to
obtain a new method that include the oscillating motion of the liquid
tank and the elastic baffle motion. Is this way really possible and
give me correct answer? I am very grateful if you guide me in this
case. If you have any other ideas I would be hear. It should be noted
that all the actions I've done in OpenFOAM-1.5-dev.

regards,
Rasoul Gharaei
rasoulgharaei 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
Dynamic Mesh problem Paul_321 FLUENT 11 August 11, 2009 12:32
problem on dynamic mesh zone erkan FLUENT 2 January 8, 2009 17:01
CFD-3D flow problem using Dynamic mesh method. Sar_mech FLUENT 1 November 27, 2008 22:17
Dynamic Mesh Problem - please help! Hila FLUENT 0 August 19, 2006 05:19
Dynamic mesh problem Sampath FLUENT 1 October 13, 2004 07:44


All times are GMT -4. The time now is 21:47.