CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Dynamic mesh, hinged flap (http://www.cfd-online.com/Forums/fluent/75553-dynamic-mesh-hinged-flap.html)

Randre April 28, 2010 13:52

Dynamic mesh, hinged flap
 
2 Attachment(s)
Hi

I'm simulating the reaction of a hinged flap to the ocean waves in 2D and 3D. 2D mesh is triangular and 3d is tetrahedral. My domain repesents only the fluid zone, with the following BC:
top - pressure outlet
left wall - velocity inlet
right wall - wall
bottom - wall
flap - wall

When I run the simulation without moving mesh, only to check the propagation of the waves with the flap stationary all is well and the solution converges.

However, when I activate dynamic mesh method for rigid body motion, naming smoothing, remeshing and 6DOF, the solution diverges even with a very (very!) refined mesh.

The 6DOF UDF with DEFINE_SDOF_PROPERTIES macro only permits rotation in z-axxis and the dynamic mesh zones are: Flap (6DOF solver options - ON) and interior fluid ((6DOF solver options - ON and PASSIVE) and body CG is also considered.

Multiphase model: VOF, open channel flow, implicit body force
Turbulence model: k-e realizable

Solution methods
scheme: PISO
pressure: PRESTO!
momentum: 3rd order MUSCL
rest: default

Time step is 0.01s with 20 iterations TS.

What I am missing???

Best regards

-mAx- April 29, 2010 02:09

did you checked your mesh motion?
No skewed cells or whatever?

Randre April 29, 2010 05:52

i've checked mesh motion for a determined number of TS. The statistics (and warnings) with a 2D very refined mesh are the following:

Updating...
Warning: dynamic mesh zone 1 (flap wall) with different CG uses 6DOF...
6DOF flap::libudf:: reference CG (1.00100002e+1, -2.00000000e+0.000)
6DOF flap::libudf:: different CG (1.00100002e+1, -2.00000000e+0.000)
and exactly same warning for fluid interior. What about this warning, CG is the same! What does it mean?

Dynamic mesh statistics
Minimum volume = 5.00011e-004
maximum volume = 1.25002e-003
Maximum Cell Skew = 4.71557e-001

Wich are the same for each TS. Please, check first post for refined mesh / flap detail.

Thank you

-mAx- April 29, 2010 06:00

Does it mean that you defined the fluid interior as rigid body?
Is your motion in accordance with your wish?

Randre April 29, 2010 07:07

I didn't saw any motion... while it was doing calculations my mesh disappear (I've got display mesh option checked).

edit: Now i've made some changes and previewed mesh motion and all of the domain rotate (fluid + flap) and then stopped : Negative cell volume detected and the right wall of the domain was all messed up.

2nd edit: Well, i've made a research within fluentusers files and noticed something in example of 2D store separation:

"DM philosophy:

- Move the zone fluid-bl and wall-store using rigid body motion.
- The fluid-bl zone is moved with the store in order to maintain a high quality boundary mesh around store. "


which means that one possible error is my definition in dynamic mesh zones, I'm applying rigid body motion to ALL fluid domain....

I'm going to create a boundary zone around flap to check if it works.

One more question: it is possible to be something wrong with the flap definition? I've suppressed it from fluid zone an bottom wall now has a little gap

-mAx- April 29, 2010 08:47

Quote:

Originally Posted by Randre (Post 256809)
which means that one possible error is my definition in dynamic mesh zones, I'm applying rigid body motion to ALL fluid domain....

yes you need to define the region surrounding your flap with sypecify continuum tool (eg: to treat it separately as the remaining fluid domain.

Quote:

Originally Posted by Randre (Post 256809)
One more question: it is possible to be something wrong with the flap definition? I've suppressed it from fluid zone an bottom wall now has a little gap

post a picture prior to iterations, and another one with this issue

Randre April 29, 2010 11:13

1 Attachment(s)
Quote:

Originally Posted by -mAx- (Post 256827)
region surrounding your flap with sypecify continuum tool (eg: to treat it separately as the remaining fluid

Is that available were? My pre-processing software is DM / Meshing from WB 12 . I defined a separate box in DM, then remeshed all domain, but when I tested mesh motion all of the box has moved... :mad:

don't know what to...

Thanks for your support!

-mAx- April 30, 2010 02:19

Continuum Tool is for gambit.
For DM, I don't know, but for sure there should be something like the one in gambit. (Look in boundary conditions, or something like that)
...
Just for information, in your picture the box which has moved, doesn't seem to be connected to the other domain. Else you should receive error regarding skewed cells, etc...
Or pehaps you are dealing with interfaces

Randre April 30, 2010 12:35

1 Attachment(s)
Hi again

Got a new development. Check attach. How do I avoid that? I will try to increase mesh refinement around fluid block.

My fluid block is connected to two BC:
Bottom, in white - Wall;
at back, in yellow - Symmetry.

Could that be the reason to this error? My fluid block cannot be connected to other BC that aren't in my dynamic mesh zones?

And seems that the flap is rotating by its CG. How do I restrict rotation for its foundations?

My UDF is very simple, and I guess that it would do what I want, any help?

DEFINE_SDOF_PROPERTIES(flap, prop, dt, time, dtime)


{
/* Define the mass matrix */

prop[SDOF_MASS] = 480.0;
prop[SDOF_IXX] = 0.066667;
prop[SDOF_IYY] = 0.000167;
prop[SDOF_IZZ] = 0.288;

/* Define the Degrees of Freedom allowed - Only z rotation is allowed */

prop[SDOF_LOAD_LOCAL] = TRUE; /* Determine wheter the forces and moments are expressed in terms of global coordinates(false) or body coordinates
(true) */

prop[SDOF_ZERO_TRANS_X] = TRUE;
prop[SDOF_ZERO_TRANS_Y] = TRUE;
prop[SDOF_ZERO_TRANS_Z] = TRUE;
prop[SDOF_ZERO_ROT_X] = TRUE;
prop[SDOF_ZERO_ROT_Y] = TRUE;

-mAx- May 3, 2010 02:01

the fluid domain around your flap doesn't seem to move

Randre May 3, 2010 06:00

I've changed Dynamic Mesh conditions and now seems that the fluid domain around the flap ajusts to the movement. But something is wrong, when I initialize the solution the flap starts to move immediately in the opposite direction of flow! I need the flap to move when pressure conditions around it changes. Is something wrong with my UDF? I don't apply any force or momentum to it!

-mAx- May 3, 2010 06:34

before turning on your udf, check your motion with a simple velocity profile.

Randre May 3, 2010 07:08

1 Attachment(s)
New update, Mesh motion is correct now, but when I initialize the solution, everything goes wrong.

-mAx- May 3, 2010 07:42

initialized with your udf or profile?

Randre May 3, 2010 09:08

I've got two UDF's. One is related to ocean waves, where linear ocean wave theory is applied. The other one is presented in this thread. I've initialized with a constant velocity of 2 m/s at the inlet zone, and the result is also wrong.

Don't know why but the flap moves right in the first TS of my simulation, and that's inconsistent with the distance of it from velocity inlet boundary - 10 meters. The flap doesn't move due to pressure difference. Are BC wrong?

Thank you

Coffstah August 29, 2010 22:47

I'm trying to do something very similar to this. I am simulating a heart valve and I want the leaflets to rotate in only one direction, and was hoping to use the built in 6-dof. I am very confused by this discussion though. Particularly the sample UDF you posted Randre. I don't see any evidence of the properties you used to constrain only z rotation (i.e. SDOF_ZERO_ROT_X) in the documentation. Do these properties actually exist? Is there any documentation of them I can see? Is it actually possible to do this with the built in 6-dof, or do I have to calculate the motion on my own.

Randre September 1, 2010 16:49

Do you know the work of K.Dumont from Gent University about numerical modeling of heart valve dynamics? Try a quick search in google and you'll find out information related to it.
To restrict a certain object to only one degree of freedom, you will need to use the built in 6DOF solver in dynamic mesh options and the following UDF:

#include "udf.h"
{
DEFINE_SDOF_PROPERTIES(flap, prop, dt, time, dtime)

prop[SDOF_MASS] = x;
prop[SDOF_IXX] = x;
prop[SDOF_IYY] = xx;
prop[SDOF_IZZ] = xxx;

prop[SDOF_ZERO_TRANS_X] = TRUE;
prop[SDOF_ZERO_TRANS_Y] = TRUE;
prop[SDOF_ZERO_TRANS_Z] = TRUE;
prop[SDOF_ZERO_ROT_X] = TRUE;
prop[SDOF_ZERO_ROT_Y] = TRUE;
}
And this will restrict the translation movement in x,y,z and rotation in x and y.

giov_ingr March 23, 2011 20:39

Help please
 
Hello
I have a question about the
SDOF_ZERO_TRANS e SDOF_ZERO_ROT properties.
When I try to compile the UDF with these strings FLUENT shows me that it cannot recognize these strings :confused:.

Could you help me please?
Here there is my UDF

#include <stdio.h>
#include <math.h>
#include "udf.h"

DEFINE_CG_MOTION(CG, dt, vel, omega, time, dtime)
{
real ampl,disp,omg,count;

/* reset velocities */
NV_S (vel, =, 0.0);
}

DEFINE_SDOF_PROPERTIES(eolico, prop, dt, time, dtime)
{

prop[SDOF_MASS] = 0.022;
prop[SDOF_IXX] = 3e-3;
prop[SDOF_IYY] = 2e-5;
prop[SDOF_IZZ] = 3.02e-3;

prop[SDOF_LOAD_LOCAL] = TRUE;
prop[SDOF_ZERO_TRANS_X] = TRUE;
prop[SDOF_ZERO_TRANS_Y] = TRUE;
prop[SDOF_ZERO_TRANS_Z] = TRUE;
prop[SDOF_ZERO_ROT_X] = TRUE;
prop[SDOF_ZERO_ROT_Y] = TRUE;


printf ("\n2d_eolico Updated 6DOF properties");
}

Thank you for your attention

mamyjooooon April 9, 2011 13:40

Hello giovanni and Randre and...
I have the some problem about the
SDOF_ZERO_TRANS e SDOF_ZERO_ROT properties.

i want to solve flow in a radial turbine wheel(with high RPM).
Because the flow work is done on the blades to make the blades rotating,I decided to use dynamics mesh with 6dof.
When I try to compile the UDF,FLUENT shows me:

..\..\src\stage.c(6) : error C2065: 'SDOF_ZERO_TRANS_X' : undeclared identifier
..\..\src\stage.c(7) : error C2065: 'SDOF_ZERO_TRANS_Y' : undeclared identifier
..\..\src\stage.c(8) : error C2065: 'SDOF_ZERO_TRANS_Z' : undeclared identifier
..\..\src\stage.c(9) : error C2065: 'SDOF_ZERO_ROT_X' : undeclared identifier
..\..\src\stage.c(10) : error C2065: 'SDOF_ZERO_ROT_Y' : undeclared identifier

Here there is my UDF
Quote:


#include"udf.h"

DEFINE_SDOF_PROPERTIES(stage, prop, dt, time, dtime)
{

/* Define the mass matrix */

prop[SDOF_MASS] = 0.02;
prop[SDOF_IXX] = 0.000067;
prop[SDOF_IYY] = 0.000067;
prop[SDOF_IZZ] = 0.000288;

/* Define the Degrees of Freedom allowed - Only z rotation is allowed */

prop[SDOF_ZERO_TRANS_X] = TRUE;
prop[SDOF_ZERO_TRANS_Y] = TRUE;
prop[SDOF_ZERO_TRANS_Z] = TRUE;
prop[SDOF_ZERO_ROT_X] = TRUE;
prop[SDOF_ZERO_ROT_Y] = TRUE;
printf (
"\nstage: updated 6DOF properties");
}


Could you help me please?
Thank you. Kind regards, mamadreza

giov_ingr April 9, 2011 13:53

Answer
 
hello mamyjoooon,
I have the answer...
The SDOF properties about the zero trans and zero rot are valid only for ansys fluent!! I think from the 10.0 version until 13.0 one.
I used my UDF on ANSYS FLUENT 13.0 and finally it works!!
If anybody knows how to set these properties on fluent 6.2 version please tell me.

Have a good work! :)


All times are GMT -4. The time now is 23:56.