CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Dynamic mesh problem - using DEFINE_CG_MOTION (https://www.cfd-online.com/Forums/fluent-udf/80920-dynamic-mesh-problem-using-define_cg_motion.html)

sk8erb0i October 11, 2010 09:08

Dynamic mesh problem - using DEFINE_CG_MOTION
 
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,

dmoroian October 14, 2010 09:02

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.

lehoang_mai October 17, 2010 17:42

Hey, guy! Can I simulate steady flow with udf DEFINE_CG_MOTION (dynamic mesh)? I mean airship make motion with velocity 12m/s. Regards!

dmoroian October 18, 2010 01:56

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!

lehoang_mai October 18, 2010 04:37

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.
http://farm5.static.flickr.com/4148/...20d0dab1_z.jpg
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!

dmoroian October 18, 2010 04:51

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.

lehoang_mai October 18, 2010 05:27

Quote:

Originally Posted by dmoroian (Post 279553)
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!

dmoroian October 18, 2010 05:37

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.

lehoang_mai October 18, 2010 05:59

Quote:

Originally Posted by dmoroian (Post 279572)
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

dmoroian October 18, 2010 06:26

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.

lehoang_mai October 18, 2010 06:41

Quote:

Originally Posted by dmoroian (Post 279587)
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?

dmoroian October 18, 2010 07:18

Quote:

Originally Posted by lehoang_mai (Post 279590)
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.

lehoang_mai October 18, 2010 07:33

Quote:

Originally Posted by dmoroian (Post 279596)
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!

dmoroian October 18, 2010 07:43

Yes, that looks correct.

lehoang_mai October 18, 2010 08:38

Thanks for advice!
this is considered motion fo the train toward, isn't this?

rasoulgharaei August 2, 2011 03:14

combination of 2 dynamicFvMesh
 
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


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